Forcing Accessory-Mode in Vehicle after stopping the engine - Page 1
Forum section: electronics / beginners

author: Sebastian S.
author_rank: Newbie
timestamp: January 18, 2019, 02:40:21 pm
content: 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 ) and Ignition (further refered to as ) are controlled by 2 independent relaysSaid relays are switched on and off by the Start Stop Unit (further refered to as )Upon pushing the Start button once,  is turned on. Pushing a second time,  is turned on. If the clutch (MT) or Brake pedal (AT) is depressed the engine will start in any modeWhile the engine is running and the Button is pressed everything will be turned offSoftware 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 timeMy requirements for the component to addReceive both 12V and Ground from the vehicle to operate. Voltage source can go up to 16VReceive 12V from  as signal so turning off the vehicle can be detected. Again spikes up to 16V should be coveredReceive 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 -relayDark current should be as low as possible and not exceed 5mA when Vehicle is lockedAn adjustable or fixed timer should be available and start as soon as  is turned offFunction: Upon Turning on  the module also starts sending power to the -Relay. Upon switching  off a timer starts (e.g. 40 seconds) and keeps the Output to  alive. If either the timer reches its end or the drivers side door opens the power output to the -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.

author: Mechatrommer
author_rank: Super Contributor
timestamp: January 18, 2019, 03:27:29 pm
content: 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.

author: cs.dk
author_rank: Unknown
timestamp: January 18, 2019, 03:38:38 pm
content: Which car? There may all ready be a solution out there for you..

author: Sebastian S.
author_rank: Newbie
timestamp: January 18, 2019, 03:46:04 pm
content: Quote from: Mechatrommer on January 18, 2019, 03:27:29 pm1) 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.

author: Mechatrommer
author_rank: Super Contributor
timestamp: January 18, 2019, 05:54:13 pm
content: Quote from: Sebastian S. on January 18, 2019, 03:46:04 pmany 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.Quote from: Sebastian S. on January 18, 2019, 03:46:04 pmthis 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.

author: Sebastian S.
author_rank: Newbie
timestamp: January 18, 2019, 08:14:10 pm
content: Quote from: Mechatrommer on January 18, 2019, 05:54:13 pmSo 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/PIC16F628https://www.digikey.com/product-detail/en/stmicroelectronics/L4931CZ50-AP/497-5838-1-ND/1506450

author: Mechatrommer
author_rank: Super Contributor
timestamp: January 18, 2019, 11:41:54 pm
content: Quote from: Sebastian S. on January 18, 2019, 08:14:10 pmyes. 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.

author: MavMitchell
author_rank: Contributor
timestamp: January 19, 2019, 01:02:18 am
content: 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?

author: amyk
author_rank: Super Contributor
timestamp: January 19, 2019, 01:24:48 am
content: 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.

author: Sebastian S.
author_rank: Newbie
timestamp: January 19, 2019, 09:50:10 am
content: Thanks for all you input:Quote from: Mechatrommer on January 18, 2019, 11:41:54 pmI 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?Quote from: MavMitchell on January 19, 2019, 01:02:18 amThis 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.Quote from: amyk on January 19, 2019, 01:24:48 amThese 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) > OFFThere is no switching type relay, it's 2x normally open types for either ACC or IG

author: Mechatrommer
author_rank: Super Contributor
timestamp: January 19, 2019, 10:49:28 am
content: Quote from: Sebastian S. on January 19, 2019, 09:50:10 amyou 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.

author: Sebastian S.
author_rank: Newbie
timestamp: January 19, 2019, 11:06:17 am
content: 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.

author: mvs
author_rank: Frequent Contributor
timestamp: January 19, 2019, 12:31:00 pm
content: Quote from: Sebastian S. on January 19, 2019, 11:06:17 amPIC 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.

author: Mechatrommer
author_rank: Super Contributor
timestamp: January 19, 2019, 12:44:35 pm
content: Quote from: Sebastian S. on January 19, 2019, 11:06:17 amyes, and yes you are correct about internal clamp diode, you may not installed external diode, but you'll need limiting resistor, 10Kohm is advisable.

author: viperidae
author_rank: Frequent Contributor
timestamp: January 20, 2019, 05:07:30 am
content: 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.

author: Sebastian S.
author_rank: Newbie
timestamp: January 20, 2019, 12:35:43 pm
content: Quote from: viperidae on January 20, 2019, 05:07:30 amThat'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 placeI 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.