Help with an idea for 1st Arduino project

Hello, I am new to Arduino, I know them and what they are but have never made one.
I would like to make a battery monitor and remote starter.
The project would monitor a secondary battery in my vehicle, if the battery gets below a certain point it will trigger the motor to start and recharge the battery. Once the battery is charged to a certain point, the motor would be stopped. I'm converting my van into a mini camper and would use this to keep my "house" battery charged either at night or when solar energy is low or unavailable.
There are three wires for the car that would need to be connected, ignition, starter, and tachometer.
A low voltage situation would have to close the ignition circuit, then close the starter circuit until a signal is received from the tachometer. Once the signal is received the starter circuit is opened again.
Once the battery has reached the desired voltage, the ignition circuit will open stopping the engine.
The opening and closing of circuits should be able to be done easily with relays, but are the desired actions possible?
Thank you Arduino community!

Have you identified the exact "three wires" and have you found where you can access them?

Paul

That sounds possible... But, I'm not sure how you measure charge-state while the battery is charging. (My plug-in battery charger does it somehow.) You'll also have to figure-out how to detect the tachometer.

The Arduino can't handle voltages higher than 5V so you'll need a voltage divider (2 resistors) to measure battery voltage. The tachometer signal might be 12V too so you'll either need a voltage divider or an over-voltage protection circuit (which can be made with a resistor and diode).

As with any project, just take it one step at a time... Maybe start with the inputs (battery charge/voltage & tachometer).

This is an interesting project but I would not recommend it as a first or second project, it is quite involved and will need some expertise in automotive, electronics, and programming. Good News A lot of what you want can be found here. I would break it down into many sections and work with them one at a time keeping the goal in mind. Start by connect a pot to the A/D and get the readings, then learn how to use a voltage divider with it. SOC can be determined by measuring the battery voltage; this is most accurate when the battery has been removed from a load for at least 6 hours, preferably 24 hours. Determine how you are going to get the tac signal, condition it for the Arduino, then for debugging etc duplicate it on your bench. Continue this way with each section. Very important learn how to use the mills function for delays, the delay() will lock your code and cause it to fail in the real world. Reason while the delay() is in delay nothing else will or can happen. This should get you going, I expect we will see you back many times. Have fun and enjoy. Remember Today is the Tomorrow you worried about Yesterday (gil)

What happens if the car is left unattended and in gear?

-jim lee

I have identified the three wires using this vehicle specific wiring guide for installing alarms/remote starts:
https://www.the12volt.com/installbay/alarmdetail/454.html
But I haven't physically located them in my van.

The Arduino having a 5v limit, so it wouldn't be able to read voltages higher than 5v correct?
This makes things difficult, and I can see why not recommended for a 1st project!
But the Arduino wouldn't actually have to charge anything, just open and close relays based on voltage values from a battery

Even dividing the voltage monitor, unless it can be divided by three would still be too high.

The tach from my understanding is pulsed DC, and probably is 12v. I found an article to set multimeter to AC because it can pulse too fast for DC to see it.
This would be to signal when to open the starter circuit and disengage the starter, just like you turn the key and hear the engine run, you let go of the key lol.

I like this idea of breaking it down into sections, it makes it less intimating having several small problems to solve.

Thanks guys, have given me some good info to get started, but one thing I'm not sure about that Gil said, what's the A/D I connect a pot to?

jimLee:
What happens if the car is left unattended and in gear?

-jim lee

Or parked in an indoor garage that vents somewhat to a living space?... It doesn't seem safe. Another thing - this is one very expensive way to charge a battery. :slight_smile: As well, engines don't really like to idle for long periods. It will affect your service life.

aarg:
Or parked in an indoor garage that vents somewhat to a living space?... It doesn't seem safe. Another thing - this is one very expensive way to charge a battery. :slight_smile: As well, engines don't really like to idle for long periods. It will affect your service life.

I'll be living and travelling in the van for the next year or so, I don't want to say never, but I'm fairly certain I'll never be in a parking garage, and if i am, I'll be sure to be on the top level of an open top garage.
It shouldn't have to run too long to charge the battery, I'm also beefing the charging system as well. It will have a very minimal impact on engine service life, and so be it, that's what I'm using it for.
I'll have a solar panel too, this is just to supplement solar, or during the night or low light conditions, not all the time charging.

Also, if someone knows a good guide for programming specific to what I'd like to achieve, or even general programming, would be much appreciated.

HI,
Rather than look for tacho response to tell you the motor is running.
Look at;

  • Oil Pressure switch, a motor will run with no oil pressure, but not for long.
  • Engine Temperature, an over heating engine will still run, but not for long.

Tom… :slight_smile:

thorsteenster:
Once the battery has reached the desired voltage, the ignition circuit will open stopping the engine.

Alas it is not as simple as that. The voltage will be determined by the charger and will reach the full voltage almost instantly. Replacing the charge in the battery requires a charge current to apply for some time - you need to replace the amp-hours that have been drawn from the battery.

As I write this my batteries are charging. The charge voltage is about 14.4v and the charge current is about 45 amps. I will continue the charge until the charge current falls to about 12 amps which will take about 50 minutes. By the time the current has dropped to about 35 amps the charge voltage will have risen a little to 14.9v and will stay at that. By the way this is for a 200Ah deep cycle battery.

I echo the cautions that others have mentioned

...R

Yes , I would not (!). recommend it either for the reasons others have mentioned . Think about faults whereby the vehicle starts unattended in various locations , or the starter jams in , or some fault you would notice in manual starting .
It’s also not good to start the engine and leave it idling for extended periods and not great for the neighbours when it runs and they get the fumes .

You could build a float charger and run a low voltage cable to the van.

hammy:
Yes , I would recommend it either for the reasons others have mentioned .

I think the word "not" is missing.

...R

I think you might be right ..

Hi,
Certainly this can be done. Search on "Arduino generator automatic control" Like THIS...

A guy I have doing some work for me has a working example for small gasoline generators. I'll ask him about the code example.. He's in Nigeria where the electricity goes on and off almost every day :frowning: PM me for a copy of the MightSomewhatWork code...

His version has bluetooth control from a phone...

Parts Ideas: Arduino can control nice optically-isolated relays like THESE Easily available in 2,4 8 relay modules. The optical isolation IS important. The Tach can drive a small opto-isolator so the Arduino just sees a 'transistor' ON-OFF.

Think about basic electricity/Grounds etc: See Arduino-Project-Planning-Electrical - ArduinoInfo

Some overall Arduino-controls-power info is HERE.

Think about "Stepwise Refinement". One Thing at at Time. Get a couple simple switches and wire up the run-stop and starter. Try a 1000 ohm resistor and an LED to ground on the TACH signal.

If you do/fix/make camperstuff then you are not afraid to cut and try stuff.. My wife and I have a small camper and she has rebuilt the floor and lots of other stuff; I have wired a lot of stuff.. Fun! (Stuff)

Pay Attention! To stuff like Carbon Monoxide, Fire, Etc.

Let us know how the project goes.. We can follow this thread...

You can buy a OBD i interface
That will give you RPM

as a note you cannot start a modern car in any gear .

I would expect anyone living in a caravan to have both smoke and CO detectors.

I have no idea if fuel level is accessible within the OBD but i would HIGHLY recommend that it be included in the system checks.

At some point as the project moves ahead i would also HIGHLY recomend that the system be TOTALLY disabled when the vehicle is running. Maybe a 30 minutes pause after any gear shift?

Also it screams for alerts and warnings and emergency DISABLED button

Thanks all for your answers and input.
Yes, while driving or times I'll have no need of this, it will be disabled/powered off.
The van is a 97, and I am mounting a roof fan as well to help with air movement. I will have detectors as well in place with this to be safe.
Some great ideas in here and encouragement that I can make something work.
I just bought an Arduino starter kit so I can start playing, as well make some other projects to play with.
Terryking, great post, thanks! I am remodeling the back now, including my power setup and "furniture". Great fun, I'll send you a text.