Controlling car systems with arduino

Hello everyone,

First of all I am a newbie, so please bear with me. I had some questions regarding arduino, and some general questions.

I plan to make arduino the brains of a really old and simple car and have it control circuits such as lights, a central locking system, side mirror movement and heating, etc etc. I know these circuits usually take a lot of amps to run but I plan to bring down the amps usage as much as I can on the car. (led's for all lights, solid state relays and newer parts, etc).

So, thinking that I should get a board which can handle a lot of circuits, I bought an arduino mega 2560 a few weeks ago and have been toying with it ever since. For now I used this time mostly to see how I can program arduino and managed to create several circuits and systems for it; its really damn fun :smiley:

But I still need clarifications on several items:

  1. How many circuits or low voltage circuits using static relays can my arduino handle at the same time? I understand the usual for boards is 40 mA / pin or 200 mA total but considering an LED is 20 mA, does that mean the arduino cannot handle more than 10 LED's or 4 relays (that handle 4 circuits simultaneously)? I read that for the mega, the total amp output is 400 mA (~8 relays) but still, that would not be enough as a car has many more circuits.

  2. Would arduino be enough to power all the circuitry in the car using the car battery as power supply or do I need to use relays for all of these circuits, and simply use arduino to switch them?

  3. Is it recommended to have the arduino connected to the car battery full time and use sleep mode when the car is not in use, or would that slowly kill the car battery in time?

  4. Is it possible to verify that a circuit has been completed? For example, say I provide power to Pin 13, is there a way to verify if that circuit is complete and the LED is on or, if not, let the user know by powering another "warning" LED?

Thank you :slight_smile:

  1. How many circuits or low voltage circuits using static relays can my arduino handle at the same time

There are only 2 data pins you can't normally use and those are the Serial RX and TX connection to the Arduino

You can use all other Analog and Digital lines to control things.

To all intents and purposes, you should be able to switch them on so that it appears they are all turning on and off at the same time.
There would be very small time differences between each pin if you use individual commands to each pin, but as the processor runs at 16 million cycles per second, you are unlikely to see this when controlling relays etc

Would arduino be enough to power all the circuitry in the car using the car battery as power supply or do I need to use relays

The Arduino can only output 40mA which wil not be enough to do virtually anything in an old car.
Use a relay or a transistor attached to each pin you want to operate something

Is it recommended to have the arduino connected to the car battery full time and use sleep mode when the car is not in use, or would that slowly kill the car battery in time?

Its best to use an external switching type regulator.

Over time the Arduino would flatten the battery but not over a few days or even a week or two.
Putting it into sleep mode will reduce the power taken a lot, or just power it from a circuit that only gets power when you turn the key

Is it possible to verify that a circuit has been completed

Yes. But you'd need to give specific information
Also you cant connect the car 12V stuff into the inputs, you need to use a voltage divider network (resistors) or other signal conditioning circuitry

I understand the usual for boards is 40amp / pin or 200 amp total

WOW !
Where can I buy an Arduino that can supply 40 Amps from a pin ?

I guess we all know what you mean, but seeing what you wrote worries me that there is a certain lack of clear thinking, and if your programming is as sloppy as your understanding of current then you will have difficulties for sure.

Whatever you do please do not attempt to create an Arduino powered cruise control on the car.

@rogerClark - Thanks for the reply mate. After further looking into it i found some sources that, along with your reply, gave me a cleaner understanding of what I wanted:

To all intents and purposes, you should be able to switch them on so that it appears they are all turning on and off at the same time.

So, in theory, i should be able to hold at least 30 circuits on the digital pins using transistors, and not fry the chip, is that correct?

Use a relay or a transistor attached to each pin you want to operate something

I thought of this as well, but was not 100% completely sure. I found this page which gave me a clearer understanding: http://www.ecs.umass.edu/ece/m5/tutorials/tip122_transistor_tutorial.html

Its best to use an external switching type regulator.

I see. For now I will stick to powering it if the engine is on.

Is it possible to verify that a circuit has been completed

This is what I was after: http://en.wikipedia.org/wiki/Continuity_test I need to look more into this, after performing a search, apparently some people asked regarding this as well.

@UKHeliBob - settle down tough guy, it was only a simple mistake. English is not my first language and my main background is .NET and ASP programming. Since arduino also involves programming, I always wanted to understand how the basics of electronics work as well (and try and create something for good clean fun). Regardless, thank you for spotting the error, edited.

I was not being tough, merely ironic and pointing out the error at the same time, but I do wish that you had not revised the original post as it makes comments to it meaningless. Adding a note to it would have been better.

One thing that I was deadly serious about though was the advice not to try implementing cruise control.

UKHeliBob:
Forgive me old chap but I do believe you got the unit of measurement wrongly typed. Be sure you get it right and try not to hurt yourself in your projects, ey? Ta-ta and cheerio!

Sounds better doesnt it? XD

UKHeliBob:
One thing that I was deadly serious about though was the advice not to try implementing cruise control.

That is not what i had in mind.