Green Pill

From Stm32World Wiki
Revision as of 04:53, 18 April 2021 by Lth (talk | contribs) (→‎Production)
Jump to navigation Jump to search

As mentioned elsewhere, the first STM32 development board I got my hands on was a so-called Blue Pill and it was a truly horrible experience. I do understand that some of these boards are sold cheaper than the price of a STM32F103 MCU, and it would be perfectly acceptable using clones if this was a well documented fact. Unfortunately, a lot of the vendors use clones which are labelled as genuine STM32's. Because of this, and the fact that I wanted to learn how to design electronics around the STM32 [MCU]]s, I decided to roll my own development board. At the time I was doing this, JLCPCB would only assemble boards with a green soldermask, so I aptly named it the Green Pill.

Schematics design

The board have gone through a few revisions, but the final version ended up looking like this:

Green Pill rev. c.svg

This is largely dictated by the availability of parts from JLCPCB. The USB specification dictates the use of 10uF capacitors as maximum to avoid too large inrush current when it is connected.

The USB connector is a USB-C receptacle which can be hand soldered as it only includes the pins necessary for USB 2.0 (Full speed/High Speed). Since, the STM32F103 microcontroller does not include an internal 1.5K pull-up on the D+ line, one has been added. In revision A, this resistor was pulled directly up to the 3.3V rail, but in revision C this was made configurable. The reason for this is to trigger USB enumeration on soft restart.

Most STM32 development boards have only SWCLK and SWDIO exposed on a programming header, but on this board I included the optional SWO - which can provide serial debugging.

The choice of a 16 MHz crystal rather than 8 MHz was one of cost and space. 8 MHz crystals are either much more expensive or much larger than the 3x2 mm 16 MHz crystal used on this board.

Production

Rev. a

Rev a was ordered in July 2020 and the result showed up like this:

Green Pill rev. a - top side.jpg Green Pill rev. a - btm side.jpg

Notice that the PCB manufacturer missed the holes necessary for the USB-C connector. They acknowledged this to be their mistake and offered to run a second batch at no cost. Due to ONE change in the silk screen (top side have two A9's on the header) this became rev. b.

Rev. b

Green Pill rev. b - top side.jpg Green Pill rev. b - btm side.jpg

This time much much better.

With mounted headers and USB-C connector it looks like this:

Green Pill rev. b - fully assembled.jpg

A few comments on the design. The reason for putting the USB-C connector on the flip side of the board was two fold. First of all, the assembler (JLCPCB) only accept 1 sided mounting, and since I had to hand solder the USB connector it might as well go on the back side. Second it saves space since the resistors necessary can be in the same space. Nevertheless I really didn't like this approach, so it was changed on rev. c.

Rev. c

To be added

GD32 Variant

To be added

GD32V Variant

GigaDevice also makes a microcontroller series known as GD32VF. Like the GD32E103 these are pin and memory map compatible with the STM32 MCUs, but they are based on a RISC-V rather than an ARM core.