obstacle avoiding robot circuit

Tiny BOT: Obstacle Avoiding Robot

Tiny BOT is a simple obstacle avoiding robot with two wheels that can be fabricated using a handful of generally available and inexpensive discrete components. The robot can perform avoidance manoeuvres whenever it detects an obstruction in its path. The electronic part is simple and can be built on a small piece of prototyping board. Although not terribly complicated, the mechanics do require a little care all the same. The drawing shown below details the key parts and elements of the system. Tiny BOT can be fuelled by a 6V (1.5x 4) battery pack.

Robot Parts

  • Single Shaft Plastic Gear Motor x 2
  • Plastic Wheel x 2
  • Plastic Chassis Board
  • Plastic Castor Bullet x 2
  • DC Motor Clamp x 2
  • 4 x AA Battery Compartment/Holder x 1

tiny bot parts placement

The Electronics inside the obstacle avoiding robot

Tiny BOT uses a front facing Infrared LED (Tx) to scan its path and a Photodiode (Rx) to detect light reverted from the obstacle by reflection. As soos as an obstruction is detected, Tiny BOT goes into reverse direction, and set off the locomotion in another forward direction. The sensor electronics is wired around the small Op-Amp LM358N (IC1), which is an 8-pin chip having two inbuilt Op-Amps. One part of IC1 used here is configured in comparator mode. The sensitivity of the circuit is controlled by the reference voltage at pin 2 of IC1 using a 10K trimpot (P1). P1 will help to reduce unwanted detections caused by external light sources.

obstacle avoiding robot circuit

Robot Electronics Parts

  • IC1: LM358N
  • T1: BC547
  • D1, D2: 1N4007
  • LED1: Green 5mm
  • Tx: Infrared LED 3mm
  • Rx: Photodiode 3mm
  • RL1: 6V/DPDT Relay (also tested with a 5V Relay from O/E/N)
  • M1, M2: DC motors (see robot parts section)
  • S1: On/Off Switch
  • R1: 150 Ohm
  • R2: 10K
  • R3: 120 Ohm
  • P1: 10K
  • C1: 100uF/16V
  • C2: 100nF

tiny bot initial test

The Motor Trick

Normally relay RL1 switches the positive and negative supplies to both motors M1 and M2. In case of an obstruction detection, RL1 switches to reverse the polarity of the motor connections. D2 now becomes reverse biased and hence supply to M2 is not available. Now only M1 goes into reverse mode. When RL1 switches back (no obstacle detection) Tiny BOT returns to the initial condition.

Note that this circuit can detect obstacles upto a distance of 5 – 10 cm. The range depends largely on the reflective properties of the obstacle so black objects will only be seen at very short ranges!


Join the conversation!

Error! Please fill all fields.
  • KING

    photo diode is not available .. what other components can you suggest me to substitute for it??

  • Joe

    Hey is it possible to do the same robot using the 741 op amp? And if u can share the schematics of an obstacle avoiding robot using op-amp 741

  • Jaskawal Singh Chawla

    Sir, what is N/C and N/O in the circuit diagram….?

  • vijay parishith

    hi do we use any mirocontroller in this project

  • angelocalsado

    how do you balance the robot?

  • geek

    does the robot also go backward if the obstacle is present in three directions?

    • GS

      Great simple circuit to use. I just have a couple of questions on the Infrared LED (Tx) and the Photodiode (Rx).
      Can I use a 5mm Infrared LED and a 5mm Photodiode.

      Also the Infrared LED (Tx)has specs:peak spectral wavelength: 940nm@ 20mA, spectral bandwith 50nm@ 20mA, 30˚

      The 5mm Photodiode has specs: collector dark current 100nA@ 10v (Vce), rise and fall time 3uS@5V (Vce).

      Or do you have a supplier of these items so I can match these in Australia.

      Many Thanks

    • T.K.Hareendran

      Geek: This is a simple bot.But you can tinker it !

  • Shaawaiz

    Mr. Hareendran… Great project i am making it right now but i have a question ……
    please explain that we are connecting infra red led .. so where are we connecting infra red receiver/transmitter?????
    please tell me Am i right that we are using photo diode as reciever???? and Tx is emitter????
    please reply me fast .. i need to complete my project before the deadline……
    thanx in anticipation…

    • T.K.Hareendran

      Shaawaiz: Refer the prototype picture and drawing again. You can find the exact layout of both sender (LED) and the receiver (PD) components!


    It is amazing and I will like to give it a try.

  • Aishik

    Please can you explain me the circuit in details.. U can mail me as well.. If you want to then I can provide you with my mail id..

    • T.K.Hareendran

      Aishik: I think the description provided here is enough ! For more details, refer the LM358 datasheet.

Looking for the latest from TI?