Line-follower Robot

               
Abstract: 

        This simple robot is designed to be able to follow a black line on the ground without getting off the line too much. The robot has two sensors installed underneath the front part of the body, and two DC motors drive wheels moving forward. A circuit inside takes an input signal from two sensors and controls the speed of wheels’ rotation. The control is done in such a way that when a sensor senses a black line, the motor slows down or even stops. 




      Then the difference of rotation speed makes it possible to make turns. For instance, in the figure on the right, if the sensor somehow senses a black line, the wheel on that side slows down and the robot will make a right turn.


Schematic Diagram:



R1=6K, R2=1K, R3=20K, R4=10, R5=82, R6=5K, R7=1K,C1=1µF, C2=0.1µF, C3=0.1µF,

Circuit Operation:


         This circuit contains 2 parts. PWM (Pulse Width Modulation) part and a sensor part.The photo diode turns on the photo transistor and then the output current is converted to output voltage through the first op-amp circuit. The R6 is a variable resistor, so that we can tune the scale of output voltage. The second op-amp circuit is added to change the polarity of voltage. (Positive CV is necessary later.) One thing we should know is that –Vcc to Vcc of voltage rail is needed, not from 0 to Vcc. In the circuit built-up, LM747 Dual Operational Amplifiers were used.

         Second, in the PWM section, two 555 timers (LM555) are used to produce a pulse-width modulated train of pulses. The timer on the left works in astable mode to generate regular square-wave pulses. The frequency is fixed by the values of R1, R2 and C1 here. Then, this output Q1 is connected to the trigger pin of the second timer that works in monostable mode this time. As you can see in the below diagram, at a falling edge of Q1, a pulse is triggered and stays high during some time. 
            The time (width of a pulse) is purely determined by the value of R3 and C3 if CV (Control Voltage) pin is not connected at all. CV plays a role of changing the threshold level of a timer. (Without CV, threshold = 2/3 * Vcc) CV just becomes the triggering voltage level. Therefore, the higher the CV is, the longer it takes time until discharge. In this way, the duty cycle of output pulses Q2 can be controlled. Back to my circuit, the output voltage of the sensor part provides CV. For instance, if any sensor senses a black line, the current from the photo diode decreases, the CV drops, the duty cycle gets low and the motor slows down. 
 


            Third, the PWM pulses are supplied to the gate of a power MOSFET (IRF520) to switch the DC motor on and off. Then, the DC motor only sees the average voltage proportional to the duty cycle of the pulses. When CV is high, so is the duty cycle and the motor turns fast. In this robot, the distance between sensors and the ground is fixed. So, when a sensor is off the black line, CV keeps its maximum value and both motors keep turning in a constant speed. As soon as the sensor enters the black line part, CV drops down and thus duty cycle decreases, which means the slowdown of a wheel.


Comments

Popular posts from this blog

Biomedical Projects Ideas

BLOOD INFUSION WARMER

Biomedical Sleep Inducer