Thanks for looking at my instructable. I'll be submitting this to the Mad Science Fair Contest, so if you found this document useful, please vote and rate!
This device is an extremely sensitive laser detection circuit that uses extremely little hardware, and very few lines of code. The user can shine a laser beam into the on board photo resistor (LDR - Light dependent Resistor) when the module is powered on. From there, when the push button is pressed, a small delay occurs, at which point the device becomes active. However, the circuit is not looking for a change in voltage caused by the change of resistance on the light dependent resistor, but rather a fast change in light (A breach in the laser beam, for example). Let me be more specific...
The typical LDR circuit uses a voltage comparator circuit. When the LDR is exposed to a lot of light, then the resistance across it will be very small; typically 10-1000 Ohms. When the LDR is exposed to darkness, the resistance typically becomes very high (Mega Ohms). When placed in series with a resistor of fixed value, such as a 10k resistor, you have a voltage divider circuit. From there, the voltage to the comparator circuit will read different voltages based on how much light is hitting the LDR. That method requires more hardware than I would like. I've been there, and I've done that. I wanted to be a little more original.
This method employs a coupling capacitor and an ADC (Analog to Digital Converter). The ADC is a feature included in the microprocessor that I'm using, which is the PIC10F222. I'll get to that in a minute. By coupling, I mean that when a sudden change in light occurs along the LDR, a tiny AC signal will be sent across a capacitor to the input of the ADC. This capacitor acts to block DC, and will only couple AC signals. This signal is always very small (In the millivolts), which is awesome!
This signal is then changed into a digital binary sequence that is then compared to a value in the programming. Once the circuit is active, the ADC is sampling thousands of times a second, waiting for a change on the line. When someone breaches the laser, the coupled signal hits the input of the ADC, and WHAM! Detection!!! BEEP BEEP BEEP! You'll have to see the video =)
When the the circuit catches someone breaching the laser beam, the on board buzzer will beep, and continue to beep until the user pressed the selection button again. The beeps are quite loud! There is a routine in programming that makes sure that when the user presses the button, that he/she must let go before activating the circuit again. The code is very simple, and you can change the sensitivity very easily by changing the value in the compare register.
I WILL TALK MORE ABOUT THIS IN THE SCHEMATIC DIAGRAM SECTION!!! Please see the demonstration below.
Remove these ads by
Signing UpStep 1Parts List
2x 10k Resistors
1x 100k Resistor
2x 0.1uF Capacitors
1x 10uF Capacitor
1x 7805 or 78L05 5v Regulator IC
1x PIC10F222 MCU
1x 2-Pin Terminal Block
1x 3v AA Battery Holder (For the laser)
1x 3v Laser (Any laser will do)
1x PCB (Empty)
1x LDR (Light dependant resistor, or photo resistor). Any will do for this application.
1x Monetary tactile Switch
1x 7v-25v power supply. A 9v battery will do just fine!
1x 5v Piezo Buzzer (Not seen in picture)
| « Previous Step | Download PDFView All Steps | Next Step » |
1
comment
|
Add Comment
|
![]() |
Add Comment
|













































