Drive 12V relay with wide (12-30 Vdc) supply - Page 1
Forum section: electronics / projects

author: webgiorgio
author_rank: Regular Contributor
timestamp: December 05, 2017, 12:30:36 pm
content: Hello,I am doing the design of a board which contains a 12V relay, and a 5V microcontroller. The board should accept a wide range of supply voltage ( 12Vdc to 30 Vdc) and I am looking for a smart way of controlling the 12Vdc relay.The 5V for the uC is made with a DC-DC converter.The original idea was to read the supply voltage with the uC ADC and PWM the transistor that control the relay.Unfortunately I need the ADC for other sensors, so I can't use it for this.The idea I came up with is to use the inductance of the relay to make a simple DC-DC that limits the current in the coil to 45 mA (value from relay datasheet, FEME LCA 002 12 005).Basically, when the voltage across the 15 ohm shunt resistor reach 0.7V (15*0.045=0.67), the lower transistor shorts the capacitor.The voltage on the base of the top transistor goes to zero, and the transistor goes open. The current in the shunt stop, and the low transistor open.The capacitor charges trough the resistor, until closing the top transistor again.The current rise, until the voltage on the shunt goes >0.7 V again.Tuning the size of the capacitor I could tune the switching frequency.Something like this I saw for protecting a mosfet from short circuit.Could this work?

author: tszaboo
author_rank: Super Contributor
timestamp: December 05, 2017, 12:49:15 pm
content: But why? Take any buck converter and convert the 12-30V and drive the relay from that. If you need to be very cost effective, use a 34063. Or use a 5V relay. This is not rocket science.

author: xani
author_rank: Frequent Contributor
timestamp: December 05, 2017, 01:03:54 pm
content: ... or just put 7812 before relay if there is no need to be ridiculusly power-efficient

author: Seekonk
author_rank: Super Contributor
timestamp: December 05, 2017, 04:54:51 pm
content: You have a microprocessor controlling the relay, just PWM it. I do that with every relay I use in a system to reduce current and heat. I start with full and then ramp down. I've pumped 60V into 6V solenoids. No more than half voltage is needed once relay closes. Assume the micro is monitoring input voltage or could. Even just a digital input could monitor the current sense .resistor

author: webgiorgio
author_rank: Regular Contributor
timestamp: December 06, 2017, 08:04:48 am
content: Hi, thanks for the advices.Yes I thought of a buck converter to make the 12V for the relays...but I liked the challenge of designing that current limiter with the two transistors. It turned out it works, but in continuous mode. Maybe I need to replace the top transistor with a mosfet for it to work in switching mode.At the end I will use the buck converter to go from the 12-30V supply down to 12V (150 mA) and then a 7805 for the 5 V (50 mA).Thanks for the tip on starting the relay with full voltage, then decrease, looking at the current consumption of the coil.

author: tszaboo
author_rank: Super Contributor
timestamp: December 06, 2017, 11:39:05 am
content: Quote from: Seekonk on December 05, 2017, 04:54:51 pmIt is typically one of those systems, which burst into flames, when you place a breakpoint in the software, or when you press the reset button. I refuse to design systems like that.

author: mycroft
author_rank: Regular Contributor
timestamp: December 06, 2017, 11:52:09 am
content: Take a look as how Bob Pease attacked this problem athttp://www.electronicdesign.com/analog/what-s-all-solenoid-driver-stuff-anyhow

author: t1d
author_rank: Super Contributor
timestamp: December 10, 2017, 08:27:22 am
content: The output of a microprocessor is enough to directly drive the switch of a solid state relay. I drive an AC SSR with a PIC18F4550, to modulate the power of the elements of my DIY reflow oven. It works just fine.SSR's come in AC and DC outputs. The cheap, white models sold on Ebay dangerously overstate what their circuitry can actually handle; be forewarned. I like the Crydom brand. Buying used Crydom's on Ebay seems to be okay, because, if an SSR is working, it is working.