Boost converter to charge a C to activate a solenoid - Page 1
Forum section: electronics / beginners

author: NivagSwerdna
author_rank: Super Contributor
timestamp: January 10, 2017, 12:56:04 pm
content: I have a cobbled together solution to drive my old slave clock which contains a solenoid which requires a pulse (2090ms or so) of 24V every minute to move the minute hand on. The pulse actually needs to change polarity each minute but that's an additional complication to which an H-bridge seems to offer the solution.Anyway... to date I have used a DC-DC booster module from EBAY which raises the 5V supply to 24V and runs continuously.I would like to look at improving the design...2090ms of approx 8mA (the solenoid has a resistance of approx 4k ohms, although it is a wound core so presumeable inductive) is only around200720 uCIf I charged a capacitor of1030uF to 24V it looks like it would be sufficient to drive the clock, so increasing that to47100uF to give a good margin...So the design objective is to charge a47100uF capacitor from a 5V supply to 24V once every minuteI have a ATMega328p ArduinoHow would I calculate the suitable value of an inductor/MOSFET/Diode combination that would allow me to do that?(Normally I only need the pulse once per minute but during day light savings changes I need to advance the hands either 1hr (i.e. 60 ticks) or 11hrs (i.e. around 670 ticks), it would be good if I could generate a fully charged capacitor within one second.)Please can you point me in the right direction, I don't really know where to start. I do have a stock of cheap ebay 100uH inductors, not sure if that is appropriate or not.Thanks in advance

author: Ian.M
author_rank: Super Contributor
timestamp: January 10, 2017, 02:02:06 pm
content: What's the peak current rating and DC resistance of your inductors?Its probably possible with a small signal MOSFET and diode like 2N7002 and BAT46W in under 50ms. However you need a fast PWM to do that, probably around 50KHz with the duty cycle adjusted proportionately to the feedback voltage as long as its under the setpoint, to prevent inductor saturation, and above the setpoint, backed right off to only provide enough energy to make up for the loss through the feedback divider.Its quite a bit of fiddly interrupt driven code, and if you get it wrong, it blows the MOSFET and probably the ATMega328P (though for testing, a sacrificial buffer could be added to drive the MOSFET with a 1K input resistor between it and the Arduino).A better approach for a one-off might be to hack the EBAY module if its controller chip has a shutdown pin, controlling the shutdown pin from the Arduoino, and reducing its output cap to 47uF.

author: NivagSwerdna
author_rank: Super Contributor
timestamp: January 10, 2017, 09:44:37 pm
content: Firstly, I have a picture of the modules strung together for my functioning prototype... all cheap EBAY bits.The voltage regulator is marked XL6009 and looking at the datasheet Pin 2 is EN so I could possibly lift that pin and use that.There is plenty of excess capacitance around... I used a cheap L298N module which has a pair of 200uF caps, there is a 100uF on the output side of the boost converter with 220uF on the input side and a sprinkle of caps on the Uno clone.It's a bit tricky... I could just leave the project as is... or I could take it to the next level which would be a custom PCB with a 5V micro controlled boost and a simpler H-bridge, ZXMHC3F381N8?Secondly,The inductors I mentioned having lying around are these...14.5mm diameter, measure at 0.052 Ohm and 88.8uH, packet/advert claims 100uH 6A (see pic)Thirdly,I checked my code... the current implementation applies 24V for 90ms across a coil which measures statically at 3k5 ohms. So I under-estimated the energy required a bit

author: Ian.M
author_rank: Super Contributor
timestamp: January 11, 2017, 01:56:00 pm
content: With your revised numbers, and those inductors, you could boost a 100uF cap to 24V in under 50ms. I've set up a logic driven boost converter simulation in LTspice, (attached) that senses the inductor current so it runs as fast as possible.To achieve the same result without current feedback, some experimental work would be required, scoping the inductor supply current and varying the load voltage with a shunt regulator, while adjusting the Arduino PWM parameters to determine the max permissible on-time for the MOSFET and the off-time vs Vout relationship required for the inductor current to decay to zero.

author: NivagSwerdna
author_rank: Super Contributor
timestamp: January 11, 2017, 02:45:11 pm
content: Thanks. I will check out that model when I am home, and it will probably not be until the weekend that I can try something out physically.It's going to take me a while to understand this...Given my inductor has a very small resistance, and presuming that at saturation it would act like a resistor then I guess I need to keep the on time very short during my experiments....So by the time5005 us has passed I need to be thinking about cutting the power?

author: Ian.M
author_rank: Super Contributor
timestamp: January 11, 2017, 03:01:32 pm
content: The simulation saysonly 5.8usfor I(L1) to ramp from 0 to 300mA.This can be confirmed from V=L*dI/dt.If you use a beefier MOSFET, you could go higher, subject to your inductor's saturation current limit, giving you a longer on-time, but if you hit saturation, the inductor becomes effectively air-cored and the current increases extremely rapidly, only limited by supply resistance, winding resistance and the MOSET's Rds_on resistance.Also a beefier MOSFET is likely to have a higher gate charge, and it becomes fairly pointless if you have to add a MOSFET driver as you might as well then use a single chip DC boost converter with integrated switch.

author: NivagSwerdna
author_rank: Super Contributor
timestamp: January 11, 2017, 10:49:48 pm
content: Yes. Sorry 300mA at 5us.I think I'll try something inductorless to start with... try and charge the capacitor to 2.5V using a PWM output through a 1k resistor and diode... and use that set-up to check the comparator interrupt fires to stop the PWM; using a resistor divider to compare 2V5 against the 1V1 bandgap.But... that will have to wait until I have time at the weekend.Thanks for your patience!

author: Ian.M
author_rank: Super Contributor
timestamp: January 12, 2017, 01:36:41 am
content: I mislabled the output of source B2 in the control logic. I was trying to call it 'zf' for zero flux, but forgot to change it at the waveform view, which has zeroed one trace in the logic pane of the plot. The easiest fix would be to rename the label 'zf' to 'zc'.Some sim experiments with a beefier MOSFET model and a bigger inductor (two of your 88uH in series) were very promising, reaching 85% efficiency, and drastically shortening the charging time, but then you'd be handling 2A pulses of current from the supply.

author: NivagSwerdna
author_rank: Super Contributor
timestamp: January 12, 2017, 12:07:58 pm
content: In the end state it would be good if this could operate off a single 9V PP3 or a clutch of AAs; Something that will last for a long time without self-discharge.I need to calculate the power budget but if it is only charging a 100uF capacitor once per minute then the average current is very low, being in sleep for the vast majority of the time.So... my max charge rate is going to have to be <100mA I think given my power source. Actual time to 24V isn't a big deal apart from the power cost of being awake (but ideally <1s)This is only a fun project so I don't mind if battery power doesn't work out. I was looking as at a TPS62745 perhaps to get from 9V down to either 3v3 or 5v and then I would need an arrangement to gate the 9V from the 24V boost circuit when in sleep but when boosting to come straight from the battery.All good fun and all challenging for me! Thanks for your continued interest!

author: Ian.M
author_rank: Super Contributor
timestamp: January 12, 2017, 01:09:41 pm
content: 100uf @24V = 28.8mJ.The sim I posted takes 3.6mJ to charge a 10uF cap from 0 to 24V, so 36mJ for a 100uF cap, giving 80% efficiency. It will certainly need a large input cap to support its transient current draw.Provided you shut it off ASAP after the solonoid pulse, at one pulse per minute, that's an average of 0.6mW or 120uA @5v.An Arduino without I(L) sensing will do slightly worse as it wont be able to manage the pulse rate as efficiently to adapt to the load voltage.Whether or not you need to shut off the battery supply to the boost circuit depends on the low voltage quiescent current of the H-Bridge. As there are some single chip boost converter with synchronous rectifiers that do a true load disconnect in standby, that may be the best way to go.

author: NivagSwerdna
author_rank: Super Contributor
timestamp: January 14, 2017, 11:21:44 am
content: Ian.M,Just had time to open the model. Just awesome!Looking at the model I see the significant effect of the current regulation, particularly the r term which limits the input current to 300mA.Tracking the fb voltage (and using a comparator interrupt) to turn off the PWM is easy, tracking the prevailing voltage range across R3 might be harder. Seems the trade off between using an off-the-shelf chip versus using the MCU is not an obvious choice here, without current regulation the MCU wins, with current regulation something smarter wins?Also, what is the purpose of R4 & C4? Presumably some kind of filter?Thanks

author: Ian.M
author_rank: Super Contributor
timestamp: January 14, 2017, 12:08:49 pm
content: If you know the inductance, and you are well under the limiting value of the steady state current set by the DC resistance, I=L/(V*t). Solving for t, t=L/(V*I). Therefore if you measure the input and output voltages, you can compute t_on and t_off without needing a sense resistor (R3). t_on is non-critical if you are well under saturation and the MOSFET Id limit, but t_off needs a safety margin so you don't end up pumping up the current a few mA each cycle till the MOSFET blows.Your safety margin here directly impacts the charging time and the max continuous output current, so a smarter chip that can calculate the off time on a cycle by cycle basis, using an analog computing circuit, or that can directly sense the output current if it has an integrated diode, or that has provisions for high side current sensing, can do better.The snubber network R4, C4 is to damp the HF ringing at turn-off. Without it the coil will ring like a bell with its own winding capacitance. It doesn't show up much in this sim, but if you disconnect the A1 Q output and replace it with a voltage source set up as a fixed frequency PWM:PULSE(0 5 120u 0 0 6u 22u), and plot V(d) (MOSFET drain voltage), you'll see the difference immediately you zoom in.