30$ Surveillance System With User Interface

by iideetee in Circuits > Sensors

25984 Views, 116 Favorites, 0 Comments

30$ Surveillance System With User Interface

pa110292.jpg
interface.jpg
Extremely cheap and very easy to do surveillance system. You don't have to be any kind of rocket scientist to do that. All of the required parts will probably found from your local hardware store. You will need only 2 angle bars, 2 servo motors, couple electronic components and one (old) web cam. And of course some softwares on your computer.

This instructable will show you how to build functional surveillance system.

requirements:

- 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!

Downloads

How To: Building the Frame

3d.jpg
kulmarauta.jpg
servos.jpg
p9270201.jpg
first at all, you have to buy 2 angle bars. These will cost about 2$ each. Then you have to drill all overall 3 holes for these angle bars. Holes diameter depends, that what is the diameter on your servo axis. Point is that should fit in the hole.

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!

How To: Servo Motor Control Board

circuit.jpg
new.png
p9290228.jpg
Next you are going to need control board for these servo motors. It is very easy to do and it contains only few components.

Components needed:

- 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.

Programming the Processor

I'm not going to show how to program the processor. I have to suppose that you are familiar with the AVR-programming. If you don't, then you have to go with the processor and c-code to your friend who can program the code in the processor.

The C-code is very simple and short. It contains only 60 lines of code

Downloads

Attach the Web Cam Board to the Frame

p9280213.jpg
Okey, now we have control board and the frame. Now it is time to open your web cam and attach the web cam board to the frame. It is easy to do with hot glue. You can safely remove connections to mic and the on/off button. We are not going to need these. You know what I mean when you open your web cam =)

Putting Rest of the Parts Together

pa100271.jpg
pa100265.jpg
pa100263.jpg
Okey, Now we are going to need case. My case is too big and it is also ugly as hell, so go and try to get some smaller and nicer case =)

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.

Ready for the Test

pa110292.jpg
After the tears, here it is! =) Now it is time to test our system.
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!

User Interface

interface.jpg
I programmed the user interface with the xhtml and PHP languages. It is complicant and hard to explain what everything does.

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/

Downloads