So from the previous post of sensors
we got idea how to use sensors n where to use which sensor.
so now lets proceeds and lets see how bots are made.
Here lets consider black strip of thickness 3cm. This bot is designed in such a way that when black strip comes under the LDR the correspond motor will become off. This happens when there's a curved portions. So the other motor works and robot will take turn.
We know that output from sensors is analog, so that has to be converted into digital before giving it 2 MC
Lets fisrt do it without programing, so here we avoid MC or MP so instead we need something which works logically so Comparator can be a better n cheaper option.
so now lets look back to voltage divider how it works...
so lets now assume that LDRR
s=150k without light (on black surface) R
s=10k with light (on white surface)
And the top resistance to be 10K(variable).so That we can adjust top resistance such that the voltage that goes to comparator is approx.
Without light: (on black surface)
Vp= *5 V=4.6875 V
With light: (on white surface)
Vp= *5 V=2.500 V
so This we have as output from voltage divider...Comparator
so now inputs working voltage are given to the comparator(555) as shown in the fig.And the outputs that we have from the voltage divider is given to the inverting terminal of 555 and a signal equivalent to 3.5volts is given to non-inverting terminal of 555.So that when the LDR is on black strip it give a low signal(0v) as o/p. and wen it is on white strip it give high signal(5v) as o/p of 555.so now this signals is amplified using H-bridge and o/p from H-bridge is given to the motor.
Similarly the same set for the opposite side of motor is made.And assembled....