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.

OpAmp, Buffer and Relay

Status
Not open for further replies.

AtomSoft

Well-Known Member
Ok Ill explain what i have and what i want to do ... let me know if im crazy..

I have a 3.3v MCU, 5v Relay

I want to use an opamp to jump my 3.3v to 5v and buffer it since there are usually opamp pairs in an IC... then with the buffered pin control a npn or pnp to control a relay.

Would this be too complex for something simple? Or does it sound about right? Or should i use a level shifter?
 
Ok Ill explain what i have and what i want to do ... let me know if im crazy..

I have a 3.3v MCU, 5v Relay

I want to use an opamp to jump my 3.3v to 5v and buffer it since there are usually opamp pairs in an IC... then with the buffered pin control a npn or pnp to control a relay.

Would this be too complex for something simple? Or does it sound about right?

just use the microcontroller to a 330 ohm to 1k ohm resistor to base of NPN. Then emitter of NPN to ground, collector to relay coil. Other end of relay coil to 5v supply
 
And a friendly diode to catch de spike, in parallel with the coil, anode to Vcc?
 
And a friendly diode to catch de spike, in parallel with the coil, anode to Vcc?
Depending on the relay load, the diode may slow down the speed at which the relay opens. Best practice is a to have a resistor in series with the diode, of about 5 -10 times the relay resistance. The voltage spike will be 5 - 10 times the supply voltage, so 25 - 50 V, so still well within the rating of readily available transistors. the relay current will drop 5 - 10 times faster than with a diode on its own.
 
Quick image grab from the innergoogle to show what is described in post #2. The resistor and transistor sizes depend on the relay coil. Voltage? Current? Resistance? Power?

ak

1603598638904.png
 
I recognise that picture :D



You could also use a small FET, I've just used four 2N7000's (with four 1N4148's across the relays) to feed four 5V relays from an ESP32. I could have used NPN transistors - but I've got a load of 2N7000's at work :D
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top