An H-Bridge is an essential part to drive and control dc motors.
In this post, I am going to explain how I used the powerful H-bridge Qik 2s12v10 Dual Serial from POLOLU with serial commands…
Contents
The H-Bridge Qik 2s12v10
I think this is a fairly great part to control and drive 2x medium-size motors.
It can drive up to 30A peak and 13 A continuous mode for each motor! Therefore, it is idoneous for the application I used: a 3kg Sumo robot, because they need a relatively high current peak and the board can manage 2 motors.
The price is around $75 plus sending. You can always read the Datasheet-user guide.
What is an H-Bridge? Why do we need one?
One H-bridge is an intermediate control stage between microprocessor and motors. Microcontrollers can not drive high currents, let’s say a maximum few mA. For example, Arduino can only drive around 40 mA in each out-pin and one robotic dc-motor can consume form 150 mA to 2 or 5 peak Ampers.
With this part, you convert the limited low-current microprocessor signals into power signals to feed and manage the motors.
In this case, the powerful sumo motors drain 5A in stall mode and I have 4 motors (2 for each channel).
The basic circuit is make up with four transistors, MOSFET or BJT. The name of “h-Bridge come from the shape of the basic schematic diagram. See the picture below.
Control of Qik 2s12v10 from Pololu
This Pololu Qik 2s12v10 Dual Serial Motor Controller is controlled by a Serial Port. Usually, this kind of electronic boards are managed by PWM outputs.
With this Serial communication, we can check, control and manage more variables of the H-bridge like acceleration, current limitation, errors, data feedback… and not only speed and direction. Also, it is used with only one single cable ( 2 counting the ground connection).
Connections and Pinout
The following pic shows the connections:
All the square pins are ground (GND)
The board is divided on 2 sides: the control (left) and power-side (right).
On the Vin (6-16V), you must connect the high power source or battery (on the right side). Note that you can’t supply the power-side by only connecting the “battery output” VIN left pin.
The motors
The motors are connected as following:
Also, 3 small ceramic capacitors (0.1 uF) are necessary for each motor as the previous figure depicts. This will filter (or flatten) small peaks on the current. It is recommended from the manufacturer datasheet.
3 for each motor: 1 capacitor between both terminals and another 2 caps between each terminal and the ground (the motor metal case).
The Serial Commands
The communication protocol is done by Serial commands. First, we need to define or configure the serial speed.
To setup the Serial speed to 9600 bps, you must short the 1 and 2 jumpers (as shown in the pic below). If we want use auto-detect mode, we shold send a calibration command “0x00” via Serial.
For other speed you can read user guide‘s baud rate table.
To connect the Arduino board is quite easy, just connect Tx (transmitter) from Arduino to Rx (receiver) from H-Bridge and vice versa. We can receive data from the H-bridge like configurations, diagnosis, errors, currents, speeds…
The basic protocol we use here you can see at the image below. Sending data to the H-bridge is easy, just see the image.
More information can be consulted in user guide.
ed
I think you might have misunderstood one of the pictures you are using. The picture with the red- arrows does NOT indicate why it is called an H-Bridge, it in fact highlights what is WRONG with the design, namely that there will be a leaking current trough the NP junctions. In order to avoid that you couls switch the NPN and PNP transistors