Close
0%
0%

3 Blink Modification for SAAB 9-5

Activates the blinkers 3 times from just a touch on the indicator stalk for 1999 SAAB 9-5

Similar projects worth following
Most modern cars have a function that activates the blinkers 3 times from just a touch on the indicator stalk. My 1999 SAAB 9-5 doesn't have this neat function so I have set out to give it to it.

The 1999 SAAB 9-5 blinkers are controlled by the DICE module  which reads the Indicator switch position and commands the blinkers appropriately.

The plan will be to implement something that will read the blinker indicator switch and if its intermittently operated than keep the blinkers on for 3 seconds.

SAABBlinker5.ino

Current working Version

ino - 5.39 kB - 05/29/2018 at 13:20

Download

  • Installed and working

    Saabman05/31/2018 at 11:50 0 comments

    getting the pro micro installed in the DICE module was rather straight forward with power and signals all coming straight of the multiplexer. The microcontroler board is just stuck to the top of the mux with double sided tape. 

  • DICE connections

    Saabman05/29/2018 at 12:33 0 comments

    I just hooked the DICE up without its case and made some measurements and to confirm I had the right pins.

    Yep it all looks good - Ive updated the image with markings for the pick up points for the blinkers and the power supply.

    Ill hopefully get a chance later today to solder the Arduino in and give it a go.

    The multiplexer (74HC151) second from the left is the chip we need to attach to.

    Pin 1 Left blinker input

    Pin 2 Right blinker input

    Pin 16 +5V

    Pin 8 0V

  • Firtst Attempt

    Saabman05/29/2018 at 12:30 0 comments

    After the blinker has been held on for while when it turns off if there is a bit of contact bounce it will latch the blinker for 3 seconds. its not a show stopper but Id like to rectify it. In reality it may rarely occur as the blinker switch contacts are a bit more robust than my dodgey piece of wire. Ive been playing around with some techniques to debounce it but nothing is really working out.

    It may be that I rewrite without using interrupts and poll the input but ill leave it like it is at the moment if you want to have a play here is what I have so far.

    /* Implementation of 3 second "auto" blinkers for SAAB9-5 by SAABAus Sept 2017 
     * uses pins 2 and 3 as inputs untill required than change to outputs to hold the blinker on.
     */
    
    int Blink_left = 2;                     //  Left Blinker switch on pin 2
    int Blink_right = 3;                    //  Right Blinker Switch on Pin 3
    int debounceTime = 200;                 //  debounce lock out time
    bool Blink_left_status = 0;             //  Store for the current status of the Left blinker
    bool Blink_right_status = 0;            //  Store for the Current Status of the Right Blinker
    unsigned long debounce = 0;             //  
    unsigned long trigger = 0;
    unsigned long Time_start = 0;
    unsigned long OnTime = 3000;             // Time blinkers stay on for in ms 
    
    
    
    
    
    
    
    void Right_Blink ()
    {
      if (millis()- debounce > debounceTime)
      {
      if (Blink_left_status == 1)           //check to see if the left blinker is on
       {
        Blink_left_status = 0;             // if it is turn it off
        digitalWrite(Blink_left, LOW);
        pinMode (Blink_left, INPUT);
       }   
       else
       {
        Blink_right_status = 1;             // if the left blinker wasnt on turn on the right blinker
        pinMode (Blink_right, OUTPUT);      // set the right pin to an output
        digitalWrite (Blink_right, HIGH);   // turn on the right blinker
        Time_start = millis();              // Starts the 3 second timer
       }
       debounce = millis();
      }
    }
    
    void Left_Blink ()
    {
      
      if (millis() - debounce > debounceTime)
      {
        
          if (Blink_right_status == 1)           //check to see if the right blinker is on
          {
           Blink_right_status = 0;             // if it is turn it off
           digitalWrite(Blink_right, LOW);
           pinMode(Blink_right, INPUT);
          }   
          else
          {
            Blink_left_status = 1;             // if the right blinker wasnt on turn on the left blinker
            pinMode (Blink_left, OUTPUT);      // set the left pin to an output
            digitalWrite (Blink_left, HIGH);   // turn on the left blinker
            Time_start = millis();             // Starts the 3 second timer
          }
        
       debounce = millis();
      }
    } 
    
    void Blinker_reset()                      // checks to see which blinker is on and turns it off
    {  
       if (Blink_right_status != 0)
       {
        Blink_right_status = 0;              // Sets status to off
        digitalWrite (Blink_right, LOW);     // Turns off blinker
        pinMode (Blink_right, INPUT);        // Returns to listening to blinker switch
       }
      if (Blink_left_status !=0)
       {
        Blink_left_status = 0;              // Sets status to off
        digitalWrite (Blink_left, LOW);     // Turns off blinker
        pinMode (Blink_left, INPUT);        // Returns to listening to blinker switch
       }
    }
    
    void setup() {
      // put your setup code here, to run once:
    
    pinMode (13, OUTPUT);
    attachInterrupt (digitalPinToInterrupt (Blink_left), Left_Blink, RISING); //when the left blinker switch goes high call the left blinker ISR
    attachInterrupt (digitalPinToInterrupt (Blink_right), Right_Blink, RISING); //when the right blinker switch goes high call the right blinker ISR
    }
    
    void loop()
    {
        if (Blink_left_status == 1)           //this little section is for working out how to deal with the bouncing switch on release after the blinker has been on for a while
        {
        digitalWrite(13, HIGH);               // built in LED dipsplays the what the arduino thinks is the status the left hand blinker
        }
        else
        {
          digitalWrite(13, LOW);
        }
      
      if (millis() > (Time_start + OnTime)) { // if more than the alloted time has elapsed check to to see which blinke ris on and turn it off
          Blinker_reset();
          
          
      }
    }

  • Basic parameters

    Saabman05/29/2018 at 12:27 0 comments

    The basic parameters Im going to work on (additional functions can be added later) are.

    A tap on the blinker stalk will latch the blinker input for 3 seconds.

    subsequent taps on the same direction during the 3 second period will have no effect.

    A tap from the other direction during the 3 second period will cancel the blinking.

  • oops

    Saabman05/29/2018 at 12:26 0 comments

    oops its not the fat 1Ks that need soldering too but the little 47Ks but there is a bit of space there

  • Repeatability

    Saabman05/29/2018 at 12:25 0 comments

    When I was writing that I was thinking about that very possibility of others wanting to duplicate it - so I will do the Arduino version.

    An arduino version would connect to exactly the same points in the DICE, the coating scrapes off pretty easy with a knife or even a screwdriver. and you could solder onto the 1k resistor terminals pretty easy, just need to find a suitable point to pick up power.

    the 1K resistors are the big fat ones near the top of the image Im on the road for work this week and dont have all my notes with me but ill post exactly where to connect when I get back home.

  • How do the blinkers work?

    Saabman05/29/2018 at 12:23 0 comments

    I traced out the blinker inputs to the DICE my premise was that the 12v signal from the blinker switch had to be down converted to 5V for the microprocessor and I intend on using a 5v micro to implement the mod.

    The 12V Blinker Activation signal from the stalk comes into the DICE on pins 20 and 44. When 12V is applied to pin 20 the left blinker activates and 12V on pin 44 activates the right blinker.

    Inside the DICE pin 44 connects to ground via a 1K resistor. This makes sure the input is off when the blinker is not activated.

    Pins 20 and 44 also connect via a 47K resistor to a couple of pins of an 8 input Multiplexer chip (74HC151). This 47K resistor basically handles the level shifting from 12 to 5V it just limits the current sufficiently to prevent any damage to the multiplexer and this provides the ideal spot to detect the blinker activation and inject the 3 second latching signal.

    As I dont need to worry about level shifting, current limiting or input protection as its already been done in the DICE i can go for a minimum component count solution. This is still early days in the development but I believe I can do it with one component.

    I could use an Arduino board or similar, there is tons of room in the DICE but I can do better than that. For no other reason than I can and its cheap Im planing to use a PIC10F200T E/OT this is only a 6 pin package and has built in oscillator so 2 pins for power and ground 2 pins for left and right and i have spare pins, hmm what else can I do ??

    These things are freakin tiny 3.1mm x 1.8mm thats like the size of a grain of rice. Drop it on the floor and its gone .....

    Ill glue it to the top of the multiplexer and solder wires directly from the legs of the micro down to the corresponding legs of the multiplexer.

    I expect to be able to set the pin as an input which "listens" for the blinker activation. If the blinker activation is only brief say 100ms then the pin will switch from and input to an output and go high for 3 seconds then revert back to an input.

    If the other pin detects a signal during the 3 second period that will cancel the timer and revert it all back to listening again.

View all 7 project logs

Enjoy this project?

Share

Discussions

czabel wrote 7 days ago point

Nice work! I just got a 9-5 and miss this feature from my previous car. Now that you've been using it for a while, have any issues shown up? Any improvements to report? I'm ordering a Pro Micro now to do this mod either way... 

  Are you sure? yes | no

Jeff Verive wrote 08/11/2018 at 22:44 point

Nice work! BTW - you probably don’t need debouncing if you mask off the interrupt in the beginning of the interrupt service routine and then unmask it after the blinking is complete. 

  Are you sure? yes | no

Saabman wrote 08/12/2018 at 03:17 point

I would like to do some more work with interrupts to learn more about them and effective implementation so I might rewrite the firmware and have another go using intterups and try masking as you’ve suggested and see if I can make that work - though by not using interrupts it can be built by a greater variety of boards 

  Are you sure? yes | no

Max wrote 08/11/2018 at 19:43 point

Very nice!

  Are you sure? yes | no

Saabman wrote 05/30/2018 at 00:38 point

thanks guys.

As all the controlled is handled by the DICE module there’s no separate blinker relay as such. So needed an internal solution and I’ve implemented it in such a way that there is no modification to the wireing harness and it can be removed easily and normal function restored. 

I’ve got a few other things I want to implement - like auto up windows when the doors are locked. 

I’ll check that group chat.

Bernie

  Are you sure? yes | no

AVR wrote 05/29/2018 at 17:37 point

very cool!! I'm assuming that one of those programmable relays was not available for your car so you rolled your own solution, very nice!!!! I did an LED conversion mod for my signals but just bought a special relay to handle it. 

If you want to chat about car modding and car anything I made a group chat that needs more car hackers and enthusiasts. 

https://hackaday.io/project/157813-automotive-enthusiast-chat

We'd be happy to have you!

  Are you sure? yes | no

Mike Szczys wrote 05/29/2018 at 17:34 point

This is incredibly awesome. You're backporting features on your car! Nice.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates