Skip to the content
PCBKitNew board
2 layers36 × 47 mmMad, the printed circuit board in 3D

Matrix Display

Size
36 × 47 mm
Copper layers
2
Thickness
1.6 mm
Parts
48
Nets
45
Pads
131
Tracks, vias
130, 41
Pours
2
Routed
Yes
KiCad
KiCad 7 (file 20221018)
Created
14 Oct 2024
Updated
25 Feb 2026

Overview

Mad is an open-source printed circuit board by 0x007E, from the 0x007E/mad repository on GitHub. It is a 2-layer board of 36 × 47 mm with 48 parts on 45 nets, routed with 130 tracks and 41 vias.

It is built around the AO3416A, BZV55B5V6 and TA20-11SRWA. Its parts include 12 transistors, 10 resistors, 4 capacitors, 3 diodes and 2 connectors. It belongs with the lEDs and displays boards and the AVR (ATmega, ATtiny) boards of this library.

Main components

3

README

README.md

Version: 1.0 Release Build License CC By-NC-SA

MAD - Matrix Display

Ask DeepWiki

The MAD project is based on a pcb with an ATtiny406/ATtiny1606 and a Matrix LED Display. It can be used to display data sent over SPI or UART. The display also implements a small amount of characters from the ASCII table and also has internal space (EEPROM) for 16 special characters that can be programmed.

ExperienceLevel
Soldering?%
Mechanical?%
Software?%

Downloads

TypeFileDescription
Schematicpdf / cadlabSchematic files
Boardpdf / cadlabBoard file
DrillpdfDrill file
PCBzip / tarKiCAD/Gerber/BoM/Drill files
Mechanicalzip / tarFreeCAD/Housing and PCB (STEP) files
Firmwarezip / tarFirmware for ATtiny406/ATtiny1606 (Display)
Firmware (demo)zip / tarTest application(s) for ATmega16a

Hardware

There are two parts of the hardware. The pcb and the housing of the MAD. The pcb is created with KiCAD and the housing with FreeCAD. The software is programmed with Microchip (Atmel) Studio. All files are built with github actions so that they are ready for a production environment. The housing is printed with a 3D-printer (Dremel 3D40).

PCB

The circuit board is populated on both sides (Top, Bottom). The best way for soldering the SMD components is within a vapor phase soldering system and for the THT components with a standard soldering system.

Top Layer

Top Layer

Bottom Layer

Bottom Layer

Mechanical

The housing has a tolerance of 0.2mm on each side of the case. So the pcb should fit perfectly in the housing. The tolerance can be modified with FreeCAD in the Parameter Spreadsheet.

Assembled

Assembled

Exploded

Exploded

Programming/Setup

The MAD is powerd with 5V from an external source. With Jumper JP1 bridged the MAD can be programmed over UPDI. To enable UART mode the SS (CS) Pin must be held low (more details on the dataflow diagram) otherwise the SPI mode is enabled. In UART mode only one display can be driven. The SI pin gets TXDand the SO pin gets RXD. The firmware for the display can be downloaded (see the download section).

bash
#         +-+                                         +----------+      +---------------------+
#        / /                                          |   U  +---+---+  |                     |
#      +-+-+-----------------+                        |   S  |  USB  |--+ +-----------------+ |
#      | JP1                 |                        |   B  +---+---+  | | AVR-Dude        | |
#      |    MAD - Display    |       +---------+      |   /      |      | | ~~~~~~~~        | |
#    +-+-+                 +-+-+   +-+-+  U    |      |   U      |      | | ~~~~~           | |
#    | 1 | VCC         VCC | 1 +---+VCC|  P  +-+-+  +-+-+ A      |      | | ~~~~~~~~~~~~    | |
#    | 2 | UPDI       UPDI | 2 +---+PDI|  D  |GND+--+GND| R      |      | |                 | |
#    | 3 | SI           SO | 3 |   +-+-+  I  |VCC+--+VCC| T      |      | +-----------------+ |
#    | 4 | SCK         SCK | 4 |     |       +---+  +---+ A      |      |                     |
#    | 5 | SS (CS)      SS | 5 +   +-+-+     |RxD+--+RxD| +------+      | Computer            |
#    | 6 | GND         GND | 6 +---+GND|     |TxD+--+TxD| |5V/3V3|      |                     |
#    +-+-+                 +-+-+   +-+-+     +-+-+  +-+-+ +------+      +---------------------+
#      +---------------------+       | ADAPTER |      +----+-----+
#                                    +---------+

FUSES

RegisterValue
WDTCFG0x00
BODCFG0x00
OSCCFG0x02
TCD0CFG0x00
SYSCFG00xF5
SYSCFG10x00
APPEND0x00
BOOTEND0x00

To setup SW1 as RESET (PA0) it is necessary to change the SYSCFG0-FUSE of the ATtiny406/ATtiny1606. WARNING: To reset the PA0 pin to UPDI mode a 12V impulse is necessary to program the FUSES again.

Software

The display software can be controlled by SPI or UART. The interfaces are displayed in the dataflow diagram. There is a demo software to use the display directly over spi (MAD_Test) or a library (MAD_LIB).

Dataflow diagram

Dataflow

UART Test

To send characters to the display over UART connect an USB/UART converter to the PC and make a bridge beween GND and SS (CS) before powering up the display. Start a terminal software on the computer (e.g. Teraterm) and setup the following settings:

NameValue
PORTCOM?
BAUD9600
DATABITS8
PARITYNONE
STOPBITS1
FLOWCTRLNONE

Connection setup

bash
#      +---------------------+                                +---------------------+
#      |    MAD - Display    |                                |                     |
#    +-+-+                 +-+-+                              | +-----------------+ |
#    | 1 | VCC         VCC | 1 +-------+    +----------+      | | TeraTerm        | |
#    | 2 | UPDI       UPDI | 2 |       |    |   U  +---+---+  | | ~~~~~~~~        | |
#    | 3 | SI           SO | 3 +-----+ |    |   S  |  USB  |--+ | ~~~~~           | |
#    | 4 | SCK         SCK | 4 |     | |    |   B  +---+---+  | | ~~~~~~~~~~~~    | |
#    | 5 | SS (CS)      SS | 5 +--+  | |    |   /      |      | |                 | |
# +--+ 6 | GND         GND | 6 +--+  | |    |   U      |      | +-----------------+ |
# |  +-+-+                 +-+-+     | |  +-+-+ A      |      |                     |
# |    +---------------------+       | +--+VCC| R      |      | Computer            |
# |                                  +----+TxD| T      |      |                     |
# |                                       |RxD| +------+      +---------------------+
# +---------------------------------------+GND| |5V/3V3|
#                                         +-+-+ +------+
#                                           +----+-----+

SPI Test

The firmware itself contains some demos how to use the display over spi. The demo software itself is written for an ATmega16A. To test the display a connection to the spi pins between the display and the ATmega16Ais necessary.

Connection setup

bash
# ~------------+
# ~          +-+-+
# ~          |VCC+------+
# ~          +-+-+       \        +---------------------+
# ~            |          \       |     MAD - Display   |
# ~  A       +-+-+         \    +-+-+                 +-+-+
# ~  T   [7] | P +- SCK -+  +---+ 1 | VCC         VCC | 1 |
# ~  M       | O |        \     | 2 | UPDI       UPDI | 2 |
# ~  E       | R +- MOSI --\----+ 3 | SI           SO | 3 |
# ~  G       | T +-- SS -+  +---+ 4 | SCK         SCK | 4 |
# ~  A       | B |       +------+ 5 | SS (CS)      SS | 5 |
# ~          |   |           +--+ 6 | GND         GND | 6 |
# ~  1       |   |          /   +-+-+                 +-+-+
# ~  6   [0] |   |         /      |                     |
# ~  A       +-+-+        /       +---------------------+
# ~            |         /
# ~          +-+-+      /
# ~          |GND+-----+
# ~          +-+-+
# ~~~~~~~~~~~~~~ 

SPI Parameter

To control the display through SPI the bus of the master needs the following setup:

ParameterValueDescription
Clock< 1MhzBus clock speed should not exceed this value
DirectionMSBMSB needs to be transmitted first
PolarityRisingPolarity of clock is rising _/
PhaseRisingData is valid when clock is rising _/

Detail can be found here

SPI Frame

bash
# SPI display transmission
# _                                                SS                                                _
#  \________________________________________________________________________________________________/
#                                                 SCK   
#     __    __    __    __    __    __    __    __    __    __    __    __    __    __    __    __    
# ___/1 \__/2 \__/3 \__/4 \__/5 \__/6 \__/7 \__/8 \__/9 \__/10\__/11\__/12\__/13\__/14\__/15\__/16\___
#                                                 MOSI
#    __    __    __    __    __    __    __    __    __    __    __    __    __    __    __    __
# __/C \__/T \__/R \__/L \__/B \__/Y \__/T \__/E \__/D \__/A \__/T \__/A \__/B \__/Y \__/T \__/E \____
#   \__/  \__/  \__/  \__/  \__/  \__/  \__/  \__/  \__/  \__/  \__/  \__/  \__/  \__/  \__/  \__/
#    [7                   :                    0]    [7                   :                    0]

SPI Commands

To enable a bit it needs to be set to on ($1=ON$). To disable a bit it is necessary to set it to off ($0=OFF$).

Control-ByteData-Bit(s)Description
0x000xXXNo operation
0x01[4:0]ROW1 LEDs
.........
0x07[4:0]ROW7 LEDs
0x08[6:0]Show ASCII character on display
0x100xXXClear buffer
0x1F[0]Enable display
0x200xXXCopy EEPROM address (0) to display
.........
0x2F0xXXCopy EEPROM address (15) to display
0x300xXXCopy Display content to EEPROM address (0)
.........
0x3F0xXXCopy Display content to EEPROM address (15)
0xF00xXXDisplay refresh rate LOW byte
0xF10xXXDisplay refresh rate HIGH byte
0xFF0xXXRESET the SPI queue

Example Library (matrix.h)

With the attached demo library (MAD_LIB) it is quiet easy to use the display. To setup the matrix display library some defines needs to be adjusted.

c
// Setup the number of displays that are cascaded
#ifndef MATRIX_DISPLAYS
    #define MATRIX_DISPLAYS 2
#endif
c
#include "../lib/matrix/matrix.h"

int main(void)
{
    matrix_init();
    matrix_reset();
    _delay_ms(MATRIX_RESET_RECOVERY_TIME_MS);
    matrix_enable();

    matrix_char(1, 'A');
    _delay_ms(1000);
    matrix_char(2, 'B');

    matrix_frame(buffer);
    // ...
}

Additional Information

TypeLinkDescription
ATtiny406pdfATtiny microcontroller
ATtiny1606pdfATtiny microcontroller
ATmega16ApdfMicrochip ATmega16A Datasheet
TA20-11SRWApdfDot Matrix Dispaly
Atmel ICEpdfAtmel ICE datasheet
UPDIwebUPDI-Adapter with AVR-Dude
Microchip StudiowebDownload page for Microchip Studio
KiCADwebKiCAD project page
FreeCADwebFreeCAD project page
TeraTermwebTerminal software for UART

R. GAECHTER

Parts

48
QtyValueFootprintReferences
715Resistor_SMD:R_1206_3216MetricR2, R3, R4, R5, R6, R7, R8
7AO3416APackage_TO_SOT_SMD:SOT-23Q1, Q3, Q5, Q7, Q9, Q11, Q12
7TestPoint_ProbeTestPoint:TestPoint_Pad_D1.0mmTP1, TP2, TP3, TP4, TP5, TP6, TP7
5AO3419APackage_TO_SOT_SMD:SOT-23Q2, Q4, Q6, Q8, Q10
210uCapacitor_Tantalum_SMD:CP_EIA-6032-28_Kemet-CC1, C2
2M3MountingHole:MountingHole_3.2mm_M3_DIN965_PadH1, H2
1100nCapacitor_SMD:C_1206_3216MetricC3
110kResistor_SMD:R_1206_3216MetricR10
1180Resistor_SMD:R_1206_3216MetricR9
1330Resistor_SMD:R_1206_3216MetricR1
1ATtiny__06-SPackage_SO:SOIC-20W_7.5x12.8mm_P1.27mmU1
1BINSymbol:WEEE-Logo_4.2x6mm_SilkScreenFID3
1BZV55B5V6Diode_SMD:D_MiniMELFD3
1Conn_01x06_PinConnector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_HorizontalJ1
1Conn_01x06_SocketConnector_PinSocket_2.54mm:PinSocket_1x06_P2.54mm_HorizontalJ2
1ESDSymbol:ESD-Logo_6.6x6mm_SilkScreenFID1
1FuseFuse:Fuse_1206_3216MetricF1
1Jumper_2_OpenConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_HorizontalJP1
1LEDLED_SMD:LED_1206_3216MetricD2
1OHSymbol:OSHW-Logo_5.7x6mm_SilkScreenFID2
1QRImages:QR_0x007eFID4
1SW_PushButton_Switch_SMD:SW_SPST_PTS645SW1
1TA20-11SRWADisplay_Matrix:LED_TA20-11SRWAD1
1n.B.Capacitor_SMD:C_1206_3216MetricC5

Questions

How big is the Mad PCB?

It measures 36 × 47 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Mad use?

48 parts, built around the AO3416A, BZV55B5V6 and TA20-11SRWA. 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 Mad KiCad files?

From the 0x007E/mad repository on GitHub, at the commit this page was made from: the board is pcb/MAD.kicad_pcb and its schematic pcb/MAD.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Mad design in my own project?

Its repository states no licence, so its author keeps all rights: ask 0x007E before reusing the design.

Similar boards

  • 2 layersRcl, the printed circuit board in 3D

    Rcl

    0x007E/rcl

    Color Lamp

    82 parts
  • 2 layers43.8 × 31.8 mmCba, the printed circuit board in 3D

    Cba

    0x007E/cba

    CAN-Bus Analog

    68 parts
  • 2 layers43.8 × 31.8 mmCbi, the printed circuit board in 3D

    Cbi

    0x007E/cbi

    CAN-Bus Input

    87 parts
  • 2 layers43.8 × 31.8 mmCbo, the printed circuit board in 3D

    Cbo

    0x007E/cbo

    CAN-Bus Output

    82 parts
  • 2 layers43.8 × 31.8 mmCbu, the printed circuit board in 3D

    Cbu

    0x007E/cbu

    CAN-Bus UART

    53 parts
  • 2 layers76.2 × 50.8 mmDir, the printed circuit board in 3D

    Dir

    0x007E/dir

    Digital Radio

    127 parts
  • 2 layers68.6 × 53.3 mmZmk uno, the printed circuit board in 3D

    Zmk uno

    kitspace-test-repos/kicad6-file-collection

    76 partsMIT
  • 4 layers86.6 × 85.1 mmDPB PCB, the printed circuit board in 3D

    DPB PCB

    V2-Tech/DPB-PCB

    118 parts1GPL-3.0