1
\$\begingroup\$

I have an aftermarket stereo that has an input to toggle the reverse camera display. When I apply +12v to the input it switches to the video input. This input is not used to power the camera or anything else - so it doesn't really carry a load - guessing it's just connected to a comparator. I've looked at relays (seem like overkill) and BJTs. What's the simplest way to provide +12v to this type of no-load application using the +5v output pin on an Arduino as the source?

\$\endgroup\$
  • \$\begingroup\$ Assuming you have a 12V supply you can use, the simplest way is with a BJT. Look more closely. \$\endgroup\$ – Finbarr Jul 26 '17 at 14:05
  • \$\begingroup\$ I guess that needs to be made clear, because I assumed the opposite - that all he had on the board is 5V. \$\endgroup\$ – Reinderien Jul 26 '17 at 14:14
  • 1
    \$\begingroup\$ It would seem reasonable to assume that the 12V stereo is being powered by 12V. \$\endgroup\$ – Finbarr Jul 26 '17 at 14:23
  • \$\begingroup\$ Yes, the stereo is 12v. I was looking at the PNP high side switch mentioned here but it says "For example, this circuit wouldn’t work if you were trying to use a 5V-operating Arduino to switch on a 12V motor." - Finbarr could you give an example of an appropriate BJT circuit? \$\endgroup\$ – cwd Jul 26 '17 at 14:49
  • \$\begingroup\$ Here's one example though if your stereo input took a low enough current and you could set the output pin low when you wanted video you could get away with a single transistor using a common emitter amplifier \$\endgroup\$ – Finbarr Jul 26 '17 at 15:07
2
\$\begingroup\$

I'll add some specifics. Before I do, a short discussion of my thinking.

  1. I do not know what you are talking about when you discuss an amplifier and a camera. It would have helped clarify my own understanding as to whether or not anything I say here would be helpful, if I knew more about what you are discussing. But I don't. So I'm going to completely ignore the camera and just assume we are talking about an amplifier that has "special features" I don't apprehend well.
  2. You already have tested the idea of supplying \$+12\:\textrm{V}\$ to an "input." From this, I adduce that you (a) used the existing supply in the amplifier to achieve this; (b) just used a single wire jumper; and (c) didn't need a second reference point since an assumed shared ground reference already existed. I am not sure if this input has 1 pin or 2 pins (a + and -?) But for our discussion purposes, I'll just assume 1 contact point is required and that there is an assumed shared reference, regardless.
  3. These things tell me you do have a way of accessing the amplifier's \$+12\:\textrm{V}\$, single input point you are trying to control, and also the amplifier's ground point.
  4. I'm also going to assume that you can connect the Arduino ground to the amplifier ground without causing any trouble in either system. (This may be true, but opens the door to some unlikely but possible problems.)
  5. You've said (but apparently didn't measure) that very little current is probably required by your amplifier's input-under-consideration.
  6. You've asked for the simplest way.

The following is based on a pretty simple idea. Just tie the input to your amplifier's \$+12\:\textrm{V}\$ supply rail through a resistor, to start. This will cause it to be always active, if you don't do something else. Then, add a BJT switch to pull that input down to ground (or close to it.) If your I/O pin is HI, then the BJT switch is ON and the control input to the amplifier should be close to ground. If the I/O pin is LO, then the BJT switch is OFF and the control input to the amplifier should be close to \$+12\:\textrm{V}\$.

Examine the left side first:

schematic

simulate this circuit – Schematic created using CircuitLab

On the left, \$Q_1\$ and \$R_2\$ help to isolate your Arduino input from the \$+12\:\textrm{V}\$ supply and it's probably all you really need. But if you are risk-averse then you could also consider the right side, where the added BAV99 diode pair clips any unusual voltages and limits unexpected currents from them into your I/O pin. Cheap protection, but perhaps over-kill too.


You could also just go with an opto, if you wanted. This would keep the two systems galvanically isolated (good thing) and doesn't cost much (about half a dollar) and uses a part that is supplied from multiple manufacturers. Let me know if that's what you'd prefer to use. If so, I'll add a circuit for it.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Not 6N137 it needs 5V secondary supply and output is rated for 7V max. 4N35 would be a good choice. \$\endgroup\$ – Bruce Abbott Jul 26 '17 at 21:18
  • \$\begingroup\$ @BruceAbbott Yeah, so I completely forgot about that. All I was thinking about was my recollection of a mosfet output and I just assumed. Thanks! \$\endgroup\$ – jonk Jul 27 '17 at 2:39
  • \$\begingroup\$ @jonk - your suggestion seems like the way to go - thank you. If However, if I wanted to use the opto - could you recommend one? \$\endgroup\$ – cwd Jul 29 '17 at 1:45
  • \$\begingroup\$ @cwd Bruce mentioned the 4N35. It's fine. Over temp, it guarantees a CTR of 40. If that becomes a problem, you could go for a high CTR of 500: IL223AT, for example. (Opto darlington.) But I don't think you need a high CTR. I think you can be fine with the 4N35. Get something cheap, commonly available, etc. No need to go crazy. As I said, if you need a circuit to try, I could add one. Or you can just look it up. Mostly, you supply the diode a current and the transistor on the other side passes some current via its collector. Simple like the left side circuit but with the I/O pin to a diode. \$\endgroup\$ – jonk Jul 29 '17 at 3:08
0
\$\begingroup\$

If you do not have access to a 12V supply, the simplest way is an inductor-less charge-pump fixed switching reg such as the STMicroelectronics ST662ACD-TR (https://www.digikey.ca/product-detail/en/stmicroelectronics/ST662ACD-TR/497-6542-1-ND/1865353).

If you do have access to a 12V supply, and you are able to configure your MCU pin to be open-collector/open-drain, the simplest way is a pre-biased PNP BJT such as the FJN4309. (This would also require that your MCU pin be 12V-tolerant, which is debatable and depends on the device). The safer solution would be an N-channel FET stage before the high end.

| improve this answer | |
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.