Contact Us

Use the form on the right to contact us.

You can edit the text in this area, and change where the contact form on the right submits to, by entering edit mode using the modes on the bottom right. 

Unit 35, the IO Centre, Armstrong Rd
London, England, SE18 6RS
United Kingdom

+44(0)7779606045

We create circuits that are both beautiful and functional
 

PIPS

PIPS

A Digital die

When pressing the push-button the fast scrolling of 1 to 6 — just like a regular D6 die — stops to give a 'random' number. It's not based on randomness in the circuit, but on the random timing of the press by the human.

This project is based on "Dicing with LEDs" by Elektor, which appeared on December 2006's issue. They have kindly allowed us to use it for this project.

Assembly and usage

The project includes the following components

Infogrphic. PDF

Saar soldering PIPS

Brief theory of operation

The heard of the circuit is the CD4060B, which is a 14-bit 'ripple-counter' integrated circuit with a built-in oscillator. This is convenient since we won't be needing to have a separate clock source.

The clock needs to be fast enough so our eyes cannot distinguish the die's state since then we could cheat by pressing the button just at the right time. The components connected to φI, φO and φO-bar (pins 11, 9, 10): RS, CX, and RX control the frequency of the counter. According to the datasheet, this is governed by the following two formulas:

f = 1 / (2.2 x RX x CX)
(2 x RX) < RS < (10 x RX)

In our case we'll have

RX = 470KΩ || 470KΩ = 235KΩ
// recall that R = [R1*R2]/[R1+R2]
CX = 220pF
RS = 470KΩ

f = 1 / (2.2 x 235000 x 220E-12) = 8.8KHz

That's fast enough! If you actually measure the frequency it might be different than the ideal calculation above due to tolerances of the components, and manufacturing variability.

You'll notice a switch to ground. The switch that we supplied is a single-pole-single-throw normally-open kind, abbreviated as SPST-NO. This means that it is normally an open circuit and closes the circuit when the button is pressed. In out case shorting the φI input to ground. This halts the counting as long as the button is pressed. That's how we get our 'roll'.

Saar looks closely at the circuit behind PIPS

A 'normally connected' switch, SPST-NC, would operate the circuit the other way round. That is, run only when the button is pressed. SPST-NC push-buttons are uncommon, and when we do find them, they are a bit pricey. If you'd like to fit an SPST-NC we designed the footprint to accept one! Get the KSR223GNCLFG from C&K Components.

Now we have a clock running. We need to scroll through the six states of a normal D6 die. We'll use the counter to go through the states and control the LEDs. The clever people at Elektor figured out that the best way to do that is to use the first six states of the counter for the six states of the die and a seventh state for reset. Their cleverness is in that they scrambled the states to make the circuit more efficient. See the table in the infographic.

We'll leave figuring out how the control circuitry works to you ;)

Assembly

Please follow the guidelines in the infographic. Please heed to the note about not connecting the battery while the contacts are hot from soldering. Also pay attention to not connect the battery contacts and the battery itself the wrong way. If you touch the contacts with the battery and the LEDs don't turn on, something wrong. With any trouble recruit the cavalry on Slack.

Further information

PIPS is an open source design, as is most of our work. You can find the design files for the hardware and packaging at our GitHub repository. You can edit the design files using our own PCB design open source software, PCBmodE.

This PCBs were manufactured by Eurocircuits.

PIPS was project #23 of the Boldport Club. If you'd like to purchase a kit, become a member and add one to your order through the shop.

Finally, community contributions for this project are on our community site.