HOW TO TURN ON A 12V RELAY ?

Mejlby

Member
Dear forum
I have made a timer, but I need to have "out" (pin C.2) to turn on a 12V relay. How can I do it without using a 5v relay to turn on the 12v relay

Hope someone can help with a suggestion and maybe a circuit

Best Regards
Mejlby - Denmark
 

AllyCat

Senior Member
Hi,

You can use just a simple Transistor (e.g. BC548) or FET (e.g. 2N7000) interface circuit. See for example the "Output Devices 5 - Solar & DC “Toy” Motors" in PICaxe Manual (section) 3, page 12. Replace the 6 volts rail with a 12 volt supply, put the Relay in place of the Motor, and of course change Pin 1 to Pin C.2. The diode is still required, but most (NPN) Transistors or FETs should be satisfactory. If using a FET, add a high-value pull-down resistor (22k - 1M) between the Gate (or PICaxe Pin C.2) and Source (0 volts line).

Cheers, Alan.
 

Mejlby

Member
Hi Alan

Thank you very much for your answer.
BUT.... I'm not sure I fully understand that. Do you have the opportunity to show it on a drawing

It will make me very happy


bedst regard
Mejlby - Denmark
 

AllyCat

Senior Member
Hi,

There isn't really any more to show; "Standard Circuits 3 and 4" (page 8) are similar, just change the 5v to 12 volts, but only on the Relay; the PICaxe rail must remain at 3 - 5 volts. I can't give any more indication of pin numbers as you haven't named your PICaxe version.

I don't know what you mean by "relay is 30Am and the coil draws 360 mAM", but a coil resistance of 30 ohms and current of 360 mA (milli Amps) seems very high (4 watts at 12 volts). That would need a better transistor, perhaps a BC337 with the 1k resistor reduced to ~220 ohms, but the 2N7000 might be sufficient, or the BCX38C from the manual, etc.. However, the "Output Device 11 - Solenoid & Solenoid Valves" on page 24 may be more appropriate (again changed to 12 v) for that current. What components do you have available?

Cheers, Alan.
 

Mejlby

Member
Hej Alan
I think I'm starting to understand it after reading Section 3 page 12
I have tried with a mosfet IR520 but the output is only 5V and it is too little to pull the 12V relay (coil 360 mA)

Maybe it's because I tried in the wrong way - see attached drawing
tomorrow I will try to do it as shown i Section 3

bedst regard
Mejlby - Denmark
 

Attachments

Mejlby

Member
I have many electronics components. Among other things, I made this go-kart for my daughter incl. PWM motor controller that can handle 50A. (See link)
However, I have not worked so much with picaxe ... hahaha

 

AllyCat

Senior Member
Hi,

Yes, your circuit is wrong; it prevents the Relay "seeing" the 12 volts (only the 5 volts from the PICaxe). Both the Source and Drain (or Emitter/Collector of a transistor) can amplify the Current, but only the Drain/Collector can amplify the Voltage. The higher voltage is needed to drive the required current through the resistance of the Relay (Ohm's Law: Current = Volts / Resistance).

But don't forget the Diode, it's important to "protect" the other semiconductors from the relay inductance. Best to connect the diode directly across the relay coil - but make sure it's connected the correct way around (the "bar" end to the positive supply voltage).

Cheers, Alan.
 

Mejlby

Member
Hi
Now I have changed connection as you have told me and EVERYTHING works as it should
Many thanks for your help. Now i have lean that (y) :)

Best regard
Mejlby - Denmark
 
Top