1Motor Driver Test
The objective is to build a Raspberry Pi Hat capable of controlling four DC motors.A through research was conducted to select the right H Bridge component for the PiWars Hat.
The scope of this document is to detail the choice and test of the driver with the PiWars Motor.
1.1H Bridge Specifications
The H-Bridge driver must be small enough so that four of them can fit a Raspberry 2/3 Pi Hat. The minimum steady current of each driver must be 10A or above. The driver must be able to be powered by 3S or 4S LIPO batteries.Nice to have are ultrasonic PWM, current and temperature sense, ease of soldering and ease of layout and cheap component.
Specifications:
- 3S/4S LIPO : 10.2V to 14.8V
- Current: 10A
- Small footprint
- Fully integrated: MOS +MOS drivers + control logic +sense
circuitry
- High frequency PWM
- Current Sense
- Temperature Sense
- Friendly layout
- Easy to solder
2H Bridge Choice
The H-Bridge is the most important component of the board. A large number of H-Bridges from may manufacturers have been evaluated. Amongst the options were:- IFX9201
- TLE7209
- VNH5019
- BTN7930
- BTN8982
- VNH7040
Illustration 1: VNH7040 Block Schematics
With a current of 35A, a voltage of 28V and a PWM of 20KHz the
VNH7040 met or exceed all desired specifications for the PiWars Hat.This is a new component meant for automotive. ST was able to fit three dies, allowing for true power mosfet and the specifications of the components. The previously choosen H-Bridge for the HotBlack Shield was the BD62321 with just 3A of current.
2.1Features
The basic feature is the 20KHz PWM controls. A microcontroller PWM channel with a number of digital I/O are needed to select between various output configurations:- Open
- Break (high and low)
- Clockwise
- Counter clockwise
More interesting, the VNH7040 features a single current output sense channel whose function can be selected by an internal multiplexer by a number of digital I/O. Current, temperature and even supply voltage are all monitored. Being a current output allow to minimize the noise due to differences in the 0V common rail.
The sense pin also report faults of the internal safeties that can be reset.
With the VNH7040, current PID , temperature and voltage monitoring.
2.2Interface
Interface with the microcontroller requires a number of pins.
Illustration 2: VNH7040 Truth Table
The truth table is very rich, requiring 5 digital output one PWM
channel and one ADC current channel.By carefully sorting the pin for the four drivers, two available pin configuration emerge.
Illustration 3: VNH7040 Pin Allocations
Option 1 connects the VNH7040 PWM pin to the microcontroller PWM
channel. It leaves the motor open during the low PWM time, letting
the current flow through the recirculation diodes. This option opens
the possibility of using an external diode to bring some losses
outside the driver itself.Option 2 connects the VNH7040 INB pin to the microcontroller PWM channel. This makes the motor break during the low PWM which is a more efficient and forceful drive settings. In this option the meaning of the pins is more straightforward with a DIR and ENABLE pin.
In both options, INA and SEL0 can be connected to the same logic pin to save one microcontroller pins for each driver.
In both options, SEL1 and MSENSE_ENABLE can be shared between all four drivers.
Currently Option 1 has been tested.
3Test VNH7040
3.1Setup
Illustration 4: Setup
Controls are generated by the AT4809 curiosity nano kit from
microchip. It's the same microcontroller that will power for the
PiWars Hat.Programmer is the Atmel ICE using the UPDI program and debug interface.
Programming IDE is the AVR Studio 7
One driver has been connected in OPTION 1 wring.
3.2Firmware
The firmware uses the same modules intended for use in the PiWars hat.The RTC provides a periodic interrupt at 1KHz to orchestrate the PWM slope generator and the LEDs.
The powerful timer type A is used in split mode to generate up to 6 channels of single slope PWM at 80KHz. It's configured to generate four independent 20KHz 8bit single slope PWM channels.
Control signals are fed to the VNH7040 evaluation board to test the driver in both directions.
Illustration 5: Firmware Architecture
>>>AT4809
VNH7040 Test Firmware repository<<<3.3Test
The test is a success. The hardware chosen to drive the PiWars motor block works as intended.
Video 1: AT4809 VNH7040 Test
4Conclusions
This test served as validation for the AT4809 and the VNH7040 components. Design of the PCB can proceed.The scope of the PiWars hat is ambitious, with four speed and current PID running concurrently on a single AT4809.
Quad quadrature encoder acquisition is yet to be tested.
Current sensing capability of the VNH7040 is yet to be tested.
No comments:
Post a Comment