
A SGSS cskpin routed
ThatguyCplus/throttleECU
STM32F411CE Throttle ECU — PID position control with AS5048A encoder, H-bridge motor, safety module

[![Contributors][contributors-shield]][contributors-url] [![Forks][forks-shield]][forks-url] [![Stargazers][stars-shield]][stars-url] [![Issues][issues-shield]][issues-url] [![MIT License][license-shield]][license-url]
XESC YF r4 is an open-source printed circuit board by ClemensElflein, from the ClemensElflein/xESC_YF_rev4-adapter repository on GitHub, published under the MIT licence. It is a 2-layer board of 49.5 × 29 mm with 54 parts on 48 nets, routed with 198 tracks and 133 vias.
It is built around the STM32C011F6P6, TPS1H100BQPWPRQ1 and XC6206P332MR-G, with the 1N5819WS, SM4007PL and SMAJ33A among its other parts. Its parts include 20 resistors, 9 connectors, 8 capacitors, 6 diodes and 4 transistors. It belongs with the STM32 boards of this library.
[blocked]
Simple xESC adapter for stock Rev4 (built 2017) blade-motor
(the one with a internal motor controller under his cap)
| v1.x Hardware | v2.x Hardware |
|---|---|
![]() | ![]() |
Those who want use OpenMower with an older YardForce "Rev. 4" (built 2017) model, fail with the stock Blade-Motor as it has an embedded motor-controller under it's cap.
It's not very difficult to use this motor:
But it's somehow "crafted" and you need to be capable to do these things.
As an alternative, this "Adapter" is thought to replace OM's default Mow- xESC.
In addition to this adapter, it's nevertheless required to exchange two cables of the mow motor cabling. But this should be also possible for the untalented (see Requirements).
It's mandatory to cross the green and black mow-motor-cables!
[!WARNING]
Never plug or un-plug the mow-motor while the adapter is powered!
[!WARNING]
Do not simply trust the cable colors!
Check the image and validate if your cables do have the same colors! If not adapt accordingly
Either exchange the pins within the plug, or do it the lazy way like me, with a luster terminal. The latter has the advantage that you immediately see that you already crossed green/black.
Starting with hardware version 2.0, the adapters MCU needs to be branded by flashing a hardware config into the OTP area.
Generate Hardware Config Binaries
cd firmware/host-hw-config
lbuild build
sconsThis creates i.e.:
hw_config_v1.0.bin - Hardware v1.0 configurationhw_config_v2.0.bin - Hardware v2.0 configurationConnect your ST-Link to the adapter PCB. Do not connect the 3.3V pin if your adapter is already assembled to the OpenMower Mainboard and get powered by it!
Flash Hardware Config
# Flash/Brand v2.0 config with ST-Link/V2
STM32_Programmer_CLI -c port=SWD -d hw_config_v2.0.bin 0x1FFF7000The branding process writes a small hardware information structure to the first two OTP dwords. Take attention that OTP flash can be written only once!
Important Notes:
Firmware Installation Variants
We've two options to install the firmware. Either via:
Connect your ST-Link probe to the adapter PCB. Do not connect the 3.3V pin if your adapter is already assembled to the OpenMower Mainboard and get powered by it!
Flash the adapter:
st-flash --reset write firmware_xesc_yf_rev4.bin 0x08000000When done, st-flash should report 'Flash written and verified! jolly good!' (or similar) and immediately reboot.
Only relevant for v1.x hardware:
[!WARNING]
Do not unplug now!
On absolutely first firmware boot, it need to flash some settings to the MCU. You'll see some blink codes.
Do NOT unplug till you see:
The whole procedure will only take about 10 seconds. Once the procedure got processed it don't get triggered again for this MCU on future firmware flashes.
If the board doesn't come up with blink signs, unplug and replug it. But once you see blink signs, do not unplug it before getting the described LED codes of the previous paragraph.
Firmware flashing via UART is currently only possible with OpenMower V1 based hardware!
aarch64 architecture. Unfortunately (as well as unbelievable) ST's programmer tool for ARM CPU's isn't available for ARM CPU's/architectures!!Once box64 got installed, you should be able to start the STM32Programmer CLI i.e. via: /opt/STM32CubeProgrammer/bin/STM32_Programmer_CLI
Login to your OpenMower Raspberry-Pi and stop openmower:
sudo systemctl stop openmower
Configure Raspberry-PI's serial device where the adapter is connected to, which is normally /dev/ttyAMA3:
stty -F /dev/ttyAMA3 115200 raw
Now trigger the current running adapter firmware to do a reboot into the bootloader via:
echo -e "\x00Reboot into Bootloader" > /dev/ttyAMA3
Check if STM32 MCU is now in bootloader mode (Step 3. was successful):
/opt/STM32CubeProgrammer/bin/STM32_Programmer_CLI -c port=/dev/ttyAMA3
Should output something like:
-------------------------------------------------------------------
STM32CubeProgrammer v2.16.0
-------------------------------------------------------------------
Serial Port /dev/ttyAMA3 is successfully opened.
Port configuration: parity = even, baudrate = 115200, data-bit = 8,
stop-bit = 1.0, flow-control = off
Activating device: OK
Board : --
Chip ID: 0x443
BootLoader protocol version: 3.1
Device name : STM32C01x
Flash size : 32 KBytes (default)
Device type : MCU
Revision ID : --
Device CPU : Cortex-M0+Flash:
/opt/STM32CubeProgrammer/bin/STM32_Programmer_CLI -c port=/dev/ttyAMA3 -w firmware_xesc_yf_rev4.bin 0x08000000
Reset the device (start our newly flashed program):
/opt/STM32CubeProgrammer/bin/STM32_Programmer_CLI -c port=/dev/ttyAMA3 --go 0x08000000
Only relevant for v1.x hardware:
[!WARNING]
Do not power-off now!
On absolutely first firmware boot, it need to flash some settings to the MCU. You'll see some blink codes.
Do NOT unplug till you see:
The whole procedure will only take about 10 seconds. Once the procedure got processed it don't get triggered again for this MCU on future firmware flashes.
Finally start openmower again:
sudo systemctl start openmower
Lastly, you need to add the adapter to your mower_config. Here's the relevant section out of mower_config.sh.example:
# Select your ESC type
# Supported values as of today:
# xesc_mini: for the STM32 version (VESC)
# xesc_mini_w_r4ma: for the STM32 version (VESC), but with Rev4 (Mow) Motor Adapter (only available for YardForceSA650 mower type)
# xesc_2040: for the RP2040 version (very experimental!)
# xesc_2040_w_r4ma: for the RP2040 version (very experimental!), but with Rev4 (Mow) Motor Adapter (only available for YardForceSA650 mower type)
export OM_MOWER_ESC_TYPE="xesc_mini"Once adapted, restart openmower via: sudo systemctl restart openmower
Edit OpenMower stack config via openmower configure env and set FIRMWARE="yardforce-v4"
| Green | Red | Description |
|---|---|---|
| 3 * quick blink | 'Power up' successful | |
| 1Hz blink | Waiting for init by xesc_ros | |
| 0.5Hz flash (short flash every 2 seconds) | Shutdown (Sleep) triggered by OpenMower Pico FW | |
| on | All fine (initialized, xesc_ros connected and no error) | |
| 1Hz blink | Waiting for OpenMower (xesc_ros driver) connect | |
| flash | One single short flash for every host communication error, like packet or CRC error | |
| on | Wrong hardware version firmware flashed! Motor disabled for safety. Flash correct firmware | |
| 5 * blink | NRST Pin not yet disabled. Keep board powered and watch for further LED codes | |
| 5 * blink | NRST successful flashed | |
| 4Hz quick blink | Open VMC (no motor connected). WARNING: Do not connect the motor while the adapter is powered! | |
| 2Hz fast blink | VMS temperature issue or over-current detected | |
This project is build with modm. You need to install the required toolchain as described in their Installation section, before going on.
Once done:
git clone --recurse-submodules https://github.com/ClemensElflein/xESC_YF_rev4-adapter.gitcd xESC_YF_rev4-adapter/firmware/src# This is for v2.0 hardware building
lbuild -c hw-v2.xml buildscons [profile=<release|debug>] [build]export MODM_OPENOCD_BINARY=../packages/xpack-openocd-0.12.0-3-linux-x64/bin/openocdscons program(Ordered by priority)
See the open issues for a full list of proposed features (and known issues).
| Version | Release Date | Info |
|---|---|---|
| 0.3.0 | 2025-10-25 | - Fix "Open-Load" detection for Rev4-ESC hardware v1.0 - Improve load current and RPM calculations - Add hardware/firmware mixup protection - Add support for Rev4-ESC hardware v2.x |
| 0.2.3 | 2024-10-03 | - Add RPM to status package |
| 0.2.2 | 2024-08-25 | - Support STM32 bootloader flash via UART |
| 0.2.1 | 2024-08-19 | - Add shutdown signal handling (sleep/power-off VMC) - Handle over-temp and over-current |
| 0.2.0 | 2024-08-16 | - Switch from Arduino to modm lib - Integrate flash procedure to disable-NRST - Add Motor current and PCB temperature |
| 0.1.1 | 2024-07-10 | - Open VMC (no motor connected) detection - VMC-short and thermal error detection |
| 0.1.0 | 2024-07-05 | Generic functionality like Start, Stop, Break |
| Version | Release Date | Info |
|---|---|---|
| 2.1.0 | 2026-12-?? | - Improve current sense ADC clamping - Increase HW current limit to 3A - Minor part and routing adjustements |
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
git checkout -b feature/AmazingFeature)git commit -m 'Add some AmazingFeature')git push origin feature/AmazingFeature)Distributed under the MIT License. See LICENSE.txt for more information.
Project Link: https://github.com/ClemensElflein/xESC_YF_rev4-adapter
| Qty | Value | Footprint | References |
|---|---|---|---|
| 5 | .1uF/50V | Capacitor_SMD:C_0402_1005Metric | C2, C4, C5, C8, C9 |
| 5 | 1k | Resistor_SMD:R_0603_1608Metric | R15, R16, R17, R19, R20 |
| 5 | 220 | Resistor_SMD:R_0603_1608Metric | R1, R2, R3, R4, R7 |
| 4 | 2N7002 | Package_TO_SOT_SMD:SOT-23 | Q1, Q2, Q3, Q4 |
| 4 | 47k | Resistor_SMD:R_0603_1608Metric | R5, R6, R10, R11 |
| 3 | Conn_02x02_Male | Connector_PinHeader_2.54mm:PinHeader_2x02_P2.54mm_Vertical | J6, J9, J10 |
| 3 | TestPoint_Flag | TestPoint:TestPoint_Pad_1.0x1.0mm | HV_PB7, PA7, PB7 |
| 2 | 4.7uF | Capacitor_SMD:C_0603_1608Metric | C1, C3 |
| 2 | 470 | Resistor_SMD:R_0603_1608Metric | R8, R9 |
| 2 | 4k7 | Resistor_SMD:R_0603_1608Metric | R12, R13 |
| 2 | Conn_01x05_Male | Connector_PinHeader_2.54mm:PinHeader_1x05_P2.54mm_Vertical | J3, J4 |
| 2 | Conn_01x06_Male | Connector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_Vertical | J7, J8 |
| 1 | 10k | Resistor_SMD:R_0805_2012Metric | R18 |
| 1 | 10uF/50V | Capacitor_SMD:C_0805_2012Metric | C6 |
| 1 | 1N5819WS | Diode_SMD:D_SOD-323 | D3 |
| 1 | 3V3 | Diode_SMD:D_SOD-123 | D5 |
| 1 | 820 | Resistor_SMD:R_0603_1608Metric | R14 |
| 1 | Conn_01x03_Pin | Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Vertical | J2 |
| 1 | Conn_01x09_Male | Connector_PinHeader_2.54mm:PinHeader_1x09_P2.54mm_Vertical | J1 |
| 1 | LED Red | LED_SMD:LED_0603_1608Metric | D2 |
| 1 | LED White | LED_SMD:LED_0603_1608Metric | D1 |
| 1 | SM4007PL | Diode_SMD:D_SOD-123F | D4 |
| 1 | SMAJ33A | Diode_SMD:D_SMA | D6 |
| 1 | STM32C011F6P6 | Package_SO:TSSOP-20_4.4x6.5mm_P0.65mm | U2 |
| 1 | SolderJumper_2_Bridged | Jumper:SolderJumper-2_P1.3mm_Bridged_RoundedPad1.0x1.5mm | JP1 |
| 1 | TPS1H100BQPWPRQ1 | Library:TPS1H100-Q1_ThermalVias | U3 |
| 1 | XC6206P332MR-G | Package_TO_SOT_SMD:SOT-23-3 | U1 |

ThatguyCplus/throttleECU
STM32F411CE Throttle ECU — PID position control with AS5048A encoder, H-bridge motor, safety module

mauro-starspec/Elevation_Pivot_Daughter-Board
KiCad 9 daughter board for the Starspec elevation/pivot controller.

Tomoshibi-technology/RCJ-Japan2024-Circuit
RoboCup JapanOpen 2024とEindohoven 2024に向けての回路開発

BornaBiro/Xmas-Ornament-2024
Issues is that STM32 MCU is missing it's GND.


LMWB/Pasta-alla-Norma
Circular shaped RGB-LED PCB with integrated Microcontroller and EEPROM

Meo98/picostack
Stackable, contract-driven module system for the Raspberry Pi Pico — open hardware, built by code

It measures 49.5 × 29 mm and has 2 copper layers, 1.61 mm thick.
54 parts, built around the STM32C011F6P6, TPS1H100BQPWPRQ1, XC6206P332MR-G and 1N5819WS. 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 ClemensElflein/xESC_YF_rev4-adapter repository on GitHub, at the commit this page was made from: the board is PCB/xESC_YF_r4.kicad_pcb and its schematic PCB/LEVEL_SHIFTER.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
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).