YIuIWzc

Simple-Foc Quadruped Wheeled Robot Control Verification Board - Graduation Project

 
Overview
This is the product of my graduation project. The biggest regret is that I didn't have time to debug the program at the end. It uses an ESP32S3 for control, and the upper and lower computers can communicate via SPI or serial port. It incorporates four L6234Ds, theoretically capable of controlling four 4010 brushless motors, but this hasn't been fully verified.
       If the design is sound, I feel this is the coolest circuit I've ever designed. It took about half a month to complete, uses a four-layer board, isolates the drive and control layers, and retains debugging interfaces for easy debugging. I hope someone can verify this; it should be fine. At least I've tested each module individually without problems.
    The 4010 motor sampling board uses an INA240 for current sampling, combined with an AS5600 to achieve magnetic closed-loop control. I recommend pairing it with a simple-FOC to create your ultimate motor.
PDF_Simple-Foc Quadruped Wheeled Robot Control Verification Board - Graduation Project.zip
Altium_Simple-Foc Quadruped Wheeled Robot Control Verification Board - Graduation Project.zip
PADS_Simple-Foc Quadruped Wheeled Robot Control Verification Board - Graduation Project.zip
BOM_Simple-Foc Quadruped Wheeled Robot Control Verification Board - Graduation Project.xlsx
92620
Smart Fan 2
A smart desktop fan based on the ESP8266 and Alibaba Cloud IoT platform. Supports Tmall Genie voice control, remote control via mobile app, and rotary encoder control.
Image Display:
Video Link:
Bilibili Video -- Function Demonstration and Introduction
Project Overview
This project is a smart desktop USB mini fan based on the ESP8266 and Alibaba Cloud IoT platform. It can be controlled via Tmall Genie voice control, remote control via mobile APP, and rotary encoder control, with 9 adjustable wind speeds. Common desktop mini fans on the market usually do not have remote control functions, have low wind speeds, and only offer a maximum of three wind speeds.
The highlight and challenge of this project lies in how to control the boost module to output an adjustable voltage using a microcontroller.
Project Functions
Tmall Genie voice control, mobile APP remote control, rotary encoder control, 9-speed adjustment.
Project Parameters The project

uses the ESP8266 as the main controller and connects seamlessly with the Alibaba Cloud IoT platform.
The casing uses an existing desktop mini fan, which is replaced with a self-made PCB.
A rotary encoder is added for switching on/off and wind speed adjustment.
The boost chip uses the SX1308, and the ESP8266 controls the output voltage.
The mobile APP is provided by Alibaba Cloud IoT and supports Android and Apple, eliminating the need for self-development.

Principle Analysis (Hardware Description)
The hardware of this project consists of the following parts: Main controller: ESP8266; Motor driver: SX1308; Control: Rotary encoder.
Motor Driver:
Although this fan motor is a brushless motor, it has a built-in Hall switch, eliminating the need for complex three-phase circuitry. It can be treated as a simple DC motor; the higher the voltage, the faster the speed. Therefore, a circuit with high current and an output voltage of 3-12V is required.
Traditional boost converters use MOSFETs to build a BIOS boost circuit, with the microcontroller outputting PWM signals to control the MOSFETs' on/off state, ultimately achieving voltage boost. However, such circuits are complex, requiring consideration of overvoltage, short circuit, and no-load conditions; otherwise, the MOSFETs can easily burn out, increasing the difficulty of both hardware and software. Therefore, this project uses a dedicated boost chip, focusing only on how to boost the voltage. Many boost chips are available on the market, with similar functional structures. This project uses the SX1308 as the boost chip. Actual testing showed that the output voltage remains unchanged regardless of whether the motor is connected, eliminating the risk of chip burnout.
Commercially available SX1308 modules and reference circuit diagrams all use a potentiometer to change the voltage at the feedback pin FB to adjust the output voltage, without microcontroller-based adjustment.
So how can we control it with a microcontroller?
The SX1308's FB pin has a fixed output of 0.6V. When R1 decreases, according to the voltage divider principle, the voltage at FB increases. To maintain FB at 0.6V, the chip must decrease the output voltage until FB reaches 0.6V. Conversely, if R1 increases, the voltage at FB decreases, and to maintain FB at 0.6V, the chip must increase the output voltage. This is the buck-boost principle of the SX1308 chip.
Based on the above analysis, the following design is possible:
the microcontroller only needs to change the voltage at FB, and the SX1308 can adjust the output voltage to achieve the boost effect.
Since the ESP8266 lacks a DAC, a PWM DAC circuit was built, and a voltage follower composed of an LM358 was added to improve the DAC output drive capability. The D2 diode is used to prevent current from the boost chip from flowing back to the DAC, affecting the boost chip's output.
Traditional SX1308 circuits can only boost, not buck, so this project uses a SEPIC circuit.
After ensuring the schematic and program are correct, the PCB layout and routing are crucial; improper placement can easily lead to boost failure. You can refer to the video explanation on Bilibili:
https://www.bilibili.com/video/BV1hE411Z7i6/?spm_id_from=333.999.0.0&vd_source=3fed0714b584649b555dfc61705378be
My summary is as follows:

1. The SW pin should be close to the first inductor, and the area of ​​SW should be as small as possible.
2. The power inductor should not be too small. Inductance values ​​are usually 4.7uH, but the size varies. Larger inductors have larger saturation currents, meaning they need to handle large current loads. Therefore, these two inductors should have large packages; otherwise, they won't be able to handle the load.
3. The connection wire to the feedback resistor on the FB pin should not be too thick, otherwise it will be easily interfered with. 10mil is usually sufficient. Try to connect it from the outermost capacitor, rather than from the Schottky diode output pin.
4. Multiple vias are needed at the GND pins of the inductor and capacitor. The specific reason is unknown, but this is how the instructor in the video does it, and it's also how it's done on the purchased modules.
5. The final output VOUT area should not be too large; this is not absolute.
6. In the video, the instructor basically added fill areas manually to the top layer, only using copper plating on the bottom layer.

The software
code is relatively simple. Since it involves an IoT platform account, it will not be open-sourced. You can refer to the official ESP project:
https://github.com/espressif/esp-aliyun
Note:

Because the motor drive requires a large current, the USB power cable must be thick enough. The original fan's power cable cannot be used, as it will prevent the boost chip from boosting the voltage. A fast charging cable must be used.
To accommodate the original fan's casing structure, this project uses a micro USB interface instead of a Type-C interface.
PDF_Smart Fan 2.zip
Altium Smart Fan 2.zip
PADS_Smart Fan 2.zip
BOM_Smart Fan 2.xlsx
92621
Voltmeter and Ammeter Training Camp
Based on the voltage and current range that the device can detect, the external current and voltage are sampled. The voltage passes through a voltage divider resistor and enters the ADC function pin of the CW32F030C8T6 module. After precise calculation by the system, the voltage is displayed on the LED display screen.
The LCSC development board - Voltage and Current Meter Training Camp
samples external current and voltage based on the device's detectable voltage and current range. The voltage passes through a voltage divider resistor and enters the ADC function pin of the CW32F030C8T6 module. The system then performs precise calculations and displays the result on an LED display.
This design primarily uses 0805 surface-mount packages, significantly reducing the size of the product.
The development board is placed on the back of the board; due to a momentary oversight, the orientation is reversed, but this does not affect its practical use.
Software Description
: The software can be nested using code blocks. It's not necessary to explain all parts of the software; only the important parts need to be described.
Code Block:
#include
void main()
{
printf(""\n);
}

Physical Demonstration
Notes
: This section explains some precautions to take during the creation of the project (optional).
Demo Video
Notes: Upload the demo video as an attachment. Attachments can only be 50MB in size. Files larger than 50MB can be hosted on other cloud storage or video websites; simply include the link here.
Other Attachment Upload
Notes: Entries participating in the event must upload all project-related program attachments to an open-source platform or personal code storage cloud. Attachments can be uploaded up to a maximum of 50MB (please do not upload to the LCSC workspace, as there are limitations).
PDF_Voltmeter and Ammeter Training Camp.zip
Altium_Voltage and Ammeter Training Camp.zip
PADS_Voltmeter & Ammeter Training Camp.zip
BOM_Voltage and Ammeter Training Camp.xlsx
92622
Voltmeter and Ammeter
Following JLCPCB's lead in manufacturing - Voltmeter and Ammeter

The hardware of the voltage and current meter based on SW32F030 is as follows:

The input is a DC female connector, with an SE8550K2 step-down converter to 5V to power the MCU system;
the display uses two 3-digit common-cathode LED displays to show voltage and current respectively;
a resistor divider is used to reduce the input voltage to measure the ADC value, and a 100mΩ sampling resistor is used to sample the current;
three function buttons and one LED indicate the working status;
the voltage and current sampling interface

software

initializes the core board status;
initializes the LED and key;
initializes the LED displays;
a timer starts
the ADC
and refreshes the SEG display within the timer; the ADC samples 20 times, filters and averages the results; then assigns the values ​​to the voltage and current arrays, and refreshes the display via SEG.

CW32 voltage and current meter.zip
PDF_Voltage and Current Meters.zip
Altium_voltmeter_currentmeter.zip
PADS_Voltage and Current Meter.zip
BOM_Voltage and Current Meter.xlsx
92623
Development board storage box
Development board storage box, keeping your development board from gathering dust.
This project was undertaken because I had too many development boards on my desk, and I wanted to organize them to prevent them from gathering dust.
The project doesn't involve circuitry and comes in two sizes, compatible with most development boards on the market.
The storage box consists of a transparent plastic box, a 3D-printed support, and a PCB base with surface-mount headers.
Care should be taken to control the temperature of the 3D-printed parts to prevent stringing and cleaning difficulties.
The larger size corresponds to a rectangular storage box measuring 85*55*25mm, suitable for larger development boards like the ESP32.
The smaller size corresponds to a rectangular storage box measuring 65*45*20mm, compatible with boards up to the LCSC ESP32S3.
You can find the storage box on Taobao; any extra PCB boards can be used as perforated boards.
3M 9448 double-sided tape can be used for assembly, and it's quite sturdy in practice.
This project is for educational purposes only and commercial use is not recommended.
Small size support. 3mf
Large size support .3mf
PDF_Development Board Storage Box.zip
Altium development board storage box.zip
PADS Development Board Storage Box.zip
BOM_Development Board Storage Box.xlsx
92625
19V Uninterruptible Power Supply (UPS) for Mini NAS
A 19V uninterruptible power supply for the NAS, giving the files on the hard drives a warm home.
The input uses the original 19V adapter from the computer, and the output terminals use standard 5525DC terminals.
 
The MP26123DR-LF-Z chip charges three 12.6V lithium batteries in series. The chip has built-in over-temperature and overheat protection. The chip can be configured to charge two (8.4V) or three (12.6V) batteries. This project uses three batteries in series, so R3 does not need to be soldered.
 
A Panasonic 28650 lithium battery pack with three series and two parallel configurations is used. The finished product includes a protection board and an equalization board. You can choose a suitable capacity lithium battery pack according to your needs. Handle lithium batteries with caution; illegal modification of lithium battery packs is strictly prohibited.
 
The battery voltage is boosted to approximately 18.5V using a TPS61178RNWR as a backup power source. The output voltage is adjustable. Please refer to the chip datasheet to calculate the feedback resistor. Theoretically, the chip can output 10A, but this project only verified the hardware was working correctly at 3A. For higher current requirements, please recalculate the inductance value and thicken the corresponding traces to meet the high current requirements.
 
The power path management is manually implemented. When the adapter's 19V is available, the power supply charges the battery and supplies power to the output terminals through a D5-SS54 Schottky diode. At an output current of 1A, the Schottky diode's voltage drop is approximately 0.7V. At this time, the 18.5V supplied by the battery through the boost chip is controlled by PMOS-Q2 to remain non-conductive, and the load current is entirely provided by the power adapter.
 
When the adapter's 19V is disconnected, Q2 automatically conducts, and the 18.5V supplies power to the load through Q2.
 
Chip temperature: At a charging current of 2A, the MP26123DR-LF-Z chip surface temperature is approximately 60 degrees Celsius.
 
When powered by the battery, at a discharging current of 2A, the TPS61178RNWR surface temperature is approximately 80 degrees Celsius. For chips with higher currents, additional heat dissipation measures should be taken.
 
After 72 hours of high-temperature aging, all components operate stably.
 
The solution has been verified; please feel free to replicate it.
PDF_19V Uninterruptible Power Supply (UPS) for Mini NAS.zip
Altium Mini NAS 19V Uninterruptible Power Supply (UPS).zip
PADS_Mini NAS 19V Uninterruptible Power Supply (UPS).zip
BOM_19V Uninterruptible Power Supply (UPS) for Mini NAS.xlsx
92626
STC32G12K128 small development board
The STC32G12K128 small development board I designed is based on a high-performance 32-bit ARM Cortex-M3 core microcontroller launched by STC (Semiconductor Technology Corporation).
The STC32G12K128 series microcontrollers are 32-bit 8051 microcontrollers with a wide operating voltage range, launched by STC in 2022. The operating voltage of this series of microcontrollers is 1.9V~5.5V. Compared with the STC8H3K64S4 series microcontrollers, the STC32G12K128 series microcontrollers have added peripherals such as DMA, RTC, and CAN.

This small development board based on the STC32G12K128 has the following features:
1. All I/O pins are brought out via headers
. 2. Three separate 5V and three GND header interfaces are added.
3. Powered by a USB interface at 5V.
4. Downloads via USB interface, simple and easy to use.
5. Built-in power indicator; includes a programmable LED indicator.
6. Built-in 32768Hz crystal for easy debugging of the internal RTC.

(Third board test attempt


, second board test attempt failed

! [WeChat image_20240726085525.jpg]
First board test attempt failed
! [WeChat image_20240726085530.jpg]
![WeChat image_20240726085533.jpg])
PDF_STC32G12K128 Mini Development Board.zip
Altium_STC32G12K128 small development board.zip
PADS_STC32G12K128 small development board.zip
BOM_STC32G12K128 Mini Development Board.xlsx
92627
CW32-Voltage and Current Meter
Voltage and current meters based on LCSC development board-CW32F030
Video Link:
Bilibili Video -- Function Demonstration and Introduction
Description
This project is a voltage and current meter based on CW32F030, with voltage and current measurement functions.
Approximate voltage measurement range: 0-30V (can be simulated for testing)
Approximate current measurement range: 0-3A (can be simulated for testing)
Photos of the finished product are shown below. This was
my first time using 3D printing and panel printing, and there were some minor mishaps, but thankfully it didn't affect the overall result much.
All the components used this time are plug-in type. Below are pictures of my soldering process. A family photo
of all the components connected
. No! A few plug-ins are still missing
because they haven't arrived. The design is quite casual, and the color silkscreen function is only reserved for the LCSC development board and Sinyuan Semiconductor.
The PCB is basically based on the official design, including the placement, layout, and routing.
The hardware power supply uses DC-DC input voltage of 5V-12V. Now
for the key point: This 32-bit chip has: a 12-bit high-speed ADC that can reach ±1.0LSB INL 11.3ENOB, and multiple Vref reference voltages. The STM32 we commonly use only supports VDD=Vref. This system uses a built-in 1.5V reference voltage, which can be configured via the program. However
, a mistake was made in component procurement; common-cathode digital tubes were intended, but common-anode ones were mistakenly purchased. I mentioned that the digital tubes were malfunctioning after downloading the program, and after investigation, the problem turned out to be the incorrect procurement. The following is a modified part of the program for a common anode digital tube:
/* Common anode digital tube encoding table:
0xc0 0xf9 0xa4 0xb0 0x99 0x92 0x82 0xf8 0x80 0x90
0 1 2 3 4 5 6 7 8 9
0x40 0x79 0x24 0x30 0x19 0x12 0x02 0x78 0x00 0x60
0. 1. 2. 3. 4. 5. 6. 7. 8. 9.
0x3f 0xbf
0 0 1 1 1 1 1 1 1 1011 1111
dp GFEDCBA
*/
uint8_t Seg_Table[21] = {0xc0, 0xf9, 0xa4, 0xb0, 0x99, 0x92, 0x82, 0xf8, 0x80, 0x90,
0x40, 0x79, 0x24, 0x30, 0x19, 0x12, 0x02, 0x78, 0x00, 0x60,0x08};// 0x08:A.
// Common terminal settings:
/**
* @brief Close all common terminals
*
*/
void Close_Com(void)
{
GPIO_WritePin(CW_GPIOA,GPIO_PIN_8,GPIO_Pin_RESET);
GPIO_WritePin(CW_GPIOB,GPIO_PIN_3,GPIO_Pin_RESET);
GPIO_WritePin(CW_GPIOB,GPIO_PIN_4,GPIO_Pin_RESET);
GPIO_WritePin(CW_GPIOA,GPIO_PIN_11,GPIO_Pin_RESET);
GPIO_WritePin(CW_GPIOA,GPIO_PIN_12,GPIO_Pin_RESET);
GPIO_WritePin(CW_GPIOA,GPIO_PIN_15,GPIO_Pin_RESET);
} // Modification switch(Pos)
in Seg_Dis function { case 0: GPIO_WritePin(CW_GPIOA,GPIO_PIN_8,GPIO_Pin_SET); //PA8,COM1 break; case 1: GPIO_WritePin(CW_GPIOA,GPIO_PIN_11,GPIO_Pin_SET); //PA9,COM2 break; case 2: GPIO_WritePin(CW_GPIOA,GPIO_PIN_12,GPIO_Pin_SET); //PA10,COM3 break; case 3: GPIO_WritePin(CW_GPIOA,GPIO_PIN_15,GPIO_Pin_SET); //PA11,COM4 break; case 4: GPIO_WritePin(CW_GPIOB,GPIO_PIN_3,GPIO_Pin_SET); //PA12,COM5 break; case 5: GPIO_WritePin(CW_GPIOB,GPIO_PIN_4,GPIO_Pin_SET); //PA15,COM6 break; default: break; } Just change all of them to common cathode and it's OK.
























Actually, understanding digital tube displays is quite simple. I'll paste some notes from my school days. Back then, I used I/O ports to drive transistors, and the transistors drove the digital tubes. I also used the STM32's PB4 pin, which needs to be configured for multiplexing to be used as a regular GPIO.
The program is fully commented to make it easier for beginners to understand. Please download the attached program for reference.
That's about it. I wish myself and everyone else continued success!
Voltage and Ammeter Project.zip
Demo video.mp4
PDF_CW32-Voltage and Current Meter.zip
Altium_CW32-Voltage and Current Meter.zip
PADS_CW32-Voltage and Current Meter.zip
BOM_CW32-Voltage and Current Meter.xlsx
92629
CW32 Voltmeter and Ammeter Training Camp Project
A CW32 voltage and current meter replica based on the CW32 voltage and current meter training camp.
Project Introduction: This project
describes a miniaturized (all-surface-mount design) integrated voltage and current meter based on the CW32 voltmeter and ammeter training program. We hope this successful experience will provide a unique perspective for enthusiasts.
1. The power supply circuit
uses a common 3.3V linear regulated power supply to power the chip and digital display.
2. Advantages of CW32

: Wide operating temperature range: -40~105℃;
Wide operating voltage: 1.65V~5.5V (STM32 only supports 3.3V systems)
; Strong anti-interference: HBM ESD 8KV; All ESD reliability reaches the highest international standard level (STM32 ESD 2KV)
; Project focus - Better ADC: 12-bit high-speed ADC, achieving ±1.0LSB INL 11.3ENOB; Multiple Vref reference voltages... (STM32 only supports VDD=Vref);
Stable and reliable eFLASH technology. (Flash0 pending)

3. The voltage sampling circuit
uses a voltage divider circuit to achieve high voltage acquisition. It is designed to acquire up to 100V, but the current configuration allows for acquisition of 0-30V.
4. The current sampling circuit
uses a low-side current sampling circuit for current detection. The low-side of the sampling circuit shares a common ground with the development board's meter interface .
5. The digital tube driver
uses a digital tube as the display unit.
6. Indicator lights:
An additional power indicator and an IO working indicator light are designed.
7. Button circuit.
8. TL431 circuit design for voltage measurement calibration:
An additional TL431 circuit is added to provide a 2.5V reference voltage, which can be used to provide an external voltage reference for calibrating the AD converter.
Voltage Testing:
1. 5V charger voltage test (error approximately 0.3V)
2. Battery voltage measurement test (error approximately 0.4V)
PDF_cw32 Voltmeter and Ammeter Training Camp Project.zip
Altium_cw32 Voltmeter and Ammeter Training Camp Project.zip
PADS_cw32 Voltmeter and Ammeter Training Camp Project.zip
BOM_cw32 Voltage and Current Meter Training Camp Project.xlsx
92630
electronic
参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2026-03-28 01:51:37

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号