Line Follower has Lots of recycled Parts, but Zero Brains

Line Followers are a tried-and-true type of robot; both hardware and software need to be doing their job in harmony in order to be successful at a clearly defined physical task. But robots don’t always have microcontrollers and software, as [Mati_DIY]’s zero programming analog line follower demonstrates.

For readers used to seeing a Raspberry Pi or Arduino in almost everything, an analog robot whose “programming” exists only as a harmony between its discrete parts can be an eye-opener as well as an accessible project. A video of the robot in action is embedded below.

[Mati_DIY]’s design uses two CNY70 reflective sensors (which are essentially infrared emitter/phototransistor pairs) and an LM358 dual op-amp. Together, the sensors act as two near-sighted eyes. By using the output of each sensor to drive a motor via a transistor, the presence or absence of the black line is directly and immediately reflected by the motion of the attached motor. The more black the sensor sees, the more the motor turns. Electrically, that’s all that happens; but by attaching the right sensor to the left motor and the left sensor to the right motor, you get a robot that always tries to keep the black line centered under the sensors. Playing with the spacing of the motors and sensors further tweaks the performance.

The motors in [Mati_DIY]’s robot look like 9g servos, but if so they must be modified for continuous rotation to work in this design. The modification is a classic robotics hack, but nowadays it’s possible to purchase units already in continuous rotation format.

If you find this direction of robotics interesting, you might want to look into the various BEAM robotics projects we have featured over the years, like this tumbler or this solar-powered Turbot hybrid. For an even more complex take on a microcontroller-free line follower, be sure to check out this slick-looking robot that features a hardware implementation of PID.

19 thoughts on “Line Follower has Lots of recycled Parts, but Zero Brains

    1. The real pros just wire photoresistors straight into the motors. Using silicon is a luxury not everyone is afforded!

      I always wanted to make one using the internal feedback circuitry in a servo for the tracking, it seems like you could probably replace the position feedback with a voltage divider made out of a pair of photoresistors (with direction swapped for the right and left servos). You need to crack open the servos to convert them to continuous rotation, why not use their electronics too.

  1. i would love to see a teardown of one of these japanese “micromouse” robots solving mazes. These things are incredibly fast, I wonder how they get enough friction to accelerate like that, and how they accomplish such good position tracking.

    1. that video only shows the last round after it did a “solve run”. and of course it is lightweight, but i bet there’s some mechanical secrets to getting this performance.

  2. The LED front “Wheel” is a nice solution for a junk box build.

    When I was in yr7 there was a project in an electronics magazine to build a line following car ( all analog control similar to this one one ) but instead of differential drive it used one motor for drive and another actuated the steering.

    I so wanted to build one but didn’t have the skills or know suitable people to help make it a reality or have access to the parts. :(

    30years later I still haven’t done it

  3. Hah! This whole time I thought continuous-motion-modified servos still used the PWM/H-Bridge circuitry… Was trying to imagine how PWM’d be done with op-amps.
    So basically the motor’s directly-connected and the servos are basically nothing more than gear-boxes.

    That opens some doors for those of us lacking servos. One time I found a supply of old Mac/Apple floppy-drives for real cheap, which I bought specifically for their highly-reduced disk-eject gear-boxes. Or old remote-control cars with differential drive, like FastTraxx… maybe even hovercrafts… Or tiny-bots with motor-shafts directly touching the surface.

    I wonder if the op-amps are necessary, maybe the transistors alone would be enough amplification?

    Great weekend project.

    1. In his article he says that any transistors will do but the ones he used has a relatively high Vce for a small signal transistor. Other transistors with a lower Vce would probably pop because of the back EMF from the motor. The circuit needs some diodes from collector to emitter to protect the transistors.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s