This instructable will show you how to build functional surveillance system.
- Linux operating system
- server (apache)
- PHP support
- Mysql (optional) If you don't wanna use Mysql login checking
- about 30$
- web cam
- servo basics
Pictures and the video on below will tell you more than 784 words!
Step 1: How To: Building the Frame
Of course you also will need these servo motors. Every RC-hobby store is full of these and the price is from 5$ to up. You can use screws or hot glue to hook up these parts. I used both.
Focus on, that there is enough space between the servo motor and the angle bar, so it can turn freely!
Step 2: How To: Servo Motor Control Board
- Attiny2313 processor
- Max232 buffer circuit
- 4 x 0,1uF capacitors for the Max232
- 7805 voltage regulator
- 1 x 16V/47uF capasitor for the voltage regulator (input)
- 1 x 100nF capacitor for the voltage regulator (output)
- 1 x 2,1mm DC-jack or what size you ever wanna use
- 1 x D9-connector for RS232
- 2x3 spike bar for the servo motor connection
Follow the schematic instructions and your board should look like this.
Step 3: Programming the Processor
The C-code is very simple and short. It contains only 60 lines of code
Step 4: Attach the Web Cam Board to the Frame
Step 5: Putting Rest of the Parts Together
ATTENTION! Do not do same mistake what I did! I put the power and RS232 connections to front side and they should be back side of course.
Step 6: Ready for the Test
Put the power plug in and pray.. No smoke? No sparkling? No fire or screaming? good, then everything is perfectly(hope).
When the power plug is connected, the camera should turn its default position. which is 1500us. It keeps little "surrur" voice, but it is normal.
Now you can try to control your camera with the minicom, gtkterm or what you ever wanna use. It is important use 4800 baudrate. With the another rates it is not going to work!
I suggest that, download gtkterm to your Linux machine and change from port options it to use 4800 speed.
Then press a,s,z,x keys from your keyboard and the cam should turn.
If it works it is time to graz yourself!
Step 7: User Interface
On the right side there is 4 buttons: camera on, camera off, motion on and motion off. Camera on, puts the camera online and then it shows"webcam is running.." and camera off, turn its off and the sign "webcam is stopped" is presented.
Middle of the screen is the video stream which comes from the camera. Turning the camera happen clicking the picture. If you see some object in the edge of the picture(like lamp) and you click it the camera will turn that it is middle of the picture when the next refresh(interval is 1s).
There is also 4 button below the video stream. Up, down, left and right. With these buttons you can turn the camera more closely.
On the left side is the area where the motion detected pictures will update if motion detection is online. There is also button remove pictures, which will remove all of the pictures.
Zip-packet contains everything about the user interface and you can modify/use these files how do you want.
About the motion detector script, check this out: https://www.instructables.com/id/SZVB5BEFGG8PE6R/