Vehicle remote ignition - Some questions.

Okay, after reading around some forums, i apologise for my idiocy..

I found a diagram that someone else has posted, would this be fine to power the arduino?
Regards, Matt.

https://picasaweb.google.com/lh/photo/XfQQ4t57ZujKV4wVzmg48NMTjNZETYmyPJy0liipFm0

Yeah, I wouldn't expect to see all the nasties without a long-term histogram. And a lot of it is protective "just in case" stuff that happens frequently enough to be a real concern, but not necessarily every day. I'm sure you'll find leagues of people that say "hey, I ran mine from a 7805 for three months, and it's doing just fine!" Good for them. It might run forever. But it might not, and it's not too hard to protect it properly, so why not, eh? Better than having it spontaneously croak some random day for no apparent reason.

I just started a thread here in this forum for a design review of a suitable automotive PSU. The one you posted looks like a great start, and is really close to what I came up with. I would still avoid the linear regulator if you could. It's just bad practice to turn excess voltage into waste heat when you're running from a battery. That's your call though. If you drive it every day, you'll probably keep the battery charged enough that it'll never matter.

I still maintain you're making things complicated for yourself by cutting power to your Arduino, but it's your design and your right. :slight_smile:

It's worth doing the sums to figure out how long your Arduino will take to flatten the battery. It doesn't need much current to flatten a car battery over a couple of weeks. Consider having a switch to disable it for when the vehicle is going to be parked for longer than a few days. You might even consider having the Arduino disconnect itself if it's left running for too long, to remove the need to disable it manually.

This is the basis of my suggestions. Cutting power means you need a relay, which is going to draw 20-50mA continuously while the Arduino is powered up -- which by design is when the engine is NOT running, hence the battery is NOT charging. An efficient regulator and judicious use of sleep states will bring the idle consumption down considerably.

Besides, relays are ugly devices. There's back-EMF, mechanical operation, contact bounce, tarnishing and pitting on the contacts themselves, parasitic current draw while engaged... Having to engage the starter means having to use ONE relay. But I would not be in a hurry to add any more than absolutely necessary.

Now, you could use a normally closed relay for power, and open it only when the car is running. But then if you have a kill switch (to turn it off during periods of non-use, or for safety when you want to work on the car), your relay is energized again, wasting power.

Yuck. :slight_smile:

I see your point.
I've also worked out that a relay isn't going to work, because when the car's running even if the arduino is controlling it, the "on" wire from the key barrel is going to be hot.
I really can't see any way around this except to add a 10/5 minute delay on the arduino for the car to remain on for, in the chance that i don't get to my car in ten minutes, then bad luck i guess.

Cheers guys :slight_smile:

I've rerad up on how other remote ingitions work, and the norm seems either a timer, or a brake sensor. if the brake is depressed, the arduino shuts off the relays, obviously, you put the key in and switch on first.

I'm teaching myself Eagle cad, as theres a PCB company up the road from me who has a 1 day turn around time :slight_smile:
I'm having a hard time learning Eagle, and there arn't many tutorials out there.
But should have my head wrapped around it soon enough

Look at the bottom of my post for a link to Eagle tutorial videos on Youtube.

Disclaimer, I am not affiliated with the person in the video.

Thanks for that!

The next big step is codeing, as i'm a complete newbie to codeing anything (have had a little bit of experiance with HTML)
I'm going to be hard pressed to write the code.
Basically, if i set it up where i have the two relays for ON and IGNITION, then have a brake switch that would then end the code/switch off the relays when pressed and also have an input when the alternator +12v is running it switches off the ignition relay. how exactly would i code this?
i'm fairly sure i can figure out the cell shield command part of it as there are a ton of tutorials on this.

Sort of like this:

gets command to start> fires ON relay (pin 11)> fires IGNITION relay (Pin 10)> senses car has started from the alternator charge +12v> turns off IGNITION relay> Waits for brake switch input, if none, shuts off car after 10 minutes> starts code from beginning (waits for input from serial/cell shield)

My car's battery is massive, i'm not worried about the draw from arduino, and i would include an OFF switch for the arduino if i was going to be leaving it for a few days.

This is what i've come up with.

int ignitionPin = 12;
int onPin = 11;
int ledPin = 13;
int brakePin = 3;
int alternatorPin = 4;
int usbnumber = 0;
void setup() {
    pinMode(onPin, OUTPUT);
    pinMode(ignitionPin, OUTPUT);
    pinMode(ledPin, OUTPUT);
    pinMode(4,INPUT);
    pinMode(3,INPUT);    
    Serial.begin(9600);
}
void loop() {
    if (Serial.available() > 0) {
        usbnumber = Serial.read();
    }
    if (usbnumber > 0) {
      
        digitalWrite(onPin, HIGH);
        delay(5000); //5 second delay because of glow plugs (diesel)
    if (digitalRead(alternatorPin)==LOW) 
       {digitalWrite(ignitionPin,HIGH);} //Would this mean that it senses theres no voltage at ahe alternator pin, then switch on the ignition relay?
       else
       {digitalWrite(ignitionPin,LOW);} //then would this mean once the ignition relay is on, and the car has actually started, that it would then turn off the ignition relay?
       
    if (digitalRead(brakePin)==LOW) 
       {digitalWrite(ledPin,HIGH);} //LED on the dash just to remind you to put key in before pressing the brake
       else
       {digitalWrite(onPin,LOW);} //turns off the car if brake switch is pressed? then the program loops and wait's for another serial input?
       delay(1000);

         
        usbnumber = 0;
    }
}

Regards, Matt :slight_smile:

EDIT: i just tried this code with a push button and such.
Didn't work, it seems the arduino doesn't wait around for an input, for instance, i send a serial command, the ON relay fires, then after 5 seconds the ignition relay fires, then i press the push button (as if it were the alternator input) and nothing happens.

Now i know the switch is wired up fine, because if i hold the push button down and send a serial command, the ignition relay never comes on.

Sorry for being such a codeing noob :\

Anyone?