6
\$\begingroup\$

I am looking for a motion sensor device that can track person/animal walking by it and record time/date of the event(s). It needs to be able to run on a small battery or two (maybe 2 AA's or a 9 volt). It does not have to have a screen, just an input connection for a screen to hook up to in order to read the information and set the device.

Total cost would be only like $10 to $15. My initial research on the internet points me to look at a pyroelectric infrared sensor or some kind of passive infrared sensor.

Is it possible?

\$\endgroup\$
  • \$\begingroup\$ Tom, when I read your question it seems that you are looking more for a location sensor, like GPS, so you can track the location of an object/animal/person. Is this correct, or do you just want to time stamp motion. \$\endgroup\$ – Kortuk Nov 17 '09 at 9:22
  • \$\begingroup\$ Duplicated with additional answers here: electronics.stackexchange.com/q/491/857 \$\endgroup\$ – Kevin Vermeer Jun 2 '11 at 12:42
6
\$\begingroup\$

I'm thinking a PIR sensor (available from many places - ebay $9.99 link Adafruit $10 + P&P link )

Together with a microprocessor with a serial interface e.g. ATTiny2313v $1.48 from mouser link. The ATTiny will run with no additional components, using an internal oscillator. You may need a bit more memory (RAM/Flash) than this but even an ATMega168 is not too expensive.

Use a SD card to store the data in (fast and non-volatile) - can be interfaced directly to ATTIny via SPI (need a SD card holder). No need to use FAT as the data can be read out by the controller into the serial interface.

Use the serial interface to plug your laptop into (bring a USB-TTL serial convertor).

So with enclosure and assorted connectors etc you will probably come in at about $20.

The PIR operates at 3.3v (you can bypass the 3.3v regulator to do this) and the ATTiny will work quite happily at that voltage.

Battery consumption is the only other issue here - PIR consumption is the one to worry about here - the microcontroller can run in full sleep mode (micro amps) almost all the time, waking the microcontroller up via an interrupt when the PIR detects something. The PIR is rated at 4.7mA when run from 12v. You can get rechargable AA cells with around 2000 mAH, or LiPoly cells - so these would last just over two weeks.

So all in all yes it is possible - but it may cost a few $ more than your budget.

\$\endgroup\$
  • 2
    \$\begingroup\$ Depending upon how much data you want to store, you may not need the SD card -- just store the data in the onboard EEPROM. As an example, if you store time as minutes since start, you can span 45+ days with a 2-byte time value. With 128 bytes of EEPROM, that's enough for 64 events. Once you're done, just plug the device into your ISP connector and dump the EEPROM. As for the enclosure, a simple Altoids tin works great, saving more money. \$\endgroup\$ – Craig Trader Nov 10 '09 at 18:48
4
\$\begingroup\$

It is above your $15 price limit, but you can pick up a can of SSScat! automated cat repellent at many pet centers (WalMart included) for around $25:

http://www.amazon.com/Premier-SSSCAT-Automated-Cat-Deterrent-Kit/dp/B0002XI7CI

The battery operated motion sensor can be removed from the canned air and connected to the microcontroller platform of your choice (either electrically, or mechanically using the built-in actuator).

One option would be a $20 AVR Butterfly running Butteruino so that it can be programmed via the Arduino platform. The Butterfly includes 512KB of flash memory, an LCD, pin-header serial output, a 5-way joystick, and watch crystal, so it makes a decent all-in-one data logger platform.

Total cost for that configuration would be about $45, but build time would be minimal as there is essentially no electronics integration to do.

\$\endgroup\$
2
\$\begingroup\$

This should be fairly simple to make with a microcontroller (maybe an arduino) and a premade motion sensor. Just interface them together and make the microcontroller save the time to the eeprom everytime motion is seen. Data could be uploaded with a computer through a serial connection.

Recording the direction might be possible with two sensors spaced some distance away from eachother (the person/animal is moving to the direction of the sensor that picked it up last) but this might not be too reliable, at least not if the sensors are overlapping.

A cheap and a simple solution would be to use a premade motion sensor and an old computer/laptop and connect the sensor to the parallel port or to the serial port and just log stuff with the computer, but it would not be battery powered.

I don't think making a motion sensor yourself is worth the hassle, premade modules are cheap and plentiful and should be easy to interface with.

\$\endgroup\$
1
\$\begingroup\$

Parallax sells a PIR motion sensor for $9.99 and it is simple to hook up. You just have +5V, GND and then a signal pin. If you use an Arduino (http://www.arduino.cc) you can just hook that pin to one of the digital pins. You can build your own Arduino for pretty cheap as well. You can use an SD card to log the data to; and that can be hooked up to the Arduino as well. There is a SD Card shield in the Maker store for $13.95 http://www.makershed.com/ProductDetails.asp?ProductCode=MKSEEED6&Click=37845

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy