Jump to content

[ ENDED ] Nov 2010 - 43oh Project of the Month Contest

The November 2010 - 43oh Project of the Month Contest  

23 members have voted

You do not have permission to vote in this poll, or see the poll results. Please sign in or register to vote in this poll.

Recommended Posts

Entry to the November 2010 contest is open. This is an opportunity for you to show off what you can do with the MSP430. The 43oh community forum has been growing both with good discussions and members. The project section of the forum as well as the Blog has a lot of project ideas you can base your submission on. Feel free to ask questions about the project on the forum.




Now for the prize:

Winner : [T]exas Instruments has stepped in to sponsor this month's project with a TI Chronos Watch kit. Thank you for the kit TI!

Runner up : [G]eekdoc has been kind enough to donate a pristine unopened Launchpad kit. Although you may already have one, having another Launchpad can be quite handy like a project you may not want to take apart or recreate [J]oby's SPI Ninja. Thanks Geekdoc for sponsoring this month's contest giveaway.


To submit your entry, make an entry into this thread with the following:

1 - A small description of your project.

2 - A picture or video of your setup

3 - Code.

4 - Schematic(rough/hand drawn is fine as long its legible)


About judging the winner : A week before the contest ends, a poll will be created with all the project entries. Only members of the forum will be allowed to vote.


A few simple rules to follow:

- You must be a member of the 43oh forum at least a week before your submission.

- One entry from each member will be permitted.

- Your project can be anything based around the MSP430. You may interface the MSP430 to another controller.

- You may reuse code from anywhere as long as you give credit to the original author.



Enjoy yourselves!

Link to post
Share on other sites

since i got an extra hour this weekend and everybody is waiting for others, i will submit my project as the 1st entry.


@bluehash, don't know this post format is good, let me know and i can adjust it.


RFM12B Spectrum Analyzer




this is a simple rf spectrum analyzer project based on TI Launchpad. i have been working on other rf transceiver projects and in need of a simple rf spectrum analyzer to help me visualize what's happening.


this is a linux project, i had given attention with my best knowledge to make provisions so that it can be built under windows. however i do not have the time and resources to try out everything under windows.


i did successfully built and run the project under windows 7 w/ TI CCS IDE, for host visualization script, it also works under windows but required you to install some unixish packages (cygwin and more)


a RFM12B module is used to capture signal strengths of different frequencies. the RFM12B utilizes a SPI interface to communicate to a MCU. a software SPI is implemented in this project for simplicity.


the Launchpad firmware basically received commands from the PC side perl script to start sampling for signal strengths, the frequency and signal strength are then sent to a host application (written in perl) for visualization. there is a threshold in the firmware that prohibits data sending if the signal strength is below it. this is needed as the LaunchPad can only do 9600bps communicating w/ the PC and if we include all the zeros and noises for sending, the uart is not able to catch-up.


the current firmware also does not read all possible frequency due to the uart bottleneck, instead of reading at 7.5Khz gaps the firmware is only reading 16 x 7.5Khz (120Khz) steps. the valid range for the RFM12B is between 36 and 3903 (3867 steps) and we are doing 241 steps per sweep. the Launchpad would perform a full sweep of 241 frequency steps, reporting those frequencies and signal strengths if they are above a threshold, and at the end of a full sweep, send a signal as indication.


on the PC side, the perl script will send a "start" command during start-up. it then reads data from the Launchpad, continuously updating the display grid to show "near" real-time results. there are some other settings on the perl script that affects the visualization.


detail construction in http://www.simpleavr.com/msp430-project ... m-analyzer


screens-shot of host side software showing fhss activities




breadboard layout








construction and fhss capture demo video


tried and fail to embed video, use following link


source code (rfm12.h, ezrfm.c)

http://sites.google.com/a/simpleavr.com ... edirects=0

http://sites.google.com/a/simpleavr.com ... edirects=0


host side visualization script

http://sites.google.com/a/simpleavr.com ... edirects=0


[EDIT] replace attached image w/ link so non-member can see, thanks doc

Link to post
Share on other sites

Here is my entry, an MSP430G2xxx based tea timer!


I love tea, and thought this contest was an excellent reason to actually get off of my lazy behind and put this together.


Below is my blog post on it, modified slightly to show the pictures and code here rather than just link to them as on my blog. Blog post is available here: http://blog.suspended-chord.info/?c=27


Below this point is the post:


Hello all,


I am an avid tea drinker. As such, I make many cups of various kinds of tea, each with their own optimal steep times. Usually, I just keep track of the time, but I have found that I can make the best cup of tea by setting a timer to go off after a certain amount of time, depending on the style of tea that I am brewing. I find the best results come from going by the following table (based on personal preference and experimentation):



Tea Variety => Recommended Steep Time

White tea => 2 minutes

Green tea => 3 minutes

Black/Oolong tea => 4 minutes

Herbal tea/infusions (most varieties) => 5 minutes

Rooibos tea (African redbush) => 6 minutes

Chai tea (regardless of base) => 8 minutes

Kukicha twig tea and other varieties => in intervals of 1 minute



With this in mind, I decided that I should make a tea timer. This seems simple enough, and it has been on my to-do list for a while anyway, and 43oh! is having an MSP430 Project of the Month Contest, so I decided to hack it together. Turned out rather simple.


  • The full part count is as follows:
    [*:2tr33j9x] 3 toggle switches (or a 3-switch DIP, as I used)
    [*:2tr33j9x] 4 10k resistors
    [*:2tr33j9x] 1 5mm green LED
    [*:2tr33j9x] 1 piezo buzzer with integrated driver circuit
    [*:2tr33j9x] 1 tact switch/push button
    [*:2tr33j9x] wire
    [*:2tr33j9x] Any MSP430 uC with at least 1k flash and a TimerA module (though I could have hacked the WDT to work)


So, I assembled the circuit on my breadboard, following the schematic at the end of my post, and programmed the MSP430.


For the code, I borrowed beretta's TimerA code example, and tweaked it to fit the needs of my timer. The timer is to read the input value of the three switches as a binary value to determine tea type, set a "goal" amount of half-second ticks based upon the user's request, and when the user presses the "start" button, go into a waiting period. While the uC is waiting, the LED will be flashed slowly at first, but increasingly faster as the timer ticks closer to the goal. Once the goal amount of ticks has been reached, the LED will be turned on, and the buzzer will sound (mine sounds reminiscent of an old-fashioned tea kettle, so it's suitable). The buzzing can be stopped by pressing the "start" button again to reset the device, and allow another time to be set. Simple enough, right?


The code is available:

// MSP430 based Tea Timer
// Sets off a buzzer to let you know when your tea is done steeping
// Supports several types of tea

// suspended-chord (http://blog.suspended-chord.info)

/* Tea steeping chart
  Tea type             Time         DIP Code
  White                2 minutes         000
  Green                3 minutes         001
  Black/Oolong         4 minutes         010
  Herbal               5 minutes         011
  Chai                 8 minutes         100
  Rooibos              6 minutes         101
  Other                1 minute          110
  Other 2              30 seconds        111

// circuit:
// LED on P1.0
// Piezo buzzer with driver on P1.1
// 3-switch dip (or 3 toggle switches) on P1.4, P1.5, and P1.6
// push button tact on P1.3, pullup resistor

//#define DEBUG

#define __MSP430G2231__

// pin for status LED
#define LED BIT0
// pin for buzzer
#define BUZZER BIT1
// pin for start switch
#define START BIT3
// three consecutive pins for mode selection
#define INPUT1 BIT4
#define INPUT2 BIT5
#define INPUT3 BIT6
// numeric value of the first pin
#define SHIFT 4
// unused bits
#define UNUSED BIT2 + BIT7

// variables
unsigned int goal = 0;
unsigned int tickCount = 0;
unsigned char statusCount = 0;
char statusMode = 0;
char mode = 0;
char reset = 0;
volatile unsigned int i = 0;

void main() {
 while(1) {
   WDTCTL = WDTPW + WDTHOLD; // kill wdt
   P1OUT = 0; // clear outputs
   P1DIR = LED + BUZZER + UNUSED; // setup outputs and unused to out/low to reduce power consumption

   BCSCTL1 = CALBC1_1MHZ; // setup DCO

   // setup TimerA
   TACCR0 = 62499; // .5s cycle with 1MHZ clk and /8 divider

   // delay a few cycles to debounce
   i = 0;
   while (i < 50000) i++;

   while ((P1IN & START) == START) { // keep setting mode until start switch is pressed
     // setup mode
     mode = (P1IN & (INPUT1 + INPUT2 + INPUT3)) >> SHIFT;

     // setup goal
     switch (mode) {
       case 0: // white tea
         goal = 240; // 2 minutes
       case 1: // green tea
         goal = 360; // 3 minutes
       case 2: // black/oolong tea
         goal = 480; // 4 minutes
       case 3: // herbal tea
         goal = 600; // 5 minutes
       case 4: // chai tea
         goal = 960; // 8 minutes
       case 5: // rooibos tea
         goal = 720; // 6 minutes
       case 6: // other
         goal = 120; // 1 minute
       case 7: // other2
         goal = 60; // 30 seconds
           goal = 0;

#ifdef DEBUG
   goal = 30; // 15 seconds

   // reset the TAR, and finish setting up TimerA
   TACTL = TASSEL_2 + ID_3 + MC_1 + TACLR; // select SMCLK/8, up mode, and clear the TAR
   TACCTL0 = CCIE; // enable interrupts

   // enable interrupts

   // turn on LED
   P1OUT |= LED;

   // reset variables
   statusCount = statusMode = tickCount = reset = 0;

   // enter LPM1
   while (reset == 0);

// timerA interrupt for CCR0
#pragma vector = TIMERA0_VECTOR
__interrupt void CCR0_ISR (void) {
 tickCount++; // increase tick count

 // toggle LED increasingly faster as the time counts towards the end
 if (tickCount >= goal/4) statusMode = 1;
 if (tickCount >= goal/2) statusMode = 2;
 if (tickCount >= 3*(goal/4)) statusMode = 3;
 switch (statusMode) {
   case 0:
     if (statusCount >= 4) { // blink every 2 seconds
       P1OUT ^= LED; // toggle LED
       statusCount = 0;
   case 1:
     if (statusCount >= 3) { // blink every 1.5 seconds
       P1OUT ^= LED; // toggle LED
       statusCount = 0;
   case 2:  
     if (statusCount >= 2) { // blink every 1 second
       P1OUT ^= LED; // toggle LED
       statusCount = 0;
   case 3: default: // blink every .5 second
     P1OUT ^= LED; // toggle LED
     statusCount = 0;

 if (tickCount >= goal) {
   _disable_interrupt(); // kill interrupts
   TACCTL0 &= ~CCIE; // disable TimerA CCR0 interrupt
   //LPM1_EXIT; // exit LPM1
   P1OUT |= LED + BUZZER; // buzzer + LED on
   while ((P1IN & START) == START); // if START pressed, return to main()
   reset = 1;


Basically, as I stated above, the user selects a mode (tea type) by way of the three switches, and then presses a button to start the timer. When the tea is done steeping, the buzzer goes off, and the user can press the button again to reset it. The switch positions corresponding to the tea types are as follows:


6, 5, and 4 refer to P1.6, P1.5, and P1.4

6 5 4 Tea type (time)

0 0 0 White Tea (2 minutes)

0 0 1 Green Tea (3 minutes)

0 1 0 Black/Oolong Tea (4 minutes)

0 1 1 Herbal Tea/Infusions (5 minutes)

1 0 0 Chai Tea (8 minutes)

1 0 1 Rooibos Tea (6 minutes)

1 1 0 Other1 (1 minute)

1 1 1 Other2 (30 seconds)



Now, this isn't the most accurate timer, as I'm not using the crystal, but it's accurate enough to steep a good cup of tea (believe me, I've used it a lot since I hacked it together), and my stopwatch tells me it's accurate to within around 6 seconds on average.


In the future, I'd like to use a better input mechanism (I might be geeky enough to remember binary codes for tea types, but most are not, so a rotary switch or something would be perfect), maybe a cheap LCD for a status indicator, even showing how much time remains, and potentially having the last two codes (110 and 111) be user programmable for any time in second increments up to half of an unsigned long (as the ticks are half-second ticks). Maybe even shove it all into an Altoids tin for portability and the geek-chic factor. Who knows?


Anyways, here's the schematic, and a photo of it in action:



Tea-Timer in action! (notice the LaunchPad is only used as a power supply here... I don't have a battery clip yet.)





Thanks for reading!


Keep tweaking~


EDIT: I'm an idiot sometimes... I forgot the code and images.

Link to post
Share on other sites

thereza, thank you for registering and submitting your project. That is a unique way to use the MSP430.

However, the contest requires that the entrant submit code and schematics so that other members may benefit from it. Thats the goal of the contest. I'm going to leave it here till voting starts, so that others may see it, as its really inspiring. Unfortunately, it will have to be moved out out of the contest if code and schematics have not been submitted. I apologize for this.

Link to post
Share on other sites
Part of my thesis work: http://tiny.cc/tricorder

Submitting because someone asked me to, but I can't release the full schematics,etc.

Very cool. Should probably be in its own 'Projects' thread, though.


With that level of skill, you should be able to whip up a pretty good entry for the contest if you're interested.

Link to post
Share on other sites

My project is a programmable strobe controller for high speed photography. A device like this is crucial for many types of high-speed photography, as it can orchestrate multiple sensors such as photogates and contact microphones with several outputs, such as a flash trigger and a camera's shutter release, so as to capture a photograph of just the exact right instant with microsecond precision.

An example; I connected my device to a small electronic water valve, to my camera's cable release port, and to a flash. I arranged it so water could flow down from a bottle, through the valve, out a small nozzle, and down into a bowl of water below whenever the valve is powered. Then I wrote a script to control the device;

while (true)
 if (RIN0 == 1)
 { // Button 1: Double drip
   reg delay1 = 50;
   reg delay2 = 192;

   ROUT.T3 = 1;    // Prime the camera
   waitms(10);     // Setup time

   ROUT.T2 = 1;    // Open valve
   waitms(15);     // Wait for drop
   ROUT.T2 = 0;    // Close valve

   waitms(delay1); // Put some space between drops

   ROUT.T2 = 1;    // Open valve
   waitms(15);     // Wait for drop
   ROUT.T2 = 0;    // Close valve

   waitms(delay2); // Wait for drops to fall

   ROUT.R3 = 1;    // Fire the camera
   waitms(63);     // Wait for shutter to open

   ROUT.R1 = 1;    // Fire flash
   ROUT = 0;       // Finish flash pulse, close camera

   waitms(200);    // Lockout

Once I got the timing just right, this script has the valve release exactly two drops of water such that the second will collide with the splash from the first, and take a picture of the result. It produces pictures like this, each and every time I press a button on the device;



Here's the device itself. I call it Strobr.


That's an MSP430F2274 in the center, driven by a 16MHz clock crystal (to keep timing more precise and repeatable). On the top left are two analog input ports, each with one input pin and a software-switchable power pin (because some sensors, like photogates, need power to work). In addition to being polled by the MSP430's ADC, it can also route them through the MSP430F2274's built-in op-amps for small signals like microphones. Top middle are a pair of buttons, just two more inputs available to the chip. Top right are a pair of ports that can be connected to each other via a pair of solid-state relays, of course software controlled as well. The idea behind adding these was to be able to switch on and off an audio signal to a speaker, for making sound sculptures. Haven't tried it yet. On the bottom right are four output jacks, each with a pair of digital output pins. Finally, on the left there's a FTDI FT232RL USB-to-serial converter, and under the power switch, you can just barely make out a USB port on the bottom side of the board.

The device connects to my computer by USB. The PC application I've written allows you two write simple scripts for the device, error-check and compile those scripts, load the compiled bytecode onto the device, and poll the device's status and display it in realtime. It looks like this;


The MSP430, in addition to maintaining communication with the PC, runs a very simple virtual machine that executes the scripts that have been loaded onto it. The virtual machine is fixed instruction length (32 bits), and has no stack or memory of any kind except for 16 general-purpose registers and 16 specialized registers. In the screenshot of the PC application, you can see the bytecode that the script is compiled into, as well as the registers that the virtual machine operates on. Those registers are; RIN0 (buttons input), RIN1(analog input 1), RIN2 (analog input 2), RD1 and RD2 (analog input deltas, change since last sample), RLED (the ring of LEDs), ROUT (the eight digital outputs), RPWR (power to the input ports and to the relays), RAIM (analog input mode- no amps, one amp on each port, daisy-chained amps on one port, etc.), RG1 and RG2 (amplifier gain setting), RAP (automatically poll state to the host), RFLG (flags- running, test truth), and RPC (program counter).


Schematic (click for full size):



PCB layout (clicky clicky):



And finally, for source code, you'll have to go to my web site, since the file is too big to attach to this post. It includes Eagle files for the schematic and PCB layout (including a detailed bill of materials totaling about $100), CAM files for the PCB (in case you want to get one made and don't care to muck about with Eagle), source code for the MSP430 and for the PC application, and even a few scripts to run on the whole contraption. If you do decide to make one of these, though, you should note that my design isn't perfect, and you would do well to double-check my work and address a number of issues first.


My web site, where I have writeups for this project and others, is OminousHum.com.

Link to post
Share on other sites
Does the project need to be complete? I am working on my first launch pad project really and its not really complete. It's very basic and will probably not win any ways lol

As long as its functional, you should be good. I'd encourage you to submit your project though, no matter how basic it is. These contests were created to come up with innovative ways to use the chip and share code. Good luck.

Link to post
Share on other sites

Killing Zombies with the Launchpad


Well, this is my entry for the November 2010 Project of the Month Contest. It is very simple and far less usefull than the others projects. The truth is that I wasn't participating until I saw the Chronos :D .So i had to come up with something easy and fast to develop. I was plaiyng arround with some leds and photodiodes in front of my pc monitor and I thought that cold be interesting to interact with the screen with the photodiodes or some other ligth sensor. that idea eventually ended up being a shooting game. I wasn't too sure what to shoot at but then i realized that the option was obvious; ZOMBIESS!!!. everybody like killing zombies.The circuit is very simple. the LDR is in a voltage divider with a 10K potentiometer. moving the potentiometer will help with the calibration.It has also a capacitor to stabilize the analog signal. the trigger is a switch in series with a resistor and a capacitor for debouncing. this swicth is in fact in parallel with S2 in the Launchpad so you could just use that one an reduce the number of needed parts. I just use my hand for the gun so I didn't have to make one (it also makes a great human machine interface :)).The source code for the MSP430 is basically the same as the "Snake game". every time you pull the trigger the ADC takes 16 samples and send the avarage to the computer. The analog signal is provided by the LDR. the LDR has a different response depending on the wavelength of the incident light (that`s the reason for the funky colors). it isn't very accurate, variations on the ambient light or in screen distance will lead to a misunderstanding between the zombies. Every time you pull the trigger and hit one of them you'll hear a shot and a zombie scream because, well, even zombies don


Link to post
Share on other sites

The project that I would like to submit to the November contest is a Motion Detection Wildlife Camera. It uses a re-purposed PIR sensor module from an air freshener to provide motion detection, an inexpensive key chain camera to capture images, and a TI msp430g2211 microprocessor from the Launchpad kit to provide the necessary brains.




The project is described in depth at http://www.instructables.com/id/Cheap-Motion-Detection-Wildlife-Camera/

This link includes the code and schematic for the project.


An overview of the schematic is shown below:



Link to post
Share on other sites
This topic is now closed to further replies.
  • Create New...