Close

Launchpad Dev Platform & Current Measurements

A project log for Diabetic Infusion Set Reminder

Simple on-desk reminder of infusion set lifetime and replacement cycle.

david-ogilvyDavid Ogilvy 02/29/2016 at 14:270 Comments

When I started this project, I knew I needed a low cost and low power microcontroller. All it really needed was a timer, some basic IO (5 pins), and the ability to use a watch crystal. Looking around my lab/study, I found some old MSP-EXP430G2 Launchpads. The kit includes an MSP430G2211 which is close enough to what I will be using (it's in the same family, and has analog comparator functions that the G2201 doesn't have, otherwise the same chip). The pin headers connecting the debugger section to the target section came in handy for taking power measurements.

Using my trusty Dave Jones uCurrent Gold, and a Keithley 2000 DMM, I was able to take measurements in various states.

Running the core off the internal oscillator (DCO), which runs at approximately 1 MHz, with a /8 divider, results in a core clock frequency of 125kHz. Running current is 100uA at this frequency.

Running the core off the external watch crystal, 32.768kHz, with a /8 divider, results in a core clock frequency of 4.1kHz. Running current is 6uA at this frequency. However, I had some issues where it would boot up and run off the DCO, because the LFXCLK wasn't ready yet. There's an interrupt that occurs when LFXCLK fails, which I could use to then kick it back into low frequency mode. However, the device only runs in full power mode for a few seconds at a time, so I didn't bother. DCO it is.

In Low Power Mode 3, with the internal timer running off the 32.768kHz external clock, with interrupts enabled for the button, current consumption was a measly 600nA.

I have yet to decide on resistor values for the LEDs, but will be looking to keep the LED current around 2mA or less to reduce battery power consumption. A quick calculation shows I should get 6-12months of runtime easily with the occasional manual viewing of status.

FYI: If you are using Code Composer Studio, and haven't tried out GRACE yet, do it. It's super easy to setup chip peripherals using a GUI. I had the timer, IO pins, clock sources, etc all configured in no time using GRACE.

Discussions