decided id give another go at switch mode supplies. im still cheap to buy one of those one chip solutions, so its using a 555 timing source and a power transistor doing the switching. the rest of the regulator is just a typical buck regulator (inductor, capacitor, and diode). its running on a 7.4v dual cell lithium battery and im trying to drop it down to 3.3v. it could run a 500ma load just fine while keeping around 4 volts. so were getting closer.
as the load increases the voltage drops so at a point it becomes unusable. since were putting out around 4v @ around 500ma, that means the power supply is very usable. but what if i want to use a smaller load. well then you get higher voltages and that is undesirable. so i need a way to cap the voltage at 3.3v.
looking at the datasheets for one chip solutions gave me some ideas. first thing i need is a reference voltage. i decided to use a resistor and zener diode reference. the zener diode when reverse biased against the voltage source will breakdown to whatever its zener voltage is. in this case 3.3v, and the resistor just keeps it from melting. then i take the output from this reference and feed it to the non-inverting pin of an opamp, and on the inverting side i feed the output voltage from the regulator. in this mode an opamp is now an analog comparator. if in+ > in- i get a high voltage, otherwise i get ground. its like coding with silicon.
now that i have a bit telling me if were overvolting or not. its just a simple matter of taking the clock source and the output of the opamp and anding them. you just **** with the clock so that the inductor and capacitor have a longer discharge time, and thus the average voltage drops. i looked at a 74hc08 quad dual input and gate, unfortunately you cant run it any higher than 6 volts. but i had some pn2222s that can push up to 40 volts. an and gate is just 2 transistors and 3 resistors, so i built one out of those 5 parts. now i just feed the output of this gate into that power transistor and the voltage never goes past 3.3. i feel really awesome right now.
now there is one problem. i want moar powar! i want to push a couple amps. unfortunately when i use a smaller load resistor (which increases the current) the voltage still drops below the desired level. this really all comes down to my buck regulator. things like the size of the inductor and capacitance and duty cycle and frequency all play a part in how much power a switch mode supply can handle. it takes math which i am too lazy to do. i also dont have much in terms of inductors. i found a nice one in an old portable tv i took apart last week. but aparently its not big enough. maybe one of those big toroidal coils like the ones i salvaged from a mobo. i suppose i can swap the resistors on the 555 with a pair of pots so i can dial in the clock parameters and see what i can do there. maybe increase the duty cycle, idk. but using a big whopping coil that will probibly kill something is my plan of action.