[PSOC™] C3——单MCU 3电机方案案例

[复制链接]
4|0
Burnon_FAE_1 发表于 2026-7-17 14:56 | 显示全部楼层 |阅读模式

Contributors:
Employee




Article content


2: 描述
Domestic robot platform for evaluation of microcontroller, communication, power and sensor devices
Figure 1: Sensor robot
Story
This domestic robot platform showcases and enables quick evaluation of several of Infineon’s microcontroller, communication, power, and sensor devices. Most of the mechanics and housing are 3D-printed — and can therefore be adapted quickly based on your requirements.
This article gives a high-level overview of the project, leaving room for your own ideas.
Block diagram
Mainly, officially available boards from Infineon are used to compile the electronical body of the vehicle.

Figure 2: PSOC™ Edge C3 block diagram
In some cases, e.g., motor control and rain sensors, customized PCBs have been designed to fulfill size constraints.
The overall system can be split into the following sections that are described further in detail:
  • Human machine interface (HMI) — including visualization and illumination
  • Communication
  • Remote control
  • Motor control
  • Radar sensor
  • Rain sensor
  • Additional sensors
  • Mechanics
  • Software
HMI — including visualization and illumination
The overall central unit is built on top of a PSOC™ Edge E84 — an ML-enabled, high-performance, low-power, and fully-integrated MCU — with advanced ML hardware acceleration and graphics. A 7-inch touch display enables human interactions where nearly all features of the vehicle are supported:
  • Visualization of the general system
  • Visualization of sensor values
  • Manual control of the motors
  • Illumination
The Light and Versatile Graphics Library (LVGL) is used together with EEZ Studio for designing the HMI. Some screens are shown here for reference.

Figure 3: GUI: System overview
Figure 4: GUI: System power history
Figure 5: GUI: Manual control pad
Figure 6: GUI: Manual motor control
Figure 7: GUI: Sensor values including history
Figure 8: GUI: Rain sensor based on CAPSENSE™ 4
Figure 9: GUI: Radar surface detection
Figure 10: GUI: Bumper and illumination settings
Figure 11: GUI: About screen
Communication
System bus
As in many commercial products — not just in the automotive area — a CAN bus has been implemented for the main communication between the BLE remote Control, motor system, and the HMI unit. All of the used devices support the newer CAN FD interface. When not available on the relevant boards, an external PCB for the PHY has been used.
Figure 12: CAN FD Shield TLE9371VSJ
Sensor interfaces
Connection with the sensors is established mainly through the I2C or UART interface, as shown in the block diagram (Figure 2), and is described further in each dedicated sensor section below.
Remote control
Besides the on-vehicle HMI, the robot can be remotely controlled via Bluetooth® Low Energy (LE) based on the high-performance AIROC™ CYW20829 device with robust RF performance and 10 dBm TX output power without an external power amplifier (PA) using the CYW920829M2EVK-02 evaluation kit. Although the Bluetooth® LE device supports the CAN/CAN FD interface, a CAN PHY, unfortunately, is not available on that board. In this case, an external CAN FD Shield based on TLE9371VSJ has been used to bridge the Bluetooth® LE messages to the robot’s internal bus.
The XENSIV™ - Bluetooth® game controller is used as a remote control unit and supports all features required to move the robot, with the option to activate additional features as well.

Figure 13: XENSIV™ - Bluetooth® game controller
It uses magnet sensors and switches as well as CAPSENSE™ touch technology for a modern open-source game controller unit, as it has been already shown in the Game_Controller_BLE_to_CAN_and_Display article.
Motor control
This project demonstrates the capabilities of Infineon’s PSOC™ Control MCU family, specifically the PSOC™ C3 Main Line, to control three BLDC motors simultaneously with a single MCU. Two motors of type 42BSB061B040X (24 W, 52 W, max 4000 rpm, 0.125 Nm) are used for the driving wheels and one 42BSB041B040X (24 W, 26 W) for the simulated rotary mower. While these may not be the right motors for this kind of application, the setup effectively showcases the more complex multi‑motor control capabilities of the PSOC™ Control MCUs.
Dedicated PCBs (MCU + power) have been designed to be smaller than the official PSOC™ Control evaluation boards, enabling a compact integration in the vehicle’s footprint.
Figure 14: Evaluation setup for testing the software to drive three motors
The system has a modular design, with two PCBs interconnected by a compact flat ribbon cable (1.27 mm pitch) to minimize space while providing a higher pin count for signals and power. The architecture uses one shared 24 V DC bus for all motors. Power enters through a single connector on the MCU board and is forwarded to each power board; the 3.3 V rail for the MCU is typically generated on the power board and fed back to the MCU board — with the option to generate 3.3 V locally on the MCU board using an on‑board regulator — if required by system integration.
Figure 15: A single PSOC™ Control MCU controls three 3-phase BLDC motors
The complete three‑motor setup consists of a single MCU board and three identical power boards. Each Power board integrates one MOTIX™ 6EDL7141 smart three‑phase gate driver and six OptiMOS™ BSC014N06NSSC MOSFETs, forming a three‑phase inverter (three half‑bridges) for a single motor.
Current sensing is implemented with low‑side shunts: three shunts are placed on the board, each 10 mΩ, and the FOC algorithm uses two phase currents; shunt voltages are conditioned by the internal amplifiers of the 6EDL7141. Mounted on the Power PCB, the XENSIV™ TLE5012B sensors provide magnetic position feedback via SPI or IIF/MOTIF and route these signals to the MCU through the ribbon cable. They share the same 3.3 V rail as the MCU, and angle readings are used directly without additional filtering.
A single shared fault/error line from all power boards is routed to the MCU, if any motor reports a fault, the control system stops all motors, prioritizing safety.
The MCU PCB contains the PSOC™ C3 Main Line MCU and uses UART or CAN FD for external communication.
Figure 16: Self-made PCB for 3-channel motor control based on PSOC™ Control
Figure 17: Self-made PCB Sor single-motor power stage
The mechanical integration is straightforward — a diametrically magnetized magnet is mounted on the motor shaft and aligned to TLE5012B. As shown in the evaluation setup above, each motor has its power board screwed to the back of the motor, while one motor carries the MCU board on top of its power board to minimize harnessing and footprint.
Figure 18: Mounting XENSIV™ TLE5012B with a diametral magnet on the shaft
All three motors are controlled using a sensored field‑oriented control (FOC) algorithm with a 20 kHz control loop. Magnetic rotor position is measured using XENSIV™ TLE5012B sensors: Two motors provide position via SPI, and one motor provides position via the IIF interface due to the MCU having only one MOTIF interface. Inside, the software control architecture is organized as three parallel FOC instances, each including Clarke/Park transforms, PI current control, inverse transforms, and PWM duty cycle generation.
PWM carriers are center‑aligned at 20 kHz, and duty cycles are updated every control cycle. The main clock is shared and synchronized across all PWM timers for all three motors. A timer in PSOC™ Control C3 generate interrupts that trigger the control tasks and sensor reads so the position and current align with the PWM carrier. Floating‑point math is used for the FOC loops, with all three motors active at 20 kHz; the observed CPU load is approximately 37%. Protections include overtemperature monitoring handled by Infineon’s 6EDL7141 gate driver and a software implementation for overcurrent response when any driver asserts a fault.
Radar sensor
Surface detection using a 60 GHz radar on its associated KIT_CSK_BGT60TR13C evaluation kit is implemented using DEEPCRAFT™ AI to identify whether the robot moves on grass.
Figure 19: 60 GHz radar kit using BGT60TR13C
The outdoor environment presents significant challenges due to the wide range of surface types. To address this, we have collected a substantial and diverse dataset, as outlined below. Standard signal processing algorithms used to extract the features of different surfaces, as we have observed raw data is quite prone to even small changes.
We have trained a quite small 5-layer fully connected network with <8000 parameters to perform the classification, reaching >95% accuracy on the trained model and deployed it to PSOC™ 6 using DEEPCRAFT™ Studio. It is used to convert the *.h5 model to C code to deploy the model on PSOC™ 6 MCU.
Figure 20: PSOC™ 6 Surface detection pipeline
Up to 10 predictions per second can be made using a PSOC™ 6 microcontroller. The current model can differentiate grass from most common non-grass surfaces, such as gravel, sand, asphalt, earth, stone, cement, and metal mesh, manhole, or grid. It's robust against any ambient light (direct sunlight, no light) and low-visibility conditions (foggy, rainy, wet/dirty cover). Additionally, obstacle and cliff detection can be included.
The project uses 29 kb flash memory with model and complete code.
Rain sensor (CAPSENSE™)
Using CAPSENSE™ technology, a simple implementation of a rain sensor is executed. The machine-learned model enables detection between touch by finger, and water drops or rain (and water level, respectively). Of course, the current implementation does not (yet) claim to be a commercial sensor, but allows the evaluation of the capacitive touch technology (CAPSENSE™) and machine learning. We’re using the influence of water on the capacity and sense the different impact of a finger touch and water at different frequencies to distinguish between a wet surface and a touch and even be able to detect the touches on wet surfaces. The sensor gets sensed by a custom PSOC™ 4100T board, which streams the data over I2C to a PSOC™ 6-based CY8CKIT-062S2-AI kit, which runs a simple ML model as part of Infineon’s DEEPCRAFT™ Edge AI Solutions. It was created and deployed using DEEPCRAFT™ Studio, where the model can be found and improved as a starter model. The data is sent directly over USB to the studio, which simplifies the collection and labeling of the data.
Figure 21: Rain sensor setup for evaluation
Figure 22: Rendering model of rain sensor (top) and grass moisture sensor (bottom, planned)
Additionally, a grass moisture sensor is under planning.
Additional Sensors (CO2, Temperature, Pressure, Humidity, ...)
Infineon’s XENSIV™ Sensor Shield enables developers via the Arduino UNO interface to quickly evaluate and develop with environmental sensors. It also features a 160 x 80 TFT display, an OPTIGA™ Trust-M secure element, and a QWIIC connector for additional peripheral expandability.
Figure 23: XENSIV™ Sensor Shield
Figure 24: Radar sensor XENSIV™ BGT60TR13C
Figure 25: CO2 sensor XENSIV™ PASCO2V15
Figure 26: XENSIV™ TLE5012B Magnetic Sensor (used for Motor Control)
Currently, the GUI on the robot shows the values of CO2, temperature, pressure, and humidity over the last hour.
Mechanics
While the base acryl platform is cut by laser, most other mechanical parts are 3D-printed. This enables modifications and easy adaption of new features, sensors, and more. For the prototype, PLA filament has been used — TPU material has been used just for both the tires.
Some 3D views are shown below:
Figure 27: Sensor Robot for Radar Surface Detection
Figure 28: Back-Wheels, Front Radar and ToF (planned)
Figure 29: Display for HMI
Figure 30: Top inside view including mock-up of the blades
Figure 31: Rear interior view
Figure 32: Front interior view including rain- and grass-moisture sensor (green)

Figure 33: Front interior view including rain- and grass-moisture sensor (green)

Figure 34: Front interior view including rain- and grass-moisture sensor (green)
Additionally, following are the individual 3D-printed parts (in alphabetical order):
Figure 35: 3D-printed parts
Software
Obviously, each of the hardware modules described above requires its own firmware. Each project is attached to the article and can be used as a reference. Refer to the included software disclaimer, especially consider that it is provided as-is, with no warranty of any kind, expressed or implied, including, but not limited to, non-infringement, implied warranties of merchantability, and fitness for a particular purpose.
The following chart shows an overview of each firmware and the interaction between the used hardware boards:
Figure 36: Firmware on the top-level
Fact sheet
  • Size: 63 cm x 37 cm x 23 cm
  • Weight: approx. 7 kg
  • Material: PLA, TPU, Acryl, Silicon
  • 3D-printing: 46 pcs, 80 hrs, 2.6 kg
  • Battery: 24 V / 2 Ah
  • Current: approx. 1.5 A (including Motor)
  • Motor: 24 V, 52 W, max 4000 rpm, 0.125 Nm
  • Gear: 15 : 180
  • Wheel: 205mm (Back), 90mm (Front-Dummy)
  • Speed: max 3.2 km/h (1000 rpm)
  • Software: Lines of ‚C‘-code
  • Costs: 300 € (Material only w/o Electronics)
  • Working hours: Don't ask
Picture story
Figure 37: The sensor robot from different angles
Components used





您需要登录后才可以回帖 登录 | 注册

本版积分规则

122

主题

196

帖子

5

粉丝
快速回复 在线客服 返回列表 返回顶部
0