I am a 100% software guy, so i wanted to confirm that my little project is gonna work before i fry everything.

I am trying to create a controller for my (quiet old) Onkyo reciever. I am trying to do this by using a proprietary 3.5mm mono jack they have on their devices.

The protocol is quite easy.(If you want to have a look a it) I just have to connect a 3.5mm Jack to a gpio pin to signal high and low, the problem is that 5V are required and to my understanding the gpio pins only provide 3.3V.

So my idea was to wire the 3.3V GPIO with the base of a transistor and then use the 5V powersupply.

Crude Schematic

Now I have a few points i am unsure about:

  1. Do i really need a npn transistor or a different one?
  2. What do i have to consider while buying a transistor?
  3. Did i forget something important?

Thx a lot for helping me out.

EDIT: Thanks to Steve G's response I was able to solve this and do some reading up, if anyone else wants to read up the keyword that got me started was "level shifting", an easy concept once you know what you are searching for exactly.

  • \$\begingroup\$ What you've drawn will not work. I will answer later. \$\endgroup\$
    – Steve G
    Nov 4, 2016 at 14:39
  • \$\begingroup\$ While TTL logic is nominally 5V, the voltage level that is interpreted as high is considerably lower. It changes from family to family, but plain old TTL it was 2 volts, so 3.3V should work. Personally I'd be more worried about ground loops between the Pi's power supply and the receiver if that input was not already opto isolated (and it may be for all I know) \$\endgroup\$
    – infixed
    Nov 4, 2016 at 14:48
  • \$\begingroup\$ I was going to say that what you have won't work because there is nothing pulling the output back down but with a bit of digging it looks like the CD player includes a 10k pull down on that signal so you may be OK. \$\endgroup\$
    – Andrew
    Nov 4, 2016 at 14:48
  • 2
    \$\begingroup\$ FYI we all have a life outside EE.SE as well so not everyone will see your question immediately. Adding the line "Since noone bothers to answer" less than an hour after you posted the question is not going to do you any favours. \$\endgroup\$ Nov 4, 2016 at 14:50
  • \$\begingroup\$ Im sry if noone bothers to answer seemed rude. Im just used to having fast responses on stackoverflow and if you dont get any it generally is a sign that your question is just flat out bad/not even remotely working. What I wanted to say with that, is that I figuered I made some really crucial mistakes while drawing this up and wanted to ask for pointers, where to read up, because I assumed I didn't understand the whole problem at all. And of course I understand noone wants to type up a full beginner's guide here. \$\endgroup\$
    – s_qw23
    Nov 4, 2016 at 14:54

1 Answer 1


Try this circuit. You can use most common NPN general purpose transistors, the editor defaults to 2N3904, but 2N2222 or BC848 will work.


simulate this circuit – Schematic created using CircuitLab

  • \$\begingroup\$ Thanks a lot. Can I ask why Q1 and R2 are necessary at all? And does it matter if you put the OUTPUT before or after Q2? (I gather it does?) \$\endgroup\$
    – s_qw23
    Nov 4, 2016 at 15:11
  • \$\begingroup\$ To level shift the 3.3V output from the GPIO pin to 5V which you said you needed. It also provides protection to the Pi in case the receiver outputs 5V due to a pull up to 5V on the input. It may work without level shifting, but since I have no idea what circuitry is inside the receiver this guarantees it will work. You could just try a direct connection from the Pi to the receiver. But don't be too surprised if there is 5V present on the input which may damage your Pi. \$\endgroup\$
    – Steve G
    Nov 4, 2016 at 15:20
  • \$\begingroup\$ Thanks a lot. That was really helpful. The hero of the day :D \$\endgroup\$
    – s_qw23
    Nov 4, 2016 at 15:23

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.