/badge-2021

Badge for Labortage 2021

Primary LanguagePythonCreative Commons Zero v1.0 UniversalCC0-1.0

Badge Labortage 2021

assembled badge

Idea: based on Swag Badge

The idea for this year's Labor badge is based on the Swag Badge from the Open Hardware Miniconf at linux.conf.au 2021.

Swag badge

They also released a DIY version named Dag Badge as well as the Swag Badge schematics.

PCB

This is our own PCB design. We will offer a basic kit with the PCB itself, the ESP32 D1 Mini board, 2 OLED displays, and 2 push buttons, to keep it simple and inexpensive. Anyone can purchase the additional parts if they like and we may have some left over from testing, and of course, feel free to fork and rework the PCB as you like, print it yourself, file PRs, or just leave some feedback.

Size (rounded): 94mm x 130mm

Badge

See the schematics for details.

ESP32 D1 Mini

The data sheet and documentation for the ESP32-WROOM-32 is publicly available.

Buy

https://www.az-delivery.de/products/esp32-d1-mini

Pinout

ESP32 D1 Mini Pinout

The ESP32 has VDET pins which can be used for ADC.

Firmware

Use the erase.sh script to clear the SPI flash and flash.sh script to flash:

./erase.sh
./flash.sh firmware-image.bin

NOTE: One common board is the MH-ET LIVE ESP32 MiniKit. In order to flash it, you need to short GPIO0 to GND and use the assigned /dev/ttyACM{n} device.

MicroPython

It's in beta and we were having trouble getting MQTT and WiFi to work reliably.

Use ampy to upload scripts. On many OS distributions, you can find a package for it.

NodeMCU

The ESP32 variant is also still in beta, though may do better then MicroPython. We haven't tested it yet, but it does boot up thus far.

Use nodemcu-tool to upload scripts. If you are using Arch Linux, you can use the package from the AUR. Otherwise, use the PKGBUILD as a reference for building it; mind that you may need to rebuild the native modules.

Here is a prebuilt image from the cloud build service.

Buttons

There are many suitable and colorful 6x6 buttons, tall and high, though not as nice to press. We went with the larger 12x12 retro arcade style tactile push buttons instead.

OLED I2C Display

Note: On the back, we need to solder a bridge on one display in order to change its address, so we can use both on the same bus.

The module is based on the SSD1306. See also the data sheet and schematics for a similar design.

Buy

https://www.az-delivery.de/en/products/0-96zolldisplay

Front

display front

Back

display back

Joysticks / Thumbsticks

PS2 joysticks and corresponding caps are available from Amazon and probably other sources as well.

The Freetronics Kicad library has a model for it.

They have two potentiometers for the two dimensions each, so we assign GPIO pins to them:

function left right
X axis IO33 IO32
Y axis IO34 IO35
button IO5 IO12

Other ESP32 Boards

https://www.mischianti.org/2020/05/30/esp32-pinout-specs-and-arduino-ide-configuration-part-1/

Demo

MicroPython SSD1306 OLED Display Scroll and Shapes

Sources