This is the post to discuss about the input section of the auto car. The team provide us with infra red sensors. Actually the eye of the robot is not limited to this only. There are several type like Light Detecting Resistors (or Photocells) and optic sensors (which might costs RM 400.00 each).
Before going further, this is an analogy of how the infra red (IR) sensors will work.
Figure of the analogy of IR sensors
Let's say there is a hand there and the hand wants to push the button so it will be switched on. If the hand is there, it will keep pushing so the switch is closed (electricity will conduct). If the hand is not there, switch will be open (electricity won't conduct).
Figure of symbol for IR transmitter and receiver
In this pair of infra red sensors, when the transmitter emits IR ray, as long as the receiver receives the ray, the electricity will flow in the receiver. Of course in this, the electricity if not measure by ON or OFF like the hand analogy. There is a range from full current to zero current. The current can be any value from zero to the maximum depending on the strength of the IR ray. The stronger the ray, the more current will pass through.
Figure of IR transmitter and receiver connection.
To connect, we will use 5 volts, 330 Ohm resistor and 4.7 kOhm resistor. The signal we are getting is voltage. When the ray is present, meanings the 'switch' is closed, therefore signal will be close to 0 volts. If the ray is absent, the 'switch' is opened, therefore the signal will be close to 5 volts.
Figure of IR transmitter and receiver.
This is the sample of the IR transmitter and receiver. The polarity, '+' and '-' must be connected correctly in the circuit. Shorter leg for transmitter is negative while shorter leg for receiver is positive.
Now the output from the signal is in analog. Meanings the voltage can be ranged from 0 volt to 5 volts. We shall see the way to change the analog signal to digital signal.