Running LED dice

Posted on Tuesday, December 16th, 2014 in LEDs by DP


Raj over at Embedded Lab has published a new build, a running LED dice using PIC12LF1822 microcontroller:

This project is about a similar LED dice but with a slightly different output form. It uses 6 LEDs which are arranged in a circular pattern and are labeled 1 through 6. They create a chasing effect when the dice is rolled. The chasing effect slows down gradually, and eventually stops at one of the six LEDs. The rolling is done by a gentle shaking of the dice horizontally. The LED dice is powered with a 3V coin cell battery and uses PIC12LF1822 microcontroller to generate a random number and drive the output LEDs.

Check out the video after the break.

This entry was posted on Tuesday, December 16th, 2014 at 7:00 pm and is filed under LEDs. You can follow any responses to this entry through the RSS 2.0 feed. You can skip to the end and leave a response. Pinging is currently not allowed.

One Response to “Running LED dice”

  1. KH says:

    There is another kind of vibration sensor that uses a spring and a metal post, but maybe that one is too sensitive.

    Enable the pull-up (WPUA2), and we can save 2 resistors. I have used ball-in-can tilt sensors, never needed to use a single resistor when using internal pull-ups.

    An on/off switch should not really be needed, since the PIC12LF1822 uses tens of nanoamps in sleep mode. If the author experienced excessive sleep current, then may I suggest the following:
    (a) tie MCLR to VCC to minimize GP2 power draw (internal pull-up for MCLR didn’t work on at least one PIC I used, whatever I did, so I dunno about this one)
    (b) set PORTA pins to output LOW on sleep, TRIS high will just let the pins pick up stray voltages or charges and nudge the input FETs out of saturation, leading to sleep power wastage
    (c) make sure WDT and BOR are disabled

Leave a Reply

Notify me of followup comments via e-mail. You can also subscribe without commenting.

Recent Comments

  • Joe Desbonnet: Ya, I can recommend the low melting point solder. I used brand 'ChipQuik' and it's amazingly easy to use.
  • Jerome: I need a new BusPirate for the Fablab ;) Many thanks!
  • Max: Seems like an unexpectedly violent way to remove the chip indeed. A hot air station should of course do the job just fine, but in...
  • jose: Part removal described here is pure butchery, the cheapest hot air station will do a fast and clean job removing the QFP, heat air to...
  • Cody: Yes please