# pcboard for remote observatory

B

#### Bob

Jan 1, 1970
0
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.

Thanks,
Bob C

C

#### Chris

Jan 1, 1970
0
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.

Thanks,
Bob C

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.

http://www.rabbitsemiconductor.com/

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.

http://www.lvr.com/

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 follow. http://www.jameco.com/ 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.

http://www.measurementcomputing.com/index.html

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

Chris

C

#### Chris

Jan 1, 1970
0
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.

Thanks,
Bob C

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:

D
.------>|------o----o
| _ | +
| | | |
|-----|\|------'
| |_|
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
Chris

B

#### Bob

Jan 1, 1970
0
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:

D
.------>|------o----o
| _ | +
| | | |
|-----|\|------'
| |_|
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
Chris

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

I really wished I knew about the parallel port option. I can use it
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
www.mtco.com/~jgunn/cloud.htm 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.

Bob

C

#### CFoley1064

Jan 1, 1970
0
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
www.mtco.com/~jgunn/cloud.htm 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.

Bob

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
Chris

S
Replies
0
Views
957
Sparkey
S
M
Replies
8
Views
1K
John Pham
J
Replies
1
Views
311
Replies
4
Views
269
Replies
0
Views
255