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.
Many ways to do this BUT easiest for a beginner is probably a relay.
Complexity can be added as required :-).
You can also put airpump where relay coils is on diagram and drive it directly. See below for a good FET to use.
Output voltage from PIR is not known - you will need to advise this BUT this will almost certainly work.
MOSFET (shown as a IRF511 but see below) is an electronic switch that converts the PIR voltage output to a higher power level.
This is shown as 12V but relay can be any DC voltage that suits. Usually 5V or 6V or 12V are common.
The relay contacts act as a switch - connect them across where the switch is at present.
The STP62NS04Z MODFET is available at Digikey for 43 cents in 1's in stock.
If used in the circuit below it could be used to switch the airpump directly.
It is rated at 60Aand 33V so should probably be OK. That is a FAR higer current than the pump takes when running but fun things can occur at startup. MOSFET datasheet here
For a less painful ride you should advise
Airpump Voltage and power or current.
PIR output voltage and whether high on detect a(as assumed here) or low on detect or ...
Data sheet links for above would be a REALLY good idea.
Relay contact ratings have to match air-pump requirement.
If PIR output goes low on detect circuit would need to be very slightly more complex.
1N4001 diode MAY need uprating depending on pump current drain - which you are going to find out and tell us :-).
As above - pump motor COULD go where relay coils is and no relay is then needed. This does mean that PIR may be destroyed if things go wrong. Discuss.
Best Answer
The latest craze, since they are legal most everywhere, is ultra-sound animal repellents. If it hurt your ears, imagine what a dog or cat feels. Farmers and those with a lot of land can legally buy pain field generators, much like the military uses.
It is 100 to 2,000 watts of ultrasonic waves. They are triggered by motion or sound and MUST shut off after a few seconds. The local police can intervene if it runs non-stop and the neighbors complain. The sound can travel 300 yards even in residential areas, and can be heard through glass windows.
Some offer options like a 'bark' detector for noisy dogs, and bright flashing LED's that cats hate.