[WIP] NFC car starter by MrStein



  • Hello to all!
    I start a project starter car, as I had already done in the past.


    The project will be long because I leave one month in England but I can start the CAD files (boards and maybe a 3d printed gear knob for the antenna).
    The idea is to do something easily duplicable, easy to use and inexpensive.

    the current idea:
    The microprocessor will be a MSP430 or an arduino mini pro with an interrupt gestion for nfc reader (I like the LowPower).

    For the other;
    -> A NFC reader like a PN532 shield or other NXT card reader
    -> A bistable relay (the contact relay 30A) -> http://www.aliexpress.com/item/Free-shipping-NBC9-A-1-magnetic-latching-relay-60A/1823736075.html
    -> an astable relay (the ignition relay >20A)
    -> a LDO regulator 15v -> 12v or 15v -> 5v if I use a MSP430

    For the wiring
    http://www.servimg.com/image_preview.php?i=610&u=13542366:2nsi9c9w]![](http://i57.servimg.com/u/f57/13/54/23/66/sans_t10.png

    The actual schematic:


    There are a SPI connection to an optionnal external nfc shield and a SMA connector for the antenna.
    A speed indication of the car with the 7th pad of the OBD2 connector.
    The curent nfc shield will be connect with the UART communication.

    WIP... :)



  • Hi,
    I finished the biggest part of the eagle board.


    (miss the isolate and maybe some 1n400x diode in additionnal protection for the relays )

    The dimensions of the relay are not good but I wait the relay (from China (~ 20days :/ )) and be sure of the relais size before start a prototype.

    Anyone know how to bypass the anti boot other than moving the antenna system? With emulating the code for the calculator?


  • Community Helper

    Hi @MrStein , could you private message me in the chat box? It's the icon top right, or the glowing box bottom right. Ta. :-)


  • NFC Ring Team

    @MrStein Where in England? I will come to visit and bring you a car to hack on. You know my email address so just email me an address and the car you'd like :)



  • the board, normaly ready for the integration in a car :
    (components from John, electronical help by Lokki & Duncan )
    TOP:

    BOTTOM:


    (latching relay is in the bottom side after a eagle design problem, but I think i'll work fine. )

    schematics:
    http://i39.servimg.com/u/f39/13/54/23/66/v210.png

    EAGLE file


  • Community Helper

    So much prettier than mine, @MrStein, that's awesome. ;-)


  • NFC Ring Team

    Okay so the problem we hit in implementation is the BMW has a hall sensor for the push button, this makes life somewhat difficult.

    We're investigating the possibility of interfacing with a third party remote starter module and also ways to replicate the hall sensor signal.

    The source code is written for V2 and I sent through to @MrStein

    Also note I just spoke to a BMW remote start expert and the car I chose is one of the hardest ones to interface with because of the way they implemented the electronics. Any other car up to a 7 series would be fine..

    I have such bad luck.. Will trade in this 7 series and get a different car to hack on...

    *grumbles.


  • Community Helper

    Ouch. The focus would perhaps have been easier... Still, if you can make it work on the beemer you can do it on anything.



  • UP! Some news about the project !

    First I have some electronical test from my 407 peugeot:
    The current from the contact in the neiman is about 9.5mA, the stater contact is at 17mA. So a 3A relay will work fine.

    I start a new version with a ATMEGA328 and a 16MHz crystal. You also have a BLUETOOTH 4.0 connector for a further version.

    The board:

    The circuit with a 3d printed box

    (miss the atmega healder & a led)

    (letters are bad)

    I give all the schématics / 3D drawing after some tests :)



  • After some test, a new proper version (10 pcb for 10$):

    I solder all when I have more time .


  • NFC Ring Team

    Excellent work @MrStein - I think one thing we should be doing is holding a few of these pre-made in stock so people can purchase them through store.nfcring.com



  • As you want john, I add some modification to the second board (capacitor value en package) so I would like to test them before give all the files.
    After it's an open source project so use them as you want :)



  • Fun with the starter, useless but for science of course !

    But with that test, I know that my car need 500ms delay between the contact & the starter. and more than 800ms after that to launch the engine.



  • Here are the files of new optimised version, click on "téléchargement gratuit" :)
    http://www.partage-facile.com/E8RQRYP85C/atmega_v3_nfc_starter.zip.html

    A new 3d printed box will follow, in open source too :D



  • This looks fantastic. I'm curious, @MrStein, ou wrote "The keys are currently in this version to avoid problems related to the anti-starter. It will be neutralized (bypassed) later on." in the first video. Did you insert the keys in the "On" state in your car before scanning your ring? Great project!



  • Now, I use a deported antenna to connect to the neiman (were you put the key) the immo chip.
    this is not the best solution but it s difficule to emulate the immo signal so it's the easiest ;)
    I had make some "how to" for connection between the neiman & the board, and how to supply. For now they are on my youtube (mrstein) but in french..
    I will make another video for bypass the immo ;)

    maybe if I have the time I will make a instructable for all (making the board, connection, bypass), but as you can read, my english is not realy good for translate a full text ^^"



  • That's very cool. English would be great for everyone, but I can read French just as well. Keep it up! Can't wait for your next update ;) Lâche pas la patate!!!



  • The code, with sleep mode and interrupt. Work fine with the board (you have to plug a 10Kohms resistor 0603 cms between the +5v and int1, it will be rectifed with another version)

    http://fr.sourcepod.com/pwdatf37-45351

    /*
     Code par MrSTEIN (mrstein(at)hotmail.fr)
     v1.0/ 01/10/2014
     compatible avec NFC starter V3.0
    
     configuration harware:
     interruptBRAKE 3
     BRAKE 4
     buzzer 5
     RelaisStarter 6
     RelaisContact_OFF 7  
     RelaisContact_ON 8
     LED 13    
    
     informations hardware:
     1flash: CONTACT
     2flash: STARTER
     1buzz: SLEEP
     2buzz: STOP
     */    
    
      #include <Wire.h>
      #include <PN532_I2C.h>
      #include <PN532.h>
      #include <avr/sleep.h>
      #include <avr/power.h>
    
    
    //definition des clefs  
    String CLEF1 = "xxxxxxxxxxxxx";
    String CLEF2 = "xxxxxxxxxxxxx";
    
    #define interRelais 500 // temps entre contact et starter
    #define tempsStarter 500 // temps starter ON 
    
    //definition des sorties, valable pour la v3  
    #define interruptBRAKE 3
    #define BRAKE 4
    #define buzzer 5
    #define RelaisStarter 6
    #define RelaisContact_OFF 7  
    #define RelaisContact_ON 8 
    #define LED 13  
    
    PN532_I2C pn532i2c(Wire);
    PN532 nfc(pn532i2c);
    boolean etatContact = false;
    boolean etatBRAKE = false;
    
    
    //*******************fonction buzzer
    void fct_FLASH(int pulse){
      for(int i=0; i<pulse; i++){
      digitalWrite(LED, HIGH);
      delay(200);
      digitalWrite(LED, LOW);
      delay(200);
    }
    }  
    
    //*******************fonction buzzer
    void fct_BUZZ(int pulse){
      for(int i=0; i<pulse; i++){
      digitalWrite(buzzer, HIGH);
      delay(200);
      digitalWrite(buzzer, LOW);
      delay(200);
    }
    }
    
    //*******************fonction contact
    void fct_contact(){
    fct_FLASH(1);
    digitalWrite(RelaisContact_OFF, HIGH);
    delay(500);
    digitalWrite(RelaisContact_OFF, LOW);  
    etatContact = true;
    }
     
    //*******************fonction starter
    void fct_starter(){
    fct_FLASH(2);
    digitalWrite(RelaisStarter, HIGH);
    delay(tempsStarter);
    digitalWrite(RelaisStarter, LOW);
    }
    
    //*******************fonction STOP, interrupt sur BRAKE
    void fct_STOP(){
    delay(1000);
    if(!digitalRead(BRAKE)){
    fct_BUZZ(2); 
    digitalWrite(RelaisContact_OFF, HIGH);
    delay(500);
    digitalWrite(RelaisContact_OFF, LOW); 
    Serial.println("STOP");
    etatBRAKE = true;
    etatContact = false;
    
    while(!digitalRead(BRAKE)){delay(500);}
    etatBRAKE = false;
    Serial.println("FREIN OFF");
    }
    else fct_DODO();
    }
    
    //*******************fonction lecture de tag
    String fct_lecture(){
      String Received;
      boolean success;
      uint8_t IdReceived[] = { 0, 0, 0, 0, 0, 0, 0 }; 
      uint8_t Id_Length; 
    
    if (success = nfc.readPassiveTargetID(PN532_MIFARE_ISO14443A, &IdReceived[0],&Id_Length)){
    for (uint8_t i=0; i < Id_Length; i++)
     Received += String(IdReceived[i], HEX); 
    return(Received);
    }
    else
    return(0);
    }
    
    //*******************fonction MODE sleep
    void fct_DODO(){
     delay(1000);
     fct_BUZZ(1); 
     Serial.println("ARDUINO entre en mode sleep");
    attachInterrupt(1,REVEIL, LOW);
    delay(100);
      set_sleep_mode(SLEEP_MODE_PWR_DOWN); 
      sleep_enable();
      sleep_mode();
    Serial.println("ARDUINO reveil");
    fct_STOP();
    }
    
    //*******************fonction reveil
    void REVEIL(void){
    detachInterrupt(1);
    }
    
    void setup(void) {
      pinMode(buzzer,OUTPUT);
      pinMode(RelaisStarter,OUTPUT);
      pinMode(RelaisContact_ON,OUTPUT);
      pinMode(RelaisContact_OFF,OUTPUT);  
      pinMode(LED,OUTPUT);
      digitalWrite(LED, LOW);
      digitalWrite(buzzer, LOW);
      pinMode(BRAKE,INPUT);  
      delay(100);
    //if(!digitalRead(BRAKE))fct_STOP(); // en cas de reset forcé, securite
      Serial.begin(115200);
      Serial.println("start"); 
      nfc.begin();
      uint32_t versiondata = nfc.getFirmwareVersion(); 
    
      if (! versiondata) {
        Serial.println("erreur pn532");  
        while (1); // halt
    }
      nfc.setPassiveActivationRetries(0xFF);
      nfc.SAMConfig();
    Serial.println("CAR STARTER V1.0");  
    }
    
    
    void loop(void) {
    String Received;
    while(etatContact == false){
    Serial.println("attente lecture pour contact"); 
    Received=fct_lecture();
    
    if ((Received == CLEF1 || Received == CLEF2)){  
    Serial.println("Clef valide, contact");  
    fct_contact();
    delay(interRelais);
    }
    }
    
    while(etatBRAKE == false){
    Serial.println("attente lecture pour starter");   
    if(digitalRead(BRAKE)) etatBRAKE = true;
    Serial.println(digitalRead(BRAKE));
    Received=fct_lecture();
    
    if ((Received == CLEF1 || Received == CLEF2) ){ 
    Serial.println("Clef valide, starter");
    fct_starter();
    }
    }
    delay(100);
    if(etatBRAKE == true){
    fct_DODO();
    }
    }
    

    A video of the plugging in the car will come, maybe if I have some translation help I could make an instrutable.

    edit: sorry, not a lot of comment (and in french), but I think it's not too difficult to understand.


  • Community Helper

    post your text on some collab tool in french and if I have some spare time I'll try to help you to translate it.



  • Hey @MrStein this looks great! If I was still tech savvy like in high school I would love to do a home build! Seeing how I'm only a little tech savvy now, what's the odds of being able to buy one of these? I just got my hands on my NFC ring thanks @NFC-Ring-Team can't wait to integrate this into my day to day!



Looks like your connection to NFC Ring Forum was lost, please wait while we try to reconnect.