Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Relays

Status
Not open for further replies.
Digital Outputs can each sink and source around 20mA and are capable of driving LEDs and other small loads directly. Be aware that while each output can handle 20mA there are limits for each port and for the entire chip that typically prevents 20mA being used on every output. For some PICAXE chips, the port and total limit is around 95mA while for others the limit can be around 200mA. A review of the datasheet for the core PICmicro chip is recommended -- Wiki

You'll be needing a transistor driver to drive the relay. If the relay pulls less than 150mA you can use a small signal switching unit like a 2n3904, for up to 800mA a metal can 2n2222 will do. For big loads (several amps) perhaps a MOSFET would be the way to go. Always clamp the relay with a rev. biased diode.
 
You can get some solid-state relays if you are looking to keep the part count down. There are a number of surplus stores that have them at an affordable price. You can find them on google. Otherwise you will need a transistor of some type with the right rating to drive a coil, as stated, and a diode to protect it.
 
The relay is 5V. I tried a 2N3906 NPN transistor like THIS. but It didn't work. I'm. using 4.5V, relay works when hooked directly to batt. but not with transistor. Do I need the full 5 volts for the transistor to work (and by that I mean 6V with a reg.)
 
If u'r using an NPN be sure to connect the other end of the relay coil to the +ve rail and use a rev biased diode across the coil conn.

You can test with an LED b4 placing the relay, just use a 470 to 1k resistor in series with the LED as u have a 5V supply.
IF the LED worx and the relay does not, check your relay reistance across the coil. use V=IR to determine the current pull based on your Vdd.

If it's too much the TR. won't switch it.
 
Last edited:
found the problem (lose coil). It's ALWAYS the obvious stuff. anyway, I have a 1K resistor on the base and none on the collector or emitter. the transistor shortly turned on the relay, but then burnt out. What now?
 
Use your DMM, what's the resistance (ohms) of the coil and what is the driving voltage (V) you are using? Current draw (I)=V/R. That should be under 0.15A for a 2n3904 or under 0.8A for a 2n2222. Cut those values in half for continuous operation or the TR will overheat. If u need more current, the simple way is to drive a power transistor (TIP31) with the 2n3904.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top