Iknew that cheap motors were not that accurate; I could see that Hobbit, Elf, and Berry would not go straight when driving the motors at the same voltage.
Due to Hobbit and Elf’s two-wheel drive, it was fairly
simple to “eyeball” calibrating the motors:
- Have the robot go forward for 3-4 feet.
- Note how far off a straight line the robot ended up being.
- Use the (distance-offset)/distance as a correction factor to
slow the faster motor down.
With Berry, I intended to use a similar rough calibration
and a compass to provide a feedback loop to travel straight.
So, I wired the two motors on each side in parallel, and
used a dual-channel L298N based driver to drive each side.
The variations turned out to be so large that I decided
to make Berry a true four-wheel drive robot, and replaced
the L298N driver board with two L9110S boards.
While I could have used two L298N boards, they take
up a lot more room, are more costly, and — most important
— the L9110S is powerful enough for Berry’s motors.
To save time, I actually built a new “engineering deck”
where the motors were not powered in parallel.
When soldering wires to the motors, it helps if you
start with all motors in the same orientation, using the
same color code. Don’t worry too much if you get some
wiring wrong. It is easy to switch wires at the screw
Wiring the L9110S Motor
The two L9110S motor drivers need a total of eight
RoboPi pins, so I used pins 8-15 as in Table 1.
I used color-coded wiring for all the connections.
Serving Raspberry Pi
48 SERVO 05.2017
Last time, I was unhappy to find how bad the
speed varied from motor to motor in the same
set of four motors that came with the
Magician 4WD chassis I used for Berry.
Working Around Motor-to-Motor Variations in Cheap Gear Motors
Photo 1: Wiring Berry for 4WD.
Photo 3: Bye bye, L298N driver!
Photo 2: Motors wired in parallel on each side.