First off got to say, I love the Arduino. I used to program PIC chips and the Arduino just makes sense. (both the coding environment and the hardware setup) I can see it being used for so many applications. The support for the Arduino and like boards are amazing.
I'm working on a little project that has to have my Arduino run off my car battery. Right now I am running my project off a 9 volt battery for my motor driving board and usb power for the arduino. I don't have a car pc :P so I'll have to change the setup. Initially I thought I would need two lines of power going to motor driving board and arduino. But when I move the jumper on the arduino I can hook Vin up to the motor driving board so it gets it power from the arduino.
I don't know much about car wiring other than hooking up speakers (2 simply wires hehe). I know car batteries are rated at 12 volts and are a bit more in actuality, 12.6v I think. Doesn't the voltage fluctuate when you drive though?
Am I going to need some type of 12 volt regulator that goes between my car battery and my arduino. I don't want to fry my arduino board or blow fuses in my car.
Thanks in advanced.
The voltage fluctuates a lot, especially when using the AC or driving hard. I have an in car application and use both a slow blow fuse and a 12V voltage regulator. The cheapo one I got at radioshack works just fine.
Hey, Thanks for the response.
Are you talking about this part? http://www.radioshack.com/product/index.jsp?productId=2062600&cp=&sr=1&origkw=regulator&kw=regulator&parentPage=search
Do you have to replace all the fuses with slow burn fuses. I would like to avoid replacing any fuses if possible.
would something like this work http://www.uoguelph.ca/~antoon/circ/car912.htm
Wow, kewl question. I've been looking to do this with one of my projects. Are there any schematics for this type of circuit?
I was thinking of picking up a 40VDC to 5VDC/9VDC voltage regulator. Something like a 7812 or something but with different in and out voltages.
Been browsing Mouser but haven't found anything yet.
Anyway, can't wait to see what comes out of this.
Oh and this might help a bit as far as what wires to tap into. Found this while doing some initial research on the project. http://www.commandocaralarms.com/wiringsearch.asp
I just realized it was my old motors that need more than 5 volts to run. 6+ volts I think thats why I used a 9 volt battery for my motor driving board... but now since I am using a small dc motor (not sure the specs on it but it runs fine at 5 volts. I can use the regulated 5 volts from the arduino to power my motor driver board.
Now i read with regulators it needs to be +2v higher than the regulated voltage. So my question is, does the arduino need +7v input to have it have 5v regulated. (I think the USB runs at 5 volts so I think anything above => 5 volts would work for arduino. which brings me to my next question.
I have a 2003 Nissan Altima this project is going into, isn't there +5v regulated all over the car I can splice into? Thanks.
I guess instead of tapping the wiring system I can get a Cig Lighter Adapter
I found this http://cgi.ebay.com/Universal-Auto-Car-Power-Adapter-Adaptor-Charger-1-5-12_W0QQitemZ170208617514QQihZ007QQcategoryZ60208QQssPageNameZWDVWQQrdZ1QQcmdZViewItem
Universal Auto Car Power Adapter Adaptor Charger 1.5-12 (I would run it to the arduino at 6 or 7.5 volts. It says only 800mA is that enough I don’t really understand whats required for the arduino amp wise.
Yeah the car adapter would work great. Issue is I'm looking for a more permanent setup for car alarm and tracking purposes. Own an IT company and need to ensure the vans are protected and trackable (got to know where those techs are).
The circuit you found at http://www.uoguelph.ca/~antoon/circ/car912.htm looks really good. I need to research that IC to find out what the max voltage in can be. I actually have a radar detector in my Honda that displays vehicle voltage when not alerting me of police. It reads anywhere from 12.3VDC up to 15.1VDC while driving and breaking. Interesting thing is the voltage rises when I break (while in park-automatic trans). Thought that was interesting.
Anyway, you would think that there would be 5V lines running around all over the car. Especially newer vehicles. I don't know much about all that though and have actually never found a line running regulated through the car.
I do have an old phone charger laying around. I'll grab it later today and open it up. Like to see what they have placed inside of it. Its a generic Razr charger so it contain standard parts. I'll see if I can snap a photo of it. Maybe deconstructing it would provide a possible solution.
As far as the car charger running at 800ma...That should be plenty. I read that the USB port supplies 500ma so if you're not running motors you should be fine. I would like to supply 1A to the arduino board though in my design. I'm kinda new to circuits so I could be wrong but I figure in initial build, the more amp (under max specs of course) the better. Course I could be completely wrong and blow out something crossing fingers.
I just made it so I run the power of the motor drive board off the arduino +5v regulated. I am still hooked up to USB so it has to be this way, once I get that car adapter regulator i'll be running the ardunio at +6v setting I think. even though there are options up to +12v (As I read in the other thread you linked to the less input voltage = less heat dissipation.
I am running a small DC motor from a cd rom drive I butchered. I don't know how many amps it draws under load but it should be less than 800ma I hope.
One last thing thats a bit weird and not quite related to the topic but has to do with power issues...
My motor drive board has a place for two + and - leads to dc motors and a place to hook it up to a battery + and -. The PWM cable right now that is Power, Signal, Ground are hooked up except the power line to the arduino. As long as I power the board from the arduino to the motor drive boards through the motor drive board's batteries terminals + and - I don't need to hook up the power end of the PWM cable to the arduino. (I just need signal, and ground)
This is very weird because when I hook up the Power end up the PWM cable to the arduino from the motor drive board and get rid of the connections to the battery terminals the motor drive board does blink however it won't power the motor. Basically I was trying to cut down from 5 wires (dc motor + and -, PWM Power, Signal, and Ground) to 3 wires (PWM Power, Signal, and Ground).
I hope this makes sense. I am just curious to why when I have a 3 wire setup the motors dont turn but the led indicator on the motor driver board lights up.
I think I get what you're saying. I'm not totally familiar with driving motors through Arduino. I have only played with a servo when I first started with a Basic Stamp 2. I'm guessing here, but it sounds like you are not getting enough volts/amps to run the motor.
If I understood you correctly, you are saying that it works if you hook up the battery connections on your motor board but it does not work if you are getting power via the Arduino. Did I get that right?
What motor board are you running out of curiosity? Is this the shield I've seen before? What are you currently powering the Arduino and the motor board with in both setups?
Motor board is http://www.lynxmotion.com/Product.aspx?productID=90&CategoryID=10 and here is the datasheet on it. http://www.lynxmotion.com/images/data/hb-03.pdf
It was expensive when I bought it $50 bucks in 2004 but hey it works.
The way its setup right now that works.. USB powers the board. I hook up a +5v from the arduino and Ground from the arduino to the motor driving board power terminal as well as a signal and ground from the arduino to the PWM cable of the motor driving board. Then my motor is hooked up to the motor driving board.
I checked out the links you attached. I think I understand a part of it, however, I don't know what chips are being used between Arduino and your motor(s). I'm wondering if the chip in between is creating the PWM when hooked up the way you describe works.
A few thoughts if I may...
1) When you hook the Arduino up in the non-working config, are you using PWM ports from the Arduino to your motor?
2) Are you using the chips on board? From what I see from the schematic, there are three inputs for two motors which were designed for RF comm. Ar you connecting the Arduino to the RF ports or something else?
3) Do you need the motor board in the first place? Are there one/two PWM pins on the Arduino to drive the motor(s)?
4) I'm thinking that when you hook the power up in the non-working config, the power is going the wrong way in your circuit (just a guess).
5) I guess I need a bit more info. If I'm wrong on the above, what pin is connect to what motor controller lead for PWM in your working setup? Non-working setup?
I'm actually using a digital pin to send a pulse to the motor boards by setting it high for 20 milli and setting it low for 1... Setting it low for 2 spins it the oppisite direction. 1.5 is off but when I don't want the motor to run I don't set a pulse at all. Because this is a small motor I haven't tried hooking it up to the arduino directly. The digital pins are only good for 80ma. I think you need some kind of h-bridge or motor driving chip to drive any dc motor.