Pages:
1
2 |
khlor
Hazard to Others
 
Posts: 111
Registered: 4-1-2014
Location: Who knows, really...
Member Is Offline
Mood: No Mood
|
|
Homebrew adjustable switched PSU
Hello to all,
I hope you are in great health and I hope you have a better new year than this one we all had to survive to.
Greetings aside, I've come here to present my newest creation.
First some pointers to consider, please understand, it will make sense when I show schematics, photos and ratings.
1 - I am not an engineer
2 - Like I've seen on Sulaiman signature, in regards to this at least, I am a hobbyist, not an amateur nor a professional
3 - you could get better performance with better parts and a design around a specialty chip like the tl494 from Texas Instruments
4 - I did the way I did it because I wanted to make it from scratch, in fact my will to do it from scratch was so great I almost used
an astable flip-flop instead a 555.
5 - this is something I meant to do for over three years, spent the last 6 months designing it and spent whole three days building it
6 - it is not optimal, I know, but I do accept criticism and suggestions for future iterations. the main idea was my design but some
parts of the circuit were stitched from bits and pieces I found on stack overflow, homemade-circuits.com and this place
7 - This is a hobby project, if you have to buy all parts I hardly believe it will be cheaper than buying a decent buck converter
module, unless you have all the parts already, most of it could be scrapped from broken ATX power supplies, with exception of the LM7812, LM358 and
the 555 as well as the BC337/BC327(but these are dirt cheap) and the MOSFETS(IRF9540) but if you do the switching on the low side you could get
N-Channel FETS from the ATX power supply, I guess there are two per power supply.
With all of that said, let's go for a bit of background.
I've seen posts here on the forum, even before the creation of the "Electronics" sub-section, most of these posts were under the power-hungry
"Electrolysis" sub-section and these posts regarded the need for a power supply with an adjustable constant-current feature and adjustable voltage for
mainly electrolysis and chlorate cells many solutions were given, the main solution was to buy a buck-converter board with such features and there are
plenty of cheap solutions, I've used one of these, the cheap ones can hardly give 3A, not bad. some other were to use a resistor or even a light bulb
as a resistor, simple but far from being constant current. and other of the suggested solutions was to use the lm317. and as a power source a big
transformer or a power brick(laptop charger)/wall wart.
While the buck-converter module is a sensible solution, resistive control is too wasteful and not too practical for electrolysis operations and the
lm317, not to bash on it, I mean the humble lm317 is precise and for low power applications is just what the doctor ordered, but when you scale up
things like dropping from 19.5v at 3A, things get complicated quite easily first lm317 is rated for a maximum of 1.5A, so you'd have to be using at
least 3 in parallel and a huge heatsink, not optimal.
I've seen people talking about making their own, for those who can i is a nice option, but I'd say it is only for the hobby since buck-converter
modules now days are cheap even with this stratospheric inflation, I did mine because I do like electronics and I do it as a hobby that sometimes
yield some cash on the side so I set out to see if it is possible to do so without specialty integrated circuits(IC for short) and it is possible, but
I have no idea if it is any good. Alright, I rambled for long enough, let's get down to brass tacks!
The Schematics
There isn't much special here aside from the fact that my drawing skills aren't top of the line, and I didn't wanted to learn CAD just yet, I tried to
do all in one sheet of paper, but it got too complicated, so I divided in two parts so it is easier to see and also show.

Picture 1: Part A
Sorry for showing a chopped up schematics, part A are the two MOSFETS, with two sides, side A and side B and they work in turns, while side A is on,
side B is off and vice-versa, I decided to go this way because I think it would not put too much of a strain on the source. Bases of Q1 and Q6 should
be connected to pin 3 of the 555 in Part B of this schematic, so bases of Q2 and Q8 should be connected to the line designated "Enable" of part B.
this part doesn't have much going on, just a simple modified gate driver with push pull circuit using BJT transistors.

Picture 2: Part B
Part B has a whole lot more going on, it generates the signal to oscillate the MOSFETS in part A and also enable signals for regulation, those who
understand a bit of electronics will notice that the circuit takes two forms of feedback that feed on base Q1 and Q2, base of Q1 regulates voltage, as
voltage on output rises enough will cause Q1 to activate according to how R11 is set, and will stop the 555 and also cut the enable signal for the
MOSFETS on part A, this is the voltage control, simple but in practice proved to be very effective.
As for the current control it took a bit more of work, as current is flow through the circuit it will generate a voltage in R13 as this voltage is too
small to be detected by the transistor I used the first half of an LM358 and feed the output though R4 and R5 (variable resistors) forming a voltage
divider network and then feed it to the base of Q2, so, I regulate a limit based on the 0.65-0.7V needed to activate the transistor to use it as
reference voltage, thus as current increase the amplified voltage generated in R13 will turn on Q2 causing the same effect as Q1.
In my research I learned recently that this is what they call "skip cycle" and it is far different and far less reliable than the proper way of doing
this which would be PWM control. I tried sveral different tricks to increase stability on this feedback loop and as things are I guess it is "good
enough" current control is a little finicky but once you set what you want it is stable regardless on how the load varies and voltage control is
actually pretty good, I got pleased on how it works right out the gate.
I neglected to put on the schematics, but between Vcc and Ground you should put a large capacitor rated for at least 25v at a minimum of 2000uF, but I
guess that 4-5mF would be good to keep things stable down the line,
Second thing, Vcc can be anythere from 16V to 22V 25 would be pushing it, but I believe that if you swap all capacitors to be rated to 50v you could
go as high as the maximum voltage of the LM7812 without much worries, just remember adapt the gate driver circuit as well. If you want to use lower
voltage( <16V >12V ), I it is possible, but you should replace the LM7812 for a LDO of 12V or perhaps a LM7809 would work without the need to
modify anything, but since I am using IRF9540N going bellow 11V will be detrimental and will cause them to heat up a lot! these are my considerations.
Schematics Notes:
Put a large capacitor(electrolytic) between Vcc and Ground;
OUT+ in part B should be connected to OUT+ from part A;
put 0.1uF ceramic capacitors(code 103) before and after the lm7812 and a couple on the output to help dampen the noise and voltage ripple;
R13 is supposed to be a 10A shunt resistor, as I did not had that on hand, I've decided to use 6 1Ohm +/- 5% 5W resistors in parallel, these aren't
best quality nor best suited for the job of shunt, because as they heat up their resistance increase, I calculated and it is around 0.16 Ohm, but when
I do U=RI it returns 0.18-0.22Ohm(I assume it is those 5% plus thermal variations) , so it is unreliable, also, when the circuit is drawing more or
less 4.9A the voltage drop goes over 1V(1050mV) which represent nearly 5W on losses so, a proper shunt resistor would increase efficiency figures
quite significantly.
here are a few pictures of the finished board, I did on a perf board i never did PCB etching and for now I have no interest in doing so since most of
what I've do is early prototypes that may never go into "production" as per say.
Something else I neglected to mention, for the digital/voltage ammeter module I put the positive wire( thin red) connected to the 12v output of the
7812, the negative(thin black) I didn't connected, the rest is just like the image bellow(Picture 3), just replace the battery for (OUT+ and OUT) - as
shown in part B:

Picture 3: Wiring diagram for digital ammeter/voltmeter module

Picture 4: Finished 1

Picture 5: Finished 2

Picture 6: Finished 3
The digital ammeter/voltmeter do have a slight difference from the values I see in my multimeter, the voltage it shows is around 0.4V higher than when
I measure, the current show 0.1A than the measured. I trust my multimeter more, that thing was expensive.
Now for the ratings
The circuit has the 555 oscillating at 33.3kHz and duty cycle was roughly 52% however during tests the gate of the MOSFETS got pretty hectic, due to
cycle skipping, I assume.
My tests were made with a resistive load a 24V 250W halogen lamp HLX 64655 Xenophot made by Osram(not sure what is used for, but was expensive for a
light bulb), not the best load since resistance increases when heated, best test would be with something that has a negative thermal coefficient of
resistance but it was all I had on hand that wouldn't fry with the voltage and power ratings I'd be testing
with this load I made some tests, the power source for the circuit was a19.5V, 65W power brick to recharge dell laptops. and it is on the final
assemble as show in pictures 4 and 5.
Test #1
Input: 0.08A - 19.45V - 1.556W
Output: 0.51A - 0.2V - 0.102W
Efficiency: 6.5%
Test #2
Input: 1.71A - 19.45V - 33.26W
Output: 4.06A - 4.61V - 18.71W
Efficiency: 56.25%
Test #3
Input: 1.80A - 18.83V - 33.89W
Output: 4.14A - 4.75V - 19.66W
Efficiency: 58.0%
Test #4
Input: 2.15A - 18.7V - 40.20W
Output: 4.81A - 5.5V - 26.45W
Efficiency: 65.8%
The sampling is too little to be scientific, I know, the testing wasn't made using automated tools, it was made by hand, step by step I had to use 3
multimeters and a lot of imagination. However from a glance it is possible to see that it shows some characteristics of a buck converter, low
efficiency at low power ratings and efficiency goes up with the power ratings, I had no other load to test with but I'm sure this little project of
mine can give little excess of 5A over long periods of time, the MOSFETS don't even get too hot, you can touch them and hold touch without getting
burns.
And aside the low power tests I am mildly satisfied with the results, or I was until I got my cheap osciloscope thing to see what was on the output,
and the voltage ripple is... regrettable, I've measured as high as 1500mV of pure ripple. I know these cheap chinese osciloscopes aren't precision
tools, however it does help to have an idea of what is going on. noise was low though... but it happened only when I was clamping down heavy on the
current, however it cannot be ignored that even 100mV ripple is still high(so I've read), so I'd say this doesn't qualify for lab power supply and I
don't think it will be good to use with electronics testing or precision work, but if all you need is something with an adjustable constant current
feature for electrolysis/chlorate, I think it'll do just fine. I tried some adjustments(already on schematics) to improve the ripple situation and it
got bellow 300mV for the most part.

Picture 7: Tests
Final Considerations
It was a pretty fun project to build, at times I almost gave up, and I did one using the tl494 based on a video from AKA Kasyan, but for me it didn't
worked quite well, so I referred to the datasheet from Texas Instrument for help and got it working. it is way easier, but I wanted to do something
unnecessary and for fun, so I decided to do it iwth the 555, but as stated before, I almost did it with just transistors, but I opted for a better
stability on the signal generation. most of the parts I had on hand, and use of a "high side switching" is simpler, but not obligatory, instead of the
P-Channe MOSFET with little modification you could use any power N-Channel MOSFET.
With regards to applications, I guess this circuit can e used as a charger, for lead-acid batteries, no problem, and electrolysis and chlorates
production, it is adjustable, both voltage and current, and it can keep a constant current, so long your shunt is a good one, otherwise you may notice
a slight current drop as the resistance of the shunt resistor rises. Also, a good shunt can increase efficiency, since almost 5W have been calculated
to be lost just for this, almost 12.5% so that is something to think about.
I am sorry for the long text, I wanted to keep it all short and sweet, but this in on itself is a lot to unpack.
if you have questions, suggestions or considerations, please I'd like to know.
EDIT: corrections on the text above picture 3
[Edited on 31-12-2024 by khlor]
"NOOOOOO!!! The mixture is all WROOOOOOONG!"
|
|
Rainwater
National Hazard
  
Posts: 987
Registered: 22-12-2021
Member Is Offline
Mood: Break'n glass & kick'n a's
|
|
Hot dam the perf board. I love it.
Nothing wrong with a cheap scope ether..
Just a note, something i wish I new when I first started.
A capacitor's capacitance will decreases under load as the voltage rating is reached.
Sometimes up to 90% at rated voltage. Its a marketing ploy manufacturers use
And the devil is in the datasheets.
What frequency is your ripple at? 33k? 1500mv of ripple. You mean one point five volts? Thats a lot.
Are you measuring that at the output of your psu, or the input of your load? Wire leads(feeder circuits) make a big difference.
For example that 5 amps you list, going through a 16 awg Al lead 40mv per foot, then another 5mv per through hole device with the standard 0.4mm lead
Trace thickness plays a role to.
Consider a cheap hotplate from the dollar store, as a load. The stove cooking heating elements are a nicrome wire with nice linear properties. And is
usually rated for about 900 watts 120v version 15 ohms. 220version 33ohms.
Have you simulated the design? Results vs real-life?
Great job too.
"You can't do that" - challenge accepted
|
|
Twospoons
International Hazard
   
Posts: 1350
Registered: 26-7-2004
Location: Middle Earth
Member Is Offline
Mood: A trace of hope...
|
|
Well, looks like you got it basically working, so congrats on that.
A couple of things: you are pushing the gate voltage on your mosfets to damn near breaking point - they are only rated for 20V. You only need -10V on
the gate to get those things fully turned on - anything more is just extra gate charge that will add to the heating.
Also your reference voltage appears to be just the Vbe of a transistor, which is wildly unstable with temperature - so you can expect your output
voltage to vary wildly too, as things heat up. Same goes for your current regulation.
The inductors are unshielded so likely radiating a lot of noise. Bear that in mind if you are using other instrumentation near this PSU.
Realistically, while I applaud the use of BJTs and 555's, the better route would be to use TI's Webench tool - give it your input and output
requirements and it spits out a list of suitable chips, complete with schematics and simulations. The PSU chips they have will give you an accurate
voltage reference, cycle by cycle current limiting (protect your MOSFETs), appropriate loop compensation, very low ripple, under voltage protection,
overload protection, soft-start, better EMI, smaller parts, and better that 90% efficiency.
EE's like me don't do this stuff from scratch without a really compelling reason. TI's chips are just too nice.
Helicopter: "helico" -> spiral, "pter" -> with wings
|
|
khlor
Hazard to Others
 
Posts: 111
Registered: 4-1-2014
Location: Who knows, really...
Member Is Offline
Mood: No Mood
|
|
Me too, I mean, it is better than a breadboard and you can freeform or easily adjust as you go, it is perfect for prototyping!
Quote: Originally posted by Rainwater  |
Just a note, something i wish I new when I first started.
A capacitor's capacitance will decreases under load as the voltage rating is reached.
Sometimes up to 90% at rated voltage. Its a marketing ploy manufacturers use
And the devil is in the datasheets.
|
Okay, this is new for me and I find it disturbing, I didn't bothered with datasheets since most of the caps I am using were scrapped from electronic
thrash. on this note, it means that i.e. if I use 50v 1000uF capacitors I may have better performance and less ripple than the 25v 1000uF, right?
Quote: Originally posted by Rainwater  |
What frequency is your ripple at? 33k? 1500mv of ripple. You mean one point five volts? Thats a lot.
Are you measuring that at the output of your psu, or the input of your load? Wire leads(feeder circuits) make a big difference.
For example that 5 amps you list, going through a 16 awg Al lead 40mv per foot, then another 5mv per through hole device with the standard 0.4mm lead
Trace thickness plays a role to. |
So... this is the not good part, it was, one point five volts of ripple, but this was before, now it gets to a maximum of 0.4V but usually 0.25-0.30V
still high, but not as bad as before. About the frequency, it is not at the 33kHz, since my circuit uses cycle skipping instead of PWM, the frequency
was around 90kHz-125kHz(at least I assume this to be the cause of the frequency discrepancy or some sort of hysteresis loop).
The measurements were made right at the contacts sticking out of the box, and I did measurements right from the board as well.
and I went crazy with the "traces" using not just tin/lead but also copper wires to reinforce the whole thing.
I think that some filters may help with that, perhaps a choker, will have to test, but efficiency will decrease, for sure.
Quote: Originally posted by Rainwater  |
Consider a cheap hotplate from the dollar store, as a load. The stove cooking heating elements are a nicrome wire with nice linear properties. And is
usually rated for about 900 watts 120v version 15 ohms. 220version 33ohms.
Great job too. |
Yes, I'll, in fact, thanks to you, I remembered I do have some nichrome wire, so, I guess I can test the maximum rating of it after all!
just in my head, alright, I'm done with the lame jokes... but seriously, no I never played with simulation software it is on my to-do list, the most
thought I gave it was when I decided to build it, the dream was at least 7-8 amps at 10V, I am barely scratching 4.8 amps at 3.5V, and the old regular
pen and paper.
and thanks for the compliments.
"NOOOOOO!!! The mixture is all WROOOOOOONG!"
|
|
khlor
Hazard to Others
 
Posts: 111
Registered: 4-1-2014
Location: Who knows, really...
Member Is Offline
Mood: No Mood
|
|
Quote: Originally posted by Twospoons  | Well, looks like you got it basically working, so congrats on that.
A couple of things: you are pushing the gate voltage on your mosfets to damn near breaking point - they are only rated for 20V. You only need -10V on
the gate to get those things fully turned on - anything more is just extra gate charge that will add to the heating.
Also your reference voltage appears to be just the Vbe of a transistor, which is wildly unstable with temperature - so you can expect your output
voltage to vary wildly too, as things heat up. Same goes for your current regulation.
The inductors are unshielded so likely radiating a lot of noise. Bear that in mind if you are using other instrumentation near this PSU.
Realistically, while I applaud the use of BJTs and 555's, the better route would be to use TI's Webench tool - give it your input and output
requirements and it spits out a list of suitable chips, complete with schematics and simulations. The PSU chips they have will give you an accurate
voltage reference, cycle by cycle current limiting (protect your MOSFETs), appropriate loop compensation, very low ripple, under voltage protection,
overload protection, soft-start, better EMI, smaller parts, and better that 90% efficiency.
EE's like me don't do this stuff from scratch without a really compelling reason. TI's chips are just too nice.
|
yeah, the gate voltage was a huge oversight, and yes, my reference voltage is Vbe, after things warm up it gets "stable"
and I agree, TI chips are good, though, first time I hear about Webench, I know TI like to spoil designers, I mean their datasheets are so good, but a
tool like that, I'll have a look. with that in mind, I did this for the absurdity, for fun, and I don't realistically think there's any other reason
anyone should be doing something like it. but that is my opinion.
EDIT: and I like BJTs, and discrete components, as for the inductors, even the cheap scope was catching the EM radiation when the box was open
[Edited on 31-12-2024 by khlor]
"NOOOOOO!!! The mixture is all WROOOOOOONG!"
|
|
Keras
International Hazard
   
Posts: 1014
Registered: 20-8-2018
Location: (48, 2)
Member Is Offline
|
|
Really, I’m not sure why you bother with all those discrete transistors while you could order ICs that would do all the regulation for you and boost
your efficiency way up to the 90%s.
I know this is less fun than building the whole shebang from scratch, but if you value energy… :p
For example this IC costs less than € 1 over here (unit pricing), probably you can get it for a handful of nickels.
|
|
Sulaiman
International Hazard
   
Posts: 3779
Registered: 8-2-2015
Member Is Offline
|
|
Nice. messy, but nice, and it works.
I understand the desire to make discrete circuits from scratch.
ICs would make the job much simpler
buying a ready made psu is even easier, and probably cheaper,
(enclosure,connectors,knobs,switches,initial failures etc.)
but where is the fun in that?
good effort.
......................
to me, chemistry is similar,
almost every chemical that I've synthesised is cheaper and probably purer if I buy it,
but I keep going.......
CAUTION : Hobby Chemist, not Professional or even Amateur
|
|
bnull
National Hazard
  
Posts: 599
Registered: 15-1-2024
Location: Home
Member Is Offline
Mood: Sneezing like there's no tomorrow. Stupid cat allergy.
|
|
Did you include a fuse on the mains side?
You need short-circuit protection on the output.
You're using caps rated to 25 V in a place with 19.5 V plus that huge ripple. Change them for 50 V caps. Better yet, measure the voltage between pins
for each electrolytic capacitor in the circuit and substitute them by others rated to at least twice the measured value. Trust me, you don't want to
push them.
I know they are quite old, but you may want to take a look at the electronics books at WorldRadioHistory. Allan Lytel, John Potter Shields, and Rufus P. Turner have some books on power supplies from which you can adapt something.
Search for the service manual of a commercial power supply. These manuals have schematics of the device (sometimes with labels on the
blocks, like "switching", "regulation", "thermal protection" etc.).
Simulate. You can get results pretty close to real life without risk of burning or blowing up stuff. The time I spend on simulations more than
compensates the time I would spend trying to fix a major screw up (chiseling away melted insulation, for example). They're not perfect but they beat
pen and paper for me, especially for complex circuitry.
Always read the datasheets and test the components. I have some capacitors whose capacitance is roughly half of what it should be.
That's an interesting project.
|
|
khlor
Hazard to Others
 
Posts: 111
Registered: 4-1-2014
Location: Who knows, really...
Member Is Offline
Mood: No Mood
|
|
Quote: Originally posted by Keras  | Really, I’m not sure why you bother with all those discrete transistors while you could order ICs that would do all the regulation for you and boost
your efficiency way up to the 90%s.
I know this is less fun than building the whole shebang from scratch, but if you value energy… :p
For example this IC costs less than € 1 over here (unit pricing), probably you can get it for a handful of nickels.
|
I know, in fact I did already one using the tl494 and cost was next to nothing I got 4 ics for about US$ 2, but this is the hobby, the fun is in doing
something you aren't exactly supposed to.
Quote: Originally posted by Sulaiman  | I understand the desire to make discrete circuits from scratch.
ICs would make the job much simpler
buying a ready made psu is even easier, and probably cheaper,
(enclosure,connectors,knobs,switches,initial failures etc.)
but where is the fun in that?
good effort.
......................
to me, chemistry is similar,
almost every chemical that I've synthesised is cheaper and probably purer if I buy it,
but I keep going....... |
Thanks, I mean, this means a lot when it comes from someone who gets it.
Well... I didn't bothered with fuse on mains side, because the entire circuit is fed from a laptop power adapter(a dell 65W 19.5V) I assume it has its
own fuse, though, I guess a fuse would be important, not just on the input of my circuit but also on the output of it.
Short circuit protection, I though of it, but never implemented even though I should, right there with reverse polarity protection and soft start, it
is a work in progress.
Quote: Originally posted by bnull  | You're using caps rated to 25 V in a place with 19.5 V plus that huge ripple. Change them for 50 V caps. Better yet, measure the voltage between pins
for each electrolytic capacitor in the circuit and substitute them by others rated to at least twice the measured value. Trust me, you don't want to
push them.
|
About the caps, Rainwater mentioned it, and I guess that if I want this ship to sale for real it is time to get some new caps, thanks for bringing
this out, I'll take it to heart.
Quote: Originally posted by bnull  | I know they are quite old, but you may want to take a look at the electronics books at WorldRadioHistory. Allan Lytel, John Potter Shields, and Rufus P. Turner have some books on power supplies from which you can adapt something.
Search for the service manual of a commercial power supply. These manuals have schematics of the device (sometimes with labels on the
blocks, like "switching", "regulation", "thermal protection" etc.).
[...]
Always read the datasheets and test the components. I have some capacitors whose capacitance is roughly half of what it should be.
|
I'll be sure to check those out, in fact, I do favor older books because everything today is integrated or programmed(i.e. pic, avr, arduino), like a
black box and I do enjoy seeing how it used to be done.
And yes, most of what I know today came from service manuals and datasheets, though, I was much more concerned with getting things working rather than
the needed protections of the design, my bad.
And I'll start checking datasheets for capacitors as well, didn't thought it'd be that important.
Quote: Originally posted by bnull  |
Simulate. You can get results pretty close to real life without risk of burning or blowing up stuff. The time I spend on simulations more than
compensates the time I would spend trying to fix a major screw up (chiseling away melted insulation, for example). They're not perfect but they beat
pen and paper for me, especially for complex circuitry. |
Simulations, now days it is getting more widespread. I did spent some time without a proper PC, and I am typing this from a crappy 32gb laptop(I
disassembled it in hopes of upgrading just to discover the motherboard is the same they use on tablets) so, this one is something I've been avoiding,
I understand its importance and how helpful it can be, but truth be told, I never felt enthusiastic about it but whenever possible I'll give it a
shot, hope there are linux tools.
Good to see I'm not the only one who thinks this way.
I'm grateful to see that many replies and many with interesting insights, I'm already rethinking many things and how to rework or make a brand new and
improved iteration, please, keep 'em coming.
"NOOOOOO!!! The mixture is all WROOOOOOONG!"
|
|
Twospoons
International Hazard
   
Posts: 1350
Registered: 26-7-2004
Location: Middle Earth
Member Is Offline
Mood: A trace of hope...
|
|
I was thinking about your control loop last night, and theres a very strong possibility your circuit is running in a quasi linear mode, which would
explain why your efficiency is so poor for a buck regulator. Scope the mosfet gate and check the voltages. My guess is that its not switching hard,
but only to around the gate threshold voltage.
Helicopter: "helico" -> spiral, "pter" -> with wings
|
|
khlor
Hazard to Others
 
Posts: 111
Registered: 4-1-2014
Location: Who knows, really...
Member Is Offline
Mood: No Mood
|
|
Quote: Originally posted by Twospoons  | I was thinking about your control loop last night, and theres a very strong possibility your circuit is running in a quasi linear mode, which would
explain why your efficiency is so poor for a buck regulator. Scope the mosfet gate and check the voltages. My guess is that its not switching hard,
but only to around the gate threshold voltage. |
Sorry for the long time, well, I got worried about your earlier reply, since I did not use zener clamps and was already scoping the gates and you're
right, this circuit is working in a quasi-linear mode, the gate voltage starts at around -7V and as I ramp up the voltage pot it raises up to -9.8V
and then it gets switching, little to say I wasn't pleased, since it resulted in the majority of my losses, after plenty on thinking and debugging I
decided to make some changes, I tried to just step the fets and keep the 555 running, but no dice, then I decided to drive the "enable pin" of the
gate driver with a schmitt trigger, it improved the situation considerably, but while scoping the gate I saw that while the majority of pulses were
between -11V and -15V there were some around -5V and -8V and I don't think that is adequate, while messing around withe the circuit and rebuilding
the gate driver from scratch trying to understand what is going on, I am still at a loss, and some parts died, among them, 4x 555, 3x BJTs, 2x FETs,
and 2 resistors. most of the death toll was due to my carelessness while embroiled in testing and frustrated at my little pet project which at this
point devolved into complete madness, for now it'll be shelved since I have no more p-channel FETs, I'm not sure how I'm gonna solve this or perhaps I
might settle for this improvement and put large heat sinks on the FETs and settle for it, I guess my downfall was the and gate baked into the gate
driver, and the -5V pulses are the overlapping rise an fall of the BJTs since they activate independently, but for all my testing I couldn't find a
proper reason so it is just a quickly thrown together theory. however since I have to buy more parts, I'll go for improved caps as well and see if I
can get this to be better or at least as good as it can be with my insane requirements, at any rate I am once again grateful for the tips and help.
"NOOOOOO!!! The mixture is all WROOOOOOONG!"
|
|
Rainwater
National Hazard
  
Posts: 987
Registered: 22-12-2021
Member Is Offline
Mood: Break'n glass & kick'n a's
|
|
I admire your bravery and confidence. Building this without a
simulation, had it been me, would have resulted in a lot of smoke.
Ltspice is free, easy to use, and many manufacturers have models of their parts freely available.
At least then you can quickly, cheaply and safely try different stuff
"You can't do that" - challenge accepted
|
|
Twospoons
International Hazard
   
Posts: 1350
Registered: 26-7-2004
Location: Middle Earth
Member Is Offline
Mood: A trace of hope...
|
|
Buck converters usually rely on some form of duty cycle modulation for control - either fixed frequency PWM or variable frequency with fixed on-time
or off time. What you seem to be trying to do is a form of hysteretic control - turning the power on or off to maintain regulation. This is a valid
approach, but is usually only used where the buck converter faces a very large range of loads, and is only engaged for very light loads to improve
light load efficiency (the converter switches between PWM and hysteretic control based on load).
You would need to add a comparator with some hysteresis to your feedback loop to achieve hysteretic control, or you need to modulate the duty cycle of
your 555 oscillator.
Also: stop thinking of BJTs and MOSFETs as switches - they are amplifiers. They can mimic a switch if you drive then hard enough, but they are still
amplifiers.
Helicopter: "helico" -> spiral, "pter" -> with wings
|
|
Sulaiman
International Hazard
   
Posts: 3779
Registered: 8-2-2015
Member Is Offline
|
|
that type of voltage and current meter module has an inconvenient feature:
(I have two of them)
the current sensing is done in a very similar way to your current sensing using R13
so there is a V=I.R voltage across the thick red and black wires
so the voltage across your load is
(your power supply output voltage)-(voltage drop between the current meter thick red and black wires)
ie, the ACTUAL load voltage will reduce as the load current increases
even if your psu gives a perfectly constant output voltage.
.........................
Irrespective of the above,
it is convenient to have the output voltage 'floating' with a third (usually green) terminal that is connected to the chassis and 'earth'
under most circumstances the black and green terminals are connected together,
but you can if required, disconnect the green terminal, for a floating supply.
eg you could connect the -ve terminal to the positive terminal of a 12V battery to get
12V to (12V + psu voltage)
OR
connect the +ve terminal to earth for a negative output voltage.
this feature is most useful when there are multiple PSUs in a system.
including other mains powered instruments
often a high value resistor (eg 1MOhm) is added between the green and black outpuut terminals to shunt any leakage current.
CAUTION : Hobby Chemist, not Professional or even Amateur
|
|
khlor
Hazard to Others
 
Posts: 111
Registered: 4-1-2014
Location: Who knows, really...
Member Is Offline
Mood: No Mood
|
|
Update
Gentlemen, I haven't abandoned the project, yet... more parts died, mainly bc337 transistors, at least 3x 555 and one Lm358,but I still march on!
Following the suggestions here presented, I did the following:
-All input and output capacitors have been replaced by 50v rated ones;
- I worked to improve the feedback loop control replacing the transistor by something which results show to be a less unstable signal, by replacing
the bjt with a Schmidt trigger
Some other things I did since then include:
-Doubled the switching frequency to about 60kHz
-Changed the inductors to some filter inductors I found on a board that could only be a fluorescent tube ballast(it does have some shielding, jt looks
like a miniature transformer with a ferrite core)
-put some protection around the 555 and lm358 since they were getting fried, lost more than 5 ics
- as you can see on sheet #1 the ojtput stage got a little different in order to isolate the ic from the rest of the circuit, I don't know if it is
right or wrong, I know it works and nothing else fried of over 2 weeks of testing and abuse.
-I added a simple soft start I saw on stackoexchange, I scoped it and it does work fine.
I must say, on voltage control mode the improvement proved to be astounding, ripple used to be no less than 300mv and now I managed to keep it under
100mV which is something of an achievement to me,. though at higher currents ripple does tend to rise a little, up to 300mv, but at this point I
believe improvements should be made on the feedback loop, or increase output capacitance even further.
However, current mode is being the major roadblock here, after finally getting it to work I scoped the output and what I found terrified me to my
core, the output wasn't smooth, it had a lot, and I mean a lot of oscillation, it is like the capacitors weren't even there to begin with and the
circuit was outputting it raw. then I scoped my sensing resistor and quickly found what the problem was.
As the signal was being turn on, the mosfets were generating voltage spikes in the form of a sawtooth wave across that resistor and even though the
current control was apparently working, it was working in a wrong way, the spikes were being fed back to the circuit making it oscillate like crazy. I
did some research and found out that what I need is some sort of error compensation in order to filter those spikes out and send an "average voltage"
back to the circuit so it can regulate current properly, since after some considerations, I realized that the mode of current control I am using
works well for linear circuits where the output is supposed to be a smooth DC line and not the mess that is the raw output of a switched buck
regulator.
right now, I am considering reworking the circuit for the sixth time(yes, after my last post the circuit has been reworked five times already)
I want a true SMPS, however, I am considering a hybrid, switched for voltage regulation and linear for current regulation, I bet it would make things
simpler, though inefficient, but more efficient than a pure linear circuit. but for now, I am weighting my options, I got a reading on TI, infineon
and analog.com papers and they say it is done with at least three opamps, one to amplify the signal from the sensing resistor, another to get signal
from oscillations for error compensation and other to receive both signals and compare them to get the "average voltage" without the spikes and all is
fed to the control circuit of the gate for the FETs. I did a few tries, but no dice, I am unfamiliar with the process of dimensioning the resistors
and the feedback loop in on itself(see picture 4l)
Right now, this is all I have for this update, if you have any suggestions or a simpler materia on current mode switching regulator, it will help. but
for now, I am considering the hybrid route, but I ran out of space on the board and the box since a linear current regulator will require at least two
extra mosfets in parallel and a large heatsink.

Picture 1: Sheet #1 control board
Picture 2: Sheet #2 feedback signal

Picture 3: Sheet #3 power switching

Picture 4: current mode as found on https://www.cnblogs.com/shangdawei/p/3312352.html
"NOOOOOO!!! The mixture is all WROOOOOOONG!"
|
|
Twospoons
International Hazard
   
Posts: 1350
Registered: 26-7-2004
Location: Middle Earth
Member Is Offline
Mood: A trace of hope...
|
|
Perhaps you are beginning to understand why electronic engineers ( like me - 35 years experience) prefer to buy a chip from TI to do all this, instead
of "reinventing the wheel". Current mode buck controllers are cheap and common, and its usually only a little extra work to make a CV / CC variable
supply based on one. All the math required for picking the components is right there in the chip datasheet - especially the loop compensation, which
is critical for stability. 50mV ripple is trivial to achieve, 20mV or less is possible with care.
There's a point where doing it the hard way becomes an exercise in futility, frustration, and expense.
Helicopter: "helico" -> spiral, "pter" -> with wings
|
|
Rainwater
National Hazard
  
Posts: 987
Registered: 22-12-2021
Member Is Offline
Mood: Break'n glass & kick'n a's
|
|
1) No block diagrams / functional organization
2) No simulations.
3) No simulations / prototype comparison
1) Organization is the greatest tool of any design more complicated than on/off.
2) Know what to expect in an ideal world
3) And compare it to what you get in the real world
For example, sheet #1, leaving the unmarked IC(555 timer) on pin 3, entering Q1, Q2, and Q3.
You have 2 npn in series,
this will produce an 'nand' gate with the inputs of Q1b and Q2b and the output at the collector of Q1
and enough current to saturate the transistors,
the logic output will be low(about 50~150mV).
This is fed into an inverter (Q3) to make it logic High.
Assuming all works well, the end result is you only see the output pulses from the 555 when the feedback is HIGH
The same can be accomplished by applying the feedback signal directly into the 555's rst pin(pin 4).
Which is active low, so pull to ground to stop and hold high to run.
If you need your 555 output inverted, invert your duty cycle.
Block diagrams make optimizations like these much easier to spot.
They also explain in a universal language what you're trying to do.

Edit:
Just ran the numbers and your 555 would be clocking over 650khz with a 0.1nF (100pF) cap.
Thats way to fast for any 555 i have seen.
Edit:Showing my age, ti has one that operates at over 3mhz with a 15ns rise time.
EMI for everybody. Check your datasheets for terms and conditions.
[Edited on 18-2-2025 by Rainwater]
Here is an ideal simulation showing the effects of the suggested changes to the 555 output.
Notice the first cycle period difference between the 3 circuits
The orginal circuit initial pulse can be cut short depending on when the feedback goes high
The first edited circuit will have an extra long period of the first cycle.
Due to the initial capacator value of 0v
These can be corrected by adding an emitter follower to the capacator as shown in the 3rd circuit.
Which maintains a minimum capacator charge of ~1/3Vcc

https://everycircuit.com/circuit/6417463831035904
[Edited on 18-2-2025 by Rainwater]
I do not believe that using your Vgnd as a virtual ground is going to work the way
you have implemented it. Placing a diode there will lift the regulator up 1 diode drop
(0.7v) making it produce 9.7V when referenced to ground. But using that Vgnd is
causing some waky simulation results.
https://everycircuit.com/circuit/5779711385010176
[Edited on 18-2-2025 by Rainwater]
Sorry about all the edits. Dont want to spam the fourm with post.
Down with the flu and posting more during my conscious moments.
On page 2 R9 and R11 form a 1% attenuator to the current
sense, just before feeding that into a 101 gain amplifier.
Resulting in a gain of 99.99
Im not sure why your doing that.
The same can be accomplished by selecting the appropriate feedback resistor.
And ditching the attenuator( voltage divider)
Also of critical attention is the limits of the device as stated in the datasheet.
this opamp will go up to Vcc-1.4V and down to as low as 0.7 above ground. And a
minimum input offset of no more than 4mV.
This output then supplys another voltage divider made up of 2 pots and this is
where a block diagram would really really help out.
Im lost.
Its kinda a summing amplifer with an attenuated inverter. No clue

[Edited on 18-2-2025 by Rainwater]
Quote: Originally posted by khlor  |
I did some research and found out that what I need is some sort of error compensation in order to filter those spikes out and send an "average
voltage" back |
Add a low pass RC filter comming off Rsense into the first opamp.
Set the cutoff frequency(Fc) to be equal to or less than your desired switching frequency.
This will limit the opamps phase shift to below 90degrees preventing oscillations in
the current sense circuit feedback path.
I.E. leave R9 and swap R11 out for a capacator.
C=12πR9Fc
So a switching speed of 60k, R9 = 1K would = 2.7nF
If you bumped R9 = 500ohm you could use a 5.3nF cap.
You have to adjust the values for what you have on hand.
This will dictate the reaction speed of your device to a change in current.
[Edited on 19-2-2025 by Rainwater]
"You can't do that" - challenge accepted
|
|
khlor
Hazard to Others
 
Posts: 111
Registered: 4-1-2014
Location: Who knows, really...
Member Is Offline
Mood: No Mood
|
|
Rainwater, I've read this post and I thank you fir taking the time to properly dissect the poorly described mess I've cooked up, I really mean it.
Now adressing some points to help understand what I tried to do:
Quote: Originally posted by rainwater  |
1) No block diagrams / functional organization
2) No simulations.
3) No simulations / prototype comparison
1) Organization is the greatest tool of any design more complicated than on/off.
2) Know what to expect in an ideal world
3) And compare it to what you get in the real world
|
You're right, in retrospect I though of just drawing the block diagrams, but then I though it wouldn't show the details of the circuit and thus hide
faults, my "AND" gate is an inverted nand, and I was more concerned in putting this in evidence rather than showing just an and gate which is the
actual function it is meant to perform.
Simulations, I have a crappy laptop the ones with 32gb all in a single board and tried on LTSpice and... I kinda got it working but couldn't get the
circuit to work, so I left it alone and got back to pen and paper, I am not used to simulation, I understand how important it is and I should make an
effort to get it to work but I will admit it, it still eludes me and I don't really feel like it, I saw that you used everycircuit, I will give it a
try and try other solutions as well.
but all things considered, you make good points and I thank you for that, I will consider this on my next update as soon as I rework things out,
again.
Quote: Originally posted by rainwater  |
For example, sheet #1, leaving the unmarked IC(555 timer) on pin 3, entering Q1, Q2, and Q3.
You have 2 npn in series,
this will produce an 'nand' gate with the inputs of Q1b and Q2b and the output at the collector of Q1
and enough current to saturate the transistors,
the logic output will be low(about 50~150mV).
This is fed into an inverter (Q3) to make it logic High.
Assuming all works well, the end result is you only see the output pulses from the 555 when the feedback is HIGH
The same can be accomplished by applying the feedback signal directly into the 555's rst pin(pin 4).
Which is active low, so pull to ground to stop and hold high to run.
If you need your 555 output inverted, invert your duty cycle.
|
yeah, about this part, you got it, mostly. q1 and q2 make a nand gate and q3 is supposed to invert its output to make it an and gate, and yeah, it is
to output the 555 signal when the feedback is high, it was an effort to keep rework at a minimal after I changed from the idea of turning the
inductors in an alternated manner. but the 555 output at this stage isn't meant to be inverted, but buffered.
but I ill look at inverting the duty cicle, never considered the possibility,might come useful.
Quote: Originally posted by rainwater  |
Just ran the numbers and your 555 would be clocking over 650khz with a 0.1nF (100pF) cap.
Thats way to fast for any 555 i have seen.
Edit:Showing my age, ti has one that operates at over 3mhz with a 15ns rise time.
EMI for everybody. Check your datasheets for terms and conditions.
[Edited on 18-2-2025 by Rainwater]
Here is an ideal simulation showing the effects of the suggested changes to the 555 output.
Notice the first cycle period difference between the 3 circuits
The orginal circuit initial pulse can be cut short depending on when the feedback goes high
The first edited circuit will have an extra long period of the first cycle.
Due to the initial capacator value of 0v
These can be corrected by adding an emitter follower to the capacator as shown in the 3rd circuit.
Which maintains a minimum capacator charge of ~1/3V
|
Sorry, my bad, I forgot not only to lable the 555 but the capacitor is 1nF or .001uF oscillating at around 60kHz, the scope shown 62kHz mine is the
standard NE555, can't be that fast, I tried.
Quote: Originally posted by rainwater  |
I do not believe that using your Vgnd as a virtual ground is going to work the way
you have implemented it. Placing a diode there will lift the regulator up 1 diode drop
(0.7v) making it produce 9.7V when referenced to ground. But using that Vgnd is
causing some waky simulation results.
|
This virtual ground wasn't the objective but rather a consequence, in fact I'd prefer no virtual ground. the idea here would be to protect the 555 and
its delicate insides from back emf as I saw in a stack exchange post when looking up ways to protect the 555 from being burnt. however at this point i
believe it is causing more trouble than solving it, I've read that capacitors in parallel close to vcc and gnd of the ic can protect it from transient
spikes, but I was never confident on that
Quote: Originally posted by rainwater  |
Sorry about all the edits. Dont want to spam the fourm with post.
Down with the flu and posting more during my conscious moments.
On page 2 R9 and R11 form a 1% attenuator to the current
sense, just before feeding that into a 101 gain amplifier.
Resulting in a gain of 99.99
Im not sure why your doing that.
The same can be accomplished by selecting the appropriate feedback resistor.
And ditching the attenuator( voltage divider)
Also of critical attention is the limits of the device as stated in the datasheet.
this opamp will go up to Vcc-1.4V and down to as low as 0.7 above ground. And a
minimum input offset of no more than 4mV.
This output then supplys another voltage divider made up of 2 pots and this is
where a block diagram would really really help out.
Im lost.
Its kinda a summing amplifer with an attenuated inverter. No clue
|
Sorry to see that, hope you get better soon.
To be honest here, even I have some trouble understanding what I've done, the amplifier from current sensing is a circuit I got from somewhere and I
calculated the resistors to be a 10x gain, guess it doesn't make much sense now, the second opamp was supposed to be a Schmidt trigger, but it didn't
worked so well and I tried to reverse the resistors resulting in what you see now which kinda of works. I tried looking at the datasheets for
application information but it went over my head. I will give it some more effort and try to understand to make proper use of the opamps
Quote: Originally posted by rainwater  |
Add a low pass RC filter comming off Rsense into the first opamp.
Set the cutoff frequency(Fc) to be equal to or less than your desired switching frequency.
This will limit the opamps phase shift to below 90degrees preventing oscillations in
the current sense circuit feedback path.
I.E. leave R9 and swap R11 out for a capacator.
|
Thanks, that is much more easier to understand than all that I found on TI papers but.
Rainwater, again, thank you very much for this help and for the time you spent doing all of this even the simulations. and I will try to make things
more organized and understandable on my next update.
"NOOOOOO!!! The mixture is all WROOOOOOONG!"
|
|
bnull
National Hazard
  
Posts: 599
Registered: 15-1-2024
Location: Home
Member Is Offline
Mood: Sneezing like there's no tomorrow. Stupid cat allergy.
|
|
Quote: Originally posted by khlor  | Gentlemen, I haven't abandoned the project, yet... more parts died, mainly bc337 transistors, at least 3x 555 and one Lm358,but I still march on!
|
Are you using sockets?
|
|
khlor
Hazard to Others
 
Posts: 111
Registered: 4-1-2014
Location: Who knows, really...
Member Is Offline
Mood: No Mood
|
|
if by sockets you mean those things you can use to quickly swap chips, then yes, but I started only on the last time i rebuilt it, so imagine four
times already having to either desolder and resolder or scrap an entire board because of a burnt ic.... it was... lenghly. however since last time
nothing fried, then it is good!
"NOOOOOO!!! The mixture is all WROOOOOOONG!"
|
|
Rainwater
National Hazard
  
Posts: 987
Registered: 22-12-2021
Member Is Offline
Mood: Break'n glass & kick'n a's
|
|
When simulating your design, putting everything into the simulation is often a finishing step.
You're not at that point of the design yet, and it's a real pain in the butt.
I prefer idealistic building blocks. they make things much quicker.
so let me diminstrate how I would break this problem down.
after a long time in the field, most of this has become second nature and doesn't require much planning.
its gona take a lot longer to write than to execute.
ultimately, we want a simple buck converter.
this implies we need a pulse width modulated switched power source.
(There are many pwm topologys. Im going to stick with a fixed frequency and varable duty cycle to keep this quick).
we want to drive an n-channel mosfet.
this is the first set of constraints given to us. pull the datasheet
( IRF9540), and we have a
max VDS -100V
VGS(th) -2V ~ -4V
max Vgs +/- 20V
RDS(on)Vgs=-10V 200 mOhm
Td(on) 16ns
Tr 73ns
Td(off) 34ns
Tf 57ns
Rg 1.6 ohms
Qgd 29nC
good stuff, good stuff.
I just now realized you're using a p-channel device.
all the same maths, tho
so we need to drive the gate to less than Vcc - 10V to get that low impedance path to Vcc of 0.20 ohms
easy math here, so expect me to get it wrong.
simulation will correct me.
we have a Vcc of 19 - 10 = 9V
0.0000000299=3.2nF
so the parasitic gate capacator will be about 3.2nF.
(I really think i just use the delta, which would be 10V and 2.9nf,
but let's go with 9V 3.2nF). Little explanation, the charge required to turn the mosfet fully on is given in columbs, i just converted it to frads.
F=q/v
not only do we need Vcc-10V but we have to do it through a parasitic
resistance of 1.6 ohms (not all datasheets give this number, must be an rf
component)
this equals an ideal charge time of 25ns(20MHz) and a rms of 47.3mA peeking at
6250mA
if we want a 60kHz switching frequency, let's target a switching speed 100x that.
For a 16.6us switching frequency, let's target a 166ns switching speed.
if 5*r*c=t
then t/(5c)=r
so 0.000000166÷(5×0.0000000032) = 10.375 ohms
and to doublecheck 5×10.375×0.0000000032=166ns
(so the 5rc is the time it takes to 98% charge a capacator.
just so everyone is on the same page)
this will have an instant current draw of 1034mA and an rms of 6.5mA
so what do these numbers mean?
if we drive the mosfet 'on' in 166ns, it takes (16+73= 89ns) for the gate charge to
take effect and the output to fully rise, so the total transition time between fully off
to fully on will be around 255ns.
to go from fully on to off would be 166+34+57=257ns.
in worst case, we will spend 512ns out of 16.6us in a switching state.
that is about 3% of the duty cycle, just switching
which is about 3% of our alloted time, in the most energy inefficient state, worst
case scenario, we are zero % efficient for 3% of the time, and we have an ideal
efficiency of 97%.
really it will be less b/c those values in the datasheet is for a fast transition, and we will be doing a particularly slow transition. Which is good,
we can say that theoretical +97%
base line, we know we need to feed the mosfet driver with 1034mA(6.5mA rms)of current to get this done.
your drawing says your using BC327 and BC337 after reading the datasheet, your
going to need to parrallel them to get the current needed. which is a terrible idea. (https://youtu.be/0ZG11UBoj-o)
max current is 800ma and you need to push 1034.
2 in parallel tempature coupled should do the trick.
so they have a high hfe of >100. meaning if you apply 10ma at the base
you get 1000ma at the emitter. i would seriously consider setting up independent
base resistors and bonding the collectors to smoke at least 1 set before switching
to a properly rated part. if parts arnt flyin, are you tryin?
We will/may need to add some emmitor resistors of low value, (2-5ohms) to prevent
overdriving the drivers but ignore that for now .
simulation time.
https://everycircuit.com/circuit/4609478892847104
notice the 115ma crossover distortion,
this will blow the transistors, their already maxed out.
so we need to introduce a delay to allow the on transistors to fully switch off before
turning the off transistors fully on.
if we parrallel the transistors base with a small capacator, this will delay its on time,
then if we shunt the base resistors with a diode, this will decrease its off time.
https://everycircuit.com/circuit/5579716065099776
there is still a little minor crossover distortion but now the shunted current is less than 1ma for less than 1ns so only your electrician will know.
(looks great from the house)
so timeing and current are checked. now lets focus on voltage. spec says Vcc-10 and we are currently dropping 20.
there are a few ways to tackle this problem, datasheet says +/- 20, and we could
ignore it, but we will be within 85% of absolute maximum, so no.
we could use a rubber diode but this can effect our current draw. so no.
we can prep a new voltage plane and use it as ground for the sinking portion of the
driver cycle. shore it up for the high inrush current all without effecting performance. (to the bus)
https://everycircuit.com/circuit/4839481706414080
See what I did there, it will be a pain in the but to implement but for now, we model it as another voltage source, do the hard stiff later
notice how we had to lift the current sink driver circuit by 10V to maintain proper
Vbe biasing, and how I had to half the base resistors, because of the voltage difference.
basicly instead of dealing with a 20v system, we are dealing with a 10v system that starts at 10v up.
simulation allows us to quickly implement the 'ideal' solution for a problem without
having to involve every little perfect detail.
as we approach the next problem, just rinse and repeat the process. use the maths, you do not need a super computer.
so sleepy. got class then work ill add more when I get time, we still got to fully implment the mosfet into the ciruit.
"You can't do that" - challenge accepted
|
|
Rainwater
National Hazard
  
Posts: 987
Registered: 22-12-2021
Member Is Offline
Mood: Break'n glass & kick'n a's
|
|
I left off with an ideal 10v voltage source.
this is so simple. it's hard to consider. and easy to miss
we need a sinking, 10V voltage source.
the easiest, way is another common emitter amplifier,
this time using a pnp transistor.
so what happens is as we sink current out of the parasitic capacator,
we feed a modest Pnp that will devower anything over 10V, but nothing under 10.
https://everycircuit.com/circuit/6403352245829632
now, the simulation shows a slow response due to the small biasing current through
the 2 resistors. I can increase this current to increase our sinking ability, but this
waste power and decreases efficiency. We also need to consider the maximum
current these little transistors can take.
A better option is to store the excess charge and elongate our sink time.
so we add a capacator.
But what size?
i use the 10s rule. bias things 10 times what you need for a 1% error.
let me explain.
we need to sink 3.2nf of capacity. if we use a 3.2nf cap, then our final voltage will be
half the input. so the 10v difference we want will only be 5v.
if we double it, 10/5/2.5,
tripple it, 10/5/2.5/1.25
10 times 10/5/2.5/1.25/0.625/0.31/0.16/0.078/0.039/0.019/0.0097
so a 32nf cap will do just nicely.
https://everycircuit.com/circuit/5594798681620480

now we have a 35ns rise and fall time for our gate driver.
thanks to the simulation, we see many basic circuits that dont work "exactly" the
way I expected, but we can identify and solve these issues in minutes instead of days.
the last ideal components to solve are the 2 drive signals.
both need to have a low state of 10v and a high state of 20 with 20ma of current.
but what would happen if we just used one signal? lets simulate
cool, there has been no change to the circuit or spec. No unwanted backfeed
between the stages. we need one signal source with 20ma of current.
now lets just go ahead and replace the driver signal with a 555 astable oscillator,
fixed frequency on a 10v lift kit.
hurray, broke the simulator.
https://everycircuit.com/circuit/5744018562613248
This should work, let me email them again.
Its the year 2025, i should have a good spice simulator for the phone by now
Attachment: buck converter drawings 1-5.zip (274kB) This file has been downloaded 29 times
So attached are the schematics that follow alone with this ramblings.
Well. I broke their site for most of the morning. But it is what it is.
This simulation is getting to complex for a phone so time to break
it down into smaller parts until we put it into ltspice.
We know the driver must deliver +20 high and +10v low. And
according to the 555 datasheet, it will not do that.
Dont forget that we are going to lift the 555 up by 10V.
This will do two important things, first it will get us away from the maximum
Vcc allowed, but more importantly it will make our 0v low state, really 0V+10V.
And the 10V high state, 10V + 10V.
But not so fast. Datasheet time



The first 2 images put numbers to it and the second 2 are in crayon, yum yum.
Look at the chart on the top. This tell me that when the 555 is in a high state
And supplying a current of 10ma the output will be Vcc-(1~1.7)
Sinking current doesnt do to well ether.
To the simulation, lets see if this will be a problem.
https://everycircuit.com/circuit/4870370574336000

yes, another undesired effect. Because we can not get 0.6v or higher below
Vcc, during the HIGH output of the 555 the pnp transistor is not turning
off completely.
During the low cycle, we remain slightly above the desired 10V, but
this does not cause an issue because it is within the 0.6 threshold.
So we need yet another pullup stage.
We can use a npn transistor, to give a - gain and provide rail to rail
voltage, but that would invert the signal and mess up the timing of
the driver. Instead we can use a voltage divider, to get us within the 0.6 difference
that we need.
Back to the maths. The voltage divider formula is just a ratio, * a coefficient.
Vout=VinR2R1+R2
There are an infinite number of combinations, we just have to pick
the total resistance, then apply the ratio,
The datasheet says worst case is Vcc-1.9. And i like
play room so lets say Vcc-2.5
We need to be less than 0.6 so lets say 0.55
0.552.5=0.22,1000∗0.22=220,1000−220=880
0.55=2.5220220+880
Now with this resistor divider we can shift the high output up by 2V
But it also shifts our LOW state to a higher voltage.
2.2=10220220+880
Thos will only effect our biasing current by (2/10=0.20) 20%
But now we have increased the bias resistor for that pnp from 350 to 350+880.
We need to remove the 880 resistance during a low cycle and keep
it inplace during a high cycle. We need a bypass diode. But not just
any old diode, we want one that perfectly matches the voltage drop we need to
cover. Our worst case is 2.5v we need a rubber diode
A Vbe multiplier will work great, providing us with an adjustable diode
drop to bypass that resistor. But we can go one step more, and instead of bypassing
the 880 resistor. We can replace the voltage divider completely with a rubber diode
(See W2AEW for an explanation of this circuit.)
2.5Vdrop0.7Vbe=3.6
So by picking a random R2 like 1000ohms, R1 can be 3.6k
providing the ratio needed for a 2.5V dropping diode.
With the new low voltage, the bias resistor needs to be recalibrated.
10/350=28.5ma, so we need to keep that, with a new Vdrop of 7.5V
7.5*28.5=214 so slap a 200 ohm resistor in there
Lots to write, i hope.it works. To the bus
https://everycircuit.com/circuit/6443729804197888
Almost. 50ma to go, alot better than 200 but not good enough

Now replacing the voltage divider did not work. Lets return it and
use the resistor network of the rubber diode to be the 880 resistor.
https://everycircuit.com/circuit/4879660320161792
And 15ma of off current.
What an adventure, im gonna spell check and leave it for today
Im sure this explains why buying a pre fabricated solution is the way to go.
This type of stuff is in those little $1 chips. And we ant even really started yet, all
this is just to drive that p channel device your using. We still got to define a pwm
control scheme. Implement feedback typology, do some parasitic prevention stuff,
power factor correction. Then figure out a layout to prevent emi emissions and
inductor couplings so this circuit doesnt ring like a bad pa setup.
Twospoons suggestion are starting to make sense to you now?
Attachment: buck converter drawings 7-9.zip (165kB) This file has been downloaded 29 times
[Edited on 22-2-2025 by Rainwater]
"You can't do that" - challenge accepted
|
|
Rainwater
National Hazard
  
Posts: 987
Registered: 22-12-2021
Member Is Offline
Mood: Break'n glass & kick'n a's
|
|
So to wrap up the driver section, their is a really easy fix for all these problems.
All these elaborate circuits have been proposed to condition the input to meet the
requirements of a push pull typology. You won't find a real-world example of this
because there is a simpler solution.
I could have lead with this and saved a lot of explanation but its about the journey
not the destination. If we swaped out the upper pnp transistor for an npn transistor,
how would this effect the maths.
Instead of trying to bringing the base voltage to about the collectors; we would just
have to bring the base voltage above the emitters. As the parasitic capacator
charges, the Vbe will constantly decrease until the transistor turns itself off.
We just have to ensire this point is above the threshold voltage for the mosfet we
are driving.
And what happens if the same is done to the lower stage. Replacing it with a pnp
has the same, but reverse effect. Now holding the base to a diode drop below the
desired voltage will turn on the transistor until it reaches our goal, then the
transistor will turn itself off..
So point being, by switching the upper and lower (pnp npn) pair to a (npn pnp), the
transistors solve all of the problems we solved in a more complex manner.
https://everycircuit.com/circuit/5469955860594688
umm. Crap, so i though you had them backwards in your original drawing, but now I
see that i just didnt read it right. My bad. That would have saved a lot of explaning if
I started here and not there. For those who know, heres a good laugh, for those that
didn't, well now you do.
[Edited on 23-2-2025 by Rainwater]
"You can't do that" - challenge accepted
|
|
khlor
Hazard to Others
 
Posts: 111
Registered: 4-1-2014
Location: Who knows, really...
Member Is Offline
Mood: No Mood
|
|
Well, I'm just speechless, you basically gave a lecture here, and I appreciate it very much. I mean, I started electronics as a hobby when I was a
teenager, and for long I left it aside, then got back, only did small stuff, a few transistors here, blink led there, done some repair work... this is
my first attempt at designing anything this... "big" and I must say, there is a lot I should've learned before starting this, talk about biting more
than I can chew, it is quite a humbling experience, and yes... doing my research reading TI, analog, infineon and other manufacturers papers on the
subject I realized that, yes, it is indeed far more reasonable to use a solution already made than making it all by hand. I did some of it with linear
circuits and had no trouble so I figured I was ready for switching, but turns out I was way outclassed for this. however the end goal was to learn and
through this journey I learned many things. and watching your simulations and this work you did kinda makes me feel... I don't know the word exactly
but it is around "inadequate" at any rate, I just started playing with simulations on everycircuit and another software from ECS studio, it is good
that it runs on android so I can do it on the fly, I'm still getting acquainted with these tools so I can start getting serious with it, been quite
slow here, work is taking all of me and then some more, spending nearly 13 to 15 and half hours a day spent on commute and work leave little time and
even less of me to do these things. but I am understanding some of the process and it has been insightful so far. do you have any reading material to
recommend for this kind of project?
And really don't feel too bad about it, I see it as a good thing you just misread my gate driver, it was quite the journey and helped me to understand
a few things, like how you can increase the time a transistor takes to turn on just by putting a capacitor in parallel with the base and emitter.
turns out I need to learn way more than I imagined to do this properly and still I think I may not even get there
"NOOOOOO!!! The mixture is all WROOOOOOONG!"
|
|
Rainwater
National Hazard
  
Posts: 987
Registered: 22-12-2021
Member Is Offline
Mood: Break'n glass & kick'n a's
|
|
Please dont be discouraged.
This looks like a lot but its really not when you break it down bit by bit.
When you get practice, it gets very easy.
It's all just basic ohms law and signal theory being applied.
"You can't do that" - challenge accepted
|
|
Pages:
1
2 |
|