Author Topic: Forcing Accessory-Mode in Vehicle after stopping the engine  (Read 2219 times)

0 Members and 1 Guest are viewing this topic.

Offline Sebastian S.Topic starter

  • Newbie
  • Posts: 9
Forcing Accessory-Mode in Vehicle after stopping the engine
« on: January 18, 2019, 02:40:21 pm »
Hello everyone,

I'm a long time watcher of the EEV-Blog and do have some interest to electronics because I'm a car mechanic and profess in diagnostics of electronic functions. Unfortunately we don't go as deep as opening ECUs and figuring out what's wrong within them as the manufacturers don't provide data to do so. I am able to read schematics, take measurements and identify basic parts thanks to the blog.
What I'm not able to is figuring out what parts I need to make my wish a reality. I want to have the Accessory-Mode in my car active after I turned off the engine. Since this is a modern car with a push button instead of the conventional ignition switch this has proven rather hard. I am now at the point where I have sketched down how I think it could work and hope you can help me pick the correct parts.

So basic information first:
  • The Modes Accessory (further refered to as [ACC]) and Ignition (further refered to as [IG]) are controlled by 2 independent relays
  • Said relays are switched on and off by the Start Stop Unit (further refered to as [SSU])
  • Upon pushing the Start button once, [ACC] is turned on. Pushing a second time, [IG] is turned on. If the clutch (MT) or Brake pedal (AT) is depressed the engine will start in any mode
  • While the engine is running and the Button is pressed everything will be turned off
  • Software configuration is no option according to the manufacturer, the ECU is secured with Anti-Theft-Bolts and getting it out to check for internals takes a long time

My requirements for the component to add
  • Receive both 12V and Ground from the vehicle to operate. Voltage source can go up to 16V
  • Receive 12V from [IG] as signal so turning off the vehicle can be detected. Again spikes up to 16V should be covered
  • Receive the Signal from the drivers side door so opening the door can be detected (Switch is connected to ground)
  • Send 12V from point 1 out to [ACC]-relay
  • Dark current should be as low as possible and not exceed 5mA when Vehicle is locked
  • An adjustable or fixed timer should be available and start as soon as [IG] is turned off
  • Function: Upon Turning on [IG] the module also starts sending power to the [ACC]-Relay. Upon switching [IG] off a timer starts (e.g. 40 seconds) and keeps the Output to [ACC] alive. If either the timer reches its end or the drivers side door opens the power output to the [ACC]-relay is cut and normally turned off.

I will attach a prototype schematic of how I want to wire this up to aid you in my probably confusing description.
 

Online Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11630
  • Country: my
  • reassessing directives...
Re: Forcing Accessory-Mode in Vehicle after stopping the engine
« Reply #1 on: January 18, 2019, 03:27:29 pm »
1) you should not tap directly from battery (topmost line), you should tap after 200A fuse, or better yet, put your own 5-20A fuse to the battery tap.
2) i guess the line that goes to SSU (bottom ACC) relay control is to bypass SSU control? i wouldnt do that. i will put another relay parallel to ACC relay and do independent control from there. so i will not mess with SSU module's output/power pin.

what part needed? it depends on your preferences. if me i will go mcu way much simpler and less component. if you go analog way i'm guessing you will need more part for timer (555 and shift registers), reset or latch switch everything, much harder if me doing it. ymmv.
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 
The following users thanked this post: Sebastian S.

Offline cs.dk

  • Supporter
  • ****
  • Posts: 642
  • Country: dk
Re: Forcing Accessory-Mode in Vehicle after stopping the engine
« Reply #2 on: January 18, 2019, 03:38:38 pm »
Which car? There may all ready be a solution out there for you..
 

Offline Sebastian S.Topic starter

  • Newbie
  • Posts: 9
Re: Forcing Accessory-Mode in Vehicle after stopping the engine
« Reply #3 on: January 18, 2019, 03:46:04 pm »
1) you should not tap directly from battery (topmost line), you should tap after 200A fuse, or better yet, put your own 5-20A fuse to the battery tap.
2) i guess the line that goes to SSU (bottom ACC) relay control is to bypass SSU control? i wouldnt do that. i will put another relay parallel to ACC relay and do independent control from there. so i will not mess with SSU module's output/power pin.

what part needed? it depends on your preferences. if me i will go mcu way much simpler and less component. if you go analog way i'm guessing you will need more part for timer (555 and shift registers), reset or latch switch everything, much harder if me doing it. ymmv.

1) Of yourse I won't be tapping into that wire, I realized that mistake right after I posted this here. There'll be a seperate fuse for that later on.
2) Fair enough although I don't think the relais itself is capable to be diagnosed. I will change that however to do as you said if it's possible, since the ACC-Relays is in the engine compartment while everything else is in the cabin. I'll think about what to do here.

I thought about going for a MCU myself, but lacking the knowledge I don't know which to pick for my specific use-case nor do I really know how to look for one as there are a lot of them. I stumpbled upon a PIC16F18323 but am not sure if it will do the trick.

@cs.dk It's a 2016 Mazda Miata (ND) and unfortunately noone in our german community has found a solution to that yet.
« Last Edit: January 18, 2019, 03:49:35 pm by Sebastian S. »
 

Online Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11630
  • Country: my
  • reassessing directives...
Re: Forcing Accessory-Mode in Vehicle after stopping the engine
« Reply #4 on: January 18, 2019, 05:54:13 pm »
I stumpbled upon a PIC16F18323 but am not sure if it will do the trick.
any mcu will do the trick including that you mentioned. you just need to learn how to program it and put decent 5V voltage regulator and spike protection to it.

@cs.dk It's a 2016 Mazda Miata (ND) and unfortunately noone in our german community has found a solution to that yet.
this is very easy circuit any german guru can make it in 5 minutes. lack of solution may hint something, safety reason maybe. to not risk flattening the battery or burning a car. or maybe simply no one has the need yet except you the first one.
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 
The following users thanked this post: Sebastian S.

Offline Sebastian S.Topic starter

  • Newbie
  • Posts: 9
Re: Forcing Accessory-Mode in Vehicle after stopping the engine
« Reply #5 on: January 18, 2019, 08:14:10 pm »
any mcu will do the trick including that you mentioned. you just need to learn how to program it and put decent 5V voltage regulator and spike protection to it.

this is very easy circuit any german guru can make it in 5 minutes. lack of solution may hint something, safety reason maybe. to not risk flattening the battery or burning a car. or maybe simply no one has the need yet except you the first one.

So it comes down to programming the timer and I/O pins correctly when using a mcu, correct?

Well the german electronics enginnering guru or hobbyist probably can do it, I lack experience in that field unfortunately. I don't think they're concerned for anything like that to happen as they put modules in their cars that void the warranty on groups that cost more than 3000€ if anything goes down. It's rather the lack of experience and not going further beyond and waiting for the solution to come. Which is why I wanted to push in that direction.

Tomorrow I will go to out local electronics hardware store and get the following parts along with a prototype-board to try getting into the programming side, which is why these components are not SMDs but through holes for now. I've sketched up the following circuit according to the specs in the datasheets of the respective parts. Could this work (assuming the chip is programmed) or is there a major flaw that will just burn this chip to a crisp?
https://www.microchip.com/wwwproducts/en/PIC16F628
https://www.digikey.com/product-detail/en/stmicroelectronics/L4931CZ50-AP/497-5838-1-ND/1506450
 

Online Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11630
  • Country: my
  • reassessing directives...
Re: Forcing Accessory-Mode in Vehicle after stopping the engine
« Reply #6 on: January 18, 2019, 11:41:54 pm »
So it comes down to programming the timer and I/O pins correctly when using a mcu, correct?
yes. but your schematics lacks limiting resistor and clamp diodes to clamp 12V input to 5V input. if you have extra unused mcu pins, i suggest breaking them out so later if you want to add inputs you only need to solder to pcb traces. and i suggest add low side bjt switch to relay coil instead of directly supply from mcu pin to protect it from overcurrent stress. ymmv.
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline MavMitchell

  • Contributor
  • Posts: 29
  • Country: au
  • Not my real name
Re: Forcing Accessory-Mode in Vehicle after stopping the engine
« Reply #7 on: January 19, 2019, 01:02:18 am »
Just something to consider, what Accessories do you want to use with this bypass.
They may not work just by powering them up in this way. The BCM may need to be running for the Radio to work(for example).
Have you tested by manually bypassing the relay to make sure you get the result you are after?

« Last Edit: January 19, 2019, 01:03:57 am by MavMitchell »
 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 8269
Re: Forcing Accessory-Mode in Vehicle after stopping the engine
« Reply #8 on: January 19, 2019, 01:24:48 am »
If I'm understanding you correctly, the push-start button currently cycles through the sequence ACC, ACC+IG (engine runs), OFF but what you want is ACC, ACC+IG (engine runs), ACC (to a maximum of 40s), off? In that case you don't need to worry about IG at all and just add a time delay to the ACC relay. I wouldn't bother with an MCU, since you're going to have to do level shifting to drive the relays anyway.

In fact, you can already get time-delay relays so those can be an easier and more robust solution than trying to do it with an MCU.
 

Offline Sebastian S.Topic starter

  • Newbie
  • Posts: 9
Re: Forcing Accessory-Mode in Vehicle after stopping the engine
« Reply #9 on: January 19, 2019, 09:50:10 am »
Thanks for all you input:

yes. but your schematics lacks limiting resistor and clamp diodes to clamp 12V input to 5V input. if you have extra unused mcu pins, i suggest breaking them out so later if you want to add inputs you only need to solder to pcb traces. and i suggest add low side bjt switch to relay coil instead of directly supply from mcu pin to protect it from overcurrent stress. ymmv.
I will have to look further into that, but can you explain what you mean by clamping 12V input to 5V input? I understand it as bridging both sides with a resistor and a diode. What're the benefits of doing so?

Just something to consider, what Accessories do you want to use with this bypass.
They may not work just by powering them up in this way. The BCM may need to be running for the Radio to work(for example).
Have you tested by manually bypassing the relay to make sure you get the result you are after?
This has been taken into consideration already. All required ECUs to keep the Infotainment alive are either powered all the time or switched with the ACC-Relay. I'm trying to bypass the positive output of the SSU to keep the relay active.

If I'm understanding you correctly, the push-start button currently cycles through the sequence ACC, ACC+IG (engine runs), OFF but what you want is ACC, ACC+IG (engine runs), ACC (to a maximum of 40s), off? In that case you don't need to worry about IG at all and just add a time delay to the ACC relay. I wouldn't bother with an MCU, since you're going to have to do level shifting to drive the relays anyway.

In fact, you can already get time-delay relays so those can be an easier and more robust solution than trying to do it with an MCU.
These relays exist, yes. But I wasn't able to find a micro-format relay with a switch off timer and the correct pinout format to simply pnp. Fiddling with wired in the compartment is ok with me but not in the engine bay.
Cycle of the Button is: ACC > IG > Start (when either pedal is depressed) > OFF
There is no switching type relay, it's 2x normally open types for either ACC or IG
 

Online Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11630
  • Country: my
  • reassessing directives...
Re: Forcing Accessory-Mode in Vehicle after stopping the engine
« Reply #10 on: January 19, 2019, 10:49:28 am »
yes. but your schematics lacks limiting resistor and clamp diodes to clamp 12V input to 5V input. if you have extra unused mcu pins, i suggest breaking them out so later if you want to add inputs you only need to solder to pcb traces. and i suggest add low side bjt switch to relay coil instead of directly supply from mcu pin to protect it from overcurrent stress. ymmv.
I will have to look further into that, but can you explain what you mean by clamping 12V input to 5V input? I understand it as bridging both sides with a resistor and a diode. What're the benefits of doing so?
you cannot simply feed 5V mcu with 12V level input, it will burn, let alone nasty spikes generated by the igniter. refer to the attachment... i've provided 3 ways for passive 12V to 5V level shifting. there is active way using transistors but i dont recommend it for complexity reason unless you are building super robust multi K$ device. also shown is how you control 12V relay from an mcu using low side npn bjt, fwiw ymmv.
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 
The following users thanked this post: Sebastian S.

Offline Sebastian S.Topic starter

  • Newbie
  • Posts: 9
Re: Forcing Accessory-Mode in Vehicle after stopping the engine
« Reply #11 on: January 19, 2019, 11:06:17 am »
I see, that makes sense. So you're not talking about the VDD input but about the Input pins where the 12V battery is currently connected to, correct?

Implementing one of your solutions would drop that voltage to levels the chip yould take. Now my question is, according to the datasheet this is already implemented with each I/O pin by default, at least that's how I understood it.
 

Offline mvs

  • Frequent Contributor
  • **
  • Posts: 370
  • Country: de
Re: Forcing Accessory-Mode in Vehicle after stopping the engine
« Reply #12 on: January 19, 2019, 12:31:00 pm »
Now my question is, according to the datasheet this is already implemented with each I/O pin by default, at least that's how I understood it.
PIC has clamping diodes on each GPIO pin to power rails, but nothing to limit current flown through. So you will need at least a resistor connected in series. I would go for 10K - 47K here.

Do not forget also to put sufficient static load on power rails, clamped current needs to be consumed some way. Power indication LED is usually quite good solution for this.
« Last Edit: January 19, 2019, 12:33:04 pm by mvs »
 
The following users thanked this post: Sebastian S.

Online Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11630
  • Country: my
  • reassessing directives...
Re: Forcing Accessory-Mode in Vehicle after stopping the engine
« Reply #13 on: January 19, 2019, 12:44:35 pm »
I see, that makes sense. So you're not talking about the VDD input but about the Input pins where the 12V battery is currently connected to, correct?
yes, and yes you are correct about internal clamp diode, you may not installed external diode, but you'll need limiting resistor, 10Kohm is advisable.
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 
The following users thanked this post: Sebastian S.

Offline viperidae

  • Frequent Contributor
  • **
  • Posts: 306
  • Country: nz
Re: Forcing Accessory-Mode in Vehicle after stopping the engine
« Reply #14 on: January 20, 2019, 05:07:30 am »
If I were you I'd do a proof of concept first.
The last thing you want is to spend a whole bunch of time designing and building something to find out you can do it.

It's possible the ECU will detect the ACC line still active after turning it off and throw a fault code, switching on the check engine light.
 

Offline Sebastian S.Topic starter

  • Newbie
  • Posts: 9
Re: Forcing Accessory-Mode in Vehicle after stopping the engine
« Reply #15 on: January 20, 2019, 12:35:43 pm »
If I were you I'd do a proof of concept first.
The last thing you want is to spend a whole bunch of time designing and building something to find out you can do it.

It's possible the ECU will detect the ACC line still active after turning it off and throw a fault code, switching on the check engine light.

That's the goal. Investing in a few bucks to try this out is ok for me. After the chip is programmed everything will be tested on a breadboard with a LED as indicator of power running. Since I need 12V to programm the chip I got now (but is missing in tinyCAD) it's perfect to check everything.

I will check for actual dark current one the contraption is in place
I will check for fault codes a few times after to be sure and if any are placed if they're critical.

I'm not sure if I should add a resistor into the circuit for the door signal since the switch itself doesn't provide one. I'd be checking just for a closed loop at this point with no way of telling if the contact is shortet to ground or not.
« Last Edit: January 20, 2019, 12:38:01 pm by Sebastian S. »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf