Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

surveillance camera

Status
Not open for further replies.

dexterdep

New Member
hi could someone help me/ discuss what components should be used like the camera shown in this link https://www.youtube.com/watch?v=9ONkNmZG_P4
also i have an idea of changing the camera into a hd one with night vision that can also transmit the pictures taken
to the smartphone and when the owner recieves the photos he can view the video by choosing (watch) nor (close)
 
Quite a difficult task. With commodity equipment you...

(1) Would need x86-64 software that can read a camera input stream and extrapolate motion from it. (programming experience required)
(2) Would need a hardware interface that said software can use to control generic electronics. (soldering experience required)
(3) Finally you need servos and the physical harness that can hold and point your camera.

The software would need to be highly customized so that it can give you a one of four, one of eight, or multy-directional output that the motion was determined to be heading into. I wouldn't expect commercial motion processing software to be able to do this out of the box. You would most likely need to find an open source solution and modify it for your task. Writing software is a discipline in and of it's self. This would be the hardest part IMO.

The actual hardware interface would be no problem, but the driver for it might. Though it could be easily done with the USB HID class and something like a PIC/AVR, free software library's already exist also. The serial/parallel port is also still a viable option despite it's age. Lots of ways to do this, not all straight forward makes this middle ground.

The servos could simply be standard RC servos. There are 101+ tutorials out there for driving them. Then you would just glue one onto the other, one would be for X and one for Y. RC servos have more than 180° range on average. This step is most likely the easiest part.

Basic over all system as I see it (rough draft)
The software would get camera video streams and compare the current frame to the last to calculate motion using the expected algorithm. It would figure which side/corner the motion was heading off of, or if it was moving out of range of the camera at all. It would provide this info to the hardware device via an USB HID input endpoint (device side) as an 8 bit number roughly dividing a full circle into 256 directions, with 0x00 being not leaving camera view. The hardware would take any number other than 0x00 and convert it into two magnitudes to be added to two different PWM delay lengths. These two lengths would be the 0-1ms pulse needed to position each servo. The electronic device would output this as a 5v signal on the control wire. With a certain number of 0x00's received, or for a certain amount of time, the servos could be turned off to save power. This can work because a RC servo will hold it's position against light loads without power do to gear friction. Finally, there would need to be a way to prevent the software from seeing it's own camera movement commands as false motion. This could be done in the motion software as a detection for full frame moment, or in the hardware as a simple delay before allowing movements again.

Final thoughts.
Other methods could be done if you don't like the above. If you have an IR/heat camera, the motion detection would be a lot easier I would imagine. You could also use some trick optics, acoustics, or other sensors to assist with your aiming. But that would more than likely be harder to pull off then the above. I would investigate the USB rocket launcher projects and auto paint ball turret projects, as they already have almost the exact same feedback loop as what you want to do. Only they don't re-position a camera, they move a toy foam projectile launcher or paint ball gun.
 
Last edited:
**broken link removed**
At the bottom of the page are the small tilt and pan servos.

Sensor.......the camera is a sensor.
http://mondo-technology.com/ there are two "video" pages. Here he is looking for movement on a fixed camera. It will not work with a moving camera but the idea is good.
 
can i use a pir sensor to detect and follow human movements?

Good idea, Not "easy" to DIY. Over the counter PIR sensors mainly only detect just the presence or absence of body heat + motion, and can't really resolve the direction or range of such. You *COULD* change the lens system to make it work as an up-down/left-right sensor, and use two for both the axes. But you need the right material for the lens and more importantly... the exact right shapes. The need for custom precision optics alone would probably kill the idea. And to top it off you would also need to change the electronics to support the new feature, it would now need to provide three states instead of just the two. All-in-all it would require a lot of "doing" that would be difficult IMHO.
 
Last edited:
Cool deal. It just might be a little easier to use PIR than I thought. I particularly like the second one. I might actually try and do something like that with some of the PIR sensors that I have. I have some servos and some raw PIR sensors I have been looking to use. Doesn't look too hard to do, one single lens and a radar like sweeping motion from a servo. You store the positions of the strongest signal as your target angle, no extra processing required. With that you won't even need to do any x86 programming to make that work, it would all be hardware. If I get into doing such things I will share the results with you to be sure.

Yeah, as I said, PIR can be made to work. Just keep in mind that although the first looks like a crappy home made project, and the second like it's really simple plug and play option, they were both likely designed and built by people with at least some experience in electrical engineering. And with all the hardware involved you can bet they will require some skills to reproduce.

If you insist on following in those peoples footsteps on your own, you're going to want to start by researching raw PIR sensors, how they work, how you interface to them, what can be used for lens material, etc, etc. After you know how to use them effectively, then you can figure a circuit that will move one and read it's output.

*HERE* are some PIR sensors that you can choose from if you want. The one you most likely want is the third one down. That one has the narrowest window which makes it the best candidate for a sweep-and-read style body heat direction finder. Do note that the signal coming from those sensors is usually quite weak, so you will probably need some kind of amplifier to make use of it. It may be worth while to get the IC's specifically designed to work with raw PIR elements, as this would give you a more μC friendly signal. Though if the output is just a 1 or 0 then you're going to have other serious problems with usability. A 1-10 level of IR power would be a more useful signal to deal with.

After you have a sensor, then you're going to need a lens. You're NOT going to want the normal PIR lens such as any of these. This is because those lenses are intended to widen the angle of detection area, and you specifically want a narrow beam of area detection. And as I said before... I honestly don't know if you are going to be able to find something like that easily. The Sensor in second project looks like he/she didn't even use a lens at all, just a filter. That CAN possibly work, but it would most likely reduce the range down to a few feet. Which would work in a small room... but so would a wide angle camera.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top