If you look at the chassis of the zBot vehi-cle, you’ll find two parts requiring intel-ligent control: the steering servo and the DC motor. The so called H-bridge is the normal circuit for electronic control of revolution speed and direction. The DC motor of a Tamiya car is powerful enough to propel zBot at up to 20 miles per hour. The motor then consumes more than 10 A, so we choose high-current power MOSFETs for the driver stage. There are lots of different devices to choose from. The MOSFET we require has to supply the maximum motor current and, importantly, it has to be switched with gate voltages of about 5 V. In this case, the microcontrol-ler switches the power stage (‘low side’) directly. For high side driving level shifters are necessary. The schematic of the H-bridge power stage shows a few inverters, NAND gates and two tri-stateable drivers. These logic func-tions are very important as the easier way, i.e.., directly controlling all four MOSFET has a fatal disadvantage.
In case of a software crash it could happen that two ore more MOSFETs are switch on incorectly, for example T4 and T7. In that case, the current through the transistors is limited by the internal resistors of the MOSFETs (about 10 mil) only. Such a fatal error would destroy the MOSFETs. The logic functions configured here effectively avoid illegal states. To control the DC motor, three signals are needed: DIR, PWM and STOP. DIR con-trols the direction of the motor revolution, PWM the speed, and STOP brakes the motor. The software module for the DC motor is called dcm.c.
(1) The complete document called Zbot — the Robot Experimental Platform Is available for free downloading from the Elektor Electronics webstte. The file number Is 070172-11.zip (July/August 2007).