Professional Documents
Culture Documents
DengFOC-Odrive单路 产品手册 新版 靓丽版
DengFOC-Odrive单路 产品手册 新版 靓丽版
Mr. Deng
///
Machine Translated by Google
CONTENT
Table of contents
Machine Translated by Google
I. Overview Deng FOC driver supports driving high-current motors, and can
system.
Deng FOC is a highly integrated FOC driver for three-phase brushless DC
CAN, UART and FPC serial ports (can realize screen display or
possible .
Based on the powerful and stable open source project ODrive, FOC motor driver that everyone can play together !
We further optimize the circuit, reduce the volume, optimize the interface,
01 02
Machine Translated by Google
2. Introduction
size 42mm*42mm
ab
analog input
03 04
Machine Translated by Google
DIO 3 A3 ///
SWDIO Digital 3.3V Analog 3.3V
CLK G 5
SWCLK GND 5V
05 06
Machine Translated by Google
///
07 08
Machine Translated by Google
3. Check
Each Deng FOC has undergone careful visual inspection and routine testing before
However, it is inevitable that damage may occur during packaging and transportation.
Therefore, it is recommended to conduct a general inspection after receiving it before powering on.
///
The hardware described in this article performs the first power-up test.
///
09 10
Machine Translated by Google
first step
hardware list
Connect the Type-C data cable, the blue light (power indicator
light) and red light (DRV fault indicator light) on the board
ÿ Deng FOC
Both light up.
11 12
Machine Translated by Google
second step
The screen details are as follows:
If the screen is selected, on the FPC connector on the back of the driver board
Connect screen. Gently press the black locks on both sides of the FPC connector
Pull it out, insert the screen cable according to the direction of the figure below, make sure
After the gold finger is fully inserted into the connector, press the lock into the connector
Connector.
displayed
ÿ mode ÿ Current
on the screen:
ÿ Target value
ÿ location
13 14
Machine Translated by Google
4. Environment Configuration
first step
FOC. Before using it, you need to configure the python environment first.
power switch), the red light goes out.
second step
Check the output 5V of the voltage regulator circuit, and the digital power supply 3.3V
and analog power supply 3.3V If it is already installed, you can skip this step. We recommend using
15 16
Machine Translated by Google
A Download anaconda official website URL: C pay attention to uncheck "Add Anaconda to
(477MB)
B chooses Ann
Installation path:
17 18
Machine Translated by Google
D After the installation is complete, find and open it on the start interface
Control Panel -> System and Security -> System -> Advanced System Settings
Settings -> Environment Variables -> User Variables -> Add in PATH
The Scripts folder of the anaconda installation directory. Check the path where
you installed anaconda and find the Scripts folder. My path here is (anaconda
EConfigure environment variables.
installation path)\Scripts.
19 20
Machine Translated by Google
C install odrivetool
implement:
C Select List All Devices in Options ESelect the up and down arrows, select libusb-win32(v
D drop-down menu, select Odrive 3.5 Native F Wait for the driver replacement to complete
Interface (Interface 2)
25 26
Machine Translated by Google
G When done, close the Zadig window C connects odrivetool in Python39 environment, enter
27 28
Machine Translated by Google
5. Start using
Glue the magnet on the motor shaft: (the magnet must be a radial magnet and it ,
ÿ Deng FOC
ÿ Motor
type ignored)
and motor so that the encoder on the back of the DengFOC is aligned
ÿ Type-C data cable
ÿ Dissipating resistor (optional) module and motor, align the encoder chip to the magnet, and
29 30
Machine Translated by Google
Connect the USB, motor and power supply. The picture below shows the board Connect the computer with USB (the power can not be turned on first, just
The connection diagram of the load-encoder type. model in the picture connect the USB), activate the odrivetool where
It can be downloaded and printed in the after-sales group. Conda environment, enter "odrivetool". Appear
odrv0.erase_configuration()
31 32
Machine Translated by Google
///
Deng FOC has prepared a python program that can
And defined the required basic parameters according to the actual situation
Calibrate.
value, brake return current value, the number of pole pairs of the motor,
value (for the time being, only the ABI mode of AS5047P is supported
Section 5.2 and Chapter 6. bit set by the parameter in the program
33 34
Machine Translated by Google
python environment
program
35 36
Machine Translated by Google
D for on-board encoder type: due to ODrive Configure the parameters first, but do not calibrate the motor,
SPI encoder support is a bit problematic, if Encoder and enter closed-loop mode, then save the settings,
If you need to use the SPI mode of AS5047P, you need reboot.
37 38
Machine Translated by Google
It will stop the operation and print out the error reason, as shown below
When the number of pole pairs is not set correctly, resulting in encoder calibration
error.
Modify the following parameters according to the actual situation (the specific parameters say
39 40
Machine Translated by Google
Since Deng FOC's on-board encoder model is AS5047P, the ABI mode and SPI mode of
41 42
Machine Translated by Google
The motion calibration must be performed each time the power is turned on, and the use of
Deng FOC can realize the speed/position/torque motion control of the motor,
The advantage of the AS5047P-SPI is that it can be selected as long as the
and each motion control supports multiple inputs
Once the encoder is calibrated, it is not necessary to enter the subsequent power-on
Modes such as direct input, climb mode, etc. each model
43 44
Machine Translated by Google
The calibration procedure consists of calibration, programming of the motors performed separately
ÿFor convenience, the program has set 6 modes to
Configure, including: Encoder calibration, and motor position closed-loop test, as follows:
When the encoder reading mode is ABI mode, the encoder must be
45 46
Machine Translated by Google
Once calibrated for the first use, subsequent Set position directly or trapezoidal track position mode, run with one key
Encoder recalibration is no longer required, so the designed After configuring the program and calibrating the motor, open in conda
"beep" ), pre-calibrate the encoder (that is, it will not rotate back and odrv0.axis0.controller.input_pos = [position target value]
Set the torque direct or torque climbing mode, and run one-key configuration
After setting up the program and calibrating the motor, open odrivetool in
Set the speed direct or speed ramp mode, run the one-key configuration conda , enter
Realize speed control, and at the same time, real-time changes can be seen on the screen.
47 48
Machine Translated by Google
6. Parameter description If you don't want to use it, just keep it as the default value. in addition
Because there may also be some resistance in the wiring and terminals,
So if you have any problems with the brakes, try turning the
Deng FOC can use ODrive Tool to
This parameter increases by 0.05ÿ.
axis0 for parameter configuration.
odrv0.config.dc_max_positive_current[A]
odrv0.config.enable_brake_resistor
odrv0.config.dc_max_negative_current[A]
If a dissipative resistor is to be used, set it to
True. If you use battery power, you generally don't need to set it. That is, the maximum current value that the power supply can sink.
49 50
Machine Translated by Google
And when the power resistor is not used, it is necessary to return the current to the battery
In the whole range, this parameter should be higher than the electric
odrv0.config.dc_bus_undervoltage_trip_level [V]
to set it to 26V.
ÿHigh current motor
odrv0.config.max_regen_current[A]
MOTOR_TYPE_GIMBAL
If a DC stabilized voltage source is used, it does not have the ability to recover electric energy,
Note: Do not select on non-gimbal motors
The backflow current that the battery actually withstands is set. higher than the
overheat.
The return current of the parameter will be dissipated by the dissipation resistor.
51 52
Machine Translated by Google
Choice of motor type: For the sake of safety, you can start to set the current of 10A
ÿIf the current noise of 100mA is harmful to the motor Limits to ensure stable operation of Deng FOC. After the configuration is
completed later, modify the appropriate motor current limit. (Note: Motor
If it is considered "small", then you can choose a high-current motor
current and power supply current are not the same thing, simply
ÿIf the current noise of 100mA is considered "big" for the motor ,
Said that the higher the speed of the motor, the supply current and the motor current will be
If the internal resistance of the motor is greater than 1ÿ, choose the gimbal motor
odrv0.axis0.motor.config.calibration_current [A]
odrv0.axis0.motor.config.torque_constant Sets the maximum calibration current. If the motor is under load, set
Too small motor is not strong enough to rotate and calibrate, you need to increase the calibration
Usually set to 8.27/KV value, which is every 1A current flows to
quasi-current for complete and correct motor calibration.
The ratio of the torque produced by the motor. If you want to take current A
odrv0.axis0.motor.config.resistance_calib_max_voltage[V]
The phase resistance of the motor is small, if this parameter is set too high, it will cause over-current protection
odrv0.axis0.motor.config.current_lim[A].
mistake. Specifically, it can be roughly set by Ohm's law.
53 54
Machine Translated by Google
The ABI mode of the AMS5047P and the SPI mode of the
odrv0.axis0.controller.config.vel_limit [turn/s].
settings to illustrate.
As the name suggests, it is used to limit the speed of the motor.
coding
odrv0.axis0.en
ENCODER_MODE MODE_SPI_
odrv0.axis0.motor.config.requested_current_range[A] coder.config.mode
Devices
_INCREMENTAL ABS_AMS
type
coding
odrv0.axis0.en
device
coder.config.c pr 4000 16384
CPR
SPI
odrv0.axis0.en
model coder.config.a
bs_spi_cs_gpio_pin 8
CS
pin
odrv0.axis0.en
bandwidth
coder.config.b 3000
andwidth
55 56
Machine Translated by Google
There are many input modes, and the commonly used input modes are listed below.
And the parameters that indicate that each input mode needs to be set accordingly:
CONTROL_MODE_POSITION_CONTROL
In this input mode, the drive needs to be in speed control mode
down, and will gradually climb/fall from the current speed value to the
odrv0.axis0.controller.config.control_mode configure
57 58
Machine Translated by Google
ÿ rate of climb
In this mode, you need to configure
odrv0.axis0.controller.config.vel_ramp_rate[turn/sec]
ÿ Speed limitation under trapezoidal trajectory
ÿ Load inertia
odrv0.axis0.trap_traj.config.vel_limit
odrv0.axis0.controller.config.inertia[Nm/(turn/s²)]
In this input mode, the drive needs to be in the position control mode ÿ Acceleration limitation on trapezoidal trajectory
In the formula, the target position value is input through input_pos, and the motor reaches odrv0.axis0.trap_traj.config.dccel_limit
the set position according to acceleration-constant speed-deceleration, that is, the speed
In this input mode, the driver needs to be in the torque control mode,
and will gradually climb/fall from the current torque value to the input to
configuration
odrv0.axis0.controller.config.torque_ramp_rate
59 60
Machine Translated by Google
odrv0.axis0.controller.config.vel_gain
odrv0.axis0.controller.config.vel_integrator_gain
odrv0.axis0.controller.config.pos_gain
odrv0.axis0.controller.config.pos_integrator_gain
61 62
Machine Translated by Google
(2) If there is no problem, turn off the power and measure whether the lower tube DS is on.
If it is turned on, the problem is that the lower tube of the power dissipation circuit is damaged
(3) If there is no problem, remove the two MOS tubes of the dissipative circuit. If it still flashes
after power on, the problem is that the inverter circuit is faulty. If
Pole signal, observe whether it will lead to simultaneous conduction of the upper and
lower tubes, or replace the dissipation circuit MOS tube, if there is simultaneous conduction
(1) Turn off the power to measure whether AUX_H and AUX_L are short-circuited, and
Bad, just replace the LM5109
63 64
Machine Translated by Google
(1) Test whether the USB socket DP and DM are short-circuited, and test
The resistance between PA11/PA12 is short-circuited and the resistance is too large
If it is less than 22ÿ, the problem is the welding problem of the USB socket
If a sine wave of 8MHz is observed, it is determined that the crystal oscillator is damaged.
You should try to replace the crystal oscillator, if the problem persists, you should check
65 66
Machine Translated by Google
Measure GVDD/AVDD/DVDD to see if it Re-calibrate and code the motor by hand-compressing the connector
They are about 11V/6V/3.3V respectively, if it is close to 0, Calibration, if improved, the problem is the motor contact
Then you should check whether the EN_GATE is soldered or not. If Bad, just replace the connector or directly solder the wire
there is no soldering, you should try to replace the DRV8303 and test again
67 68
Machine Translated by Google
Check whether the three-phase line is in good contact with the board.
LP5907 damaged
"ERROR_CPR_POLEPAIRS_MISMATCH"
(4) The motor magnet is too far away from the encoder, the required distance is 1-3mm
"ERROR_PHASE_RESISTANCE_OUT_OF_RANGE"
69 70