View Single Post
Old 05-05-2004, 06:06 AM   #8
starfox
Maximum Bitrate
 
starfox's Avatar
 
Join Date: May 2002
Location: Australia
Posts: 449
This is the outline for the basic design i'm using:

PICAXE08 program:
http://tartarus.uwa.edu.au/~daveis/c...pplication.zip

Diagram for relay drivers:
http://tartarus.uwa.edu.au/~daveis/c...elayDriver.pdf

You need to vary R1, R2 depending on the resistance of the relay coil that you're using. Similarly for R5, R6, and R8, R9. In my circuit, RLY1 and RLY2 have 200 ohm coil resistance (i'm using a 3A PCB relay), and RLY3 is a 30A automotive relay with 80 ohms resistance. You need to adjust these so the transistor is in saturation.

R3, R4, R7 are current limiting resistors so the PICAXE doesn't have to do too much work.

D1, D2, D3 are protection diodes so the back EMF of the relays doesn't destroy your transistor in the long run. 1N4004s are fine instead of 1N4001s.

U1, U2, U3 are optoisolators. I chose to use standard 4N28s because they're quite cheap and they work. ^^ Using an optoisolator + transistor might seem a bit excessive but i found that the optoisolators became quite warm after supplying the relays without a transistor. Since this circuit has to sit in a car which might get quite hot, i decided that using transistors would be a more robust design.

Q1, Q2, Q3 are standard PNP transistors. You can replace this with just about anything with an hFE > 100, though BC327s should be common everywhere.

The inputs labelled Pin4, Pin7 and Pin5 are the respective pins on the PICAXE IC.

I don't have a diagram for how to wire up the rest of the circuit yet as my circuit design software doesn't have a model for a PICAXE or PIC at all.. Does anyone know of software which'll let you draw a circuit with a PIC in it? (i hope i don't have to use MS Paint ^^)
starfox is offline   Reply With Quote