Motor driver: Unterschied zwischen den Versionen
(→Wheel motors) |
|||
Zeile 21: | Zeile 21: | ||
So, that's the reason why Ardumower is designed as a 24V system. | So, that's the reason why Ardumower is designed as a 24V system. | ||
− | = | + | = Motor driver = |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | == Principle == | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
A motor driver is a circuit that allows current to flow either one direction or the opposite direction through the motor - depending on wether the motor should turn forward or backward (so called 'H-bridge'). There are many motor drivers available as ready-circuit boards, some can even control two motors (Dual H-Bridge) - if you connect two of their H-bridges in parallel, the maximum motor current can be increased. | A motor driver is a circuit that allows current to flow either one direction or the opposite direction through the motor - depending on wether the motor should turn forward or backward (so called 'H-bridge'). There are many motor drivers available as ready-circuit boards, some can even control two motors (Dual H-Bridge) - if you connect two of their H-bridges in parallel, the maximum motor current can be increased. | ||
Zeile 49: | Zeile 33: | ||
Arduino PWM Pin —> MOTOR-Speed Pin (PWM) | Arduino PWM Pin —> MOTOR-Speed Pin (PWM) | ||
Arduino Analog Pin <— MOTOR-Current Sensor Pin | Arduino Analog Pin <— MOTOR-Current Sensor Pin | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== Popular modules == | == Popular modules == | ||
Zeile 160: | Zeile 126: | ||
File: L298driver.jpg | double current | File: L298driver.jpg | double current | ||
File: L298N_schematics.jpg | schematics | File: L298N_schematics.jpg | schematics | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
</gallery> | </gallery> | ||
Zeile 190: | Zeile 134: | ||
* price | * price | ||
− | = Starting current = | + | == Starting current == |
Here are some measurements of the Ardumower motor's starting current (peak): | Here are some measurements of the Ardumower motor's starting current (peak): | ||
Zeile 201: | Zeile 145: | ||
</gallery> | </gallery> | ||
− | = Short-circuit current = | + | == Short-circuit current == |
To not damage the motor driver on the first run, find out the maximum current that can flow through your motors. In other words, find out the 'short-circuit' current. Typical measurement installation: | To not damage the motor driver on the first run, find out the maximum current that can flow through your motors. In other words, find out the 'short-circuit' current. Typical measurement installation: | ||
Version vom 5. Dezember 2015, 23:53 Uhr
Inhaltsverzeichnis
Abstract
Ardumower's design uses two different types of motors (all motors can be purchased via the shop ):
- Two motors (with integrated gearing) for driving (wheel motors), and encoder (for distance, direction and speed control)
- One motor (with high rotation speed) for mowing (mower motor)
To control a motor, it requires a 'motor driver'.
Voltages
Although there exist 12V motors and 24V motors, as in all modern systems, the Ardumower uses 24V motors. The reason is as follows:
Assuming that the motor consumes 50W, using 24V results to a motor current: 50W / 24V = 2A.
Assuming that the motor consumes 50W, using 12V results to a motor current: 50W / 12V = 4A.
The higher the current (A), the more problems arise:
- The motor driver must be suitable for higher current (more expensive)
- The PCB traces need to be more thick (more expensive)
- The rechargable battery need to support higher current (more expensive)
So, that's the reason why Ardumower is designed as a 24V system.
Motor driver
Principle
A motor driver is a circuit that allows current to flow either one direction or the opposite direction through the motor - depending on wether the motor should turn forward or backward (so called 'H-bridge'). There are many motor drivers available as ready-circuit boards, some can even control two motors (Dual H-Bridge) - if you connect two of their H-bridges in parallel, the maximum motor current can be increased.
If the direction of the motor does not need to be controlled, (e.g. for the blades), you do not need an H-bridge, but instead a simple 'switch' (e.g. MOSFET-transistor-circuit).
The motor driver is connected through control signals to the Arduino. Example:
Arduino Digital Pin —> MOTOR-Direction Pin (DIR) Arduino PWM Pin —> MOTOR-Speed Pin (PWM) Arduino Analog Pin <— MOTOR-Current Sensor Pin
Popular modules
MC33926 (recommended)
Features: up to 3A with integrated current sensor and thermal shut-down protection, for all kind of robot mowers)
M1_FB --- pinMotorLeftSense A1 M1_SF --- pinMotorLeftFault 25 M1_PWM_D1 --- connect with jumper to GND M1_PWM_D2 --- connect with jumper to VDD M1_IN1 --- pinMotorLeftPWM 5 M1_IN2 --- pinMotorLeftDir 31 EN --- pinMotorEnable 37 M2_FB --- pinMotorRightSense A0 M2_SF --- pinMotorRightFault 27 M2_PWM_D1 --- connect with jumper to GND M2_PWM_D2 --- connect with jumper to VDD M2_IN1 --- pinMotorRightPWM 3 M2_IN2 --- pinMotorRightDir 33 EN --- pinMotorEnable 37 VDD --- Arduino 5V
L6201P
Features: 48V, 4A
B+ power supply output voltage equal to the power connector GND GND EN driver enable RPWM forward PWM signal, active HIGH LPWM reverse PWM signal, active HIGH CT current signal output VT voltage signal output
Forward EN=1, RPWM=PWM, LPWM=0 Reverse EN=1, RPWM=0, LPWM=PWM (also possible? EN=1, RPWM=255-PWM, LPWM=1 => needs to be verified!) Brake EN=1, RPWM=0, LPWM=0 Not brake EN=0, RPWM=x, LPWM=x Note: 1=High level (3.3-5v), 0=Low level (0V or GND)
L9958
Features: Arduino 240W H-bridge Motor Driver Board - SX8847, up to 8A
Note that this module has an on-board linear voltage regulator, which converts the input POWER (typically 24 or 12V) to 5V. Some modules do this with a single voltage regulator (chip VR1 on the module), or in a two-staged approach (VR1 and U2).
Converting 24V to 5V with a linear voltage regulator is very inefficient (current in = current out, so if you need 100mA at 5V, the linear voltage regulator requires 100mA at 24V, so you loose 1.9W in this module). Therefore, it is recommended to disconnect the linear voltage regulator from the board, and use the 5V from the switched mode power supply.
L9958 GND---GND L9958 VCC---Arduino 5V L9958 EN---Arduino 5V L9958 DI---GND L9958 DIR---Arduino MOTOR_DIR L9958 PWM---Arduino MOTOR_PWM L9958 MOTOR(+)---motor(+) L9958 MOTOR(-)---motor(-) L9958 POWER(+)---battery(+) L9958 POWER(-)---battery(-)
L298N
Features: up to 4A Notice: When using a L298N-motor driver, both H-bridges (2A) should be connected in parallel, so that both bridges drive a single motor (max. 4A):
Connect in parallel:
IN1 with IN4 IN2 with IN3 OUT1 with OUT4 OUT2 with OUT3
(Do NOT disconnect the SENSE-lines, except when you want to measure current by a 'shunt' resistor).
Make sure there is a jumper on both ENA and ENB. Also, make sure there is a jumper on S1.
Choosing a driver
When purchasing a motor driver, consider...
- max. thermal load (short-circuit current)
- price
Starting current
Here are some measurements of the Ardumower motor's starting current (peak):
Starting current:
- Gear motor: 15A (starting current peak)
- Mowing motor: 20A (starting current peak)
Short-circuit current
To not damage the motor driver on the first run, find out the maximum current that can flow through your motors. In other words, find out the 'short-circuit' current. Typical measurement installation:
Battery === Ampere meter === Motor
The Amperemeter (e.g. model making) should be able to measure the maximum current (e.g. 30A). The motor to be measured is mechanically blocked (so it cannot rotate).
Warning
- always remove blades
- only connect battery for a short period (1-5 seconds)
- always use cables with sufficient wire cross section
Example measurement:
- Rotenbach SPM08-320
- Wheel motor: 8A
- Mowing motor:
- Ambrogio L50
- Wheel motor: 4,5A
- Mowing motor: 22A
- Tianchen TC-G158
- Wheel motor: 5,4A
- Mowing motor: 16A (both 32A)
The measured current will only flow in 'worst-case' scenarios, which means when the motor starts or when it is blocked and it will only flow for a short time (as your battery might not deliver the high current constantly, and so current and voltage will break down).
Current sensor
To detect certain conditions (robot drives against obstacle, motor blocks etc.), the motor current should be monitored constantly. There are two approaches for sensing current.
Approach "Hall sensor module"
This is the recommended approach for sensing current. These current sensor modules are available for different current ranges.
- ACS712ELC-05A (185mV/A, max. 5A)
- ACS712ELC-20A (100mV/A, max. 20A)
- ACS712ELC-30A (66mV/A, max. 30A)
- The lower the range, the more precise the measurement.
Approach "Shunt resistor (circuit)"
The current flows across a very small resistor (0.5 Ohm) and the voltage drop is measured