How to make a light-following robot in one afternoon | Popular Science

# How to make a light-following robot in one afternoon

An easy intro to robot-making.

You don’t need a ton of space or materials to make this robot.

Jeremy S. Cook

If you want an easy project to complete in a day or so, or something to introduce kids to the world of robots and electronics, make this light-following robot your weekend project. The concept is very simple, and could be built in an infinite number of ways, with parts that you may already have on hand. For now, though, I’ll tell you exactly how I made mine.

### Electronics assembly

First up: the electronic circuit.

Jeremy S. Cook

I’ll first discuss the electronic circuit of the device, then explain how it’s actually assembled, as this can be done in a variety of ways. As shown in the above schematic, the positive side of the stacked batteries (connected in series for 6V) are wired to one side of each of the 6 LDRs. Three of these LDRs are arranged on the left side of the robot, and the non-battery lead of each is connected to the right motor. The other three LDRs are arranged on the right side, and the non-battery lead is connected to the left motor. The motor leads not connected to LDRs are applied to the negative battery connection, completing a circuit.

RELATED: Slipping into this ‘skin’ turns any object into a robot

The setup acts in such a way that when light is shined on the left LDR array, resistance to the right motor is lowered, and thus power is applied. This causes the motor to spin forward on the right side, turning it towards the light shining on the left array. The opposite effect will apply with the other three right LDRS and left motor, and if light is shined equally on both sides, the robot will travel forward. If either motor turns backwards, swap the battery and LDR leads.

### Mechanical Setup

Building the body.

Jeremy S. Cook

To get these components to look like an actual moving robot, I first put a ½ inch slot in a piece of medium-density fiberboard with my milling machine, where the tiny motors could reside. A router or tablesaw could also be used for this task, if you’ve got it. I then used a 2¾-inch hole saw to cut out a circular assembly that would form the robot’s body with the slot in the middle. Finally, I traced the shape of a CR2032 batteries in the MDF behind the slot, and cut a rough cavity for the CR2032 batteries.

Give thanks for hot glue.

Jeremy S. Cook

From here, I used the perf board to lay out the circuit, then arranged the wires so that when it’s attached to the MDF body with hot glue, the batteries are sandwiched between the + and – wires to supply power. (The wire was stripped back and rolled around the insulation.) The motors were held on with a combination of hot glue and the glued perf board, and wheels were drilled out to a diameter that could be pressed directly onto the gearmotors.

While this setup did work, in retrospect it would be easier to simply purchase a 6V coin cell holder with leads already available for a solid connection, especially if you don’t have a board lying around. Hot glue—even more hot glue, that is—could then be used to keep everything in place.

This is how I made the ‘bot shown in the video below. You could copy my methods step-by-step, create a 3D printed or otherwise carefully designed version, or simply start the build with the tools and materials at your disposal and see where it leads. As long as you can get the wheels to roll the device around, you’ll have something entertaining that follows a flashlight beam. You can make your frame out of wood, plastic, cardboard, or other readily-available materials.

(Jeremy S. Cook is a freelance tech journalist and engineering consultant, with over 10 years of factory automation experience. An avid maker and experimenter, you can follow him on Twitter, or see his electromechanical exploits on the Jeremy S. Cook YouTube channel.

Tags: