MSP430 based single LED clock

[Kenneth Finnegan's] latest clock makes use of the TI Launchpad for programming and debugging MSP430 microprocessors. We took a look at the Launchpad when it was released and we’re glad to see some hacks resulting from availability of that tool. The clock reads out the time using a bi-color LED. Press the button and a series of flashes will tell you the time. A three-position toggle switch is used along with the push button for setting the time. The protocol he developed is outlined in his demo video after the break.

We like [Kenneth's] use of a plastic electrical box as a project box. They’re cheap and you can find them everywhere in many different sizes. He mentions the difficulty in drilling through the faceplate. We’ve had our share of shattered plastic trying to drill holes in the darn things. If you’ve got some tips on faceplate-modification we’d love to hear them.

This clock is sure the polar opposite from the TTL clock that [Kenneth] showed us back in March, trading jumper wires for lines of code. We’re going to give this one a try, hopefully fixing the button debounce along the way.

61 thoughts on “MSP430 based single LED clock

  1. NAUC (not another useless clock).

    If you can’t improve the analog clock – which has been around for centuries – which takes a mere glance, yes just 1/2 second or so to tell the time – why bother?

    Clock projects – unless they involve excellent craftsmanship (which definately eliminates projects using plastic wall boxes) are the “hello world” of electronic projects. How many times can we pretend to be impressed and say “good job”?

    1. @TJ: Nope, there are two colors but they can both be turned on at one time creating a third.

      @NAUC: Yep, this is the hello world of MSP430 projects for [Kenneth]. I love seeing people do things with new hardware, and if you have to have a reason to built it, you’ve missed the point of Hackaday. The point of the project is to build the project, not necessarily what it will do, or why you want it done.

  2. any body tried melting a hole with a soldering iron? You’ll want an old tip, but it should work. Or try heating the drill bit

  3. drilling through thin plastic?

    TAPE! tape, tape, tape.

    experiment with layers of masking, painter’s masking, or packing tape that’s appropriate for the surface finish (easy adhesive removal) and the type of drilling you’re doing (don’t ever use fibrous tape unless it’s a big-ass hole, >1″).

    sometimes a single square right where you’re drilling will do the trick, sometimes several layers in rows or an X are needed. i haven’t needed it on both sides of the plastic, but i could see it being necessary for very thin, brittle plastic like a transparent CD case.

    this trick also works very well for preventing chips when driving nails in to plaster or brittle/bare drywall. i imagine it could help with drilling or cutting painted surfaces that are at risk of chipping.

  4. Ohh, another thought try using an end mill bit in a drill press setup we use this where i work to mill plastic parts.

  5. let me toss my hat in for a ton of tape on thin plastic, at work I have to sometimes cut into or drill piano case parts, which is coated with a thin layer of polyester as its finish

    some painters tape and patience Ive sent them through drill bits, band saws, hand saws, and a table router without chips

  6. oh and far as the MSP430, am I the only one who thinks learning its Assembly language would be less confusing than their C?

  7. To drill through a plastic or metal face plate use a center punch so your bit doesn’t walk then start with a small hole e.i. 1/8″ then finish the whole using a step bit also known as a unibit

  8. Their C is just as confusing as 8-bit AVR and PIC.

    Actually for me it is a lot less confusing, the Launchpad comes with debugging, which is pretty neat since you have to shell out a lot for a debugger for AVR or PIC.

  9. i’m not sure what kind of material it is, but i’d try putting the cover face down onto a piece of relatively soft wood and slowly drill into it with a drillbit for metals at high rpm :)

  10. interesting project. nothing wrong with a “hello world” project, everyone does it with every programming language they pick up :)

    I am, however, very jealous that you’re launchpad is not like mine, backordered :(

  11. Thanks guys. I’m probably going to have to replace the button, since it’s also flaky, on top of the lack of software debounce problem.

    @TJ,MycroSopht: The colors red and green have this very cool property that when you mix them, they make yellow.

    The tape sounds like a good idea. We figured center-punching it would break it, so we heated a nail to melt a centering dent (smelled HORRID!), then did two sizes of drill. There was some chipping depending on how hard you blew through the back side. I found turning the plate over after the first hole helped greatly.

    I spent the week after they announced the Launchpad with the eStore open in a tab hitting refresh. I finally managed to get an order in for two at 3am, and they came a few weeks later.

    @Brennan: That’s why I have the blink rate so high. Once you get the feel for the rhythm of the display, it’s pretty easy to count.

  12. Why not use a low power RS Flip-Flop to debounce your button? The only drawbacks would be a little more power sucked away from your battery and the cost of another part. –Just throwing around ideas.

  13. clock is a little confusing, but this is cool

    i’ve wondered about using those containers for project boxes but the shape is a little odd and most of the blue containers you see in hardware stores have holes

    did he program on launchpad then just pop it out
    could have used four or five leds to make it less confusing
    code?

  14. a combination of melting the hole with an old soldering iron, using a pliers to pick off or razor blade to cut off the melt over, and then gently ream with a screwdriver or drill bit to fine fit the size of the hole.

  15. On faceplates…

    Mark your spot well – fine tip is great if you have decent motor control.

    Heat up your soldering iron. Once hot, press the tip into the center of your mark.

    You don’t have to go clean through to get a good pilot hole.

    Drill at highest speed possible with metal bits, but press slooooowly…

  16. Front plate solutions:
    1) Buy the cheaper plates. They’re softer plastic.
    2) Buy the more expensive metal plates.
    Either way works, depending on your needs. Just don’t get the brittle (Bakelite?) version.
    -Doc

  17. I gotta say I love the launchpad. It took me a little while to get on my feet as my only previous uC experience was with Arduino. I feel pretty comfortable now. I don’t really think the C was that bad, and yes, the debugger is nice. The hardest part for me was realizing I had been looking at the wrong datasheet for about two days. Maybe I don’t know what I’m talking about, but it seems weird to name your MSP430 chips MSP4302xxx, MSP4304xxx etc…, and then come out with a new series MSP430G2xxx. Prolly I’m dumb ;-) Anyway, it worked very great for analyzing some analog signals, and I’m really hoping the community gets behind the Launchpad.

  18. You can get faceplates made of both finished and unfinished wood — not even a specialty item, Home Depot and Lowes carry them. They’re a couple of bucks insteadof 15 cents but look a lot better, take paint and stain, and are far far easier to modify.

    In a similar vein you can also get stainless steel faceplates intended for bathrooms, which are easier to work with if you know how to drill metal (lubricant!).

  19. Grind a small flat on the cutting edges of the drill bit to purposely
    blunt it. This stops it from taking a deep bite and servoing itself
    into the soft material.

    Clamping the job securely to a flat backing surface stops the drill
    from bursting through and making a mess of the reverse surface.

    Or, more expensive, use a step or cone drill which gives you the
    option of drilling a range of hole sizes with the same bit.

  20. @sparkInTheDark: It would have to be a CRAZY low power flip-flop. The chip is rated for something like 0.8uA draw in RTC mode like this. Really I just need to use the second Timer_A CCR register to delay multiple calls.

    Thanks Mike.

  21. As for making the hole…

    I have to drill faceplates all the time, and it is true that the standard plastic faceplates are very fragile. As stated above, the flexible vinyl faceplates are easily drilled. If you must drill one of the fragile ones, you should heat a new metal drill bit, place the faceplate face-down on a soft wooden surface, and, using layers of tape to help, drill in HIGH SPEED IN REVERSE. With a new sharp bit, this will partially drill while partially melting a nice, clean hole… :)

  22. I’m jealous as well. I have been waiting 2 months for my launch pad and chronos watch. In the last week I have seen this and that rock em sock em with 4 watches. Geez TI let’s us play too….

  23. Thanks for this tutorial. I’ve been looking forward to getting started with the free software versions of the MSP430, but wasn’t entirely sure that the code would be exactly the same.

    One thing that I found interesting about the Launchpad is that it contains a number of fairly high-powered chips on the debug/programmer side of the board. Specifically, the TUSB3410 USB-Serial convertor, which has quite a lot of RAM, and can be programmed using 8051 code (not exactly sure how), and the M430F1612 (16-bit Ultra-Low-Power MCU, 55kB Flash, 5120B RAM, 12-Bit ADC, Dual DAC, 2 USART, I2C, HW Mult, DMA).

    I think it could be really interesting to see what else these boards can be programmed to do. e.g. a proper (full) JTAG adapter, perhaps, rather than the parport/wiggler clones, etc.

    The Launchpad boards have a number of test points(? TP1-7) and extension points (J4), which are located on the programmer/debugger side of the board, and are probably connected to different pins to the J3 jumper block.

  24. I use a combination of a 1/8th inch carbide drill bit and a unibit (stepped drill bit used for thin materials) to make holes in hard materials.

    For one project I did, I drilled 16 holes into one faceplate and didn’t have any issues with chipping or cracking.

  25. Hey thanks for the reply Kenneth. You’ve got a point there. I’ve always been plagued by my want to add more parts. Good job on the build.

  26. A good way to “drill” holes in all sorts of thin and soft things, especially really small holes, is with ball burrs in a flex shaft or rotary tool.

    For especially brittle things you burr through one side until breakthrough, then finish the hole from the opposite side.

  27. The best way to drill through a “hard” faceplace is with a drill press (or a very stable hand drill) at low speed.

    The material is usually bakelite and while strong in it’s fabricated form, is very brittle to work with after the fact. I’ve shattered a few myself and it took a bit to learn the trick.

    The hardest point and what will usually result in a shattered plate is when your drillbit is about to break through the other side. At that point, drill very slowly until you begin to see the bit peek out the other side. Follow up by repositioning the drill on the opposite side using the peek-out hole as your pilot and continue drilling SLOWLY until the hole is cleared.

    Can I mention again DRILL SLOWLY? (just for emphasis.)

  28. I drill in 1/8″ acrylic all the time and always have cracking problems with twist drills. I use what is called a brad point bit. They are available at most woodworking shops. Works great for us. If we need to have a lot of parts done, we send them out to be laser cut.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s