Skip to content

Launchpad RGB Lamp

A simple RGB colour changing lamp on the TI Launchpad. Using one RGB LED, 3 resistors and a potentiometer.

Eagle files and mspgcc sources below.

Here’s the breadboard and Launchpad version:

(On my RGB LED, pin 2 is longer than the rest, it’s the cathode)

Prototype PCB:

I brought out GND, TEST, RESET and VCC to a 4 pin header, so I can use the Launchpad to do In-System-Programming and debug.

I’d like to mount it inside a small plastic bottle to help diffuse the light. But, a jam jar will do for now:

Source code and Eagle files: lamp.tar.gz

Turning the potentiometer moves smoothly through hues. The colours are always fully saturated. To show different RGB values, set led_brightness[0 to 3].

Download source code, makefile and Eagle project.

Bits of code cobbled from:
http://www.nunosantos.net/?p=114

http://www.msp430launchpad.com/2010/09/simple-adc-example-on-launchpad.html

Categories: Uncategorized.

Tags: , ,

Comment Feed

12 Responses

  1. Hello…
    i examined your blog and i liked it.
    i want to use your project details in our msp430 blog.
    can i use ?

  2. Of course, can you post a link to your msp430 blog here too.

    Thanks.

  3. Hey is there a reason why you used P1.0 P1.1 P1.2?
    I would use P1.0 P1.4 P1.4 so you can use P1.1 and P1.2 for Serial conection to PC or any other device to controll the colour…

  4. @MystBoy It wouldn’t be hard to change the pins. I didn’t want a serial connection for my lamp, so started connecting from the first pin on the first port.

  5. I know it may seem silly or trollish, but what is the value of the potentiometer?

  6. @Richard I used a 10K linear pot

  7. Wonderful! I may throw one together to play!!

    FYI - you have an apparent error on your hand drawn schematic. P1.7 is on pin 9 rather than 8, i.e. one more pin “up” on the chip.

    Thank you so much for sharing!!

  8. Nice Post, thanks
    Just wish to know, how much current can each port (e.g. P1.0, P1.2) source safely?

    Is this similar in all msp430 mcu’s?
    Thanks

  9. I was wondering if you could put the code up in a different format please

  10. Hi, Great job
    I need to do something very close to it, but I need to feed 20 LEDs. I was wondering to use all of them in series and then feed with 3 transistor which are going to be controlled by the MSP. Is this a PWM code ? could you please send me the code , I cannot find and did not understand the code in the link , is that the code you used ? or you modified it ?
    Thanks

  11. what is the value of resistor?
    270 ohm or 270k which one?

  12. @kralex 270



Some HTML is OK

or, reply to this post via trackback.

Security Code: