Skip to content
Joennuh edited this page Nov 3, 2019 · 20 revisions

Work in Progress. This Wiki is not finished yet and thus may contain incomplete or incorrect information. Once finished this message will be removed.

Ofcourse you can build your own prototype on a prototype board but if you want to take the PCB a step further you can choose to use a well designed PCB especially for the Dice Tower.

I created a PCB design on EasyEDA: https://easyeda.com/Joennuh/Dice-Tower From EasyEDA you can easily export the Gerber files directly to PCB manufacturer JLCPCB without the need of downloading and uploading the Gerber files. At JLCPCB you can already order 5 copies of 1 PCB design for only $2,=. That is quite neat. For the PCB's I designed you pay around $6,= in total (shipping costs not included). EasyEDA nor JLCPCB don't sponsor me and the links to them aren't affiliate links. I'm just an enthousiast about these websites.

Don't forget to switch to the latest revision with teh latest improvements! To check which revision is the newest and what the improvements per revision are go to the PCB revisions page.

The name "The BIG Site" on the PCB designs is a kind of pseudonym and website I use for working on websites and electronics.

Main PCB

Front

Front side of the main PCB

Back

Back side of the main PCB

Materials to match with the PCB

Development board

The PCB uses the Wemos D1 mini or a MH-ET LIVE ESP32 MiniKit as development board to drive the interactive leds and buttons. The Wemos D1 Mini provides basic functionality: reacting to dices put in the tower and flickering the campfire lights. The MH-ET LIVE ESP32 MiniKit provides additional functionality: a display module with pictures, configure led settings and virtual dices.

Currently the project doesn't use the WiFi capability of the Wemos D1 mini / MH-ET LIVE ESP32 MiniKit but the advantage of the choice to use this board is that WiFi functions can be added later on easily.

Leds and resistors

As long that you do not exceed the following limits you can use any led:

  • Maxmimum 3.3V, 12 mA for the leds driven by the Wemos D1 mini (eyes, campfire and configuration/status led).
  • Maxmimum 3.3V, 40 mA for the leds driven by the MH-ET LIVE ESP32 MiniKit (eyes, campfire leds, configuration led, status led, display indicator led, SMD leds)
  • Maxmimum 3.3V for the power led (not driven by GPIO but still uses the 3.3V power of the Wemos D1 mini / MH-ET LIVE MiniKit ESP32).
  • Maxmimum 5V for any other led.

As far as we found the data for it we do use the leds and resistors in the table below. We also specify to which power line it will be connected. You might need to recalculate resistor values if you use other leds with other characteristics. On our prototype PCB we did use SMD leds with other characteristics and thus also other resistors. Please see our Prototype PCB page for more information.

Amount Color Working voltage Working current Function Power Resistor
3 red 1.9 - 2.1 V 20 mA Eyes & power led 3.3V 100 Ω
3 yellow 1.9 - 2.1 V 20 mA Campfire 3.3V 100 Ω
1 green 1.9 - 2.1 V 20 mA Configuration / status led 3.3V 100 Ω
20 cold white 3.0 - 3.2 V 20 mA Lights in the tower 5V 100 Ω
4 warm white (1) 3.1 V (1) 20 mA (1) Lanterns around collection bin 5V 100 Ω
1 - - - Resistor for configuration button 3.3V 4.7 kΩ

(1): The seller of the miniature lanterns did not specify the exact color, working voltage and working current. The seller only specified that it should operate on 3 to 5 volts. I assume it will be a warm white led with a working voltage of 3.1 and a working current of 20 mA.

Additionally you can place the following SMD leds and resistors. They are not necessary to be able to use the Dice Tower project and currently the software doesn't do much with this lights. They are mainly to practive SMD soldering skills. My suggestion is based on availability at of SMD components at my house at the time of writing this document.

Amount Color Working voltage Working current Function Power Resistor
1 blue 3.0 V 20 mA SL1 3.3V 22 Ω
1 red 2.0 V 20 mA SL2 3.3V 100 Ω

The placement of the leds and resistors is as follows:

PCB Object name Material Remarks
L1 - L20 Cold white leds Connect with long (wrapping) wires to the leds in the tower it self.
L21 - L24 Lanterns Connect with long (wrapping) wires to the lanterns around the collection bin.
EYE1, EYE2 Red leds Connect with long (wrapping) wires to the red leds behind the eyes of the skull on the tower.
FIRE1 - FIRE3 Yellow leds Connect with long (wrapping) wires to the yellow leds at the campfire.
PWR Red led On the right side of the PCB. Advisable to bend the leads to let the led shine to the right instead of the top.
CFG Green led On the right side of the PCB. Advisable to bend the leads to let the led shine to the right instead of the top.
R1 - R31 100 Ω resistors Mainly situated on the bottom of the PCB. R23 & R24 are diagonal at the left side. R25 - R29 are at the top left of the PCB. R30 & R31 are at the right of the PCB below the development board.
R32 4.7 kΩ resistor Near the configuration button at the top right of the PCB.

And when you decide to solder the SMD components according to my suggestion:

PCB Object name Material SMD size
SL1 blue led 0805
SL2 red led 0805
SR1 22 Ω resistor 1206
SR2 100 Ω resistor 1206

Configuration & reset buttons

Any button could do (just connect it a wire to the PCB) but for the PCB I have chosen for a sidewards 6 x 6 mm tactile button. Any depth of the button could do but I use the default one of 5 mm.

Trigger

The trigger provides a signal to the D3 pin of the Wemos D1 mini or GPIO 17 pin of the MH-ET LIVE ESP32 MiniKit when a dice rolling through the tube of the Dice Tower has been detected. The trigger can be a anything that shorts the D3 pin of the Wemos D1 mini or IO17 pin of the MH-ET LIVE ESP32 MiniKit to ground. This could be for example 2 pieces of aluminium hitting each other when a dice rolls on it.

We have chosen for the SW-18010P vibration sensor of which DO / IO17 connects to TRIGGER / DATA IN on the PCB, GND to one of the - pins on the Power output area of the left side of the PCB and VCC to the 3V3 + pin in the Power output area on the left side of the PCB.

When you use a button or any other electrical object that can short a circuit you can just use the 2 pins at TRIGGER / DATA IN at the left side of the PCB`. Polarity doesn't matter in that case.

Header pins

On the left side of the main PCB you can solder the wires of the leds directly to the PCB and thus you only need a double row 2 x 3 male header to populate the connections for the trigger pin and power. I think single row male pin headers are more easily to break and so you can decide to use 2 single rows 1 x 3 male headers. Ofcourse you can decide to solder dupont connectors to the led wires and attached that to male pin headers of the main PCB. In that case you'll need 1 double row 2 x 32 male header or 2 single row 1x 32 male headers.

For the Wemos D1 Mini / MH-ET LIVE ESP32 MiniKit you need 2 double rows 2 x 10 female headers or 4 single row 1 x 10 female headers. On the Wemos D1 mini you can solder the default male pin headers delivered with your Wemos D1 mini (2 single rows 1 x 8 male header) on TX to VCC / 5V and on RST to 3V3. I advise you to always solder 2 double rows 2 x 10 male headers. In this way you can always switch between a Wemos D1 mini, Wemos D1 mini pro and MH-ET LIVE ESP32 MiniKit.

Display module port

This is a serial connector, type DB9. If you use a Wemos D1 mini or when you do not plan to use the display module you can leave tthis unpopulated. Elsewhise this port is meant to connect the display module to through a serial cable.

WARNING! NEVER CONNECT THE DISPLAY MODULE PORT TO A PC OR OTHER SERIAL DEVICE. RISK FOR SHORT CIRCUIT AND DAMAGE!

Display module PCB

Front

Front side of the main PCB

Back

Back side of the main PCB

The display module PCB is designed to fit on the bottom plate of a 100 x 60 x 25 mm default enclosure like this one: https://www.aliexpress.com/item/32915615354.html

Materials to match with the PCB

Leds and resistors

As long that you do not exceed the following limits you can use any led:

  • Maxmimum 3.3V, 12 mA for the leds driven by the Wemos D1 mini (display indicator led, IND_LED).
  • Maxmimum 3.3V, 40 mA for the leds driven by the MH-ET LIVE ESP32 MiniKit (display indicator led, IND_LED)
  • Maxmimum 5V for any other led.

As far as we found the data for it we do use the leds and resistors in the table below. We also specify to which power line it will be connected. You might need to recalculate resistor values if you use other leds with other characteristics.

Amount Color Working voltage Working current Function Power Resistor
1 blue 3.0 - 3.2 V 20 mA Display indicator led IND_LED or led connected to IND_LED + and IND_LED - on the bottom of the PCB. 3.3V 22 Ω
1 red 1.9 - 2.1 V 20 mA Campfire 5V 150 Ω
2 - - - Resistors for up and down buttons 3.3V 4.7 kΩ

Both the display indicator led IND_LED and power led PWR_LED doesn't need to be populated. Leaving both unpopulated doesn't affect the working of the display module and the rest of the Dice Tower.

The placement of the leds and resistors is as follows:

PCB Object name Material Remarks
IND_LED Blue led Display indicator led. Proposal is to use a blue led. Doesn't need to be populated.
PWR_LED Red led Power led connected to the 5V power distribution. Proposal is to use a red led. Doesn't need to be populated.
R1 & R2 4.7 kΩ resistor Near the up and down buttons BTN_UP and BTN_DWN.
R3 22 Ω resistor Resistor for display indicator led. Leave empty if there is no led connected to IND_LED + and IND_LED - on the bottom of the PCB.
R4 150 Ω resistor Resistor for power led. Leave empty if there is no led connected to PWR_LED.

Select button

For the select button you have 2 options:

  • Connect a default tactile momentary push button to BTN_SEL. The sqaure size needs to be 6 x 6 mm. The height needs to be heigh enough to reach the top of your enclosure. If you don't use an enclosure you can stick to a flat one of about 5 mm.
  • Connect any kind of button to BTN_SEL + and BTN_SEL - at the pin headers at the bottom of the PCB. The polarity doesn't matter.

Up and down buttons

For the up and down buttons you have 2 options:

  • Connect a default sidewards tactile momentary push button 6 x 6 mm. The height of the button needs to be suitable to be able to press it on the outside of your enclosure. If you don't use an enclosure you can use a flat size button of for example 5 mm.
  • Connect any kind of button to BTN_UP + and BTN_UP - for the up button and to BTN_DWN + and BTN_DWN - for the down button. For both buttons the polarity doesn't matter.

SSD1306 Display

There are several ways to attach a SSD1306 OLED display to the display module. Most of the SSD1306 display module do have pre-soldered male header pins attached to them selfs. If you don't want to desolder the pin headers you can decide to solder 1x4 female pin headers to the PCB on the connectors GND, VCC, SCK and SDA.

Another way to attach the screen to the display module PCB is to desolder the male header pins (or buy a SSD1036 display module without pre-soldered male header pins) and solder wrapping wires (or other kind of flexible wires) between the SSD1306 display module and the display module PCB.

As a last option I can think of you can add a JST XH connector to the display module PCB. In that way you still have a connector and you still have a wire solution.

Havind a wires solution is the best way if you use an enclosure. Not every enclosure is the same. With a wire you have a great flexibility to move around with the display.

Header pins

On the bottom side you can solder wires to seperate buttons and a seperate display indicator led to the bottom of the display module PCB. Ofcourse you can decide to make dupont cables to the buttons and led. In that case I advise you make female dupont connectors to the buttons and led so that you can use a 1 x 8 pins male header on the display module PCB. I would advise to use angled male pin header so that in most cases little height won't be an issue.

Display module port

This is a serial connector, type DB9. It is meant to connect the display module to through a serial cable.

WARNING! NEVER CONNECT THE DISPLAY MODULE PORT TO A PC OR OTHER SERIAL DEVICE. RISK FOR SHORT CIRCUIT AND DAMAGE!

Clone this wiki locally