Car GPS Locator

Hey All,

Working on a device to text message the location of my car every time the engine turns off.

My goal is to:

Detect when the car turns off, ping GPS, text location, power down. Upon starting of vehicle arduino wakes up and waits for next time the vehicle turns off.

The meat, pinging, texting, powering down, are solved for - I can't figure out how to determine what power source the arduino is being powered from.

I have a LiPo which presumably the arduino will run off of until it successfully sends the location. The question is - how to determine when 12V power goes off.

Secondly, I know how to wake up an arduino via signal pin, but how in this context? To only momentarily raise the pin high to wake the arduino - will the "high nature" of the pin effect the arduino while it runs?

If I use the 12V (stepped down) to wake the arduino, presumably it will be high until the car turns off. Is this optimal?

Looking to brainstorm a bit, so I appreciate your comments.

Thanks
Justin

is the fuse box accessible? I don't know about newer vehicles, but a lot of older cars have spare ports for constant power and "accessory" power (power only when the key is on). You could power the arduino from the constant power (stepped down), and use the accessory as your signal pin, most likely using a relay for the 12v and the 5v on the load side.

Conveniently my cigarette barrel plug turns off along with the ignition switch.

My main issue is being able to know when that goes off, to call the "gps ping/text" function.

I have a battery and the car power. When the car turns off, the battery will be powering the arduino until a successful message is sent - then the project will power down.

You're suggesting using a relay to drive the signal?

wire the cig lighter to the relay input side (maybe a solid state relay to stay silent....) and run 5v from the arduino to the load side pin 1, to an input/signal pin from the relay load pin 2.

Perhaps use a counter, such as found in the button tutorial, then it will only detect the state change, and when it gets to two (engine off), bingo.

To detect when the 12V power is on or off, use a ~3:1 voltage divider (22K:10K) from the lighter adapter to an analog input, and measure the voltage.

@jremington - you're perfectly correct.

I think I was overcomplicating the problem!

Have a great weekend!

The relay is safer, as the transients aren't passed to the arduino. If you do use a voltage divider, be sure to put protection on that input. Seems like I've seen TVS or zeners, caps and series resistors, but you should search around for what others have done in automotive circuits like this.

Cheers,
/dev

Be aware of the fact that not all cars turn off the cigarette aux power when you turn the key off. Most do these days, but not all of them (and especially in older cars). Definitely a good idea in any automotive (those things are NOISY electrically) environment to use some signal conditioning to decouple the inputs to your computer from the noise. Typically that is an resistor network as suggested to drop the voltage (I would also like a 4.7v zener as a clamp too, but that is just my thought) and then a capacitor- say 1 ufd or so from the input to ground. That helps take off noise on the sense line from the socket and you don't care with that circuit if it is delayed by part of a second or not. You will also need to consider just how you are going to switch the power off on your Arduino so that it can power itself down when done sending (make sure you wait long enough after "sending" for the buffers etc. to clear before shutting it down).

Just stumbled upon this oooollllddd post of mine and thought it would be fun to show where the project ended up: https://mycarlocator.info/

Cheers!

itswagg:
Just stumbled upon this oooollllddd post of mine and thought it would be fun to show where the project ended up: https://mycarlocator.info/

Cheers!

Sorry my virus checker advises me not to go there...
Tom.. :slight_smile:

TomGeorge:
Sorry my virus checker advises me not to go there...
Tom.. :slight_smile:

Mine too.

investigate APRS. a ham radio system for vehicle tracking, among other things.

you need a license. it's a 35 question test. 7 year old girls pass it so often it's no longer noteworthy

All in one one APRS unit, just add a Baofeng. $71.34

I set the APRS on my baja bug to transmit when I applied the brakes. that way it only ties up the system when I change directions or stop.

APRS in ABQ.

you can set the system up to send a username and put the government mandated call sign ID in the data stream, as an anti stalker measure. you can have multiple usernames, so Geek-150 for the F 150, Geek Raspewtin for the baja bug, Geek 90 for the Trail Cub...

view it on any device with internet access and a browser that does graphics.

srnet:
Mine too.

Really? Can I ask what browser/antivirus? I'm interested to look into why. Thanks.

Chrome opened the site up ok for me.

itswagg:
Really? Can I ask what browser/antivirus? I'm interested to look into why. Thanks.

Firefox\McafeeWebAdvisor

Chrome\McafeeWebAdvisor

Huh. Thanks for the info. I've looked in McAfee and it is flagged as malicious but no reason given. Will continue to try to solve the issue. Thanks again for the help and have a great day!