Skip to the content
2 layers224.8 × 27.9 mmLed32stick, the printed circuit board in 3D

Alternate firmware for Banggoods 32LED POV Stick

Size
224.8 × 27.9 mm
Copper layers
2
Thickness
1.6 mm
Parts
38
Nets
20
Pads
98
Tracks, vias
306, 18
Routed
Yes
KiCad
KiCad 4
Created
23 Jul 2016
Updated
23 Jul 2016

Overview

Led32stick is an open-source printed circuit board by adlerweb, from the adlerweb/banggood-32led-stick repository on GitHub, published under the GPL-3.0 licence. It is a 2-layer board of 224.8 × 27.9 mm with 38 parts on 20 nets, routed with 306 tracks and 18 vias.

Its parts include 32 diodes, 2 switches, 1 IC, 1 connector and 1 crystal.

README

README.md

This repository contains hardware documentation and software for Banggoods "DIY 32 Bit LED Shake Stick Kit". This repository is a supplement for BitBastelei #205(German).

Hardware

The design itself is based on a STC11F02E microcontroller (8051-compatible, 2KB Flash, 2KB EEPROM). All LEDs are connectred in a 3-way-matrix (lines, rows and polarity). An additional direction-switch and a push button are also available. The chip can be programmed using a serial connection which is available on a separate pin header.

Design notes:

  • While the battery case is build for 4xAA you should only use 3 and short the last one to avoid overvoltage. See Instructions.
  • LEDs are not current limited and must be pulsed quickly to avoid damage
  • The IC is inteded for <=20mA and most likely overused

The provided design files can be opened using KiCad. The schematic schould be correct, the board layout is only a coarse drawing and should not be used as a reference without further checks

Software

The software is written in C and intended to be compiled using sdcc. A project file for MCU 8051 IDE is included. Both tools are available for linux under a open source license, Windows-Versions should also be available.

In it's current state some basic functionallity is given, but the software is far from complere, see below for a list of known flaws.

How the software works

At the top of the file a array of longs is defined. Every element represents one column of 32 LEDs, the left/highest bit will be drawn at the base of the unit. The first element will be drawn first. You can make the array wider or smaller using GRAPHSIZE above.

To draw a column the code will iterate every LED, switching the corresponding ports for LEDs to be lit either LOW or HIGH accordingly. LEDs and pins not used well be set to High-Z to avoid involuntary driving of other LEDs on the lines/columns of the LED-array.

The main program will first inizialize all ports as inputs (High-Z) with an exception for both buttons which will be driven using the "quasi bidirectional" mode, allowing us to use the MCU as pull-up.

The main loop will start drawing once the push-button is pressed. This should be replaced with the direction switch for proper drawing. It will begin using the first array element and draw it several times. If the timeout is up it will continue with the second column, etc. Drawing will automatically stop when reaching the last element or releasing the button.

The timeout is calculated dynamically, the code will start with one and increase the number of repetition if the draw was finished before releasing the button (of later changing the direction again). Thes isn't really feasible when using the push-button but should somewhat work one the direction switch is used.

How the software should work

Have a nice whish-list of things, that should be improved…

  • Fix the direction-switch. I wasn't able to get the direction switch working right away and the push-button was enough for demonstration. Shouldn't be too much work
  • The graph should be stored in EEPROM instead of flash memory as it is now - this should noticably increase available space and should allow for multiple graphs
  • A more or less intelligent way to compress the graphs may also free up space, but I'm not sure if loosing the human-redability and a lot of processing power is worth the effort
  • The 2-line-speed-algorithm may need a bit of care to be reliable
  • Currently every LED is driven separatly. While this is easy to implement and keeps the current down it is also fscking slow. Grouping lines, columns or whatever should save execution time and allow for higher horizontal resolution and nicer text
  • It should be possible to implement a basic font and add a "programming mode" (power up with button pressed?) to allow for easier customization without the need to recompile the code every time

Flashing

The IC can be programmed using a serial bootloader. You need a USB so TTL serial adapter to connect your PC to the board. Connect GND to GND, VCC to VCC/5V and cross RX/TX. On the software side you can use stcgal on linux or the official tool for windows (which is afaik not in english…). You have to start the flashing process on your PC first and then powercycle the IC to enter the serial bootloader.

For Linux you can use this command:

stcgal -P stc12 -p /dev/ttyUSB0 main.hex

Yes, the LED-board is using a stc11-IC, but the protocol is identical. Please be aware you need full access to your serial programmer, depending on your setup you have to start the process as root or use sudo.

Thanks

  • Banggood for sponsoring the kit (and getting me to learn 8051-C)
  • Grigori Goronzy and all stcgal contributors for saving me from wine with chinese fonts
  • The team behind sdcc so I'm not required to write my own STC11 header files
  • The guys behind MCU 8051 IDE so I hadn't to read the sdcc man page
  • The whole KiCad Folks because it still rocks
  • You for providing patches, right? ;)

Parts

38
QtyValueFootprintReferences
32LEDLEDs:LED-3MMD1, D2, D10, D11, D12, D13, D14, D15, D16, D17, D18, D19, D20, D21, D22, D23 +16
112MHzCrystals:Crystal_Round_Horizontal_2mmY1
13xAAWire_Connections_Bridges:WireConnection_2.50mmDrillBT1
1CONN_01X04Pin_Headers:Pin_Header_Straight_1x04P1
1SPSTButtons_Switches_SMD:SW_SPST_REED_CT10-XXXX-G1SW2
1STC11FxxHousings_DIP:DIP-20_W7.62mmIC1
1SW_PUSHButtons_Switches_SMD:SW_SPST_B3S-1000SW1

Similar boards

  • 2 layers85 × 115 mmOSO BOOK C1, the printed circuit board in 3D

    OSO BOOK C1

    joeycastillo/The-Open-Book

    For details on how to build, test and use Open Book, I've made documentation available here.

    38 parts8.1kCC-BY-SA-4.0
  • 2 layers38.1 × 12.7 mmVrs io 1, the printed circuit board in 3D

    Vrs io 1

    rusefi/rusefi

    rusefi - GPL internal combustion engine control unit

    38 parts1.2k
  • 2 layers136 × 84 mmMacropad, the printed circuit board in 3D

    Macropad

    hackclub/OnBoard

    💡 Join 1,000 teenagers and make your first PCB with a $100 grant!

    38 parts915
  • 2 layers126.4 × 15.2 mmV5ProbeTop, the printed circuit board in 3D

    V5ProbeTop

    Architeuthis-Flux/JumperlessV5

    The next generation jumperless breadboard

    38 parts332
  • 2 layers66 × 25.4 mmArdmover Empfangsspule Yann, the printed circuit board in 3D

    Ardmover Empfangsspule Yann

    Ardumower/ardumower

    Develop an open source robotic lawn mower (HW+SW reference platform)

    38 parts282
  • 2 layers17.8 × 17.8 mmAltmode friend, the printed circuit board in 3D

    Altmode friend

    CRImier/MyKiCad

    My KiCad boards. Can't be bothered uploading individually anymore, so here you go.

    38 parts253GPL-3.0
  • 2 layers51.4 × 61 mmWifi gb cart, the printed circuit board in 3D

    Wifi gb cart

    Staacks/wifi-game-boy-cartridge

    A WiFi cartridge for the original Game Boy.

    38 parts242
  • 2 layers125 × 97.2 mmBattoota, the printed circuit board in 3D

    Battoota

    AlaaSaadAbdo/battoota

    Keyboards

    38 parts188

Questions

How big is the Led32stick PCB?

It measures 224.8 × 27.9 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Led32stick use?

38 parts. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Led32stick KiCad files?

From the adlerweb/banggood-32led-stick repository on GitHub, at the commit this page was made from: the board is hardware/led32stick.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the Led32stick design in my own project?

Its repository publishes it under the GPL-3.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).