2
\$\begingroup\$

I'm trying to make a circuit in my car that emulates a CD/MD changer device to the radio so these can be chosen as audio source and switched to. Everything works great, but one problem is that the arduino can get its power backfed from D2, D3, D4 which go to the radio through 3 100 ohms series resistors. The connector that goes into the radio is $P1 to $P8 in the sch below, VCC comes from $P4 and GND from $P5. All the data signals are bidirectional, so a simple diode won't work.

I've seen solutions which use a low-side switch triggered by the 12V pin being powered, but in a car, the 12V stays on when the car isn't running, so I don't think that would work.

I could route one of my headlight or parking light +12V to only power from second contact onwards, but I'd rather not have my lights break due to what I'm doing on the radio.

How can I prevent the backfeeding from happening?

I guess the way forward would be to only power the circuit when the car is running, but a high-side switch would not prevent backfeeding and a low-side I'm not sure about.

arduino sch

\$\endgroup\$
5
  • \$\begingroup\$ Most people use wires to connect circuits in schematics because, things get clearer and you don't end trying to figure out if a node connects to somewhere else. Where are the diodes you mention? I see connector P$1 but, I don't see $P1. \$\endgroup\$ Commented Feb 22 at 15:40
  • \$\begingroup\$ The answer depends on what kind of circuitry there is in the radio and how it must be interfaced. Please provide link to radio schematics and protocol description. \$\endgroup\$ Commented Feb 22 at 15:47
  • \$\begingroup\$ The radio is proprietary so no schematics, I had to reverse engineer the protocol in order to get it working. It's a custom CAN based bus used by Volvo and Nissan called melbus, it's basically a 60kHz 3 wire SPI signal with a bidirectional data line and clock (and busy/CS). \$\endgroup\$ Commented Feb 22 at 16:28
  • \$\begingroup\$ On most of the cars I got into the guts of the radios (been a while since it felt worth the effort) there were both switched (Ignition On/Accessory position) and unswitched 12V available at the radio harness (some also had a separate lighting 12V line connected to the lights.) \$\endgroup\$ Commented Feb 22 at 19:21
  • \$\begingroup\$ I don't see why this question needs to be be down voted. It's a fairly legitimate question to ask \$\endgroup\$ Commented Feb 23 at 3:35

2 Answers 2

2
\$\begingroup\$

Here's a design using a MOSFET to disconnect the two devices when Arduino power is absent:

schematic

simulate this circuit – Schematic created using CircuitLab

When V2 (Arduino power) is low, Q1 is switched off. In that state, the I/O pin of "other" can have zero or greater potential, and no current (except negligible leakage) can pass via Q1's body diode.

When the Arduino has power, Q1's gate is held at +5V, and this design behaves like the popular bidirectional level translator. Both devices have their inputs held high by default, due to R1 and R2. If either device's I/O pin becomes a low impedance output, and forces that pin low (0V), the MOSFET switches on, and the other side adopts that same low potential.

Duplicate this arrangement of R1, R2 and Q1 for each of the other channels, D3 and D4.

\$\endgroup\$
1
\$\begingroup\$

Although my use case is very different, I have often dealt with backfeeding (including signals on input pins when the microcontroller is off) by inserting current-limiting resistors in the path. Most microcontroller pins have protection diodes and/or can tolerate a small current without damage. The old Arduino UNO had a tolerance of around 2ma, I seem to remember, so to protect against a 5 volt backfeed, I used a 4.3k resistor. I never had any problems with either the microcontrollers or the instruments to which they were connected.

\$\endgroup\$
1
  • \$\begingroup\$ Current limiting resistors won't work on a bi-directional line that needs to be pulled down to low voltage as the series resistor prevents this. Series resistors don't fully remove the problem, they still allow data pins to leak to supply, and some MCUs do not tolerate it, or at least the idea of misusing the internal protection diodes for normal use case is not very good. A proper solution is recommended. \$\endgroup\$ Commented Feb 22 at 21:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.