DICE10 – A miniaturized electronic die based on ATtiny10

Making an electronic dice is very popular among hobbyists and there are already lots of ready-made projects on the internet about this topic. Tim at Hackaday.io designed an electronic dice project for “1KB Limit” competition. But why another dice project while the internet is already crowded with similar things?
Well, it’s not the subject of this project, but the concept, which makes it unique. This is the most miniaturized dice one can make. As Tim says:

It makes use of a very efficient multiplexing scheme to drive all the 7 LEDs of an electronic die with only two I/O pins.

Yes, you’ve read it right. Only two I/Os are used to control all 7 LEDs of a die. It became possible for a super-efficient multiplexing scheme – Charlie plex Plus. The main goal of this project is introducing you to Charlie plex Plus.

Requirements:

  • 1 x ATtiny10
  • 7 x SMD LED 0603
  • 1 x SMD Capacitor 100n 0805
  • PCB of the Circuit

Please Note: SMD components are used to miniaturize the circuit. You can easily go for through-hole components if size is not a concern.

Important Links:

Circuit and PCB:

You can see from the circuit that connections are pretty straight forward. PB2 and PB0 are used to drive the LEDs. The remaining free I/O pin, PB1, is used as a touch sensor. PB1 is RESET pin, so it can’t be used as GPIO.
All components are squeezed into a PCB that is only 13 mm x 19 mm. Instead of 6 pin headers, edge connections are used for SPI/TPI interface in order to reduce the PCB size.

Design:
As an entry for Hack a day 1Kb competition, one vital target of this project was to keep the code size below 1Kb. Using an ATtiny10 as an MCU automatically limits the code size to 1kb, so the requirement is automatically met.
The firmware uses a timer interrupt to multiplex all the 7 LEDs. The main routine calls the Tiny Touch Lib to poll the touch button. If a button press is detected, the value of the die is changed in a random manner. Though due to smaller physical size, the touch button is somewhat unreliable and often detects multiple touches. But there is no problem in using it as a random number generator.
Read More: DICE10 – A miniaturized electronic die based on ATtiny10

Leave a Comment

Your email address will not be published. Required fields are marked *