Nov 23, 2011

Halloween Build Part 2: Power

The heart of my circuit design for this Halloween display is the PIC16F690 microcontroller from Microchip. The 16F690 is a 20-pin, 8-bit flash micro that comes with a 4MHz internal RC oscillator and a 10-bit analog-to-digital converter across 12 channels. I have generated the schematic in DesignSpark so I can easily talk about each piece and its function. This entry will entirely focus on the power piece of my design, hence the modified schematic in the picture below.

First and foremost, every circuit needs power in one form or another. In my post “Power Your Next Project” I took a high level look at how best to power each of the micros in the system and decided to use a 9V battery with a 5V voltage regulator. Like I stated in that post, I will do a full blog on voltage regulators in the future if for now you can accept that its purpose is to turn higher voltages into lower voltages. However, selecting the right regulator proved to be harder than I initially anticipated. One of the good things about being rooted in power electronics is that I know more about the ins and outs of various regulators than the average electrical engineer. Unfortunately, this can sometimes make it harder to sift through the noise and choose the right part. My biggest concerns were the package size, the output voltage, dropout voltage, and the rated current of the regulator. For simple projects like this those are generally going to be the driving factors. Others like tight line and load regulation are nice to have but I am not switching any heavy loads and the micro can operate on a range of 2V – 5.5V so it is not going to shut down because the power supply is lagging.

I wanted a regulator with a constant output voltage of 5V, a rated current of at least 200mA, and the lowest dropout voltage I could get in a TO-92 package to save on size (I will do a blog on IC packages someday). The standard 5V regulator that meets most of these criteria is the LM7805, but it has a 2V dropout voltage meaning that if the battery voltage drops below 7V the entire system will cease to function as originally intended. The LEDs would start to dim and most likely the timing would start to drift even further out of whack. On the other hand, low dropout regulators (LDOs) can keep drawing energy from the battery down to as little as 5.5V, which increases battery usability. You can see the comparison between the two in the annotated picture from my last post to the right.

After spending a few hours on FindChips, Octopart, and Digi-Key’s parametric search I came across a part I thought would do the job. I chose the LT1121CZ-5 from Linear Technology. The regulator has a dropout voltage of 0.4V and outputs a stable 5V signal with an input voltage up to 30V. It also sports a shutdown pin which can lower the quiescent current consumption from 30µA to 16 µA. The regulator is only rated up to 150mA, but after checking the maximum current the microcontroller would consume in my application I felt comfortable with that figure.

Another downside is that the regulator was about $2.60. LT has a reputation for making quality but expensive parts so I was not surprised the see the cost come out so high. While I know this does not sound like much, it is quite a lot to spend on a single component that doesn’t have any programmable intelligence. Still, I decided I was going to splurge on this part because it has some interesting properties that could be useful in future applications and it provides a stable output with only a single 33µF capacitor on the output. I also needed a 33µF capacitor for an LED driver I am working on so ordering this regulator did save me a little money on capacitors. After the part showed up, I did a quick test with my power supply to confirm that it worked the way I expected. You can see the results in the Figure above.

After I placed my order for this voltage regulator I decided to keep looking for something else that might have worked in its place and almost immediately found an equally matching part for far less money. The Microchip MCP1702 provides a 5V output with a dropout voltage around 0.1V at my loading conditions. It comes in a TO-92 package and operates with input voltages up to 10V (though the datasheet says it can go up to 13.2, roughly a 12V battery + float voltage). Since I only planned on using a 9V battery for this project, I figured the 10V limit would be enough even with the batteries inherent float voltage. Like the LT1121CZ-5, this regulator is stable with an output capacitance of 1µF to 22µF with higher values possible for electrolytic capacitors. The best feature of this other regulator…I was able to get it from Allied Electronics for about $0.48 – roughly 1/5th the cost of the LT1121CZ-5. I bought a bunch of these as well to use in throw away projects like this one. It definitely was not worth splurging on the extra special regulator when this one can do the job for a much lower price. I like putting in the effort to find the lowest cost solution even on one-off boards because it gets me in the right mindset for consumer product design. Look for the full schematic and the software in my next post.

1 comments:

Joel Ryan said...

I am impressed by the amount of work and thought that went into this.

Post a Comment