

PCB CAZIN CEGARRA
Bare metal programming in C language on STM32F030F4 for a temperature sensor
- Size
- 47 × 40 mm
- Copper layers
- 2
- Thickness
- 1.6 mm
- Parts
- 34
- Nets
- 26
- Pads
- 98
- Tracks, vias
- 247, 2
- Pours
- 2
- Routed
- Yes
- KiCad
- KiCad 6 (file 20211014)
- Created
- 1 Aug 2024
- Updated
- 1 Aug 2024
Overview
PCB CAZIN CEGARRA is an open-source printed circuit board by nemocazin, from the nemocazin/stm32f030f4-bare-metal-programming repository on GitHub, published under the MIT licence. It is a 2-layer board of 47 × 40 mm with 34 parts on 26 nets, routed with 247 tracks and 2 vias.
It is built around the M24C01-RDW6TP. Its parts include 10 capacitors, 7 resistors, 3 ICs, 3 connectors and 2 diodes. It belongs with the sensors and measurement boards and the STM32 boards of this library.
Main components
1README
PCB/README.mdSTM32F030F4 Bare metal programming
PCB Conception Part
Table of content
- General project information
- Schematic design
- PCB design
- Gerber files
- Soldering
- Documentation used
- Contact
General design information
This project enabled us to design an electronic board for mass production. This put us in a real design situation, so we had to be rigorous in our work and explanations. For the design of this electronic board, several components were imposed on us. Firstly, the microcontroller is an STM32F030F4 Arm Cortex with a 32-bit RISC-V core. Next, we had to use a 1kbit M24C01 EPROM memory on the I2C serial bus. Last but not least, a Low-Power Linear Active MCP9700 temperature sensor was required. With this information on the components we needed, we began the schematic of our board.
Schematic design
STM32F030F4 ARM Cortex microcontroller configuration
As we're using an ARM Cortex microcontroller, we had to do a lot of research to create the schematic around this component. First of all, the NRST pin corresponds to the reset and a 0.1uF capacitor is connected. This information comes from the microcontroller documentation, so we did the same. The BOOTO pin is used to control the microcontroller's start-up mode. When the pin is in the low state (0), the microcontroller starts normally from its internal flash memory, where the user program is stored. On the contrary, when the pin is high (1), the microcontroller starts up in special boot mode. This means it will attempt to boot from a different boot source, such as a connected programming device (like an ST-Link or bootloader), or from external memory (like separate flash memory). We've therefore chosen to connect this pin to a 3-pin connector linked to VCC or GND, so as to manually select the microcontroller's start-up mode. This can be seen as manual debugging. Pins PF0 and PF1 correspond to clock management, for which we also used the microcontroller documentation which gave us the schematic. We also used an 8MHz quartz clock, which is the microcontroller frequency.
M24C01 EPROM memory configuration
To manage the M24C01 EPROM memory component, several pins are connected directly to the microcontroller input/output pins:
- The SDA pin is used to transmit data between the EEPROM and the master device. Data to be written to or read from the EEPROM are transmitted via this line. It is linked to pin PA10 of the microcontroller, corresponding to I2C management from master to slave.
- The SCL pin provides a synchronization clock for serial communication between the EEPROM and the master device. This clock ensures that data is transmitted and received synchronously between the peripherals. It is connected to pin PA9 of the microcontroller.
- Pins E0, E1 and E2 on an EPROM are used to configure the device address. These pins define the EPROM address on the I2C bus. When one of the pins is connected to ground (GND), it sets the least significant bit of the EPROM address to 0. If it is left floating or connected to a high voltage (VCC), it will set this bit to 1. These pins are then connected to pins PA4, PA3, PA2 of the microcontroller.
- Pin WC controls memory write protection. When pin WC is held low (0) or connected to ground (GND), this indicates that memory write protection is enabled. This means that EEPROM write operations are disabled or protected from modification. On the other hand, when pin WC is held high (1) or connected to a supply voltage (VCC), this indicates that write protection is disabled, allowing normal write operations on the EEPROM memory. This pin is also connected to pin PA7 of the microcontroller. We've also added a 3-pin connector for manual debugging. This component also operates at 5V, so it is connected directly to VCC for power supply. Pull-up resistors have been added to initialize the SDA, SCL and EPROM pins to the high state when the electronic board is powered up. This prevents random data from being written to memory.
MCP9700 temperature sensor configuration
The MCP9700 temperature sensor is easy to use. A single output pin named TEMP gives the temperature value at several voltage levels. We connected it to the PA1 input/output pin of the microcontroller. This component also operates at 5V, so it's connected directly to VCC for power supply.
ARM JTAG connector configuration
This connector allows you to control the power supply to the electronic board, as well as program the microntrolleur and perform simple debugging. This component operates at 5V, so it's connected directly to VCC for power supply. We use two pins for this component:
- The SWDIO pin is used to transmit data between the debugger and the microcontroller. This is a bidirectional data line where debug instructions, programming data and read data can be transmitted in both directions. We then connected it to the PA13 input/output pin of the microcontroller.
- The SWDCLK pin is used to synchronize communication between the debugger and the microcontroller. This clock ensures that data is transmitted synchronously and consistently between the two devices. We then connected it to the PA14 input/output pin on the microcontroller.
Other components
We've added two debugging LEDs on pins PA0 and PA5 of the microcontroller.
Decoupling capacitors
The imposed components need decoupling capacities in order to function correctly:
- the STM32F030F4 microcontroler needs 5 decoupling capacitors: C4 at 1uF, C5 at 10nF, C6 at 100nF, C8 at 4.7uF and C10 at 100nF.
- the M24C01 serial EEPROM memory requires one decoupling capacitor C9 at 100nF.
- the MCP9700 temperature sensor requires one decoupling capacitor of C7 at 1uF.
TestPoints documentation
We've added testpoints to check the voltages of certain critical tracks, and also to potentially add additional components. These testpoints also serve as a means of debugging:
- TP1 is connected to the PB1 input/output pin to potentially add a component
- TP2 is connected to the microcontroller's VCC pin to monitor the voltage value and modify it if necessary
- TP3 is connected to input/output pin PA6 to potentially add a component
- TP4 is connected to the temperature sensor's temperature output pin to monitor output voltage values
- TP5 is connected to the EPROM pin of the EPROM to check voltage and also control EPROM protection manually
- TP6 is connected to the SWCLK pin of the JTAG connector to check synchronization clock voltages
- TP7 is connected to the SWCLK pin of the JTAG connector if data is being transmitted
PCB design
For the creation of the PCB, we wanted to do mostly single-sided to facilitate production. In the end, we had to make a track on the underside. For component footprints other than those specified, we used those from the SparkFun library. To place the components, we assembled them together as shown in the schematic. We also grouped the testpoints together to facilitate debugging. Component decoupling capabilities have also been glued to the respective components. Long tracks for VCC and GND run around the board, which is not optimized but will work in our application. The result is a 47x40 mm board, with a ground plane on each side.
Gerber files
We left the Gerber files in the directory in a ZIP file. These are used to create the stencils for the electronic board. These files can be used on a Gerber Viewer like site : Gerber Viewer;
Soldering
We soldered the components to the board using tin. As the components are very small, soldering them was a bit tricky. Here's the soldered board :

Documentation used
- STM32F030F4 microcontroler
- STM32F030F4 microcontroller hardware consideration
- M24C01 serial EEPROM memory
- MCP9700 temperature sensor
- MCP9700 temperature sensor hardware consideration
Contact
Created by [@nemocazin] & Antoine Cegarra
Parts
34| Qty | Value | Footprint | References |
|---|---|---|---|
| 7 | TestPoint | TestPoint:TestPoint_Pad_D1.5mm | TP1, TP2, TP3, TP4, TP5, TP6, TP7 |
| 4 | 100n | Capacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolder | C6, C7, C9, C10 |
| 3 | 4.7k | Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolder | R3, R4, R7 |
| 2 | 20p | Capacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolder | C1, C2 |
| 2 | 510 | Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolder | R5, R6 |
| 2 | Conn_01x03_Male | Connector_PinHeader_1.00mm:PinHeader_1x03_P1.00mm_Vertical | J1, J2 |
| 2 | LED | LED_SMD:LED_0603_1608Metric_Pad1.05x0.95mm_HandSolder | D1, D2 |
| 1 | 0.1u | Capacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolder | C3 |
| 1 | 10k | Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolder | R2 |
| 1 | 10n | Capacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolder | C5 |
| 1 | 1u | Capacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolder | C4 |
| 1 | 390 | Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolder | R1 |
| 1 | 4.7u | Capacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolder | C8 |
| 1 | 8M | Crystal:Crystal_SMD_HC49-SD | Y1 |
| 1 | Conn_ARM_JTAG_SWD_10 | Connector_PinHeader_2.54mm:PinHeader_2x05_P2.54mm_Vertical | J3 |
| 1 | M24C01-RDW | Package_SO:TSSOP-8_4.4x3mm_P0.65mm | U2 |
| 1 | MCP9700T-ETT | Package_TO_SOT_SMD:SOT-23 | U3 |
| 1 | STM32F030F4Px | Package_SO:TSSOP-20_4.4x6.5mm_P0.65mm | U1 |
| 1 | SW_Push | Switches:TACTILE_SWITCH_SMD_5.2MM | SW1 |
Similar boards
- 2 layers92.9 × 82 mm

- 2 layers142.5 × 106.4 mm

- 2 layers26 × 30 mm

Microcontroller
FrameworkComputer/ExpansionCards
Reference designs and documentation to create Expansion Cards for the Framework Laptop
34 parts1.1kCC-BY-4.0 - 2 layers171.2 × 72.9 mm

Amiga gfxcard old
mntmn/amiga2000-gfxcard
MNT VA2000, an Open Source Amiga 2/3/4000 Graphics Card (Zorro II/III), written in Verilog
34 parts1k - 2 layers53.5 × 62.5 mm

Led matrix
hackclub/OnBoard
💡 Join 1,000 teenagers and make your first PCB with a $100 grant!
34 parts915 - 2 layers45 × 26 mm

- 2 layers41.7 × 25.7 mm

Headphones flex pcb rigid
strangeparts/niubi-headphones
Flexible circuit board design for adding a headphone jack to an iPhone 7
34 parts493MIT - 2 layers18.8 × 16.3 mm

Questions
How big is the PCB CAZIN CEGARRA PCB?
It measures 47 × 40 mm and has 2 copper layers, 1.6 mm thick.
What parts does the PCB CAZIN CEGARRA use?
34 parts, built around the M24C01-RDW6TP. 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 PCB CAZIN CEGARRA KiCad files?
From the nemocazin/stm32f030f4-bare-metal-programming repository on GitHub, at the commit this page was made from: the board is PCB/PCB_CAZIN_CEGARRA.kicad_pcb and its schematic PCB/PCB_CAZIN_CEGARRA.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Can I use the PCB CAZIN CEGARRA design in my own project?
Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).