Using a solenoid - Page 1
Forum section: electronics / projects

author: MyElectronsFellOut
author_rank: Regular Contributor
timestamp: August 28, 2015, 02:11:14 pm
content: Hey folks. Easy question today. I'm using a solenoid valve in a design and I have attached the circuit below. Looking for clarification for working out the max current through the solenoid so I can calculate the dropper resistor value. But the only info I have is that it's 12V 0.5w rated.I'm using a mosfet to trigger the solenoid as required so current should be 0 until triggered correct? And the voltage is determined by the RC curve created by the dropper resistor and capacitors?

author: MarkF
author_rank: Super Contributor
timestamp: August 28, 2015, 02:26:58 pm
content: Power = Voltage * CurrentI = P / V = 0.5W / 12 V = 42 mAR18 = 72 ohms. I'd start with 100 ohms as an easy to find value. The coil probably has a lower minimum voltage. Standard values would be 68 or 75.Sorry, I overlooked your 2 diode drops and the transistor drop. You probably don't need the resistor.

author: MyElectronsFellOut
author_rank: Regular Contributor
timestamp: August 28, 2015, 03:09:21 pm
content: Quote from: MarkF on August 28, 2015, 02:26:58 pmAh forgot about the mosfet drop. But the Rds On will be very low, in he milli ohm range perhaps so the voltage across the drain source is going to be tiny.

author: LatvianOnJuice
author_rank: Contributor
timestamp: August 28, 2015, 10:38:45 pm
content: The 100 ohm initial value is reasonable. To me it seems more like a 50-70 ohm value, but just start with the 100 and drop down by 10 (a potentiometer would be very uselful.)

author: eneuro
author_rank: Super Contributor
timestamp: August 28, 2015, 11:55:28 pm
content: Simply simulation and experience (I've was driving huge car alternator in custom output power limiter driver) shows that this current will depend on many factors among other PWM duty cycle and frequency related to solenoid inductance, so I do not know why are you trying to play with resistors when you have mosfet?By adjusting PWM frequency and duty cycle you can easy adjust this solenoid curent and stabilize it like I've already did in alternator for example, to be able limit output power based on custom RPM sensor inserted into this thing and disabled oryginal voltage regulatorRemember even simple sim, with a litle bit theory behind can save your time and help learn how electronics circuits can work when you slow down simulation speed and manualy play with switches, else sooner or later something willBTW: Your solenoid should have specified coil resistance-it was a few Ohms in the case of my alternator "solenoid", so short-thrugth current was a few Amps

author: MyElectronsFellOut
author_rank: Regular Contributor
timestamp: August 29, 2015, 07:53:28 pm
content: I should of mentioned im using a 3v3 micro output pin to toggle the mosfet. The datasheet didnt specify a resistance value for the solenoid which is annoying.

author: calexanian
author_rank: Super Contributor
timestamp: August 30, 2015, 07:05:10 pm
content: I started thinking about all sorts of things to say when the thought hit me. Why not just use a 7812 regulator in the supply? then all you need in your free wheeling diode and you are good to go. btw 1N4148 is not suitable for any appreciable current. 1N4937 would be a far better choice.

author: MyElectronsFellOut
author_rank: Regular Contributor
timestamp: August 30, 2015, 11:06:04 pm
content: I will check that out, thanks.

author: Someone
author_rank: Super Contributor
timestamp: August 31, 2015, 02:44:24 am
content: The 1N4148 is fine for the 42mA or so that is expected in steady state, the dropping resistor will provide very simple and soft protection during turn on/off.For the OP, if the relay is rated for 0.5W at 12V then you calculate the current from P=VIWith this current you can then estimate the dropping resistor after subtracting the diode and switch (fet) drops from the supply voltageIn the real world the relay will use more current to turn on than it does when it is being held, this is a good experiment that you could examine with an oscilloscope or if you do not have one then try different resistor values until it will not turn on reliably, then you can measure the voltage across the resistor when it will not turn on and estimate the current needed to first close the relay. They current needed to keep the relay closed is of course much easier to measure.

author: Moriniman
author_rank: Contributor
timestamp: August 31, 2015, 07:56:51 am
content: When the mosfet Q2 is off, the parallel combination of C33 and C34 is going to charge via R18 to the +15v rail (minus the diode drops of D5 & 6).When you turn Q2 on, the capacitors will be accross the solenoid coil. That means the coil is going to see more than its rated voltage and draw more than it's rated current until the capacitors discharge. That may be a good thing, decreasing the turn on time for the solenoid. The resistor R18 can then be sized for the holding current of the solenoid.I'd more usually implement this circuit with the capacitor in parallel with R18, so that their charging current gave the pull-in pulse.http://electronicdesign.com/analog/what-s-all-solenoid-driver-stuff-anyhowThe flywheel diode by the way slows down the turn off of the solenoid. Back in my electric vehicle racing days (Porsche 914) this could be a real issue when breaking several hundred amps. The trick is to use a zenner as the flywheel diode. Generally rated at the supply rail value, it allows the magnetic field to collapse much faster initially, then limits the BEMF to a safe level.

author: MyElectronsFellOut
author_rank: Regular Contributor
timestamp: August 31, 2015, 05:18:31 pm
content: I will play around with the circuit and scope it once I get my hands on one of the solenoids I'm planning to use. That's also a good tip about the flyback diode. I was concerned that the P=IV formula was somehow a bit too easy to correct lol.

author: SL4P
author_rank: Super Contributor
timestamp: August 31, 2015, 10:08:58 pm
content: 7812 gives ~1A withinfiniteheat sink...12V @ 500mA = 6W, a very hot 7812...I'd recommend PWM drive mentioned above.Not sure about regulation margin with 15V supply.

author: calexanian
author_rank: Super Contributor
timestamp: September 01, 2015, 05:33:57 am
content: Quote from: SL4P on August 31, 2015, 10:08:58 pmDon't forget. It will only be dropping (Loose number here) 3 volts at .5 amp therefore 1.5 watts. Quite suitable with a reasonable heat sink. I do like your thinking about a switching regulator. I have a feeling he is looking for minimum component implementation though.

author: MyElectronsFellOut
author_rank: Regular Contributor
timestamp: September 01, 2015, 06:49:46 am
content: I'm using a 15V 7815 regulator as I'm implementing a current source circuit, and I don't want to use a 3V solenoid on the 3V rail (i've had issues with rail voltage shifting due to solenoid activation in the past), hence the diode drops. The solenoid has to be controlled by software and will be switching on and off a constant intervals. The ON period will be in the hundreds of milli seconds range.Also, will the inductance of the solenoid depend on the current / voltage applied?