SparkFun Forums 

Where electronics enthusiasts find answers.

General project discussion / help
Did you make a robotic coffee pot which implements HTCPCP and decafs unauthorized users? Show it off here!
By pixelk
#169253
Hi,

I want to power a device only when my car was moving, here is what I thought of :

Image
(ignore the ADXL193, Fritzing didn't have Sparkfun's ADXL362 breakout board)

Could you tell me if there's any problem with this circuit ? I'm not very confident about the power/mosfet part.

When moving the (3.3V) Arduino will pull Pin 9 and 6 HIGH, then LOW if there's no movement for more than 10 minutes.
I use a LM7805 because I have it available and think the Arduino Mini Pro will be more than enough to power the LED, ADXL362 and MOSFET.
I know that due to the protection DIODE output voltage will be slightly less than 12V but that's not an Issue (it will be regulated to lower voltages).
By Mee_n_Mac
#169271
OK, I'll play the peevish design review chairman ...

It looks as if you're powering the 7805, ProMini and ADXL362 all the time. That has the potential to be a battery killer. How can you (can you?) mitigate this ?

If this is going into a Lexus w/uber soft ride, will it stay on when traveling down a long stretch of highway ? Might a better turn off criteria be thought of ?

The raw "battery" supply in a car can be quite noisy and "spikey". Do you need more filtering and/or some Transorbs ?
http://en.wikipedia.org/wiki/Transient- ... sion_diode

Why not use the onboard regulator of the ProMini ? (saves a regulator)

Is a 'low side' switch appropriate for auto use ? Why not a 'high side' switch and let the device use chassis for the return ? (saves a wire)
By pixelk
#169273
Thank you for your answers.

I've done tests without the MOSFET and it draws less than 10mA, I tried the LowPower library but it broke my timing code (it dropped the current needs to 4mA) so it was a no-go so far. Compared to the humongous power reserve in my Car battery it really isn't a concern. The ADXL is very low power to start with, but there's room for improvement. I also read about Rocket Scream low power pro minis and it may help to squeeze a few more mA. I also tried to put the arduino to sleep and only wake it up using the ADXL362 interrup, but didn't really found the sweet spot I was looking for. I first want to have a proof of concept before trying to optimize it, but I already searched that topic.

I want to power to output while moving, especially during long rides ever straight soft ones. I did many test drives and tuned my code accordingly. I have a satisfactory sketch right now (it works as intended, even if a bit hackish), but there's room for improvement (that's partially why I left the processing on the arduino instead of offloading this par to the accelerometer)

I thought the LM7805+Caps were enough to provide a safe power source to the Arduino, I really lack knowledge in the power department, I'll try to document myself on this topic, but there's a lot I don't know.

The on-board regulator of the pro mini is rated 12V tops, and a car battery can exceed this easily. using a LM7805 permits to lower the voltage to a much bearable 5V first. I prefer to heat the LM7805 than the arduino board :)

The wires already run into my car where I want them, so I didn't even try to me a wire.


Again, thank you for your answers and questions, it points me in a few directions I didn't thought about.
By jremington
#169275
7805 regulators are easily and often fried by the spikes in an automotive electrical system. Spikes and surges of > 125 V have been noted. I've attached a schematic for a spike and noise protection circuit that I've used -- the 1.5kE18 diode is a 1.5 kW surge suppressor Zener and costs only about $0.25 at Mouser.
Automotive_Filter.png
You do not have the required permissions to view the files attached to this post.
By pixelk
#169302
Woaw, thank you so much for telling me about this, I must be really lucky not to have fried anything during my test runs.
I'm getting a few of those zeners right now.
I didn't even know about this kind of transient voltage suppressors so far. That's the pitfall of only mucking around in regulated voltage world, the real world can be dangerous :)