Remote Camera Motion Trigger

Thread Starter

luv2code

Joined Jun 16, 2008
24
I have an X10 camera and receiver, and I'd like to build a small box with motion sensor that turns the camera on when someone approaches my front porch. I'd also like the project to send a signal back to my computer to indicate the camera is on.

When the computer receives the signal, it starts up the video player showing the video capture from the X10 receiver.

I thought I would have the project turn the camera off and on because I don't have a good power source on the front porch, and I want to build it in such a way that it uses very little current in "stand-by".

I found this sensor. It's cheap and runs on 3.3 and 5v. It draws very little power.

The x10 camera runs on 12v and draws 200ma.

At first, I thought I would use an arduino. I have one laying around that I toy with every so often, and it's easy to program. But then I considered how to get the "camera on" message back to the computer inside the house. I did some research, and found the cheapest wireless solution to be a pair of Xbee modules. One for the sensor/camera project, and one connected to the host PC.

After studying the Xbee, I came to realize I could cut the arduino out completely, and have the computer itself send the signal to turn the camera on via the Xbee.

Here is my current plan:
Connect the motion sensor to the Xbee. The host computer will receive the sensor input via the xbee network. Then it will send a signal to the remote xbee. That will feed some sort of transistor switch that will allow the 12v current to pass and power the camera.

My X10 camera came witha battery pack that takes 4 AAs. The pack has circuitry inside that increases the voltage to 12v. I was hoping to use the battery pack to power the entire project.

So, I think I can connect a LDO VR that takes ~5v (from the 4 NIMH AAs) and lowers it to 3.3v to power the sensor xbee circuit. Then I can connect one of the output pins of the xbee to a darlington transistor array that has a base voltage of 3.3v and a collector/emitter voltage of 12v. When I send the signal from the pc through the xbee network, it will saturate the darlington array, and turn the camera on.

Things I have to buy:

  • 3.3v USB TTL cable for connecting the computer to the xbee (I have a 5v one for the arduino, it won't work will it?)
  • a ~5v in / 3.3v out voltage regulator. 50ma current draw. (like this one).
  • And a set of diodes and capacitors to smooth things out for the regulator?
  • A darlington transistor array with a 3.3v base-emitter voltage, and 12v collector-emitter voltage. It must handle over 200 ma. ( looked on mouser, but this is the closest I could find, will it work?)
  • two xbee modules.

Do I understand things correctly? Is there anything I should do differently?

If this works out well, I want to use the same design for other things around the house.

I don't have much experience at all with electronics or circuits. I really appreciate any help you offer.
 

Wendy

Joined Mar 24, 2008
23,415
I don't have time to get on this at the moment, but there is a really simple circuit called an integrator that, when used with the video itself, will show sudden changes that can be used to do what you want. In other words, the camera is the motion sensor. Slow gradual changes are ignored. Is this close to what your after?

It will require some electronic assembly though, but I wouldn't be a bit suprised if it isn't sold comercially (don't know where though).
 

Thread Starter

luv2code

Joined Jun 16, 2008
24
I'm not opposed to electronic assembly.

What you describe might be useful. I want the project to be battery powered. Leaving the camera on all the time to act as a motion sensor would not make this feasible, would it?

Also, the solution you suggest would only eliminate the need for the $10 motion sensor part.

I would still need some way to send a signal back to the PC in order to let the user know someone was at the door.
 

Wendy

Joined Mar 24, 2008
23,415
I owe you an apology, I figured this would be easier than it is. Personally I would not hesitate to try wireing one from scratch, but I don't think you'd want to go through the heartburn. If you want I could try to draw something up, but it always requires debugging and tweaking after something like this is built, which I suspect you don't want to mess with.

Using the search words "video motion sensor circuit" on Google this is what I came up with...

Commercial device ... http://www.surveillance-spy-cameras.com/motion-sensor.htm
Commercial device ... http://www.mjelectronics.com/pages/specials/vidmotion.html
Do It Yourself ... http://www.youritronics.com/video-based-motion-sensor/

Like I said, I can draw what I think will work, but I won't be able to build it for a long time, I have too many irons in the fire as is.

How deep are you thinking of going. The basics of the video motion detection are pretty simple and translates easily enough to circuit design, which is why I saiid what did. What triggers your VCR, a set of contacts?
 
Last edited:

Thread Starter

luv2code

Joined Jun 16, 2008
24
I see where you're going, and that I need to make some clarifications.

1) I'm poor, so I am trying to make use of components I have laying around the house, which include:
a) a wireless X10 camera and receiver (the receiver has composite out.)
b) a video capture dongle and old laptop.
c) an arduino micro controller (AVR Atmega128 based) that I built from a kit.
d) various tin and wooden boxes and enclosures.
2) I like building things.
3) It's my intention to learn electronics
a) I've read the first 3 volumes on this website -- great books. still working on the others.
b) The arduino kit was my first project.
4) My long range goal is a low-cost DIY home automation system.

Building a video-based-motion sensor seems inappropriate because:
1) it's beyond my skill level
2) it's more expensive (more parts to buy).
3) it would require running power to the front porch, or a frequent change of batteries because the camera must remain on all the time.
4) how do I bring the picture up on the computer and play a tone when it detects movement?

The purpose of the project is to have a laptop sitting on the island in the kitchen that will beep and bring a video window up showing the front porch whenever someone approaches.

The video-motion-sensor only solves one of the problems, and introduces a new one -- how to run power to the front porch.

I think maybe I should attempt my own circuit diagram and post it. And then maybe you can give a critique? I'll do it later tonight when I'm off work.
 

Wendy

Joined Mar 24, 2008
23,415
Tell you what, I'll draw one up, I think you'll be pleasantly suprised how simple the concept is. Maybe some of the other guys will keep me honest, and you don't have to build it, just look at it and remember it for future reference. I'm pulling a lot of this from Popular Electronics articles I saw 20 years ago. I seem to be the local draftsman around here, with a little more training I could try the circuit simulators I see other people using (they are basically free or low cost), I highly recommend them even if I can't use them myself.
 

roddefig

Joined Apr 29, 2008
149
Hello. Neat looking project!

First observation is that you're missing a MAX232 or similar to do the level-shifting on your serial port.

Second, why not use a MOSFET to do the digital switching? I'm not saying there's anything wrong with a darlington array, but I thought it would be more straight-forward to use a FET.
 

Thread Starter

luv2code

Joined Jun 16, 2008
24
A MOSFET is just a normal transistor? Like an NPN? I wasn't sure what component to use there. It seemed like a normal application for a transistor but I didn't know if they made them with large voltage differences. I didn't get around to making a diagram because I got really sick. I'll make one this weekend.
 

Wendy

Joined Mar 24, 2008
23,415
MOSFets are transistors, but they are a different animal than BJT's such as a 2N2222. They are a voltage device as opposed to current, and tend to act more like real switches, with lower turn on resistances.
 

Thread Starter

luv2code

Joined Jun 16, 2008
24
I read up on MOSFETs on wikipedia, and I think I understand.

In my project, the Vgs is 5v if I use the arduino because it has a 5v TTL logic signal. The Vds is 12v because that's what the camera takes.

I looked on digikey for a mosfet, and this is the closest one I could find.

  • Drain to Source Voltage (Vdss)
    • 12V
  • Current - Continuous Drain (Id) @ 25° C
    • 84A
  • Rds On (Max) @ Id, Vgs @ 25° C8.5 mOhms @ 15A,
    • 4.5V
But the other numbers look way way off. In particular, the continuous drain is 84A. I don't know exactly what that means; but I don't like what I am implying from it.

Am I doing something wrong?
 

Wendy

Joined Mar 24, 2008
23,415
You've hit me in a weak spot, I'm not totally checked out on MOSFets. I believe they take around 8 volts on the gate to turn totally on, and they have increadibly low resistance when their on. Could you draw a sketch as to what you're trying and post it? I'll do my best, with a little help from my friends.
 

Thread Starter

luv2code

Joined Jun 16, 2008
24


this is the remote assembly.

The assembly in the kitchen is pretty simple. A computer with an video capture card being fed by the X10's receiver. Also, a FTDI USB-TTL cable hooked up to an Xbee board connected to the computer.

When someone approaches the porch, the Arduino detects motion. It saturates the MOSFET, powering up the camera, and sends a signal back to the computer via the XBee network. The computer then launches the video application and plays a doorbell sound.

My wife turns to the computer and she can instantly see who it is and whether or not she needs to stop what she's doing and go answer the door.

In the future, I would like to add intercom capability so she can have a chat with the person (i.e. "I'll be right there" or "GO AWAY!")
 

Attachments

Top