I'm currently working on a project that involves emulating cruise control key presses using a microcontroller, but I'm a little stuck on how to mimic the "on" key press. All of the other keys simply connect the speed control switch input wire and the speed control switch ground wire with different pull-down resistors, but the "on" key instead connects the speed control switch input with the horn relay control. I tested both wires in my car with my multimeter, and I found that the speed control input is about 8V on battery power and 10V on the alternator, while the horn relay control is about 12V on battery power and around 13.5 on the alternator. With the other switches I was planning on using a transistor array to simulate each key press. Is there any type of transistor or ic that can act as a switch between these two wires and be controlled by a microcontroller?

  • \$\begingroup\$ yes, there probably is a transistor or an IC that can act as a switch ... did you really mean to ask a question that has a yes/no answer? \$\endgroup\$
    – jsotola
    Commented Nov 26, 2019 at 3:06

1 Answer 1


so the control wires idles at about 8V and the horn relay has about 12V on it (no suprises there the horn relay resistance is only a few hundered ohms)

a tranbsistor array like ULN2003 is an interesting choice for the pull-down, but it could be made to work. darlington transistors have an inherent 0.6V minumum output voltage becasue the output transistor gets most of its base current from the collector terminal, you'll probably need to compensate for this by reducing the resistance of the resistors.

for the pull up to +12 I'd use a PNP transistor.


simulate this circuit – Schematic created using CircuitLab

Sorry about the cramped schematic, circuit lab would not allow me to draw "wire"

the diode is needed to prevent Q1 from self-distructing when someone sounds the horn. Q2 could be replaced with one of the channels of the transistor array. if you are not installin in the steering wheel you coul connect to the other side of the horn relay (or a simialr 12V source) and not need the diode.

  • \$\begingroup\$ You can draw wire. You just have to click and drag the mouse from any node. \$\endgroup\$
    – Mitu Raj
    Commented Nov 26, 2019 at 6:07
  • \$\begingroup\$ yeah, after a reboot it now works, apparently caused by too-much uptime, or at-least cured by a reboot. \$\endgroup\$ Commented Nov 26, 2019 at 19:27

Your Answer

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

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