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 – Charlieplex Plus. The main goal of this project is introducing you to Charlieplex Plus.

DICE10 - The Tiny Electronic Die
DICE10 – The Tiny Electronic Die


  • 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:

Circuit Diagram of DICE10
Circuit Diagram of DICE10

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.

PCB Diagram Of DICE10
PCB Diagram Of DICE10


As an entry for Hackaday 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 TinyTouchLib 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.


Now coming to the most interesting part of the design – the multiplexing scheme. A very common and efficient scheme is Charlieplexing. Impleneting charlieplexing you can control n²-n LEDs by n I/O lines.

Now, how can you control 7 LEDs of the die using only 2 I/O pins?

The dice pattern consists of 7 LEDs. However, you will quickly notice that 6 of these LEDs only light up in pairs, so that only 3 pairs of LEDs plus the middle one need to be controlled. This requires four I/Os – still too much!

Using Charlieplexing we can reduce the number of I/O lines to three. but still a bit too much for the ATtiny10, as an extra I/O line is required to “roll the die”. The only solution left is “Charlieplex Plus”. Before explaining that, let’s learn what Charlieplexing is.

Charlieplexing: Charlieplexing is a technique for driving a multiplexed display in which relatively few I/O pins on a microcontroller are used to drive an array of LEDs. Charlieplexing uses the tri-state property (neither HIGH nor LOW state) of microcontroller I/O pins. Only two I/Os are active at a time – one set to HIGH and one set to LOW – while all other pins are in a high resistivity state. LED connected between two active I/Os will light up.

Now, what if we activate only one I/O instead of two? Here comes Charlieplex Plus.

Charlieplex Plus:

Charlieplex Plus Circuit Example
Charlieplex Plus Circuit Example

The circuit above shows how to connect LEDs in this scheme. In addition to the antiparallel pair between the two I/O pins (PB2 and PB0), LEDs are also connected to VCC and GND. The sum of forward voltages of the four LEDs in series (LED1-4 and LED5-8) is higher than 5V so that they will not light up when PB0 and PB2 are in the high impedance (Z) state.

When either PB0 or PB2 is H or L and all other pins are Z, sufficient voltage is present to light up a pair of LEDs. However, when PB0 is HIGH and PB2 is LOW or vice versa, LED9 or LED10 will light up.

In fact, Charlieplex plus scheme is really hard to understand. It is impractical as well. But it’s still usable in such cases where our only option is to control lots of LEDs with lesser I/Os. Let’s look at the table to have a better understanding:

Charlieplex Plus Encoding Table
Charlieplex Plus Encoding Table

A general analysis shows that the new scheme can drive n²+n LEDs with n I/Os. The table below shows the number of LEDs than can be driven with a given number of I/Os with different multiplexing schemes.

Table of Comparison Between Different Multiplexing Schemes
Table of Comparison Between Different Multiplexing Schemes

So, in a summary, we can see that two I/Os are capable of handling three LEDs, and that’s what we need.


In this article, the multiplexing scheme was the first priority. If you understand the scheme clearly, you can implement it in different projects. Read this blog post if you are willing to learn more on this.

This image shows how the DICE10 works:

Animated Image of DICE10
Animated Image of DICE10

But remember that implementing Charlieplex Plus in any project is not recommended at all. It’ll make the design and the troubleshooting process extremely complex.

Efficient Low-Cost Solar Energy Converter

Researchers at the École Polytechnique Fédérale de Lausanne and the Centre Suisse d’Electronique et de Microtechnique have invented a new device to store solar power while the sun’s not shining by converting it into Hydrogen. Although many current methods use the same approach to store energy, but this device rivals them in stability, efficiency and cost.

An effective and low-cost solution for storing solar energy © Infini Lab / 2016 EPFL


They combined commercially available components that have already proven effective in industry, such as Nickel, in order to develop a robust and effective system, that is  :made up of three interconnected, new-generation, crystalline silicon solar cells attached to an electrolysis system that does not rely on rare metals. The device is able to convert solar energy into hydrogen at a rate of 14.2%, and has already been run for more than 100 hours straight under test conditions.”

In order to develop this device, the researchers used layers of crystalline silicon and amorphous silicon to allow higher voltages. Thus, three cells in series generate a nearly ideal voltage for electrolysis.

“We wanted to develop a high performance system that can work under current conditions,” says Jan-Willem Schüttauf, a researcher at CSEM and co-author of the paper. “The heterojunction cells that we use belong to the family of crystalline silicon cells, which alone account for about 90% of the solar panel market. It is a well-known and robust technology whose lifespan exceeds 25 years. And it also happens to cover the south side of the CSEM building in Neuchâtel.”

This method, which outperforms previous efforts in terms of stability, performance, lifespan and cost efficiency, is published in the Journal of The Electrochemical Society. You can check the scientific paper here.


A Christmas star with Neopixel LEDs

A geeky Christmas decoration made with 56 LED Neopixel and controlled via an Arduino Micro board:

Let’s take a look, therefore, at the project’s electrical section, that is essentially composed of a set of 56 Neopixel LEDs, that have been arranged so to form two concentric stars; the first 35 RGB LEDs (out of 56) form the bigger, external star, while the other 20 ones form the smaller and internal star. The LED number 56 is placed exactly at the center of the printed circuit board, that has the shape of a five-pointed star.
The Neopixel LEDs are connected in cascade but powered in parallel; such a configuration enables to address each single LED and to individually choose the colour; among the possible hues, the 256 possible combinations for each primary colour (therefore we have 256x256x256 combinations!) determine a total of 16,777,216 colours: that’s what one would call true colours!

A Christmas star with Neopixel LEDs – [Link]

Bitmap graphics on an Arduino Touch Screen and other top Arduino Displays

In this video tutorial educ8s.tv shows us how to load bitmap graphics in our Arduino Touch Screen projects using Adafruit’s GFX library.

The procedure that I am going to describe works with all the color displays that are supported by Adafruit’s GFX library and by the displays that use the TFTLCD library from Adafruit with a small modification. So from the displays I own I can use the color OLED display, the 1.8” ST7735 color TFT display, the 2.8” Color Touch Screen that I reviewed a few weeks ago and the 3.5” Color TFT display. You can find links for all the displays below.

Bitmap graphics on an Arduino Touch Screen and other top Arduino Displays [Link]

Buck regulators accept up to 40-V input

by Susan Nordyk @ edn.com:

A wide input range of 4.5 V to 40 V enables the TS3004x series of DC/DC synchronous buck regulators from Semtech to work in a wide range of applications, including industrial, telecommunication, and consumer. The current-mode TS30041 and TS30042 furnish 1 mA and 2 mA of continuous output current, respectively, and include integrated power switches and robust fault protection in a small 3×3-mm, 16-lead QFN package.

Buck regulators accept up to 40-V input – [Link]

MEAS: five weather sensors on one Arduino shield

by Jan Buiting @ elektormagazine.com:

In a stint of list-o-mania TE Connectivity have slapped five environmental sensors on a single board called MEAS for plugging onto the Arduino/Genuino 101 and Uno R3. Here goes in telegram style.

MEAS: five weather sensors on one Arduino shield – [Link]

Intel(r) Quark(tm) micrcontroller D2000 based Environmental sensors board

Sergey Kiselev designed and built an Intel Quark D2000 micrcontroller based Environmental sensors board:

This is a fairly small (51 x 51 mm) board, equipped with a low power Intel Quark D2000 microcontroller, and several sensors (accelerator, temperature, humidity, atmospheric pressure), as well as a mikroBUS compatible header and a Grove compatible connectors, that can be used to connect additional sensors, memory, or radio modules. The board can be used to monitor the environment conditions, and store or transmit the data to a remote system for further processing.

Intel(r) Quark(tm) micrcontroller D2000 based Environmental sensors board – [Link]

Supercapacitors Surpassing Conventional Batteries

Researchers at the University of Central Florida have been looking for alternatives for lithium rechargeable batteries which are largely used in every device.

Using two-dimensional (2D) transition-metal dichalcogenides (TMDs) capacitive materials, they are building a new supercapacitor that overcomes the performance of conventional lithium battery and replaces its efficiently.

Transition metal dichalcogenide monolayers (TMDs) are atomically thin semiconductors of the type MX₂, with M a transition metal atom and X a chalcogen atom. One layer of M atoms is sandwiched between two layers of X atoms.

TMDs are considered as promising capacitive materials for supercapacitor devices since they provide a suitable current conduction path and a robust large surface to increase the structure’s high energy and power density.

Researchers have developed “high-performance core/shell nanowire supercapacitors based on an array of one-dimensional (1D) nanowires seamlessly integrated with conformal 2D TMD layers. The 1D and 2D supercapacitor components possess “one-body” geometry with atomically sharp and structurally robust core/shell interfaces, as they were spontaneously converted from identical metal current collectors via sequential oxidation/sulfurization” according to the research paper.

The new prototype is said to be charged 30,000 times without any draining, 20 times the lifetime of an ordinary battery.

“You could charge your mobile phone in a few seconds and you wouldn’t need to charge it again for over a week,” says UCF postdoctoral associate Nitin Choudhary.

This research was published in the NANO science journal, you can check the scientific paper here.

Bluetooth 5 Is Here!

The Bluetooth Special Interest Group (SIG) has officially launched the core specifications of the new version of Bluetooth: Bluetooth 5. These specifications include longer range, faster speed, and larger broadcast message capacity, as well as improved interoperability and coexistence with other wireless technologies than recent Bluetooth versions, making it possible to advance IoT applications and usages.

Bluetooth is revolutionizing how people experience the IoT. Bluetooth 5 continues to drive this revolution by delivering reliable IoT connections and mobilizing the adoption of beacons, which in turn will decrease connection barriers and enable a seamless IoT experience” says Mark Powell, SIG’s executive director.

Keeping up with powering IoT, Bluetooth 5 has some additional features that better enable industrial automation and whole home coverage by addressing challenges like range and download speeds. It is said to improve location awareness with a smarter technology that collects data to provide personalized experiences for the end user.

While doubling the speed to enable the making of more responsive devices, Bluetooth 5 developers didn’t miss to maintain low-power consumption that results a faster data transfer.

By 2021, ABI Research predicts 48 billion internet-enabled devices will be installed, and Bluetooth—predicted to be in nearly one-third of those devices—is a cornerstone of that growth.

“The global wireless connectivity market is growing rapidly, with an anticipated 10 billion annual IC shipments by 2021,” said Andrew Zignani with ABI Research. “The introduction of Bluetooth 5 will create new opportunities in various verticals of the IoT market by reducing complexity and cost and giving manufacturers greater flexibility in targeting multiple applications and use cases.”

Within two to six months, new products are expected to be launched using this ubiquitous technology, so stay tuned!

More details about Bluetooth 5 here: www.bluetooth.com/bluetooth5

Semiconductor radioactivity detector

Robert Gawron has been working on a semiconductor radioactivity detector project:

Currently I’m trying to make a working version of a radioactivity detector that uses semiconductor as a sensor. It’s a different approach than Geiger-Muller detectors, more complicated, but also much more interesting.
While Geiger-Muller counters can only provide information about the amount of particles in a period of time, semiconductor detectors can also measure their energy, so it’s possible to say much more about the nature of observed ionizing radiation. Some of the disadvantages of these detectors are that they are more expensive, complex and sensitivity may degrade over time.

Semiconductor radioactivity detector – [Link]