Step 2Prototyping
If not I suggest you look into it, it's really easy to pick up (this is the first project I've done with it) and it's less costly than arduino.
Set up your circuit as shown in the pictures and circuit diagram.
Place the IR sender and receiver next to each other on your board, facing off of the edge, and make sure to place something between them so only reflected light will set off the sensor.
If you are using the example code then download it and test the circuit.
If you are writing your own program (which I suggest) then here are a few tips.
IR Sensor:
Read through any data sheets you can find for your sensor, it will only respond to a specific frequency (mine was 38kHz) and it responds best to certain burst lengths and gap times (how long the signal is on or off)
Also note that the sensor is in a high state (a 1 signal being sent to the chip) when there is no IR signal detected (this confused me at first).
Mode Switch:
Because this is used to count switch presses, switch bounce will ruin your program. (bounce is when, what seems like a single press to you, is registered as many presses by the chip)
To stop switch bounce simply add a pause (e.g. 100ms) after the program counts the press. This gives the switch time to settle.
When you are happy with the circuit and program you can move on to miniaturizing it to fit in a zippo.
Alternatively you could cut a slot out of a large tin, dump the breadboard and batteries in and use the intruder alarm just as it is.
But for me, making stuff smaller and more compact is way more fun.
| « Previous Step | Download PDFView All Steps | Next Step » |
2
comments
|
Add Comment
|
madmanmoe64 (author)
says:
![]() |
Add Comment
|




















































