Maker Pro
Maker Pro

Basic Logger project

J

Jim

Jan 1, 1970
0
I have a home that is all electric heat. The heaters are controlled
with a Load management system. There are 8 relays that the system uses
to turn on and off the heaters. I'd like to be able to monitor what
relays the system is controlling and how long they were on. Any ideas
on how I could do this cheaply and easily? I have a couple of old pc's
laying around, is there some kind of logger that can feed a pc?

Help! Thanks
 
J

John Fields

Jan 1, 1970
0
I have a home that is all electric heat. The heaters are controlled
with a Load management system. There are 8 relays that the system uses
to turn on and off the heaters. I'd like to be able to monitor what
relays the system is controlling and how long they were on. Any ideas
on how I could do this cheaply and easily? I have a couple of old pc's
laying around, is there some kind of logger that can feed a pc?

---
 
C

CFoley1064

Jan 1, 1970
0
I have a home that is all electric heat. The heaters are controlled
with a Load management system. There are 8 relays that the system uses
to turn on and off the heaters. I'd like to be able to monitor what
relays the system is controlling and how long they were on. Any ideas
on how I could do this cheaply and easily? I have a couple of old pc's
laying around, is there some kind of logger that can feed a pc?

Help! Thanks

The cheapest and easiest method of getting I/O to and from a PC is by using the
parallel port. This assumes you have an old PC (or a '386 and up PC whose
parallel port can be switched in BIOS to SPP), and it also assumes your relays
have DC coils, and the relay drive signals are accessible. Given those two
things, this setup will work for just about any IBM compatible PC. The form of
"bit banging" used will work with a DOS programming language such as QBASIC or
Turbo C. For a Windows application, you will require drivers to interface with
Visual Basic or your language of choice. These drivers, along with a lot of
other relevant technical information, can be found in Jan Axelson's Parallel
Port Complete, available from Lakeview Research, Jameco, Amazon, and many other
sources.

Since you've only got 4 input bits on the SPP, you might want to use a HC157 to
multiplex and read two nybbles. You use the status port to read, and use D0 of
the data output to select which nybble. You will need an external +5VDC +/-
10% power supply to power the IC and the pullup resistors below:

Hardware:

___
R1 .-.-|___|-VCC
___ N.C. | | R2
o--|___|----. | | |
| | |/ |
INPUT 1 V '-| ----------------------o 1A
- |>
| |
o-----------' GND ___
R1 .-.-|___|-VCC
___ N.C. | | R2
o--|___|----. | | |
| | |/ |
INPUT 2 V '-| ----------------------o 2A
- |>
| |
o-----------' GND ___
R1 .-o-|___|-VCC
___ N.C. | . R2
o--|___|----. | | |
| | |/ |
INPUT 3 V '-| ----------------------o 3A
- |>
| |
o-----------' GND
___
R1 .-o-|___|-VCC
___ N.C. | . R2
o--|___|----. | | |
| | |/ |
INPUT 4 V '-| ----------------------o 4A
- |>
| |
o-----------' GND

___
R1 .-.-|___|-VCC
___ N.C. | | R2
o--|___|----. | | |
| | |/ |
INPUT 5 V '-| ----------------------o 1B
- |>
| |
o-----------' GND ___
R1 .-.-|___|-VCC
___ N.C. | | R2
o--|___|----. | | |
| | |/ |
INPUT 6 V '-| ----------------------o 2B
- |>
| |
o-----------' GND ___
R1 .-o-|___|-VCC
___ N.C. | . R2
o--|___|----. | | |
| | |/ |
INPUT 7 V '-| ----------------------o 3B
- |>
| |
o-----------' GND
___
R1 .-o-|___|-VCC
___ N.C. | . R2
o--|___|----. | | |
| | |/ |
INPUT 8 V '-| ----------------------o 4B
- |>
| |
o-----------' GND


VCC
+
|
.--------o---------. PC PARALLEL PORT
LPT 1
| |
1A o-----------o 1A |
| 1Y o------------------o S3 (PIN 15, PC
INPUT)
1B o-----------o 1B |
| |
| |
2A o-----------o 2A |
| 2Y o------------------o S4 (PIN 13, PC
INPUT)
2B o-----------o 2B 74HC157 |
| |
| |
3A o-----------o 3A |
| 3Y o------------------o S5 (PIN 12, PC
INPUT)
3B o-----------o 3B |
| |
| |
4A o-----------o 4A |
| 4Y o------------------o S6 (PIN 10, PC
INPUT)
4B o-----------o 4B |
| |
| |
| SELECT/G1 o------------------o D0 (PIN 2, PC
OUTPUT)
| |
| |
| STROBE'o---------.
| | |
'--------o---------' |
| |
| |
=== ===
GND GND
created by Andy´s ASCII-Circuit v1.24.140803 Beta www.tech-chat.de

You can use any standard optocoupler IC with standard transistor outputs. A
good inexpensive way to do this would be the NEC PS2501-4, which has 4
optocouplers on one 16-pin IC (you don't need the base cannection, anyway). If
you use another opto, make sure it has a standard transistor output instead of
a darlington transistor output. Choose R1 based on getting 10 mA or so through
the opto LED. R2 should be around 22K. If you have AC relays, use the
PS2505-4, which has inverse parallel LEDs for AC. All components available at
DigiKey. Be sure to put the 5VDC power supply on the same power strip as the
PC (both on and off at the same time), and don't forget to connect the LPT GND
(pins 18 - 25) to the power supply GND.

If you want to cheat, you might be able to get away with not using a power
supply by powering the HC157 from another one of the data pins, and providing
+5V for the pullups from a couple more of the data pins (4 pullups per pin to
limit current out to a couple of mils per pin). Worst case, I don't think you
can smoke anything this way. No guarantees with this, though.

Software and Resources:

http://www.lvr.com/parport.htm
Website for Parallel Port Complete, a good resource book for this type of thing
(includes drivers to allow programming in Windows). The book is well worth the
price.

http://www.doc.ic.ac.uk/~ih/doc/par/
Interfacing to the IBM-PC Parallel Printer Port, with the basics you'll need to
program bit-banging the port


http://et.nmsu.edu/~etti/fall96/computer/printer/printer.html
Use of a PC Printer Port for Control and Data Acquisition, containing useful
code (in C)

This should do it for you.

Questions of this type usually get a better response at sci.electronics.basics.

Good luck
Chris
 
Top