MSP430 LED Matrix Toy

A place to document your own projects.

MSP430 LED Matrix Toy

Postby Markus Gritsch » Mon Sep 12, 2011 5:54 am

Hi,

I just did a quick little project using an MSP430 and two 595 shift registers to drive a small LED matrix display, suitable for beginners. Two push buttons are used as inputs and a buzzer is connected to a timer output to generate some tones. A resistor to pull up the reset line, a clock quarz to keep track of the time and a buffer capacitor for good measure are all the additional parts needed.

1.JPG

schematic.png


The board dimensions were chosen to match the size of a 2 AA battery holder. Four M2 nuts were forced into the perf board at appropriate positions under the ICs.

IMG_0901.JPG

IMG_0903.JPG


Although only very few parts are used, there were some 50+ connection wires on the bread board. By using thin wire from an old relay, everything fits nicely between the board and the battery holder.

IMG_0905.JPG

IMG_0906.JPG
Last edited by Markus Gritsch on Tue Sep 13, 2011 3:50 am, edited 1 time in total.
User avatar
Markus Gritsch
Sr. Member
Sr. Member
 
Posts: 271
Joined: Tue Feb 09, 2010 6:54 am

Re: MSP430 LED Matrix Toy

Postby Markus Gritsch » Mon Sep 12, 2011 5:55 am

The example firmware scrolls a short message smoothly across the display when pressing a button and puts the board in sleep mode afterwards. In sleep mode the power consumption is about 2 µA, so 2000 mAh AA batteries would theoretically last 100+ years :)
Attachments
source.zip
(7.66 KiB) Downloaded 645 times
User avatar
Markus Gritsch
Sr. Member
Sr. Member
 
Posts: 271
Joined: Tue Feb 09, 2010 6:54 am

Re: MSP430 LED Matrix Toy

Postby TonyD » Tue Sep 13, 2011 3:45 am

Great project, thanks for posting it. I like the idea of recycling the copper wire from an old relay coil :)
Tony
User avatar
TonyD
Jr. Member
Jr. Member
 
Posts: 90
Joined: Wed May 11, 2011 9:46 am

Re: MSP430 LED Matrix Toy

Postby Greeeg » Tue Sep 27, 2011 5:57 am

Hey Nice project, the point to point construction really shrinks down those jumper connections compared to the breadboard setup.

I noticed in the code as part of your brightness matching scheme you use the inline delay_cycle routine would it not be more efficient to use a capture module of the timer so the CPU can be sleeping during a delay. I know that the current consumption of the LEDs when they are lit would far surpass the CPU's consumption but every little bit helps. Just my $0.02

Are you planing to do anything else with it? Maybe an RTC with an alarm :P
Greeeg
Newbie
Newbie
 
Posts: 38
Joined: Wed May 12, 2010 6:23 am
Location: Australia

Re: MSP430 LED Matrix Toy

Postby Markus Gritsch » Tue Sep 27, 2011 6:15 am

> but every little bit helps.

Of course there are many ways the firmware could be written, but as you already pointed out, saving on the MCU current while having the LEDs suck 30+ mA is really not worth the more difficult approach.

I have not yet decided what to use this little platform for. Since I already built an MSP430 based bedside table alarm clock [1], I would rather like it to become something else :)

[1] viewtopic.php?f=56&t=2126
User avatar
Markus Gritsch
Sr. Member
Sr. Member
 
Posts: 271
Joined: Tue Feb 09, 2010 6:54 am

Re: MSP430 LED Matrix Toy

Postby voidptr » Wed Sep 28, 2011 1:23 am

noob questions again :o).
why choose this MCU, why not choose one from the LCD serie ?
the lcd serie seems pretty nice, with onboard hardware mux etc etc...
i didnt check price or other things yet ...

but it is a nice little board you made for sure :o)
voidptr
Full Member
Full Member
 
Posts: 244
Joined: Fri Oct 08, 2010 5:58 am

Re: MSP430 LED Matrix Toy

Postby Markus Gritsch » Wed Sep 28, 2011 1:38 am

Good question. The answer simply is because I had the parts lying around :) And because PDIP packages are so darn easy to solder.
User avatar
Markus Gritsch
Sr. Member
Sr. Member
 
Posts: 271
Joined: Tue Feb 09, 2010 6:54 am

Re: MSP430 LED Matrix Toy

Postby Markus Gritsch » Wed Jul 10, 2013 2:06 pm

Hi,

I decided to make an alarm clock out of this little project. Here is what it looks like:

IMG_3713_4000x3000_80.jpg

IMG_3730_4000x3000_80.jpg

First I cut the battery holder at the bottom to give the clock an angled standing position:

IMG_3714_4000x3000_80.jpg

The remaining single battery compartment holds a 700 mAh AA sized LiFePO4 battery. The cell voltage of 3.2 V is perfect for this application.

IMG_3715_4000x3000_80.jpg

I also changed the schematic a tiny bit and added a white LED to the buzzer pin. In the dark it can be used as a handy flashlight.

schematic.png

The firmware from my previous alarm clock [1] was adapted. Please find it attached to this post. Due to the larger flash memory size of 8 kB of the MSP430G2452, the wake-up tune is a bit more sophisticated. (Taken from the SHizZLE demo [2] starting at about 1:15.)

In standby mode the clock draws about 2.6 uA. Displaying the time consumes about 18 mA (auto power-off after 4 seconds), using it as a flashlight by having the white LED turned on also draws about 18 mA (auto power-off after 1 minute).

The rechargeable LiFePO4 battery I used is rated having 700 mAh @ 3.2 V. Doing the math gives the following theoretical values:

Standby: 30 years
constant on flashlight/displaying time: 43 hours

I guess the real limit is the self discharge of the battery, but LiFePO4 batteries perform quite well in this respect.

So I expect a few years of regular usage before I have to recharge it :)

A short video of the alarm clock in action is available on YouTube: http://youtu.be/UG2Iyw69h-E

Have fun,
Markus

[1] viewtopic.php?f=56&t=2126
[2] http://www.youtube.com/watch?v=he6oLBwVNms
Attachments
source.zip
(46.41 KiB) Downloaded 563 times
Last edited by Markus Gritsch on Mon Jul 22, 2013 2:38 pm, edited 2 times in total.
User avatar
Markus Gritsch
Sr. Member
Sr. Member
 
Posts: 271
Joined: Tue Feb 09, 2010 6:54 am

Re: MSP430 LED Matrix Toy

Postby timotet » Fri Jul 12, 2013 12:10 pm

awesome as usual.
good job
User avatar
timotet
Newbie
Newbie
 
Posts: 9
Joined: Sat Dec 24, 2011 1:45 pm
Location: Bend, Oregon

Re: MSP430 LED Matrix Toy

Postby Markus Gritsch » Fri Jul 12, 2013 12:55 pm

Thanks! :)
User avatar
Markus Gritsch
Sr. Member
Sr. Member
 
Posts: 271
Joined: Tue Feb 09, 2010 6:54 am

Re: MSP430 LED Matrix Toy

Postby UhClem » Thu Jul 18, 2013 6:38 pm

An interesting device and I would be building my own if I had the parts handy. But while looking at the code I noticed a few things.

There is a comment that claims that this will run down to 2.4V. This contradicts the MSP430 data sheet which shows that it will not run at 16MHz below 3.3V. Setting the DCO to 8MHz would allow safe operation down to 2.4V.
UhClem
Newbie
Newbie
 
Posts: 2
Joined: Thu Jul 18, 2013 6:25 pm

Re: MSP430 LED Matrix Toy

Postby 32768 » Thu Jul 18, 2013 10:18 pm

Neat.

I'd love to build one of those with a ATmega328P. Any chance the code can be ported?
32768
Newbie
Newbie
 
Posts: 4
Joined: Mon Sep 03, 2012 4:56 pm

Re: MSP430 LED Matrix Toy

Postby Markus Gritsch » Sun Jul 21, 2013 5:56 am

@UhClem: Good catch! When testing I just lowered the supply voltage of my power supply and looked at which voltage it won't start anymore. I will make another test using the 8 MHz calibrated oscillator frequency.
User avatar
Markus Gritsch
Sr. Member
Sr. Member
 
Posts: 271
Joined: Tue Feb 09, 2010 6:54 am

Re: MSP430 LED Matrix Toy

Postby Markus Gritsch » Mon Jul 22, 2013 2:37 pm

I did some measurements and got the following results:

16 MHz -- the device stops working at 2.4 V,
12 MHz -- it works down to 2.1 V, too little voltage for the white LED to turn on,
8 MHz -- stops working at 1.8 V, matrix LEDs are quite dim,
1 MHz -- works at least down to 1.5 V, below that the LEDs are completely dark.

I think I will stay with 16 MHz to prevent discharging the LiFePO4 cell too much and risk loss of capacity. This way I'm forced to recharge it at 2.4 V. The white LED also only works above this voltage.
User avatar
Markus Gritsch
Sr. Member
Sr. Member
 
Posts: 271
Joined: Tue Feb 09, 2010 6:54 am

Re: MSP430 LED Matrix Toy

Postby UhClem » Wed Jul 24, 2013 6:35 pm

What temperature range did you test over? If you will never ever operate it outside of narrow room temperature limits then this isn't important.

As for using the failure to operate below 2.4V as a stick to get you to charge the battery, why not add a low battery warning? There is an ADC just sitting there begging to be used. You will want to keep it powered down most of the time of course.
UhClem
Newbie
Newbie
 
Posts: 2
Joined: Thu Jul 18, 2013 6:25 pm

Next

Return to Project logs