Thursday, 28 September 2017

Breadboard Power Supply

Remember the power supply that I bought for my breadboard, because it was just a dollar?  Yes, that's right - the one I blew up!  Well my subsequent investigations into potentially mending it revealed some interesting information to me.

Of course, the first thing I found out is that many of the mains powered DC supplies that come with devices like your broadband modem, cable set-top box, Yamaha electronic keyboard... and so on, are what are called 'unregulated'.  This means that while the specs panel on them might say something like 'DC Out : 12v @ 1000mA', what that means is that even if you are drawing 1000mA from it, the unit should still manage to deliver 12 volts.  However, to achieve this and avoid the extra component costs of building a regulator into the unit, if you are drawing just a few mA from it, then the unit will generally deliver way over 12 volts, perhaps as much as 50% over - that's 18 volts!!

As my breadboard power supply regulator said it would take an input of up to 12 volts, and I had already used it successfully with a normal PP3 9 volt battery, I felt quite safe connecting it to my 9v @ 1000mA DC supply.  Oops - what a 'noob' thing to do.  I switched on the breadboard supply, which drew maybe 50mA with nothing except its on board LED and my multimeter connected across it, and shot about 14 volts straight into the regulator - which objected strongly, and let about 10 volts out the other side on what should have been the 5 volt line.  Lucky I didn't have anything sensitive plugged into the breadboard!

Now, strangley enough, the 3.3 volt regulator still worked perfectly at the time.  So a little while later, having obtained a replacement board (well, it was just a dollar...), I thought that I would remove the surface mounted 5 volt regulator chip - with a view to eventually replacing it - maybe.  In the meantime, the absence of that chip would help me identify which board was fully functional, and which could only be trusted at 3.3 volts.

After setting to work with the soldering iron, the chip came off the board easily, and... the 3.3 volt regulator stopped working!  Ugh - I threw my hands up in disgust, and threw the power supply board into the bottom of my 'salvage' box (well, it was only a dollar).  I couldn't really understand what had gone wrong at the time - but things like that niggle me, even if it was only a dollar, and after a few weeks of stewing, I was determined to get to the bottom of it. 

Thanks to a schematic and a quite detailed review of the board I found, by Peter Vis, I realised that the 3.3 volt regulator is fed straight from the 5 volt regulator's output, rather than directly from the same raw input.  So even though the 5 volt regulator was not working properly, if I ran it from the 9 volt supply (which provides around 13-14 volts), then after a random voltage drop... even though it lets through way more than 5 volts, is still safely below 12 volts, and therefore acceptable to the 3.3 volt regulator as an input, giving me a reliable 3.3 volt output and unreliable 5 volt output wobbling around between 8 and 11 volts.  This also explains why removing the 5 volt chip rendered the whole board useless.

I am guessing that if I was to now try hooking the board up to the 12 volt supply (which is actually pushing 17-18 volts), then the resulting voltage coming through the dead 5 volt chip would have dropped some, but probably still be higher than 12 volts, and probably fry the 3.3 volt regulator as well.  I'm not going to put this theory to the test - yeah... even though it was just a dollar!

Something else I discovered quite by lucky accident, is that the USB plug on these little boards, is a female and is supposed to be an output - also fed from the 5 volt regulator.  However, by soldering together the male ends of two USB-A leads (such as from those archaic meeses that nobody wants any more cause they prefer wireless ones), you can take a regulated 5 volt supply from a powerbank, your PC, or your phone charger, put it into the board that way (there is no diode forcing you to use it as an output only), and have a functioning power supply on the breadboard with both 5 and 3.3 volts available.  Awesome!  (...and very lucky for me, as I had assumed the USB plug was actually an alternate input mechanism anyway - like on my Arduino, and thought it damned inconvenient that I had to make up this lead myself as I couldn't find anywhere that sold Male to Male USB-A leads - that should have rung alarm bells to me, I guess...)

OK - now to look for a new AMS1117 5 volt surface mount regulator.  What's the betting they cost more than a dollar! 

Footnote - 11/10/2017
I found a seller on eBay that has a packet of 10... for a dollar!  Given the potential likelihood of this happening again in the future - I've ordered a pack and will try to repair the faulty board.  After all - the chips are only a dollar ;-D

Wednesday, 27 September 2017

Bench Supply Regulator - finished (finally)

It's been quite a while since I last published a post, which was partly due to a 3 week 'holiday' back to the UK which left me with a lack of time; partly due to a lack of progress in any of my electronics ventures (due to a lack of time); and partly because I haven't been at all convinced by the reliability of my blog audience stats, and wanted to keep away from blogger for a while to check if it was simply my own activity on any one of 3 different devices, using 2 different browsers, that was giving me 'hits' despite me trying to block it from recording my own activity.  Well - after a couple of months away from blogger - I can confirm, depressing though it is... I have absolutely no recent activity at all, so it looks like I am totally wasting my time, and nobody reads this at all.  So if nobody reads this, why am I bothering to tell you if you aren't going to read it anyway?  Ah well - it is an outlet for my frustration - so I may keep on writing just for the hell of it.

So - on with the post... I have finally completed building my 'Regulator Box' for the bench power supply.  The idea was to provide a buffer between unregulated supplies (such as various mains powered wall plug supplies rescued from defunct IT equipment, all of which appear to produce around 50% over-voltage when under little or no load) and the Arduino and breadboard power supplies.

The Arduino can allegedly be fed by up to 20v (though I'm not sure I want to put that to the test), but the breadboard supply will only take a maximum of 12v - as I found to my cost.  I plugged one of the aforementioned wall plug supplies into it, that was rated at 12v @ 1000mA, but I later discovered that it was massively NOT putting out 12v as advertised, but actually providing over 17v at the few milliAmps that the PSU on its own was drawing.  This very quickly fried the 5v regulator and rendered the PSU useless - but more on that in my next post.

So, what I am planning is for all of my power supplies that plug into the mains and produce vastly different voltages to what is claimed on the specs, as well as the 12v batteries that actually put out anything from 11 to 13v, and the solar panel charge controller (if I ever get solar on the roof) which will be controlling an 18v input under ideal conditions... all of these will plug into my new regulator box.  There is an LED display showing the input voltage present (0-30v), and that is fed into the buck converter (which can handle up to 40v).  The buck converter is adjusted to provide a regulated 9v output, which is shown by a second LED display, and then made available to my projects via two 2.1mm plugs which can then feed the Arduino and breadboard PSU safely.

I managed to shoe-horn it all into a little project box which is frosted transparent plastic, so with the LED displays pushed up against the case from the inside, they can be read from the outside without the need to cut any holes for them.  I drilled a small hole above the adjuster screw on the buck converter, just in case I want to fine tune the output voltage (which does seem to vary slightly based on the input voltage overhead).  In terms of construction, I used a hot glue gun to stick the LED displays onto a strip of clear plastic cut from an old tape cartridge box, pushed them right into the bottom of the project box (face down), and then used the hot glue gun to tack the strip in place on the sides.  I then did a similar thing with the buck convertor, screwed on the lid, then turned the whole thing upside down so that all the components that were facing downwards, are now at the 'top' of the box.  It's not the prettiest thing, but it is functional, and keeps everything contained - I'm happy with it.