You can read it here.
I won't spoil the surprise by giving you the ending.
|Joe's Hobby Electronics||
I've written a review about these buck voltage regulator modules that Ebay is awash with.
You can read it here.
I won't spoil the surprise by giving you the ending.
This was one of those projects that should have taken an afternoon and didn't, however it's now complete and working rather nicely.
I already had a box from a defunct project that had the 4x20 LCD display installed and power switch, mains transformer and a mains IEC socket on the rear so I decided to re-task it for this.
Inside is a PIC18F25K22 running this show, and the device can monitor up to three channels. Each channel has a 5-pin din connector and cable that connects to a Maxim DS18B20 temperature sensor.
You can set the alarm temperature independently on each channel, and the project starts beeping and flashing the LCD backlight if a maximum is exceeded. I also included a relay that can be used as a power interrupter for the project under test. This way I can leave a project on soak but if it starts to over heat, the power can be cut automatically.
The reason it took longer than anticipated was for some reason the PCB never etched correctly and I had some messing around to do. The software only took around an hour to write and debug. I love Proton BASIC.
...and the reason it's three channels and not more, well I happened to have three 5-pin din sockets in my junk box. If I'd had more... who knows.
If anybody is interested I'll make available the circuit diagram, PCB foil and PIC firmware but this really is an easy project to design and build.
So, now that's up and running, I can get back to the original task of designing a decent voltage boost converter.
So, over the last few evenings I've managed to finish the first useful board for my new extendable PSU; a 5v board that can supply around 3 amps. It has a trim control that allows the output to be adjusted from 5v to 6v, and a couple of op-amps wired as voltage comparators that illuminate a couple of LEDs to indicate over or under voltage conditions (less than 5v or more than 6v).
Now all happy that I'd got my first board up and working I set about designing the next one that can provide a variable 0 to 30v at around 1 amp.
Happily playing with some ideas on my breadboard I suddenly noticed smoke coming from the circuit, a bang, and then a piece of the voltage regulator went flying past my head.
The problem was, besides a fault in my design, I hadn't noticed that the regulator was starting to fry.
I did have an amp meter in series with the board but I didn't see what it was reading.
What's needed I thought, is something that can alert me to when things are getting hot.
So, I've started on a new project. It will have the ability to monitor multiple temperature sensors and report audibly if one or more of them exceeds a pre-defined temperature. All this so I can eventually measure and record the discharge curve of a battery pack. See previous blog entries to find out more about that.
That's another breadboard with a half finished prototype put to one side, and the start of another project; multi-temperature sensor alarm project. I need to think of a more snazzy name than that. Whilst it would have just been simpler to pick up some cheap data logger off Ebay.... it wouldn't have been so much fun.
Oh.. and a word of warning. Electronics on the whole is a safe hobby. Baring the old soldering iron burn or stabbed finger when a screw driver slips, you should be pretty safe if you are sensible and carful. However, things do go wrong and most components will complain venomously if they are stressed beyond their design parameters; or just connected the wrong way around. I'm fortunate in that I wear spectacles and they offer a limited amount of eye protection, but you do need to be carful.
If you're ever present when a tantalum capacitor explodes, you will wish you had a gas mask and fire extinguisher handy never mind a pair of spectacles.
I'm currently working on a +5v plug-in module for my new PSU (see previous blog post).
I had several requirements for this module including the ability to withstand a dead-short circuit and the final output voltage to be trimable to +/- 0.5v. Because of this I decided not to use the existing +5v rail that's already present, instead opting to down convert the existing +12v.
Good old linear regulators are almost indestructible if a few sensible precautions are taken, but they give off a fair amount of heat when dropping a large voltage, especially if you are wanting to pull a couple of amps.
After some research I opted for the LM2576-ADJ (also because for some reason I have a stack of them to hand).
The above circuit is straight from the datasheet and I'm using this almost as is. The only component required that I didn't have was the 150uH inductor.
Like most seasoned hobbyists I've learned to keep things that are useful and I've a drawer full of old inductors, ferrite rods and toroids that I've salvaged over the years but I decided to wind my own inductor on a ferrite toroid.
Now I've never really given this much thought before, but when buying inductors they list the inductance value, the amperage and sometimes the resistance. A wire inductor is after all just a long piece of wire, usually wound around a former of some kind so it's bound to have resistance and the more wire you have, the higher resistance. Because it's wire it has a maximum current carrying capacity and hence a maximum working current.
However, whilst experimenting with winding an inductor for this project I noticed something that in hindsight is obvious, but that I'd never really thought about before.
I wound two different inductors and after some experimentation managed to get them both pretty close to the inductance required; and I've opted to use a slightly higher value of around 220uH for this project.
The left one was wound on a much smaller toroid; you can't tell from the picture but the larger core is also around double the thickness of the smaller one.
Both inductors work in my test circuit but the larger one is more efficient.
With the input voltages the same for both tests, the regulator circuit draws 472 ma under test with the larger inductor, and 493 ma with the smaller one.
I'm not sure how many turns there are on the small inductor, probably around 70, but you can see there are only 14 on the large one and even taking into account the physical size of the core, much less wire was required and hence it has a lower resistance.
Oh, and if you're wondering how I wind my cores and check their inductance, I'll create a blog entry about that when I get a chance.
Yesterday evening I completed the first of the plug in modules that simply allows me switch the thing on and off, monitor the output voltages and fault conditions.
This is as basic a module as you can have, consisting of only LEDs and resistors. Later, I will create a better monitoring card that can actually monitor the output voltages. For now, I will rely on the PSUs own low-voltage signal.
These PC PSU's need a decent load on their outputs for them to function correctly. After some research and experimentation I found that 50 ohms across the +12v did the trick and the output voltages remain steady and seem well regulated. One article I found suggested loading the +5v line as well, but this PSU really didn't like that and refused to start.
Next step is to start designing some output cards. A simple card to start containing a switching regulator for +5v with several switched outputs and a couple of amps to begin with.
After this I really need a stable 0 to 10v fine adjustable output at around an amp. This will allow me to calibrate my data logger project.
The long bank holiday weekend arrived and I decided I would complete a battery powered project that's been sitting around for a while; I have a lot of half completed projects sitting around the workshop.
I needed to calibrate the software that monitors the internal rechargeable batteries and realised I didn't have any type of suitable data logger. So a nice quick little project idea was born, and anything to distract me from what I should be doing.
Whilst trying to calibrate my new little data logger I realised that my trusty bench PSU drifts around, a lot.
I built it around 10 years ago and it does the job, but it's a bit limited. I also think that the reservoir capacitors could do with being replaced. Also the always on fans are a bit noisy sometimes.
So, the data logger project got dumped on the growing pile of half completed projects and I set about designing a new power supply.
I've been thinking about doing this for a couple of years, and I've even been slowly acquiring the parts required.
The problem I've found over the years with bench PSU's is that they never do everything I want. Some fixed 3.3v, 5v and 12v outputs that can supply a couple of amps each would be nice. Then I started experimenting with Nixie tubes and realised I needed something that can produce a couple of hundred volts at a few mA. Then I needed a 12v PSU that could supply around 10A to allow me to repair and test a CB radio for a friend. Then I wanted something that was suitable for battery charging. Now 1.8v electronics are starting to become popular and my bench PSU won't go down that low. And the list goes on.
I decided I needed a modular PSU, one that I could plug in personality modules designed for specific purposes and hey presto, the universal modular power supply was born.
It can supply around 24 amps at 3.3v, 30 amps at 5v and a whopping 50 amps at 12v and has a single quiet, variable speed fan. It can also supply -12v at 1 amp.
Ok, so I cheated a bit and based the design on a 650w PC power supply.
However, I'm NOT going to do what many of these cowboys do and just mod a PC PSU.
It's dangerous and to be honest, a complete waste of time. I've seen many projects that start off by drilling holes in a standard PC PSU, fitting binding posts and then saying its a complete project, only for the PSU to fail (of old age or by your own actions) and you have to start again.
A bench PSU needs to be robust and capable of handling short circuits and other silly mistakes.
Current limiting is also an essential component when your PSU can deliver 50 odd amps in a heart beat.
The PSU I'm using is an unmodified (almost) stock PC PSU. The only modification is to cut off the low voltage connectors as I didn't have suitable male connectors to fit. As it happens, it's a neater job if you cut the cables to the desired length and use your own connectors and that's it. You don't even have to open it up or remove the lid.
My design is based on a 19" Vero rack, and with the PSU fitted there are 10 card slots available for custom modules. The great thing is that if I run out of slots, I can remove modules that aren't currently required or I could extend the unit to a second rack.
The above images show the completed frame.
You will notice from the first image there appears to be three metal spacers from the top of the frame to the PSU. These are just holding the PSU in place and stop it moving around. They are not fixed to the PSU housing.
You may also notice a couple "stop" in the bottom left of the picture that stops the PSU sliding forward and another one on the bottom right that stops the PSU sliding sideward. These stops hold the PSU really snugly and there's no movement at all. Also, if I need to replace the PSU for a different size one, I can move the stops around as required.
I did add an earth wire from the PSU (using one of the PSU's mounting holes) to bond it to the chassis and so scrapped the paint off the PSU to get a good connection.
The backplane consists or two identical (well almost as I changed the design slightly for the second card to correct a minor mistake I noticed during drilling), five slot panels. Each panel is fed with +12v, +5v and 0v connections.
You can just see the control signal connector on the right panel in the bottom right corner that connects to the PSUs control signals.
There is a nice metal cover that screws on the back of this rack to protect everything, and whilst you can't really see it from the pictures, the top and bottom panels are perforated so there is plenty of ventilation for the PSU and the plug in modules. The fact that the frame is metal will also mean it acts as a giant heat-sink.
As it happens, I probably won't make use much of the PSU's native 3.3v and 5v rails as there is no short-circuit or current limiting protection on these lines, so most of what I need will be driven from the 12v rail. However, some of the plug in modules may require a low voltage for some logic so using the existing 3.3v and 5v rails will save me some effort.
After checking for short circuits between the rails, I connected the PSU plugs and plugged in. As expected nothing much happened. The +5VSB line is active but that's it.
The first module will actually be a monitoring and controller card. The PSU requires a dummy load on the 12v line before it will power up correctly.
I will create a proper project for this once I've got a little time.
When I started PIC programming 15+ years ago hobbyists used to build their own PIC programmers and as such, came out with their own ICSP (In-Circuit-Software-Programming) interface connection pin-outs which they would adopt for their own designs. I don't remember giving my own pin-out much thought and it was probably based on the easiest way to route tracks on the PCB with influences from Everyday Practical Electronics' and the late John Becker with his TK2/TK3 PIC programmer projects. In those early days, you only needed 4 wires to establish an ICSP connection.
When the 18F devices started to become available a requirement for a 5th wire was added and so the 4-pin connector needed to be expanded on. For me, I opted for a 6-pin connector and my current personal standard came into existence, and that's what I'd stayed with ever since.
I always use 6-pin Molex connectors for my ICSP connections and as I bought a life-time supply of them cheap several years ago, I've no intention using anything different; at least for the majority of my projects. The Molex connectors are keyed so it's impossible to make a reverse connection.
However, over the years a standard has started to be adopted based on the Microchip PICKIT2 and PICKIT3 programmers. These programmers also use a 6-pin connector but have no reverse polarity protection like that offered by the Molex connectors, though using the Microchip standard you are less likely to damage things if the connection is reversed.
So the question is, do I keep my standard or change ?
I could adopt the Microchip standard really simply. My home-built custom programmer has standard 9-way D-type connectors as it's interface and it would be a simple matter of creating a new programming cable that matches the Microchip standard. A couple of years ago somebody asked me to look at a PIC project they created that used the Microchip standard and I did quickly make a different cable for my programmer... and I've never used that cable since.
Changing things at this stage feels like change for change sake. My current configuration works really well for me and I have no real incentive to change. But changing standards are an unfortunate way of life. In the software programming world it became common practice to adopt variable naming standards, only for this now to be frowned upon when using some programming languages.
Maybe if I wait long enough, Microchip will change their standard and fall into line with mine.
One lives in hope :)
In June 2012, I wrote a blog article on how to update the PICKIT2 to support the 18F25K22 PIC device. This is easy to do and just requires updating the local software device file, and I provided a link to the page on the Microchip site where you could download the required updates. Unfortunately, and I suppose not surprisingly really, Microchip seem to have pulled the page and the programmer is discontinued. It was replaced several years ago with the PICKIT3.
However, I for one still use my PICKIT2 all the time, and the internet is awash with them for sale, so I've included the required device file here.
When initially installed, the PICKIT2 PC software will probably only support the 18F25K20 device.
To check, select "Device Family" from the top menu of the PICKIT2 programmer software and then select PIC18F_K
Now select the "Programmer" top menu, and then "Manual Device Select" near the bottom of the list.
On the main screen, a drop-down list will be available next to "Device". You will see that whilst the 18F28K20 device is shown, the 25K22 device is missing.
Exit the Programmer software.
Locate the folder containing your PICKIT2 software (mine is here: C:\Program Files (x86)\Microchip\PICkit 2 v2)
In the folder you will see a file PK2DeviceFile.dat
This is the device parameter master list. Rename this file to .OLD
The above .ZIP file contains a replacement .DAT file.
Rename the file in the .ZIP file to PK2DeviceFile.dat and place it in the PICKIT2 folder above.
Restart the PICKIT2 software and hey-presto, you now have support for the 25K22 device as well as many other devices.
I was contacted a couple of days ago about the possibility of changing my digital themo clock to also show the date.
It sounded like a quick change and as the RTC chip does have the date available, it seem like a quick project for a rainy afternoon.
It actually took a lot longer than I thought as I had to also make provision for setting the date, including the year. Then I found I needed to restructure everything and as I made changes, more and more of the code needed to be updated. It's almost been rewritten now.
The new firmware is available on the project page for those that want to try it.
I took the opportunity to make a couple of other changes.
I've removed the need for the crystal on the PIC; the one for the RTC is still needed of course. It wasn't required as the PIC's internal timing is good enough and I needed an additional output pin to connect to my debugger. You can leave the crystal in place if you want and it shouldn't cause any issues. However, you now have two free I/O pins to play with if you need them.
The interrupt called display routine has been completely re-written and is now tiny compared to the original. It causes a lot less flicker and the display runs brighter as a result.
At some point, Weebly, the cowboys who host this site, did something that broke all the sites internal links. I've repaired these as best I can but if you do happen to spot anything that's broken, please drop me a line.
Sorry for the inconvenience.
A software and hardware engineer who loves retro computers.