Started By
Message

re: To catch a thief....

Posted on 6/12/23 at 8:07 am to
Posted by andouille
A table near a waiter.
Member since Dec 2004
10748 posts
Posted on 6/12/23 at 8:07 am to
We had this same problem many years ago, if you left your flag up for outgoing mail, this jerk would steal it. Our solution was simple, rig an air horn and put the flag up, it turned out to be the newspaper delivery guy. It sure got everyone's attention.
Posted by Lonnie Utah
Utah!
Member since Jul 2012
24131 posts
Posted on 6/12/23 at 8:26 am to
quote:

rig an air horn


Excellent idea. Since I'll be powering things on a 12v battery, a 12v car alarm siren and a bunch of super bright flashing LED's should do the trick...

A combination of somethign like

This

and

This

Harmless, but I'm sure it would the thief would crap his pants when it went off and he'd never come back...
This post was edited on 6/12/23 at 8:50 am
Posted by Lonnie Utah
Utah!
Member since Jul 2012
24131 posts
Posted on 6/20/23 at 11:20 am to
I'm still working this project out in my head. Been trying to figure out how to trigger the "trap". I've looked at all kinds of switches, roller switches, magnetic switches, tilt switches, physical push button switches, etc. The main problem with those is they all use a physical connection to trigger the switch. Really, I just want any kind of motion. Then it occurred to me, I have several of the Gy-521 gyroscope units that we used to build the rocket altimeter. Why couldn't I use one of them as a trigger as opposed to a switch? Turns out, it's easy. This is going to be the solution.
Posted by Daisytiger
Member since Jun 2023
14 posts
Posted on 6/21/23 at 6:28 am to
Me too ??
Posted by Jax-Tiger
Port Saint Lucie, FL
Member since Jan 2005
24836 posts
Posted on 6/21/23 at 11:04 am to
quote:

Something like a camera flash and a speaker that would play the old AOL "You've got mail!" sound file.


I'd go with, "Smile! You're on Candid Camera!".
Posted by Lonnie Utah
Utah!
Member since Jul 2012
24131 posts
Posted on 6/21/23 at 2:30 pm to
quote:

I'd go with, "Smile! You're on Candid Camera!".



I think I'll go with This one...

I think the only thing I'm missing to make all of this work is an "ultra bright" waterproof 12v LED or led strips to flash on and off.

I'm thinking an Arduino/Esp8266/nodeMCU of some form or fashion with a photoresistor to regulate when the "trap" is active and the gyroscope module to spring the trap. The actual "trap" will be, Flashing white LED's around the stone mailbox enclosure, the above sound file playing, and then after a 1 second delay the 12v car alarm triggering. The LED's and alarm siren will be connected to a relay that provides power directly from the 12v battery that powers the Arduino (that allows me to push more current thru the devices). After 1 min, the trap would reset.

I'll try to work up a schematic in the next few days...
This post was edited on 6/21/23 at 2:46 pm
Posted by Lonnie Utah
Utah!
Member since Jul 2012
24131 posts
Posted on 6/22/23 at 3:13 pm to
Amazon just made it's first of several parts delivery. The 12v siren is LOUD! It scared our poor dog to death.
This post was edited on 6/22/23 at 3:14 pm
Posted by Lonnie Utah
Utah!
Member since Jul 2012
24131 posts
Posted on 6/23/23 at 10:59 am to
Well, while I once upon a time got Home assistant running and abandoned it because I could do everything I needed to thru other home automation platforms, I might set it up again for this project. I discovered that my reolink NVR will interface with HA. That includes making PTZ cameras go to a set monitoring point. If I can get a node MCU to connect from the mailbox, then there's no reason I couldn't use it to trigger HA panning to and zooming in on the mailbox.

But that makes the project a couple of orders of magnitude more difficult....

On the plus side of things, I thought I was going to have to buy a voltage regulator to step down from 12v to 5v for the Arduino or node-mcu. Found out last night that both have onboard voltage regulators and I can power them directly off the 12v battery...

This is the style battery I'm using (except mine's 8ah...)
This post was edited on 6/23/23 at 11:10 am
Posted by Lonnie Utah
Utah!
Member since Jul 2012
24131 posts
Posted on 6/24/23 at 10:33 am to
Progress. I've got the "trigger the siren and flash the LED light strips for 30 seconds" part of the code working. Right now I'm triggering them with a push button. The two digital pins (D4 and D5) on the arduino I'm using aren't communicating with anything. Since they're the main ports for I2C communication, I'm kind of stuck until my new boards come in later today.

Here's the rats nets of wires on the prototype so far....



Eta: the leds on the relay module are on when the trigger is tripped. So you can tell its active in this photo.
This post was edited on 6/24/23 at 10:38 am
Posted by slacker130
Your mom
Member since Jul 2010
8068 posts
Posted on 6/25/23 at 7:28 am to
Dang, Mark Rober JV squad up in here.

I'm impressed.
Posted by Lonnie Utah
Utah!
Member since Jul 2012
24131 posts
Posted on 6/25/23 at 6:48 pm to
So Dumbo here has been struggling to get the gyroscope (gy521) to connect the microcontroller. Well it connects to ANALOG pins 4&5, not DIGITAL pins 4&5. As soon as I got that corrected, DATA!

Then I accidently reversed VCC and ground and fried it.
Posted by KCRoyalBlue
Member since Nov 2020
990 posts
Posted on 6/26/23 at 8:00 pm to
How about a fake package or allowing him to take something with little value? But, in exchange, you could use the opportunity to figure out his identity. Hidden camera near box, etc. Some method to extract info.

Then when you have the perp identified, let him try it again the following week or whenever. This time he's greeted with a big, bright light. Get his picture and let him hear a recorded message, such as....

"Thanks for shopping, er stealing, Mr. John Smith. The authorities will be waiting at your home located at 1234 Anytown St. Enjoy your prison stay."

Then don't send a cop over for about 2 weeks. Make him sweat.
Let him think the coast is clear. Then bam.
Posted by Lonnie Utah
Utah!
Member since Jul 2012
24131 posts
Posted on 6/27/23 at 7:08 am to
I spent about 20-30 mins coding last night before our family started an epic game of RISK. Was able to get the Gyroscope to turn off/on a LED with a large enough change in the orientation of the X axis. So that's (slow) progress. It should now be easy enough to blend the three sketches together to make them work. That will leave me building a couple of water tight enclosers and we're ready to beta test and deploy...

FWIW, I haven't seriously coded anything since I learned basic (and a few other languages) programming back in the 1980's. And I've never really done it with hardware integration. So this has been a learning experience for me. But it's not awful and I'm figuring it out....
This post was edited on 6/27/23 at 7:09 am
Posted by jevins_slickin
Member since Nov 2018
1137 posts
Posted on 6/27/23 at 3:41 pm to
Awesome thread! Keep us updated, im interested in doing something like this as well
Posted by Lonnie Utah
Utah!
Member since Jul 2012
24131 posts
Posted on 6/29/23 at 5:58 pm to
Work's been busy so I haven't had a ton of time to work on coding. However, I took half an hour this PM to work on things. I successfully have the photosensor = low and gyroscope movement = high part of the code working. However, in my moving around of { } during IF / Else statements, the trigger pin D2 for the siren stopped working. It should be easy to resolve, but the kid has youth group tonight (swimming party) and taking the electronics isn't a good combo. The revelation here was figuring our multiple condition IF statements (&& = and / || = or )

That almost takes care of the coding side of things. All that's left is working out the kinks in the above code and figuring out a "reset everything for 5-10 mins after being triggered" sub routine. After that it's "final" build and deploy. Hopefully, with the long weekend and can get all of that resolved.
This post was edited on 6/30/23 at 7:12 am
Posted by Lonnie Utah
Utah!
Member since Jul 2012
24131 posts
Posted on 6/30/23 at 7:13 am to
quote:

the trigger pin D2 for the siren stopped working.


Resolved. It was way simpler that I thought it would be. The original code had the SirenPin as Digital Pin 5, and I had it wired as Digital Pin 2. I updated the code to D2 and it works like a charm.
Posted by Lonnie Utah
Utah!
Member since Jul 2012
24131 posts
Posted on 6/30/23 at 12:12 pm to
quote:

All that's left is working out the kinks in the above code and figuring out a "reset everything for 5-10 mins after being triggered" sub routine.


Resolved with one line of code. All I had to do with insert

delay(300000);

into the part of the IF statement that returns the LED's/Siren to their non triggered state. Easy, peezy.

The code is now complete. All that's left is to build it and deploy.

ETA: I changed the pulldown resistor between the photoresistor and ground from a 1K ohm to 3.3K ohm. That decreased sensitivity of the photoresistor and made it have to be much darker to activate the gyro trigger. The gyro trigger is actually pretty sensitive. I have it set to just about it maximum deflection before it activates and it still triggers with ease.
This post was edited on 6/30/23 at 12:17 pm
Posted by Hopeful Doc
Member since Sep 2010
15039 posts
Posted on 6/30/23 at 12:18 pm to
I am very much looking forward to the outcome here.
Posted by Lonnie Utah
Utah!
Member since Jul 2012
24131 posts
Posted on 6/30/23 at 12:59 pm to
quote:

I am very much looking forward to the outcome here.


Murphy's law states that once you put in this amount of time $$$ and work, the dude will never show up again.

Here's a rough schematic...



Eta: There is an error in the schematic. The photoresistor is connected to 19 (pin A0) not 18 (Aref). But it's not worth changing.

eta2: Nevermind. I fixed it.
This post was edited on 6/30/23 at 1:07 pm
Posted by Lonnie Utah
Utah!
Member since Jul 2012
24131 posts
Posted on 7/5/23 at 9:47 am to
Just when I thought I was ready to roll this out, I've run into a few snags putting things into final form. Nothing that will derail the project, but I won't get things out as fast as I would like. I'll keep the board updated.
first pageprev pagePage 2 of 3Next pagelast page

Back to top
logoFollow TigerDroppings for LSU Football News
Follow us on Twitter, Facebook and Instagram to get the latest updates on LSU Football and Recruiting.

FacebookTwitterInstagram