aytwartoofyoroo

【CW32】Brushless Motor Driver Training Camp

 
Overview

(CW32) Brushless motor driver, core board, driver board

        Written at the front, I would like to thank Lichuang, Xinyuan and Unitech for their sponsorship and technical support, and for providing us with this opportunity to learn and understand brushless motor drives.

1. Circuit drawing:

1. The core board is slightly different from the core board of F103C8T6. It is adjusted for F030, and all IO ports are lead out; the components are arranged obsessively, and the jumpers are used for MCU voltage selection. The default short circuit is 3.3V;
2. The core board is matched with the bottom board. The board itself can be smaller, but considering that it matches the motor drive board, it takes an integer size;
3. Brushless motor driver board. I watched the recording twice and changed the schematic diagram several times. The power supply was replaced with LDO and all DC-DC was used. The components were still arranged according to functional areas. It looked ok by myself.

2022-05-27 All circuits are drawn, PCB proofed, and components purchased.

Then the instructional video of the brushless motor continues...

2. Circuit board welding

        During the Dragon Boat Festival holiday, components arrived one after another. Welding, testing, power-on short circuit, troubleshooting, and troubleshooting. There was no hot air blower on hand, and the MOS tube welding could not be solved. I found a hot air blower in the past two days to get it done. Here are a few physical pictures. As shown below. (2022-06-07)

1. Core board + matching bottom board:IMG_20220608_002127.jpg
2. Motor drive board

IMG_20220608_002237.jpg

3. Assembly view:

IMG_20220608_002347.jpg

IMG_20220608_003717.jpg

Notes on welding and assembly:

1. The base plate is welded to the pin header, and the motor drive board needs to use an extended pin header. The base plate and the motor drive board are directly connected through the pin header;
2. The welding of 5x6 Mos tube needs to prevent short circuit;
3. Before assembling the base and motor drive board, it is recommended to test whether the functions are normal separately and confirm that there are no short circuits and other problems before assembling them together;
4. The pin headers connecting the drive board and the bottom board need to be extended pin headers. The specific length depends on the highest component selection of the drive board and ensures that the length can meet the reliable contact with the upper female socket .​

3. Circuit debugging guide:

        I found a lot of friends asking various questions in the group. Let me give some explanations based on my circuit board. I hope it can give you some guidance, or a reminder for those who are just getting started. You can skip it if you are new;

3.1. Hardware part

3.1.1 PCB drawing part:
        First of all, I would like to thank Youyite for the open source of the schematic diagram and control code, the live video broadcast, and the various guidance in the group. Otherwise, problems such as selecting the IO port for PWM and AD conversion IO port allocation will probably be difficult for a lot of people. Friends who have learned STM32; I adjusted the power conversion part of the circuit myself, and changed the MOS tube driver from the open source half-bridge driver to the EG2133 six-bridge driver. The bootstrap voltage in the chip and the internal anti-upper and lower tubes are turned on at the same time. You can also search and learn more;
3.1.2 Welding part:
        For my circuit board, in addition to a soldering iron, it is recommended to use a hot hair dryer for soldering. If you are used to using flux, you should confirm whether there is a short circuit problem after soldering LQFP48 and 5x6 MOS. I use a blade soldering iron for microcontrollers. The welding is completed in one pass, just rinse it with washing water. If you want to ask how to weld it well, I can only say that it took a lot of practice and it was all achieved through various weldings when F103C8T6 was made in 4 pieces;
        MOS was soldered at home with a soldering iron and flux added. It turned out that there was too much flux. I was overconfident and careless. I directly powered on 12V and tested the result that it was short-circuited. Then I found a place to blow it off with a hot hair dryer and cleaned it to help. After re-soldering the flux, I still found that two MOSs were damaged, which was very frustrating.
3.1.3 Circuit test:
        It is recommended to check the core boards 1 and 2 and the supporting backplane as one part, and the motor driver board as another part. It is best to have an adjustable power supply. If there is not, use a multimeter to confirm whether the power supply part is short-circuited and then power on to test the voltage of each point. Is it normal?
1. Core board and supporting base board
       It does not have many special functions. Simply measure the resistance between GND and 3.3V and 5V to ensure there is no short circuit. When the microcontroller is soldered close to the naked eye, you can usually see whether there is any empty solder, but there is a short circuit between the pins. It is difficult to check. It is recommended that after welding, brush it with washing water and blow dry it with hot air. If it doesn't work, you can also blow it dry for a while. Once the program is programmed and the OLED can display it, and the PWM duty cycle of the rotary potentiometer can change, there will generally be no problem.
        Warm Tips: The actual capacitance of the two 100uF capacitors on the matching base plate has a lot of redundancy. It takes some time to charge once it is powered on. It also takes time for the charge pump of OLDE to start up. Once it is powered on, the microcontroller IIC OLED has written the corresponding configuration, but the display will be due to the power lag not being set properly. If the open source code used directly does not display, you can try pressing the reset button of the core board, press and release for a few seconds, and sometimes it will be normal. Of course, you can also wait 200ms before initializing OLED in the code (resulting from the pitfalls that have been stepped on over the years).

2. Motor drive board
        It is recommended to test this board in two stages. The first stage is to test the voltage conversion circuit. The power conversion part is soldered first. The R2 on the schematic diagram is 7.2K . It is more expensive on Lichuang Mall. In actual use, I chose a cheaper one. The 6.8K resistor can conduct normally with a test voltage of 9.65V; input a voltage of 12V to 30V, measure and confirm that the buck circuit is OK before welding other components.
        Snipaste_2022-06-08_21-08-04.jpg
        In the second stage, weld other components. First, measure and confirm that GND and VIN, 5V, and 3.3V are not short-circuited. Then power on and test. Since Nmos is used in the circuit, high voltage conduction, the input port of the driver chip EG2133 automatically Bring pull-down resistors, so you can individually test whether the 6 Mos tubes are working properly. After powering on, the G poles of the 6 Mos tubes should be 0V, the Mos tubes are in the off state, and the D pole voltage of the 3 upper tubes is equal to VIN, 3 The S pole voltage of the lower tube is equal to GND.   Use a DuPont line to short-circuit 5V and MCU_UH, MCU_VH, and MCU_WH respectively. Check whether the MOS tube can conduct normally. Then use this DuPont line to short-circuit MCU_UL, MCU_VL, and MCU_WL to GND respectively. , test whether the MOS tube is in positive conduction. While testing the function of the MOS tube, it also verifies the function of EG2133.    

3.2 Software part

        For the software part, I would like to thank Li Gong from Uite again for open-sourcing the code to facilitate everyone's learning. The microcontroller is the core of M0+. I have used BGI's M0+ core microcontroller before, so the project configuration is also smooth. Of course, there is also corresponding guidance in the training camp’s explanations. Friends who don’t understand can read it several times. I looked at the open source code this time, and also looked at a few official routine codes. The official routine peripheral functions seem to be covered, including ordinary applications, sleep and wake-up, and I think the code is The specifications and quality are very good, and it is more suitable for understanding than the link + callback method of BGI's official library.
        As a digression, many friends in the group ask questions about burners. Can this one be used, and can that one be burned? What do you think? M0, M0+, M3, and M4 are all based on ARM architecture and all have SWD debugging interfaces. Do you think the LINK in your hand can be programmed? ! Asking this question, I suggest you find a ST-LINK JLINK-OB project on the platform and try it yourself. If you want to find an open source one, you can also learn from the official open source DAP-LINK.

Connect the motor, see the attachment for the test video



I write this at the end. I have something on hand recently, and I don’t have time to go into some of my ideas in depth first. However, what I can think of right now is the addition of software functions, and I will have time to fill in the holes later. (2022-06-08)
1. Last week I tested the Bluetooth module of Daxia Longque. It can be connected to a laptop and transparently transmit data through Bluetooth. After writing the code and adding VOFA+, wouldn’t it be possible to wirelessly detect motor status and PID debugging? !
2. You can design a multi-level menu for the display interface, and you can set parameters through buttons or serial port (64K FLASH is not clear enough or not, full English display should be enough), and parameters can be saved by on-chip FLASH or by hanging an EEPROM;
3. Make a mobile APP to connect to Bluetooth and adjust parameters? ! I took a look last week and found that andriod studio is based on JAVA. If you have never been exposed to it, you may consider learning it after completing the first two.

参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-05-15 01:50:40

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号