A-Z of car ignition systems

  • from www.digikey.com.au

    2 X 497-2595-5-ND TRANS NPN 30V 800MA TO-39 AU$3.94
    2 x P10316-ND CAP ALUM 10UF 50V 20% RADIAL AU$0.78
    1 x Z2775-ND RELAY GEN PURPOSE SPST 5A 12V AU$1.50
    1 x 255-1066-ND RELAY GENERAL PURPOSE DPDT 2A 5V AU$7.57
    2 x PPC47.5KYCT-ND RES 47.5K OHM 0.4W 1% AXIAL AU$0.62
    2 x PPC82.5KYCT-ND RES 82.5K OHM 0.4W 1% AXIAL AU$0.62

    From elechouse.com
    1 x PN532 NFC RFID module V3 kit Approx au$30.00

    from core.electronics.com.au
    Nano 3.0 Atmel Atmega328P Mini-USB Board w/ USB Cable for Arduino AU $8.99

    anyone able to throw in opinions or perhaps ways to drop the price down a bit? i notice the main price is simply from the arduino, and not knowing anything about them am unsure if this is normal pricing or a rip
    yes i am aware im mostly using australian sites, but i have tried to include manfacturers codes to make it easier for international search

  • @lokki you are correct i do have an OBD port just didnt realize it was there untill now

  • Community Helper

    Personally I'd grab a clone nano off ebay or dx.com or similar. Don't get a clone of the reader though.
    Something like this perhaps.
    I've edited one of your posts to show the picture, you can have a look in edit yourself to see how to embed images. I used a different link address from imgur that's specifically for that purpose.

  • @lokki good call, ive altered my shopping list appropriatly....at the cost a genuine it just didnt seems like it would be a viable option if i need a genuine for every product.....

    ok so if all parts look good ill be ordering tonight....
    after much debate im going to give a standard ring a go and see what happens

    @lokki your a treasure chest of wisdom in here. would have already given up on understanding otherwise...
    Keep up the great work

  • Community Helper

    Genuine is nice if you can afford it, but clones are excusable as long as they're not using the arduino name to promote themselves. Arduino is open source but the name is a different thing.
    You're doing well here, it's good.

  • would be nice if a single site sold everything

  • @Lokki im a bit worried about this part

    i dont know why but it just doesnt seem right

  • Community Helper

    That link isn't showing up for me, are you able to give me a part number?

  • @lokki 255-1066-ND on digikey.com.au

  • Community Helper

    @MarkGabb said:


    ok, my bad. The diagram I knocked together for you was related to a motorbike project I was asked about... so while it's relevant it's not as relevant as it could have been in a better world.
    The Panasonic relay is a latching type, what it does differently is that when you trigger one side of the relay coil it locks in position one way, then you trigger the other side of the coil and it releases. This is what you'll use to set the car OFF or ON. We use this one so that if power is lost to the arduino for whatever reason then we don't suddenly lose power to the car while driving.

    Again, my fault entirely. This makes the following change - you have three outputs from the arduino instead of only two. All three are basically the same, transistor/resistor/diode, and two of them go to the same relay.
    I haven't got a picture of the latching relay for a fritzing diagram unfortunately.

  • @lokki all cool good sir. So if I just add another transistor and resistor with a diode in between. But put it to the second part of the relay? So does that mean I did select the correct part?

  • Community Helper

    Yeah that's the right part, I guess you got it from my rough BOM on my car starter thread.
    It's basically the same kind of relay only it has two states and both are persistent.
    so instead of two contacts for the coil there are four, two go one way and two go the other basically just reversing the polarity of the magnet in the thing according to which one is triggered.

    I'm really kicking myself over that though, I had both projects in my head and the newest/latest one came out on top.

    • I think the moral of the story here is to listen to the spirit of what I say and ignore the specifics. Sometimes. ;-)

  • new schem
    got it!

    @lokki so do i win for tonight? or did i just blow my circuit up....

    in deference to you i have done it in schem mode hope i did it right

    sorry reverse the tags on the on and ignition tabs

  • Community Helper

    Ok, we're nearly there - I just noticed that the flyback diodes need to be flipped so they're pointing towards positive, not negative (I think I did that to you as well!) but apart from that we're golden.

    That's your basic start circuit I reckon. Next you can customise and add in whatever else you need.

  • i think that will do untill ive got that installed and working.....

    i guess the code is another story all together?
    ill have to work on that at a later date.....

    later on i would like to add the door locks in, and maybe a door popper....
    that would be it for my car

    you mentioned earlier the the chip can reset it self....does that mean you would have to double tap the NFC sensor then to turn the car off...?

  • Community Helper

    You could quite happily use the latest code from my thread, this hardware is basically the same as what I have at the moment though I'm experimenting with a safety cutout for the reader hooked through the handbrake switch - so the reader will only work while the handbrake is on.

    What I have noticed occasionaly is that for whatever reason my unit resets itself occasionally. The latching relay doesn't allow the car to cut out at this point which is good... but we were resetting to the point where the arduino thought the car was off and would engage the starter motor again briefly.
    To combat this I'm going to use one of the inputs on the unit to let the arduino know if the engine is already running and allow the next ring read to shut off the car power instead of grinding the starter.
    I'll add this to the code as part of an IF AND statement.

  • awesome ill look at the code over the next day o0r so and see if i can work it out

  • Community Helper

    Here you go, modify at will. I think this is the latest version that I had posted.

    int triggerPin1 = 2;
    int triggerPin2 = 3;
    int triggerPin3 = 4;
    int carRunState = 0;
      #include <Wire.h>
      #include <PN532_I2C.h>
      #include <PN532.h>
      PN532_I2C pn532i2c(Wire);
      PN532 nfc(pn532i2c);
    void setup(void) {
      pinMode(triggerPin1, OUTPUT);
      pinMode(triggerPin2, OUTPUT);
      pinMode(triggerPin3, OUTPUT);
      Serial.println("Hello! I'm a Car!");
      uint32_t versiondata = nfc.getFirmwareVersion();
      if (! versiondata) {
        Serial.print("PN53x key scanner board not online");
        while (1); // halt
      // Got ok data, report state
      Serial.print("Reader Online, ");
      // Set the max number of retry attempts to read from a card
      // This prevents us from waiting forever for a card, which is
      // the default behaviour of the PN532.
      // configure board to read NFC tags
      Serial.println("Waiting for a valid key");
    void loop(void) {
      String ringUid;
      boolean success;
      uint8_t uid[] = { 0, 0, 0, 0, 0, 0, 0 };  // Buffer to store the returned UID
      uint8_t uidLength;                        // Length of the UID (4 or 7 bytes depending on ISO14443A card type)
      // Wait for an ISO14443A type cards (NFC Ring, Mifare, etc.).  When one is found
      // 'uid' will be populated with the UID, and uidLength will indicate
      // if the uid is 4 bytes (Mifare Classic) or 7 bytes (NFC Ring or Mifare Ultralight)
      success = nfc.readPassiveTargetID(PN532_MIFARE_ISO14443A, &uid[0], &uidLength);
      if (success) {
        // Display some basic information about the card
    //    Serial.print("  UID Length: "); Serial.print(uidLength, DEC); Serial.println(" bytes");
        Serial.print("  UID Value: ");
        for (uint8_t i = 0; i < uidLength; i++)
          Serial.print(uid[i], HEX);
          ringUid += String(uid[i], HEX);
        Serial.println(ringUid + "\n");
        if (ringUid == "4db5e2b62880" || ringUid == "48fc02b62880" || ringUid == "4c9232b62880"){
          Serial.println("Key accepted!");
        if ((ringUid == "4db5e2b62880" || ringUid == "48fc02b62880" || ringUid == "4c9232b62880") && (carRunState == 0)){
          Serial.println("PERMISSION GRANTED, SYSTEMS ON");
          digitalWrite(triggerPin3, HIGH);   // sets latching relay trigger on for ignition mode in car to allow start
          delay(200);                  // waits briefly
          digitalWrite(triggerPin3, LOW);    // removes latching relay trigger
          carRunState = carRunState++;
        else if ((ringUid == "4db5e2b62880" || ringUid == "48fc02b62880" ||ringUid == "4c9232b62880") && (carRunState == 1)){
          Serial.println("ENGINE CRANKING");
          digitalWrite(triggerPin1, HIGH);   // triggers output for engine starting
          delay(2000);                  // waits for a second
          digitalWrite(triggerPin1, LOW);    // removes triggered output 
          Serial.println("ENGINE CRANKING COMPLETE");
          carRunState = carRunState++;     
        else if ((ringUid == "4db5e2b62880" || ringUid == "48fc02b62880" ||ringUid == "4c9232b62880") && (carRunState > 1)){
          Serial.println("SYSTEM OFF, SLEEP TIME");
          digitalWrite(triggerPin2, HIGH);   // Trigger latching relay to reset for vehicle OFF
          delay(200);                  // waits briefly      
        digitalWrite(triggerPin2, LOW);    // Removes latching relay reset trigger
        carRunState = 0;

  • @lokki what happens if the car doesn't start in the 2 seconds allowed? Do you have to cycle back and start again?

  • Community Helper

    @MarkGabb if it didn't start then yeah, you'd have to cycle through again. It's never come up as an issue for me.

    Additional to that, with the 'engine on input' set up properly we'll be able to re write the code to compensate for not starting.