
V0.2 Custom Motor Driver DRV8316 STM32G4
clawntl/BLDC-Driver
BLDC Driver with STM32G431 and DRV8316

The design also provides empty footprints for several other sensors which are not populated in the Ambient variant: - Light sensor (LITEON LTR-303ALS-01) - MEMS microphone (Knowles SPH0645LM4H) - Indoor air quality…
Uca dkaiot2-kicad is an open-source printed circuit board by LEAT-EDGE, from the LEAT-EDGE/ambient-pcb-dkaiot repository on GitHub, published under the CERN-OHL-P-2.0 licence. It is a 2-layer board of 73 × 77.5 mm with 184 parts on 153 nets, routed with 3,007 tracks and 521 vias.
It is built around the E22-900M22S, ATECC608A-SSHDA-T and BME280, with the HP203B, LTR-303ALS-01 and SGP30 among its other parts. Its parts include 55 capacitors, 51 resistors, 30 ICs, 19 connectors and 6 diodes. It belongs with the sensors and measurement boards and the STM32 boards of this library.
Mainboard PCB for the Ambient project.
The design also provides empty footprints for several other sensors which are not populated in the Ambient variant:
/ (repository root): KiCad projectgerbers/: Gerbers generated from the KiCad projectlibraries/: KiCad libraries of symbols, footprints and 3D models for components not found in the KiCad official repositorypdf/: Schematics generated from the KiCad projectpng/: Screenshots of the KiCad 3D renderwebp/: Pictures of the actual boardRefer to https://github.com/LEAT-EDGE/ambient-firmware-zephyr for the new, Zephyr RTOS-based firmware (compatible with both STM32L4 and STM32U5), and to https://github.com/LEAT-EDGE/ambient-firmware-arduino for the old Arduino-based firmware (not compatible with STM32U5).
In order to flash the firmware, put the microcontroller in bootloader DFU mode by holding the BOOT button (right next to the USB port) and pressing the RESET button (next to the BOOT button), then releasing the BOOT button after a couple of seconds. Alternatively, you can hold the BOOT button while plugging the USB cable in, and releasing it after a couple of seconds.
dfu-util can then be used to update the firmware.
It is called automatically by the west flash command when using the Zephyr-based firmware, or by the Arduino IDE's Upload button when using the Arduino-based firmware.
On Windows, for dfu-util to work properly, it is recommended to use the WinUSB driver. Zadig can be used to change the driver of the STM32 BOOTLOADER device to WinUSB.
On Linux, for a standard user to have access to the USB device, you may have to install a udev rules file in /etc/udev/rules.d/.
An SWD probe (e.g., STLINK V2 or V3) can also be used through the J7 debug header. Programming and debugging can then be performed using OpenOCD
Exposes the PA2 and PA3 pins for the USART2 peripheral of the microcontroller for debugging purposes.
Pinout:
| Pin | Net |
|---|---|
| 4 | V_PERIPH_3V |
| 3 | PA2_TX |
| 2 | PA3_RX |
| 1 | GND |
Main connector for the audio capture and energy management daughterboard.
Exposes the I2S bus (SAI1B), an I2C bus (I2C2), the 1.8V (VDD_1V8) and 3.0V (V_PERIPH_3V) peripheral supplies, 2 GPIOs (PA10, PA15) and the microcontroller reset signal (MCU_RESET, for reed switch reset trigger).
Pinout:
| Pin | Net | Pin | Net |
|---|---|---|---|
| 11 | GND | 12 | MCU_RESET |
| 9 | SAI_FS | 10 | EXT_MIC_IO_2 |
| 7 | SAI_SD | 8 | EXT_MIC_IO_2 |
| 5 | SAI_MCLK | 6 | I2C2_SCL |
| 3 | SAI_SCK | 4 | I2C2_SDA |
| 1 | V_PERIPH_3V | 2 | VDD_1V8 |
Unused in the Ambient variant.
Exposes 2 GPIOs (PA5, PC2) that provides access to the microcontroller's ADC and DAC channels.
Pinout:
| Pin | Net |
|---|---|
| 2 | PC2_ADC |
| 1 | PA5_DAC_ADC |
Power input to the board and output of the USB charging circuit.
The audio capture and energy management daughterboard connects to this header with its J3 connector.
| Pin | Net |
|---|---|
| 2 | +BATT |
| 1 | GND |
Unused in the Ambient variant.
Power input to the charging circuit
Pinout:
| Pin | Net |
|---|---|
| 2 | SOLAR |
| 1 | GND |
Exposes the SWD pins of the microcontroller for debugging purposes.
Pinout:
| Pin | Net |
|---|---|
| 5 | 3V |
| 4 | SWCLK |
| 3 | MCU_RESET |
| 2 | SWDIO |
| 1 | GND |
Unused in the Ambient variant.
1st Li-ion cell connector, behind protection circuit.
| Pin | Net |
|---|---|
| 2 | +BATT1_IN |
| 1 | -BATT1_IN |
Unused in the Ambient variant.
2nd Li-ion cell connector, behind protection circuit.
| Pin | Net |
|---|---|
| 2 | +BATT2_IN |
| 1 | -BATT2_IN |
Used to attach the LoRa antenna mezzanine PCB.
| Pin | Net |
|---|---|
| J20 | E22_ANT |
| J21 | GND |
| J22 | GND |
| J23 | GND |
Standard 2-layer 0.8mm stackup:
No special requirements, any solder mask and silkscreen color.
Gerbers are provided in the gerbers/ directory but can be re-generated from the KiCad project.
Recommended automated assembly for top-side only.
Manual assembly for top side:
Manual assembly for bottom side:
Currently, no testing process and firmware is provided. Proper operation of the board can be checked by running the Ambient application firmware.
Short checklist (non exhaustive):
Original circuit design by @nguyenmanhthao996tn in Altium.
The schematics and PCB have been re-designed from scratch in KiCad, while keeping the original circuit ideas, BOM, and component placement to be used as a drop-in replacement.
This project has received funding from Université Côte d'Azur and CERN.
| Qty | Value | Footprint | References |
|---|---|---|---|
| 32 | 100nF | Capacitor_SMD:C_0402_1005Metric | C1, C10, C12, C13, C17, C20, C21, C23, C24, C25, C28, C30, C32, C33, C35, C38 +16 |
| 19 | 0 | Resistor_SMD:R_0402_1005Metric | R22, R23, R26, R27, R30, R34, R35, R36, R46, R47, R48, R49, R50, R51, R52, R53 +3 |
| 12 | TestPoint | TestPoint:TestPoint_Pad_D1.0mm | J_3V1, J_5V1, J_BOOT1, J_D-1, J_D+1, J_GND1, J_GPS_EN1, J_PERIPH_3V1, J_PERIPH_CTRL1, J_RST1, J_RX1, J_TX1 |
| 10 | 4.7µF | Capacitor_SMD:C_0402_1005Metric | C2, C3, C7, C11, C26, C27, C29, C39, C43, C54 |
| 9 | 4.7k | Resistor_SMD:R_0402_1005Metric | R1, R2, R3, R6, R13, R14, R17, R38, R39 |
| 7 | Conn_01x01 | Connector_Pin:Pin_D1.0mm_L10.0mm | J20, J21, J22, J23, J24, J25, J26 |
| 5 | 10k | Resistor_SMD:R_0402_1005Metric | R7, R41, R42, R43, R44 |
| 5 | 10nF | Capacitor_SMD:C_0402_1005Metric | C8, C31, C34, C36, C56 |
| 4 | 51 | Resistor_SMD:R_0402_1005Metric | R9, R11, R24, R25 |
| 4 | Conn_01x02 | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | J3, J5, J11, J12 |
| 4 | FDV301N | PCM_Package_TO_SOT_SMD_AKL:SOT-23 | U13, U14, U16, U17 |
| 4 | MBR120LSF | Diode_SMD:D_SOD-123F | D2, D3, D4, D5 |
| 4 | MountingHole | MountingHole:MountingHole_3mm | H1, H2, H3, H4 |
| 3 | BSS138L | PCM_Package_TO_SOT_SMD_AKL:SOT-23 | U28, U30, U31 |
| 3 | NCV8170AXV300T2G | Package_TO_SOT_SMD:SOT-563 | U1, U10, U33 |
| 3 | SW_Push | Button_Switch_SMD:Panasonic_EVQPUM_EVQPUD | SW_BOOT1, SW_RST1, SW_User1 |
| 2 | 12pF | Capacitor_SMD:C_0402_1005Metric | C14, C15 |
| 2 | 1M | Resistor_SMD:R_0402_1005Metric | R10, R31 |
| 2 | 1k | Resistor_SMD:R_0402_1005Metric | R19, R21 |
| 2 | 220 | Resistor_SMD:R_0402_1005Metric | R4, R5 |
| 2 | 330 | Resistor_SMD:R_0402_1005Metric | R18, R20 |
| 2 | 470µF | Capacitor_Tantalum_SMD:CP_EIA-7343-15_Kemet-W | C16, C42 |
| 2 | 5.6pF | Capacitor_SMD:C_0402_1005Metric | C18, C19 |
| 2 | Conn_Coaxial | Connector_Coaxial:U.FL_Hirose_U.FL-R-SMT-1_Vertical | J6, J10 |
| 2 | R5478N101CD | Package_TO_SOT_SMD:SOT-23-6 | U12, U15 |
| 1 | 0 | Resistor_SMD:R_0805_2012Metric | R28 |
| 1 | 0 | Resistor_SMD:R_Array_Convex_4x0603 | RN1 |
| 1 | 1µF | Capacitor_SMD:C_0402_1005Metric | C37 |
| 1 | 2.5k | Resistor_SMD:R_0402_1005Metric | R16 |
| 1 | 220nF | Capacitor_SMD:C_0402_1005Metric | C22 |
| 1 | 2M | Resistor_SMD:R_0402_1005Metric | R12 |
| 1 | 360 | Resistor_SMD:R_0402_1005Metric | R8 |
| 1 | 470 | Resistor_SMD:R_0402_1005Metric | R15 |
| 1 | 4M | Resistor_SMD:R_0402_1005Metric | R29 |
| 1 | ATECC608A-SSHDA | Package_SO:SOIC-8_3.9x4.9mm_P1.27mm | U8 |
| 1 | BME280 | Package_LGA:Bosch_LGA-8_2.5x2.5mm_P0.65mm_ClockwisePinNumbering | U7 |
| 1 | Conn_01x02 | Connector_PinSocket_2.54mm:PinSocket_1x02_P2.54mm_Vertical | J4 |
| 1 | Conn_01x04 | footprints:BAT-TH_BH-18650-A1BJ034 | U3 |
| 1 | Conn_01x04 | Connector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_Vertical | J1 |
| 1 | Conn_01x05 | Connector_PinHeader_2.54mm:PinHeader_1x05_P2.54mm_Vertical | J7 |
| 1 | Conn_02x06_Odd_Even | Connector_PinSocket_2.54mm:PinSocket_2x06_P2.54mm_Vertical | J2J14 |
| 1 | Conn_ARM_SWD_TagConnect_TC2030-NL | footprints:Tag-Connect_TC2030-IDC-NL_2x03_P1.27mm_Vertical_TopBottom | J9J13 |
| 1 | DRV5023AJxLPG | Package_TO_SOT_THT:TO-92_Inline | U11 |
| 1 | E22-900M22S | footprints:E22-400M22S | U5 |
| 1 | HP203B | footprints:LGA-8_3.6x3.8mm_P0.9mm | U21 |
| 1 | ICM-20948 | Sensor_Motion:InvenSense_QFN-24_3x3mm_P0.4mm | U19 |
| 1 | KX023-1025 | Package_LGA:LGA-16_3x3mm_P0.5mm_LayoutBorder3x5y | U24 |
| 1 | KXTJ3-1057 | Package_LGA:Kionix_LGA-12_2x2mm_P0.5mm_LayoutBorder2x4y | U20 |
| 1 | LED_0603_Blue | PCM_LED_SMD_AKL:LED_0603_1608Metric | D1 |
| 1 | LSM303AH | Package_LGA:LGA-12_2x2mm_P0.5mm | U6 |
| 1 | LTR-303ALS-01 | OptoDevice:Lite-On_LTR-303ALS-01 | U18 |
| 1 | Logo_Open_Hardware_Large | footprints:OSHW-Logo_11.4x12mm_Copper_SolderMask | SYM1 |
| 1 | MCP73831-2-OT | Package_TO_SOT_SMD:SOT-23-5 | U9 |
| 1 | Micro_SD_Card_Det1 | footprints:microSD_XKB_XKTF-015-x | U32 |
| 1 | NCV8170BXV180T2G | Package_TO_SOT_SMD:SOT-563 | U26 |
| 1 | Quectel_L96 | RF_GPS:Quectel_L96 | U2 |
| 1 | SGP30 | footprints:Sensirion_DFN-6-1EP_2.44x2.44mm_P0.8mm | U29 |
| 1 | SMD2012-2 | PCM_Crystal_AKL:Crystal_SMD_2012-2Pin_2.0x1.2mm | X2 |
| 1 | SMD3225-4 | PCM_Crystal_AKL:Crystal_SMD_3225-4Pin_3.2x2.5mm | X1 |
| 1 | SPH0645LM4H | Sensor_Audio:Knowles_SPH0645LM4H-6_3.5x2.65mm | U22 |
| 1 | STM32U595RITx | Package_QFP:LQFP-64_10x10mm_P0.5mm | U4 |
| 1 | USB_B_Micro | Connector_USB:USB_Micro-B_Molex-105017-0001 | J8 |
| 1 | XL-1608SURC-06 | PCM_LED_SMD_AKL:LED_0603_1608Metric | D6 |

clawntl/BLDC-Driver
BLDC Driver with STM32G431 and DRV8316

a5632645/final_design
simple digital waveguide synthesizer & simple mpe midi keyboard(pitch bend and pressure)


WeymenKoo/Motor-Controller
Technical notes from a full design cycle: idea → theory → schematic → simulation → layout → fab → bring-up plan.

dragonlock2/kicadboards
Offsite backup for the miscellaneous KiCad boards that don't fit elsewhere



It measures 73 × 77.5 mm and has 2 copper layers, 0.8 mm thick.
184 parts, built around the E22-900M22S, ATECC608A-SSHDA-T, BME280 and HP203B. 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.
From the LEAT-EDGE/ambient-pcb-dkaiot repository on GitHub, at the commit this page was made from: the board is uca-dkaiot2-kicad.kicad_pcb and its schematic Input_Output.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository publishes it under the CERN-OHL-P-2.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).