Simple Back-And-Forth Robot

A common theme in robot contests is to have a robot drive straight forward to a wall, detect the barrier, and reverse straight back to the starting point. I previously posted a basic robot that accomplishes this goal uses two chips; with the direction remembered by a flip-flop. A couple of people wrote me to ask:

Yes! Let’s build a forward-reverse robot with a single motor and only a single 8-pin off-the-shelf chip!

The robot is built on a 170 tie-point mini solderless breadboard (SparkFun PRT-08801), to make it that much easier for readers to reproduce themselves.

Back And Forth robot on solderless breadboard

Back-And-Forth robot on a solderless breadboard.

Because my robot is fairly small (35 mm x 60 mm or about 1.5″ by 2.25″) with a high-efficiency Swiss motor, I chose to power it from a pair of lithium CR1/3N cells for a total of 6 V. But, if you have a larger platform or more power-hungry motors, you can use a 9 V battery instead. (Note: Lithium cells such as CR1/3N, DL1/3N, and 2L76 cannot put out more than 60 mA of current, which is too little to drive most motors.)

The heart of the robot is a Clare Semiconductor IXDI604PI dual inverting 4A MOSFET driver (IC1). (The IXYS IXDI404PI can be substituted if you have some lying around, like I did.) This chip is designed to drive MOSFET transistors, but I use the chip all over the place for driving light gearmotors.

As you'll see on the schematic pages that follow, a pair of resistors (R2 & R3) feed the outputs of the motor driver chip back into the inputs, so that the chip can remember the current state.

The robot has a snap-action switch on the back (SW2) and the front (SW3) to detect collisions with walls or other obstacles. However, the circuit will work with ordinary pushbuttons or even spring whiskers passing through loops of wire.

Underside of robot with a single escap motor

Underside of robot with a single escap motor.

Since the robot doesn’t spin or turn, only a single motor (M1) is required to provide motion. Additional wheels ① allow the robot to roll smoothly, but are not powered.

A pair of 1/8-inch holes ② permits the wires to pass up the stack from the bottom to the breadboard.

Side view of simple back and forth robot

Side view of simple back and forth robot.

From top to bottom, the layers are:

  1. Electronic components
  2. Blue solderless breadboard
  3. Double-sided sticky tape (unused) that electrically insulates the metal strips underneath the breadboard
  4. Custom machined plate of blue UHMW plastic where everything screws together
  5. Motor, wheels, and switches

Now let’s look at the schematic to see how this robot works...