Working with 5V devices is a lot easier than it used to be – USB is everywhere and puts out a fairly reliable 5V. A lot of interesting devices now run on 3.3V however, so a good source of regulated 3.3V is needed. I’ve had some bad experiences with breadboard power supplies. These are very cheap boards than come with 1 or 2 regulators – 3.3V and 5v, and usually have a USB and/or 12V socket.
It may be that particular breadboard power supplies I ended up with came with inferior quality 1117s, but at least some of them have a nasty failure mode: if the input voltage is too high, or the output momentarily shorted, the full input voltage is presented on the output. This is not very nice behavior when working with prototype circuits on a breadboard. You expect the power supply to protect you from this kind of thing, not give up at the first sign of trouble at then pass through unregulated input voltage!
I have a particular plugpack power-suppy that I call the ‘circuit killer’. It is a nominal 12V DC output, but puts out around 19V at low current, and outputs half-rectified DC, there is no capacitor in there. I learnt the hard way that it is a circuit killer. Plugging it into a 1117-based power supply ruins the power supply quickly, and the failure mode then damages any attached low voltage devices.
So I wanted to look at some 3.3V voltage sources that could be powered by 5V or >12V
The MCP1702 is a low dropout linear regulator. I bought a few 3.3v devices (1702-33) because they come in a breadboard-friendly TO-92 package – looks just like a transistor. I think of these as the equivalent of a 7805 but for 3.3V. Its rated for 13.5V input. The first thing I did was connect it to the circuit killer plugpack as a test. I looked at the output and there was a lot of noise. It turns out the is a minimum capacitance of 1μF required on the input at output. I put a 35V 100μF on the input, and 22μF 16V on the output. The output was now a solid 3.3V output with around 50mV ripple.
The next thing I tried was to short out the output. The output went to 0V and stayed there, and the 1702 got hot. Looking at the output with an oscilloscope, you can see it switches on every few milliseconds to see if it is still overcurrent, and then switches off. After I removed the short it returned to normal operation instantly.
The 1702 is a tough device, I haven’t managed to kill it yet, so I know I can rely on it in circuits in future. To be extra safe, if powering a 3.3V circuit from >12V, you could always use a 7812 or similar ahead of the 3.3V regulator – it’s likely to have a higher maximum input voltage, and the 3.3V regulator will only see 12V.
Efficiency: Linear regulators draw at least as much current from the input as they provide to the output. In my test with an LED, I measured 17.1mA at 3.3V, and 17.6mA at 19V. Multiplying current and voltage to get power, that’s 334.4mW in, 56.4mW out. That’s an efficiency of 16.86%. The difference between input power and output power (in this case 83.14% or 278mW) is dissipated by the regulator. That’s why linear regulators get hot and larger ones require heatsinks. The efficiency corresponds approximately to voltage out / voltage in, so with a lower input voltage, the efficiency would be higher.
The MCP1702 has a maximum output current of 200mA so if you need more current you can use several of them in parallel, use a larger linear regulator or a switching regulator.
To overcome the problem of inefficiency in linear regulators, there are switching regulators. These are most useful when there is a large difference between input and output voltages.
A switched regulator by reduces the voltage by switching the input voltage on and off rapidly, with the output going through an inductor, converting the DC to AC. The AC is then rectified with a diode and smoothed with a capacitor. The switching frequency is high, so that the inductor and capacitor can be relatively small.
Below is the 1501-33 3.3V switched regulator, which I found and desoldered from a junk PCB. It has the same pinout as an LM2596. You can get adjustable LM2596 power boards very cheaply on eBay but I wanted to build my own for the satisfaction and to learn something. Once I know how it works, I can always order some if I need more than one.
There is a sample circuit on the datasheet that I will build:
Circuit operation: The circuit is a buck converter. The output is switched to VIN using an internal transistor with a PWM duty cycle according to the current requirements of the load. The inductor and capacitor store energy when the output is off. The feedback input monitors the output voltage across the capacitor, lowing the PWM duty cycle if it is too high, and raising it if it is too low. When the output is switched off, the back-emf in the inductor causes the voltage at the output pin to go below ground. The diode then starts conducting. This allows the stored energy in the inductor to be used. The diode has to be fast so that the energy is not wasted, so a faster Schottky diode is needed. Some buck converter designs use another transistor in place of the diode, that is switched on when the output is off.
You could probably adjust the output voltage by using a resistor voltage divider on the feedback pin but I haven’t tried this – yet.
Circuit construction: I’m using a bare copper board to build the circuit so that I can use the large copper area as a heat-sink. Incidentally this board has been sitting in my junk box for years, so I’m happy to use it for something. I was originally planning to etch it to make a printed circuit board. For this circuit, I’ll simply cut out the areas I don’t want connected to ground and surface-mount solder everything.
I’ve used a pencil to trace around the regulator package and some .1 inch headers. The penciled-in parts are to be cut out. I’m just soldering the IC and pin header at first, I’ll solder the other components once I have tested the basic functionality on a breadboard.
Below you can see board with the traces cut out using a small knife and then widened with a screwdriver.
Next I scrubbed the board with steel wool and added some flux because the board had been sitting in a box for a long time and looked oxidised. This step makes it a lot easier to solder. Then I soldered the regulator and a .1″ pin header.
Now it’s ready to plug into a breadboard and experiment with various combinations of diodes, inductors, and capacitors.
The first components I tried was a 80μH inductor and 50μF capacitor, and a random diode I had lying around. The capacitor was not large enough, replacing it with 220μF resulting in a solid ~3.4V output with 12V in. Testing for current draw with a resistor I got 14.7mA, and the input as 19.88mA. That’s 50mW out for 238mW in – 21% effeciency. That’s worse than a linear regulator and not what I expected. After doing a few more tests and mucking around I realized I had the diode on the wrong side of the inductor! It’s not actually doing anything where it is in the photos above. Putting the diode in the correct place – between ground and pin 2 (output) of the regulator – brought the efficiency up to 37%. That’s better but still not as much as it should be.
Next I looked at the type of diode. The forward voltage measured .56V which seemed to high to be a Schottky diode as specified for the circuit. I plugged in some wires in place of the diode and started testing different diodes while measuring the input current. I picked the one that resulted in the lowest input current – 10mA. Now the input was 15V 10mA, output 3.37V 27mA, which works out to be an efficiency of 60%.
I added a few more pads to the circuit board for the diode, coil, and input and output capacitors. Once I checked the board for shorts, I soldered the parts on and tested it. 12V out instead of 3.3V and the output capacitor was getting warm. Not good! It was only rated for 6V. I realized that I hadn’t wired up the feedback connection. I added that and replaced the capacitor with a 100μF 16V, and it worked again.
Testing the completed board:
I’m fairly happy with both power supply circuits I have built above. The linear regulator circuit is very small and doesn’t need many components, but is limited in power output. The switching buck converter circuit provides a stable voltage over a range of currents and is more efficient. It barely gets warm when supplying 1.5A. I will probably cut the board smaller and put it in a nice case soon.