01 November 2010

Design Note: Power

A number of comments in the community lately have suggested a note on powering the MSP430 outside of the launchpad would be helpful; to that end I'm writing up this design note to help explain the options and requirements for powering the MSP device.

Chip Configuration

The MSP430 has two pins for power that correspond to the high and low states for the digital logic: Vcc and Vss respectively. For the MSP430, Vss is typically ground and Vcc is usually in the 1.5-3.6 V range, depending on the application. (On the value line devices, these are labeled as DVCC and DVSS, with the D referring to the digital circuitry. Some devices also have a separate AVCC and AVSS for analog signals and peripherals. On these devices, you can tie the A and D supply pins to each other, but the ability to use separate supplies is there.)

Regardless of your chosen power source, there is one thing that must absolutely be done in all designs. Every MSP430 device has a RST/NMI pin. This pin allows you to reset the chip externally by grounding that pin. (The non-maskable interrupt feature is something we'll look at in a more advanced tutorial sometime in the future; for now, only the default operation of the pin is considered.) The LaunchPad is designed with a button that does just that.

In the button tutorial that for a button to behave as an input, the pin needs a definite default state (either grounded for active-high buttons or Vcc for active-low buttons). In order for a chip to be powered, the RST pin must be tied to Vcc. Note that a direct wire is not a safe method of doing this; if a reset is triggered and the pin is grounded, it would short out your power supply. A pull-up resistor is required, and a careful look at the LaunchPad schematic (it's on page 15) shows that TI uses a 47 kΩ resistor, and that seems a reasonable choice for the typical supply voltages one would use for any MSP430 design.

Note in the schematic one other aspect: on the Vcc pin, there are two capacitors. One of these is a 0.1 μF capacitor (100 nF if you're unfamiliar with SI prefixes) and the other a 10 μF capacitor. These capacitors are used to filter the power input, by which we mean keep any fluctuations in the power supply from affecting the value of Vcc. You will see below that many suggested designs for regulated power supplies use a 10 μF capacitor or similar on their output, and you may be able to get away with not using another on the MSP430 if you use one of these power sources. (You might have also noticed a small 1 nF capacitor connecting RST to ground. While not absolutely necessary, if you find your design has sporadic resets that you can't explain, add this capacitor. A TI support technician tells me that for SBW programming to work properly, it should be a capacitor of about 1 nF in size.)

Unlike the larger filtering capacitor, the 0.1 μF should always be included unless you have good reason not to. Digital circuits, especially when run at higher frequencies, can be susceptible to noise from pins switching between high and low. This capacitor is used specifically to filter out that noise, and works best if it can be physically located close to the Vcc pin on the MSP430. If you plan on making your own board designs rather than relying solely on the LaunchPad, get a number of this size of capacitor, as it will be used a lot!

Power Options

There are a huge number of possibilities for powering your circuit: solar panels, large super-capacitors, even various fruits will supply enough electrical power to run your MSP430 designs! For most hobbiest work, however, there are three major places from which to draw power: batteries (consumer type, like you'd buy at the grocery store), the wall AC, and the USB port of a computer.

Batteries are sometimes the easiest choice, but there are some caveats to consider. For the most part, a typical battery holder with a couple of wires can be connected to Vcc and Vss. On the LaunchPad, there are pins for this purpose; soldering female header pins to the wires or using jumpers make battery use simple. Before just connecting up, however, remember that the MSP430 can't handle voltages higher than about 4 V. A 9V battery might sound like a good idea, but alone is not safe to use on the microcontroller.

Good combinations of batteries: 1 or 2 alkaline AAA, AA, C, or D cells would give 1.5 V or 3 V, both good supply voltage values. If you switch to a rechargeable battery, double check the type. Many rechargeable cells are nominally 1.2 V rather than 1.5 V. If you use the 1.2 V cell types, you can use up to three of these in series (a total of 3.6 V) without trouble. Coin cell batteries also work well if you have a holder for them. In general, batteries need no other external parts, though it may be a good idea to have both filtering capacitors on the MSP430 in this case.

If you use a higher voltage battery or battery combination, or if you want to use the USB power (5 V), you will need to step down the voltage to an acceptable level. While there are a number of ways to do this, perhaps the simplest and most effective is to use a voltage regulator. (The LaunchPad is powered from USB; the portion of the board dedicated to the SBW programmer includes a voltage regulator to drop the USB line voltage to 3.6 V.) These components are cheap, robust, and work very well when used properly. Some can even handle such a wide range of inputs that you could connect most any common power source to it and have the output you need. If you've never used a voltage regulator before, read up about it and learn how to use them. An excellent tutorial can be found at SparkFun, and is a good place to start. For my designs, I like to use Linear Technologies regulators, such as the LT1763. (Note that the suggested design on the LT1763 page includes a 10 μF capacitor on its output.) This particular regulator is only available in surface mount packages, but Linear makes a number of other varieties that are comparable in through-hole packages (as an example, the LT1965). There are plenty of options out there that fall into the voltage ranges useful for the MSP430.

If you want to use a wall outlet, you will also need a transformer with a rectifier. Plenty of stores carry such power supplies in a variety of voltages. Anything in the 1.5-3.6 V range will work directly, but I've found most wall-wart supplies are 5 V or higher, and will require a regulator to operate the MSP430.

There are many, many more ways to power your circuit, but these will give you a few reliable sources to start from. Remember to tie the RST pin to Vcc with a resistor, add a 0.1 μF capacitor near the Vcc pin, and keep your voltage within the usable range for the MSP430. Don't forget to connect ground (or the negative side of the battery as the case may be) to the Vss pin, and have fun exploring your power options!


cde said...

Re: Coin cells. Only work well for low current applications. If your trying to pull more than say 50ma at a time from a 2032, it won't be an easy design.

ken said...

would be nice if rough estimates of max current draw for various common coin cells or batteries are included as mentioned by CDE.

Thanks for a great post though...was wondering about voltage regulation...