Friday, 24 January 2020

transistors - Add 3.5mm Jack to Raspberry Pi for TTL Signal with 5V


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.



Answer



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


schematic


simulate this circuit – Schematic created using CircuitLab



No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...