Material


  • Car/Robot: Ford F-150 (1:19) from NIKKO
  • BTnode rev3 from ETH Zurich
  • Quadruple Half-H Driver: L293D, alternatively SN754410
  • 2xNPN transistors BC547
  • 4x10k resistors


Disassembling the vehicle


The car has two motors. One is used for driving forward/backward using the rear wheels. The other motor is used for steering the front wheels left or right. We took the car apart and found a PCB with a lot of discrete components (transistors, resistors, ...) and a single IC, the PT8A978.

After some random guesses, we figured out that the IC is related to its "brother", the PT8A977 for which data sheets are available on the net. In short, the following pins are connected to to the amplification circuit:

  • Pin 6: right
  • Pin 7: left
  • Pin 10: backward
  • Pin 11: forward

We first removed the PT8A978 in order to control the motors but then decided to make our own driver.

Interface between motors and the BTnode3


We opted for building our own interface, so we replaced the original PCB with home-brew one based on the popular L293. The schema is shown in Figure 1.


Figure 1. Motor driver

The L293 contains two motor drivers. Each consists of four mosfets in an H-Bridge configuration. The control inputs are CMOS/TTL compatible, the output can provide output currents up to 1A per channel, at voltages from 4.5V to 36V.

Per driver, three control lines are needed: enable input and two input controls. The enable input turns the outputs of the driver on/off. For example, the enable line of the first driver, CHIP INHIBIT 1, controls outputs 1 and 2. Correspondingly, CHIP INHIBIT 2 of the second driver controls outputs 3 and 4. When a driver is enabled, its outputs become active and in phase with its input controls. The output lines can be set to GND or VCC individually.

We use the first driver to control the driving motor (forward/backward), and the second to control the steering motor (left/right). To save on microcontroller lines, we connected the OUTPUT 2 control line with the inverted output of OUTPUT 1 using an NPN transistor. The same was done with OUTPUT 3 and OUTPUT 4. In this setup, we cannot actively brake, but only two control lines per motor are needed, see circuit schema.

Figure 2 depicts the BTnode connector pins. Tables 1 and 2 describe the mappings between BTnode pins and corresponding motor control.



Figure 2. BTnode connector

 neutralforwardbackward
PE3 (inhibition)LHH
PE6 (control input)XHL

Table 1. Mapping between BTnode pins and driving motor control lines

 straightleftright
PE4 (inhibition)LHH
PD0 = SCL (control input)XHL

Table 2. Mapping between BTnode pins and steering motor control lines