Automatic Lighting and Visitor Counter
Andrew Herzog
Richard Baker
December 13, 2007
CMPET 211
Executive Summary
The objective of the project was to create a circuit with an 8051 microcontroller that sensed when an object passed through an infrared receiver’s receive path to automatically turn on lights and count how many times the receive path was blocked.
Discussion
To complete the project several smaller circuits were needed to be designed and constructed. The project needed a circuit to pulse an infrared LED at 38 kHz, a circuit to receive the infrared signal, a seven segment LED display circuit, an auto-lighting circuit, and a programming circuit. The project also required code to be written to the 8051 microcontroller to combine all the smaller circuits into an operational system.
The 38 kHz generator, Fig. 1-1, was major factor in getting the infrared receiver to operate correctly. A 555 timing chip was used to output a squarewave at 38 kHz for an infrared
LED. The generator needed to be completely isolated from the rest of the circuit because it was found that the infrared receiver’s output was similar to Fig. 1-2 at a frequency of 38 kHz. The receiver needed to output a high until an object blocked the infrared signal when it would output a low.
Fig. 1-1, 38 kHz Generator
Fig. 1-2, Infrared Receiver Output
The infrared receiver, Fig 1-3, was a very basic component of the project. 5 V was connected to pin three, ground connected to pin two, and the output was on pin one which was connected to pin twelve of the 8051. The receiver output a high as long as nothing was blocking the 38 kHz infrared signal. When an object blocked the signal, the receiver output a low, while being monitored by the 8051.
Fig. 1-3, Infrared Receiver Connections
Fig. 1-4, Infrared Transmitter and Receiver
The seven segment LED display was very similar to the “Interfacing the DS89C430 with a 7-Segment LED Display”