Tenth assignment is making input device.Here i am designing, fabricating and assembling the infrared proximity sensor,It sense the obstacles in the range which is around 5 cm (The range is dependent on color and reflectivity of the material)
First we need to design the circuit in eagle
Figure.1
In the circuit diagram we have used 1) IR LED as light transmitter 2) Photo diode as receiver 3)Operational Amplifier in comparator mode (LM358D) to detect voltage difference. 4) Attiny microcontoller 4)Light Emitting Diode
Figure.2
Figure.3
LM358D pin no. 1 connected to Attiny44 PB2 port and PA2 port is used for LED. when Obstacle will occure infront of IR sensor within specific range.LED start blinking.and will stop blinking when we will remove the obstacle.
Figure.4
10K pot is used for sensitivity adjustment.This pot is connected to positive terminal of the IC i.e pin no.3 and photo diode is connected to the negative terminal of the IC i.e pin no.2
Figure.5
Program is written in AVR studio then Saved and built. this will generate .hex file of the program in default folder.
Figure.6
I have used the sinaprog as a downloader.Open generated .hex file in sinaprog. and upload the file on Microcontroller Attiny44.following image shows the uploading process of .hex file.