Join The Community

Premium WordPress Themes Premium WordPress Themes Premium WordPress Themes Premium WordPress Themes

Thursday 10 February 2011

Analog Signal From Proximity Circuit

Connecting the output of the ir proximity circuit to the analog input to the Arduino board to create an analog value. In this example, that value controls the rate at which an LED blinks. We connect three wires to the Arduino board. The first goes to ground from ir proximity circuit. The second goes from 5 volts of the circuit. The third goes from the output pin of the circuit to analog input 2 on the Arduino board. Here the figure of the design circuit;
 

By placing your open palm in front of the ir proximity circuit, we change the amount current that is output by the ir proximity circuit. This changes the relative "closeness" of that pin to 5 volts and ground, giving us a different analog input. When the hand is moved away from the ir circuit less volts will be output to the pin. When the hand is moved close to the ir circuit more volts are output to the pin. AnalogRead() returns a number between 0 and 1023 that is proportional to the amount of voltage being applied to the pin. There are significant amounts of the infrared spectrum is contained within ambient light. Therefore the infrared signal detected by the proximity sensor can be noisy and contain light other than from the original source. To improve the accuracy of the ir sensor the transmitted infrared light should be modulated using a timer such as the 555 timer chip. The NAND gate is a standard 74LS00 that you can get anywhere - even Radio Shack, same with the 555, IR detector (RS Everlight or Sharp GP1U58Y) and IR LEDs can also be gotten at Radio Shack. Parts are easy to find and simple to connect. This does not require any fancy wiring or parts placement. Make sure that you use a .1uf bypass cap next to the 555 and next to the IR demodulator. Tweak the 2K pot until you have 38KHz, if you have a 'scope, this is a 1/38,000 period, or about 26.3us. With Arduino you can feed the output of the 555 in an I/O port and measure the frequency very easily.

0 comments:

Post a Comment

Popular Articles