I am making a bike alarm for my bike. I haven't started yet. Basically, I'm thinking of a pin to be connected to the metal post (to which the bike is locked.) I want to detect if that connection (to the ground via the metal post) is broken. Is that possible?
-
1If there is another connection from there to the Arduino's ground, and if you have an internal or external pullup resistor on the pin, then yes it should be straightforward.Chris Stratton– Chris Stratton2015年03月06日 21:13:53 +00:00Commented Mar 6, 2015 at 21:13
-
I only want one 1 single wire from arduino to detect ground, not two/a loopZeeshan Ahmad– Zeeshan Ahmad2015年03月06日 22:08:42 +00:00Commented Mar 6, 2015 at 22:08
-
That's not going to work very well. You could try something with captive sensing but it is likely to be unusably sensitive to false alarms (wind, rain, other bikes in proximity, even current leakage via tires wet with road anti-icing brine, etc). The whole project is a bit impractical anyway - how will you protect against disconnecting the power source?Chris Stratton– Chris Stratton2015年03月06日 22:10:35 +00:00Commented Mar 6, 2015 at 22:10
-
Well I was considering the fact that the thief could connect the wires directly excluding the post so preventing an alarm at all. Do you have any suggestions?Zeeshan Ahmad– Zeeshan Ahmad2015年03月06日 22:18:07 +00:00Commented Mar 6, 2015 at 22:18
-
@ZeeshanAhmad do you use a chain, wire, or a bike lock to lock up your bike? If so, you could use the metal of the chain/wire/lock to form a circuit. If the circuit breaks (the thief cuts the chain or opens the lock), then we know to set off the alarm. Just a thoughtkrol– krol2015年03月06日 22:32:29 +00:00Commented Mar 6, 2015 at 22:32
1 Answer 1
How about fastening a wire to the post, and then the other end, on the bike, goes into a "jack" (the sort of thing you plug headphones into). With the wire inserted, it makes a connection, and the Arduino knows the wire is there. As the thief steals the bicycle the plug (or loose wire) is pulled from the jack, breaking the connection. i.e.
-
I will have to try this, and see how it goesZeeshan Ahmad– Zeeshan Ahmad2016年01月31日 13:53:43 +00:00Commented Jan 31, 2016 at 13:53