LM358 Buck Regulator with Voltage & Current control - Page 1
Forum section: electronics / projects

author: FromSkyToEnd
author_rank: Newbie
timestamp: December 09, 2019, 09:37:18 pm
content: Hello all, I've been fiddling a bit with electronics lately, and decided to try an design a buck regulator using a 555 timer chip for pwm control... Got that working but it didn't have any feedback, so I started playing around with an op-amp to control the 555 timer but at one point I though, what if I drive the mosfett directly from the op-amp? I though that would be way too simple but I gave it a try and to my surprised the circuit worked!https://www.circuitlab.com/circuit/aq2pdvpy4bw5/lm358-buck-regulator/As far as I know I have not seen any buck regulator circuits that used a simple op-amp to control switching, at least from what I could find. So I decided to share my circuit, I will be using this as my bench power supply for other electronic devices. the high current parts was salvaged from old atx power supplies.I would love some feedback!I've not really made many circuits and I'm kinda impressed this one works but hey, I'm sure there's room for improvement or perhaps I'm doing something very wrong! After all I wonder why I don't find circuits similar to this.description from the schematic:Code:Provides 0v-20v DC with current limiting function from 24v and 5v DC inputM1, D1, L1 and R7 will determine the max current.R7 is the sense resistor so should be able to handle getting hot since it can be dissipating over 10w of heat at 10a loadsD3 should give somewhat of an indication when current limiting is appliedThe circuit employs M2 as a signal inverter as well to be able to drive a high power MOSFETT from a 5v signal but this also means that the switch will be normally closed if the op amp circuit fails and might cause an issue if you care about that.The main logic of this circuit is the op-amp will turn off to raise the output voltage and turn on to lower the output voltage. This allows to combine voltage and current limiting without more logic I think. Since this circuit acts as an oscillator the frequency is limited by C3Due to the high capacity of C2 it's possible when changing load or adjusting voltage/current that it delivers more voltage/current than desired for a short time, could probably improve on the output filtering but I opted for large capacity in cases when I wanted more currentStrongly suggest using active cooling for M1 and D1. M2 should have passive heatsink

author: T3sl4co1l
author_rank: Super Contributor
timestamp: December 09, 2019, 10:25:18 pm
content: Yikes! Not sure what timestep and duration to run for. Seems to be very slow (<1kHz?) and still very high ripple. Which is as one should expect from that op-amp.Why not LM393?Here's an example using a 555, that follows good design practice (peak current mode control):https://www.seventransistorlabs.com/Images/555%20Boost.pdfBeware that various resistors/setpoints/bias may not work so well at different supply voltages...Here's one with no ICs*, just transistors; okay over a modest supply range (say 8-16V):https://www.seventransistorlabs.com/Images/Discrete_Tube_Supply.png*TL431 hardly counts as an IC, it's a transistor with 2.50V Vbe, trust me!Tim

author: FromSkyToEnd
author_rank: Newbie
timestamp: December 09, 2019, 10:48:03 pm
content: Oh! Thanks for the examplesI agree the switching frequency isn't super high, but I managed to get 10khz to 18khz when i was using a 47n cap on my breadboard, but yes there is ripple there, especially in higher/changing loads! But for my purposes I'll mark it as acceptable, seems to be okay usually, but "okay" is certainly not a high bar here. I haven't managed to have a collection of op-amps, LM358 are what i had on hand but I'll have to investigate getting something better!As for the circuitsim i have not prepared it for simulation, I've built the circuit on breadboard before putting it in the circuit, here's what my newbie soldering work looks likein the picture I'm powering an LED straight from itI know I'm missing a lot of the technical knowledge around coils and buck regulator but I'm happy to learn from mistakes!Edit: I think one of my issue with the 555 and why I decided to try without it is I couldn't get mine to oscillate stably at high frequencies, likely due to the breadboard stray capacitance

author: FromSkyToEnd
author_rank: Newbie
timestamp: December 13, 2019, 04:41:37 pm
content: Welp just tried the LM393 and now the mosfett is always on... I either need to go back to the drawing board or I got a defective chip

author: T3sl4co1l
author_rank: Super Contributor
timestamp: December 13, 2019, 05:16:22 pm
content: Note that LM393 needs a pullup on its output.Tim

author: fcb
author_rank: Super Contributor
timestamp: December 17, 2019, 06:33:29 pm
content: The LM393 is quite sensitive to supply noise, and self-generated noise. If you zoom in close on a LM393 output (like in the low microseconds) when it's switching it will often 'bounce'. You can reduce this somewhat using a resistor to gofrom the output to the +in (assuming you have a suitable pull-up). It's a great low-cost comparator in certain applications but there are definatly better out there for a few pence more, and i'm not sure I would use it in a switching regulator.