Connect with us

pcboard for remote observatory

Discussion in 'Electronic Basics' started by Bob, Dec 30, 2003.

Scroll to continue with content
  1. Bob

    Bob Guest

    I'm looking for a simple pcboard or kit to make one. I'm pretty much
    a beginner in electronics but I have made one pcboard to open and
    close switches. I use it to keep my telescope from turning to far
    east/west or north/south in a remote observatory. I know how to
    program in C. I want to be able to use the pcboard to open/close a 5V
    relay that will then start/stop a motor that can open close the
    observatory roof. I can make this work with a battery but would like
    to be able to control from inside the house. So I guess I'm looking
    for a simple pcboard that I can program in C to give 5V output.

    Bob C
  2. Chris

    Chris Guest

    Hi, Bob. Your question is kind of vague and has a number of answers,
    depending on how you want to solve your problem.

    1) One IC programmable in C. Get a PIC, and purchase one of the many
    C compilers which are available.

    2) Small stand-alone Single Board Computer. Try the Rabbit. It
    comes with a Dynamic C compiler (an in-house multi-threading C
    compiler), and it's reliable and inexpensive.

    3. A quick 'n' dirty parallel port hack. You can do what you want by
    connecting a perfboard to your parallel port, and putting the relay on
    the perfboard (you'll need a separate wall wart DC power supply for
    the relay -- the port I/O pins don't have that much drive capability).
    If you're doing this from DOS, it's trivial -- get a junker '286, set
    the port for SPP in BIOS, and use outportb() to bit-bang the I/O port
    number. It's more difficult in Windows because of conflicts with the
    OS. You'll need drivers for your device, which are not trivial to
    write. A good place to start with this is Jan Axelson's "Parallel
    Port Complete", a book which goes into great detail on all of this.
    Examples are available for many languages and OS in the book.

    3a) A Q&D PP hack with a kit.
    You might want to look at the Velleman K8000RS Computer Control
    Interface Kit available from Jameco for $139.95 USD in single
    quantities as Jameco #128928. It has 16 optocoupled inputs/relay
    outputs, and includes a disk with C++ source code (DOS only, I
    believe). The Velleman kits are well-made, and a good choice for the
    beginner, with soldering and layout instructions that are easy to

    4) You want to control a large number of relays from a PC. A good
    place to start with this is Measurement Computing CIO-DIO24H, a PC
    board available for $109.00 USD. The ISA card gives you 24
    byte-selectable inputs or outputs, and will give you outputs which can
    source 15 mA and sink 64 mA. While that's not enough to pull a relay
    coil by itself, and there's no diode protection for the TTL-level
    outputs, you can hook up perfboards to the DB-37 connector in the
    back. If you want, you can also order an interface board which hooks
    up to this, and provides the relays. Programming in C in DOS is
    trivial, and you can use the Measurement Computing Universal Library
    routines for C libraries of functions in Visual C. If you have
    questions, you can call their apps people -- they're very helpful.
    I'd recommend against buying a PC card with the relays on the card --
    relay contact arcing in the PC box can sometimes cause your computer
    to hang.

    Or possibly you have something else in mind. These are just the first
    ideas that come to mind -- there's plenty more.

    Your call. Good luck.
  3. Chris

    Chris Guest

    Sorry -- this one got by me. If you're going with 3), you also need a
    transistor(2N3904), diode(1N4002), and a couple of 4.7K resistors per
    relay, as well as the wall wart, to drive each relay. Each pin would
    look something like this:

    | _ | +
    | | | |
    | |_|
    R | RY1
    ___ |/ 12VDC
    Dx o----------------|___|--o---| Q 12VDC Wall Wart
    | |>
    .-. |
    PC Parallel Port R | | |
    | | |
    '-' | -
    GND o-----------------------o-----o--------------------o

    (Vacation day today, if you haven't already guessed! ;-) )

    Good Luck
  4. Bob

    Bob Guest

    Thanks for the lengthy reply. I knew there were different
    possibilities but I didn't know all these options. It was the kind of
    answer I was looking for.

    I really wished I knew about the parallel port option. I can use it
    for several things. From your post I followed the links you
    suggested and ended up at
    Tomi Engdahl's Electronics Pages which had good stuff. I have been
    using Linux for the last 3-4 years and he had a good example in C of
    how to control the parallel port in Linux. He also had a relay
    controlling circuit similiar to yours. I had no problem getting a
    simple LED to go on and off using the different data pins. I don't
    anticipate any major problems in getting the relay to work. But that
    is this weekend's project.

    While I have got the ear of someone who might know, the next project
    after getting the relay to work controlling the open/close of the
    observatory is to make a simple cloud sensor. If you look at you will see what I'm after. My
    question is what exactly is an instrumentation amplifier and a voltage
    controlled oscillator? I have done a lot of searching on the Internet
    but have come up with a ton of hits and not sure which one matches the
    ones mentioned in this article. The peltier module was cheap but are
    these 2 items expensive?

    Thanks again for the reply on the relay. It really helped.

  5. CFoley1064

    CFoley1064 Guest

    the next project
    Good morning, Bob. An instrumentation amplifier is essentially a "function
    block" that reads as inputs two analog voltages, and outputs a voltage which is
    a multiple of the difference between the two inputs. With an IA, you can
    usually control the multiple, or the amplification of the difference voltage,
    by varying one resistor or, in the case of IC IAs, connecting two of several
    different pins together. You can either make one yourself out of op amps and
    precision resistors, or buy an IC that has the op amps and resistors built in.

    A voltage controlled oscillator is another "function block" that reads an input
    voltage, and outputs a frequency proportional to the input voltage.Again, you
    can make one out of discrete components, or purchase an IC that will do the job
    with a couple of ressitors and caps.

    Your plan is to amplify the voltage produced by the peltier junction, then
    convert it to a frequency which can be read by the PC. You probably want to
    set things up so your input frequency is between 0 Hz (dark or equal temp) to
    about 1KHz or so for full illumination in the summer at noon. You also want to
    operate off a single supply voltage if you can.

    Using the $25 USD as a reference, I'd say you could almost certainly hack
    something together that will do the job for less than that price (ICs, passive
    components) as well as being fairly simple and straightforward. If you throw
    in a perfboard and small enclosure from RS, you might be a little over that.

    If you need more help, feel free to email. (Please put "s.e.d." in the subject
    line to bypass spam filter).

    Good luck
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day