MSP430 Projects

Peter Jennings

AB6WM - West Coast

GoPro HD Camera Controller

GoPro Hero HD

The GoPro HD Hero Camera is an amazing little unit that comes with a variety of mounting accessories making it ideal for attaching to my helmet when I am paragliding, or to my car when I am driving. I was lucky to get one for Christmas and I am making good use of it.

It can be used to take HD videos or 5 Megapixel still images. Automatic time lapse mode will take a photo every 1, 2, 5, 10, 30 or 60 seconds.

You would think I would be satisfied...

I guess some hackers are never satisfied.


KISS Thermostat

KISS Thermostat The problem was simple. I use a portable electric heater to keep warm in my tiny Romahome camper. The heater has a thermostat but being mounted on the heater itself, and having been designed for a larger space, the hysteresis is totally incompatible with my environment.

First it gets too cold, so I turn the thermostat up. Before too long, it is way too hot, so I turn it down. Then I wait forever for the heater to come back on. Eventually, I give up and turn the thermostat up again. Repeat ad nauseum.

What is needed is a thermostat to control the heater that 1) is closer to where I am and not on the heater; 2) has the correct hysteresis to turn on and off quickly enough to maintain a relatively constant comfortable temperature in the van.

MSP430 to the rescue. The tiny MSP430 USB Stick and MSP4013 target board has everything I need. The internal temperature sensor works a charm. Add one button for control and some smart software, and I will be comfortable again. It's just a simple matter of programming.

KISS Thermostat

I found a nice little solid state relay on eBay for $5.00 that was capable of switching 40 amps at 250V. I only need 5 to 10 amps, so this should provide a good margin of safety. The control circuit requires 1 mA at 3.3 volts, so the MSP430F2013 should have no problem.

The control logic was as simple as possible. If I feel cold, push the button. The heater will start and the turn-on temperature will be raised to the current temperature. If I feel hot, push the button. The heater will stop and the turn-off temperature will be lowered to the current temperature. If the heater is on and I want to increase the turn-off temperature, hold the button for more than a second. If the heater is off and I want to decrease the turn-on temperature, hold the button for more than a second. Effectively, holding the button widens the hysteresis. Complete control with one simple button.

Download Source: MSP430 Thermostat.c

When I return to my camper in the spring, I will wire the solid state relay into the power to the heater and install the thermostat unit in a wall. Backup safety is provided by the heater's own thermostat and overheating safety mechanism. The SSR will require a heat sink, which will be provided by attaching it to a metal plate in a convenient location.

With any luck it will be warm enough that I won't need to use the heater.


Temperature Logger

Temperature Logger

The temperature logger looks a lot like the thermostat above, doesn't it?

Once I had figured out the code to read the temperature and store data to the flash memory, necessary to design the thermostat, I realized I didn't need the thermostat for another month. So, in the meantime, why not program a little logging program into the EZ430 F2013 unit.

Mainly this was just an exercise in programming, but I did think it would be useful to log the temperature of the freezer to see how it cycles and to check the temperature in various locations with the door closed.

I just powered the dongle off a lithium battery that has a USB connector on it, which made the whole thing portable with no extra effort.

Download Source: MSP430TempLogger.c

The software allows you to set the polling rate and the number of samples to take in the define statements. No attempt is made to compress the saved data.

Holding the button down while applying power erases the flash memory. The LED flashes while data is being recorded and stays lit when memory is full.

To read the data, I used the IAR software and copied the data from the memory dump and pasted the list of values into an Excel spreadsheet. Excel's HEX2DEC function converted them into integers and it was easy to apply the formula (x-52120)/69 to get degrees Celsius which matched my thermometer when I calibrated it at two different temperatures. The samples were taken at a rate of one per minute.

Temperature Graph