Skip to the content
2 layers60 × 60 mmBcl4v2, the printed circuit board in 3D

You might be interested in some libopencm3 examples here.

Size
60 × 60 mm
Copper layers
2
Thickness
1.6 mm
Parts
21
Nets
14
Pads
89
Tracks, vias
154, 6
Pours
2
Routed
Yes
KiCad
KiCad 4
Created
25 Oct 2018
Updated
30 Jul 2019

Overview

Bcl4v2 is an open-source printed circuit board by Yanisin, from the Yanisin/DotMatrix repository on GitHub. It is a 2-layer board of 60 × 60 mm with 21 parts on 14 nets, routed with 154 tracks and 6 vias.

It is built around the IRLML6402. Its parts include 12 connectors, 3 capacitors, 2 resistors, 2 switches and 1 IC.

Main components

1

README

README.md

DotMatrix

What is this?

A STM32F070CB driving a LED DotMatrix.

Prerequisities for building Firmware

  • You need an appropriate Cortex-M ARM toolchain. We suggest to use the ARM's GNU Embedded Toolchain for Arm . Please note that the gcc-arm-none-eabi provided by Ubuntu 18.04 is currently broken and can't be used.

  • This project makes use of libopencm3 [blocked]https://github.com/libopencm3/libopencm3) and ChibiOS. In order to build libopencm3 you need Python 2.

  • To download the firmware, you have two options:

    • Via USB: You need dfu-util 0.9+ and a USB cable. Please not that dfu-util 0.8 will not work.
    • Via SWD: You need openocd and a ST-LINK v2 device
  • Optional: Docker

You might be interested in some libopencm3 examples here.

The pull requests there might be an interesting source of information as well.

You will also want to have the manuals for your hardware at hand. These are the most important for software development:

Install & Build

Get the code:

text
$ git clone https://github.com/libopencm3/libopencm3.git
$ git clone https://github.com/ChibiOS/ChibiOS.git
$ git clone https://github.com/Yanisin/DotMatrix.git

We provide a Dockerfile, containing the suggested toolchain, openocd, dfu-util and other tools as well. You can build the container with:

text
$ cd DotMatrix/
DotMatrix$ docker build -t gcc-arm-none-eabi-8-2018-q4 .

Create a file named settings.mk in DotMatrix/src and provide an appropriate configuration. You can use DotMatrix/src/settings.mk.example as input. This settings.mk works with the Docker container:

text
OPENCM3_DIR ?= /home/dev/app/src/libopencm3
CHIBIOS ?= /home/dev/app/src/ChibiOS
HW_VERSION = "HW_60x60_rev_0_5"
SUDO=
SIM=0
OOCD ?= openocd
OOCD_INTERFACE ?= stlink-v2-1
OOCD_TARGET ?= stm32f0x

You can start the container with:

text
DotMatrix$ docker run -it --privileged --expose 4444 \
              -v /dev/bus/usb:/dev/bus/usb \
              -v `pwd`/../libopencm3:/home/dev/app/src/libopencm3 \
              -v `pwd`/../ChibiOS:/home/dev/app/src/ChibiOS \
              -v `pwd`:/home/dev/app \
              gcc-arm-none-eabi-8-2018-q4:latest /bin/bash

You need to compile libopencm3 before usage. This has to be done once. With help of the toolchain container this is:

text
dev@59e291eed30d:~/app$ cd src/libopencm3/
dev@59e291eed30d:~/app/src/libopencm3$ make

ChibiOS is compiled on demand.

To compile the firmware / demo of your interest, just go to the directory and issue $ make. For instance:

text
dev@59e291eed30d:~/app$ cd src/full/
dev@59e291eed30d:~/app/src/full$ make

This should result in a binary build/full.elf.

Content of the package

The software demos live in the src directory. There are are three main demos avaiable:

  • src/stm32f070_miniblink - a simple demo just blinking the LED
  • src/GameOfLife - GameOfLife with all connected cells working together. Simple communication protocol over UART. The demo uses just libopencm3 for HW interfacing.
  • src/full - the 'catch all' demo. Includes GameOfLife and other applications that are selectable with an 'applet selector'. Provides a communication layer over I2C and UART. Automatically detects the topology of the boards at startup and chooses a 'master board'. Is based on an RTOS (ChibiOS).

There are also other small testing projects and a simulator that allows you to run the 'full' demo on your host machine.

Flashing

Flashing is done using the make prg and make prg_usb commands. See src/common.mk for other makefile commands.

SWD Interface

Attach the SWD interface of the MCU via stlink-v2 programmer and issue $ make prg

USB DFU Bootloaders

There are two USB bootloaders. One is burnt int the MCU from the manufacturer. This one can be used in case of emergency to write "more specialized" bootloader stored in the FLASH, and that is used the flash the actual firmware.

The MCU itself has a bootloader burnt from the manufacture. This one requires the Y1 oscillator popullated in order to work. It can be

Project Distributed Bootloader

There is a bootloader in src/dfu. Among other nice features this bootloader allows to flash multiple interconnected boards at the same time. Once compiled it can be flashed to ieach of the MCUs either using the stlink-v2 programer ( using make prg commad) or via the MCUs built in bootloader (using the "make prg_bl" command).

If you want to use this bootloader (recommneded way), issue $ make prg_usb in your project and connect the board over USB (or restart it, if it is already connected. The flashing process will start as soon as the board reaches the bootlader (you will see threee dots). If multiple boards are connected and started at once, the firmware will be loaded to all of them.

The USB part of this bootloader seems to work even without Y1 resonator populated, but the manufacturer does not say that it should be relyable. If you have the the Y1 not populated keep this in mind.

MCU Manufacturers Bootloader

The MCU has a built in bootloader that is started if the BOOT0 pin is held hight after reset is released. On the board there is reset circuitry with button. If you hold this reset button for several seconds, you will get the board into manufacturer provided bootloader. Among other ways (like USART, SPI, I2C) this bootloader can program the flash via the USB DFU protocol. Use make prg_bl to talk to this bootloader. This can be used to flash the project bootloader or have the wonderfull feeling of running bare-metal. If you want to run your project without the project bootloader, You have to compile the demo with NO_BOOTLOADER=1.

Keep in mind that you can use this bootloader in USB DFU mode only if there is the Y1 resonator present. If the Y1 is not present, you will need to use the stlink-v2 or some other interface that this bootloader can handle even without oscillator. For details about this bootloader search for STs AN2606.

Memory layout

Even though that you are programming C, it is important to know the memory layout for debugging etc. The makefiles will take care of linking the code at correct addreses.

ROM is mapped at 0x08000000 and the layout is as follows:

AddressSizeUsage
0x00x4000Project Distributed Bootloader
0x40000x1C000Your application code (interrupt vectors, .text, .data)

RAM is mapped at 0x20000000 and the layout is as follows.

AddressSizeUsage
0x00x100Interrupt vectors (loaded from ROM)
0x1000x3F00Your application data (.data loaded from ROM, .bss)

For the location of IO registers for peripherals, consult the ST manual

Hardware and mechanical parts

The currently used/latest HW is described in "pcb/60x60_dma". The board is designed with KiCAD but there is the schematics exported in PDF and some assembly hints with list of needed parts are added as well. The other folders in "src" are mostly unfinished various experiments/extension.

In the "mechanical" folder you can find the mechanical parts for 3D printing. For each board PCB you will need one disp_support.stl. The file is expected to be printed with 0.4mm nozzle and 0.15mm layer height. For connecting boards you can use joint_cross_1_5m.stl for each corner (in older revision of the board there is LED in the way so you need the use the one with the cuts for the LED).

Parts

21
QtyValueFootprintReferences
8Conn_01x05kicad_libraries_new:badger_Pin_Hdr_1x05_2.54mm_handsolderJ1, J2, J3, J4, J5, J6, J7, J8
4Conn_01x01_Femalebadger_footprints_kicad_4x:badger_mount_M3J9, J10, J11, J12
24u7Capacitors_SMD:C_0805_HandSolderingC1, C3
2SW_PushButtons_Switches_ThroughHole:SW_PUSH_6mm_h5mmSW1, SW2
1100nCapacitors_SMD:C_0805_HandSolderingC2
1220kResistors_SMD:R_0805_HandSolderingR14
1DS9166A-23kicad_libraries_new:badger_SOT-23_handsolderU1
1IRLML6402kicad_libraries_new:badger_SOT-23_handsolderQ1
1RKJXV1224_Joystickkicad_libraries_new:badger_RKJXV1224 JoystickR1

More from Yanisin/DotMatrix

6
  • 2 layers51.6 × 97 mmBcl4v2, the printed circuit board in 3D

    Bcl4v2

    Yanisin/DotMatrix

    You might be interested in some libopencm3 examples here.

    252 parts
  • 2 layers60 × 60 mmBcl4v2, the printed circuit board in 3D

    Bcl4v2

    Yanisin/DotMatrix

    You might be interested in some libopencm3 examples here.

    67 parts
  • 2 layers60 × 60 mmBcl4v2, the printed circuit board in 3D

    Bcl4v2

    Yanisin/DotMatrix

    You might be interested in some libopencm3 examples here.

    58 parts
  • 2 layers60 × 60 mmBcl4v2, the printed circuit board in 3D

    Bcl4v2

    Yanisin/DotMatrix

    You might be interested in some libopencm3 examples here.

    55 parts
  • 2 layers38 × 38 mmBcl4v3, the printed circuit board in 3D

    Bcl4v3

    Yanisin/DotMatrix

    You might be interested in some libopencm3 examples here.

    33 parts
  • 2 layers35.5 × 6 mmBcl4v2, the printed circuit board in 3D

    Bcl4v2

    Yanisin/DotMatrix

    You might be interested in some libopencm3 examples here.

    3 parts

Similar boards

  • 4 layers81.6 × 88.8 mmCheetah MX4-Mini, the printed circuit board in 3D

    Cheetah MX4-Mini

    KaiPereira/Cheetah-MX4-Mini

    A powerful yet compact 3D printer motherboard that supports TMC stepsticks, fans, heaters, screens and thermistors

    171 parts179
  • 4 layers60 × 28 mmRailLink, the printed circuit board in 3D

    RailLink

    Misaka0x2730/RailLink

    Compact isolated version of J-Link v9.

    83 parts134
  • 2 layers57.2 × 35.1 mmMainBoard Rev2, the printed circuit board in 3D

    MainBoard Rev2

    lzrtag/LZRTag

    AVR-Based easily modifyable DIY Lasertag!

    70 parts111GPL-3.0
  • 2 layers68.6 × 53.3 mmDw probe tht, the printed circuit board in 3D

    Dw probe tht

    felias-fogg/dw-link

    An Arduino-UNO-based debugWIRE hardware-debugger

    28 parts90GPL-3.0
  • 2 layers55 × 100 mmESP32AY revD2, the printed circuit board in 3D

    ESP32AY revD2

    djspawnbrest/ESP32AY

    ZxPod - ESP32 based AY multiformat player

    138 parts59GPL-3.0
  • 2 layers17.4 × 12.6 mmTC4056-Bypass, the printed circuit board in 3D

    TC4056-Bypass

    DoImant/TP4056-Power-Path-PCB

    TP4056 Power Sharing PCB. Charge battery despite connected load.

    8 parts52CC-BY-SA-4.0

Questions

How big is the Bcl4v2 PCB?

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

What parts does the Bcl4v2 use?

21 parts, built around the IRLML6402. 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 Bcl4v2 KiCad files?

From the Yanisin/DotMatrix repository on GitHub, at the commit this page was made from: the board is pcb/60x60_joystick/bcl4v2.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the Bcl4v2 design in my own project?

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