Close

First PCB revision

A project log for Snailbot

Cute snail robot.

adam-demuriAdam Demuri 12/20/2021 at 03:100 Comments

For this project, I designed a custom PCB. This board will be the brains of the robot.

It uses an STM32G030 processor. Because of the ongoing chip shortage, commonly-used processors aren't available. The STM32G line is relatively new. The processor is pretty nice - it runs at 64MHz, as compared to the 48MHz of the STM32F line (e.g. as found in the common Blue Pill boards). The G030 also has more usable IO pins than the corresponding F-series processor. Since this line is so new, this particular processor was not supported by Arduino or PlatformIO yet. I updated the Arduino board definition to add this support, and wrote a custom board definition for PlatformIO.

I made this PCB somewhat generic, so that I could reuse it for other small robotics projects. It has three L9110 motor drivers, which are bidirectional (H-bridges), and can drive up to 800mA per channel. It supports three switches (or other binary sensors), and three phototransistors (or other analog sensors). It uses standard ARM SWDIO for programming, so it can be programmed e.g. using an STLink. It also has a serial line (UART) broken out.

It uses a single AA-sized LiFePO4 cell (600mAh) for power. This is a newer type of lithium battery. This battery's nominal voltage is 3.3v, with a max of around 3.6v, so no voltage regulator is required. This is beneficial, since I'll want the board to have very low quiescent current draw, so that it can run for months between charges. There is an onboard charging circuit, and a USB-C port.

I designed this board to be assembled by JLCPCB. At time of writing (2021-12), they will populate nearly all of the components - only the programming header, serial port, and battery holder need to be hand-soldered, and these are simple through-hole parts.

The motors, sensors, and switches are connected to the board using JST-ZH connectors. I designed this board to be pretty small, and these connectors are tiny! They're a pain to crimp, and a pain to disconnect, but ideally I shouldn't have to do either of those things very often. Here's the board on a first draft of the base of the snail, with one each of the peripherals attached:

I've tested most of the board's functionality, and it all works. I want to make a few usability tweaks to it, in case I want to order more of them. Next up is finishing the CAD for the body of the robot!

Discussions