1
\$\begingroup\$

I would like to convert the voltages from my Eurorack Modular Synthesizer to the voltages accepted at the GPIO pins of a Raspberry Pi 3 Model B Computer and vice-versa.

Unfortunately I have no clue about electronics, yet i know that the Eurorack-system works with voltages from -5 to 5V and the GPIO pins accept 0 to 3.3V.

The Raspberry Pi runs on 5V DC (1A), in case this is or relevance.

I'd be gracious for any help.

\$\endgroup\$
11
  • \$\begingroup\$ Are these analogue voltages or digital levels? \$\endgroup\$
    – Andy aka
    Jun 30, 2017 at 13:35
  • 1
    \$\begingroup\$ in Eurorack, this may vary. Most of the time the levels are analog, though. GPIO is always digital to my knowledge. \$\endgroup\$
    – benniy
    Jun 30, 2017 at 13:36
  • \$\begingroup\$ So, please specify what you want - I saw you said GPIO and does this mean we can assume you mean digital voltages and not analogue voltages? \$\endgroup\$
    – Andy aka
    Jun 30, 2017 at 13:46
  • \$\begingroup\$ i thought this was made clear, i'm sorry. i would like read out the voltages sent from my Eurorack synthesizer at the GPIO pins of a Raspberry Pi Computer. The Voltage ranges differ, therefore i'm of the assumption that i need to convert them. i'm sorry for my latin – being at a very novice stage (and in this conversation, for this reason and for learning more), i'm not aware of the differences in analog and digital voltages and the like. \$\endgroup\$
    – benniy
    Jun 30, 2017 at 14:01
  • 1
    \$\begingroup\$ You can't read analogue voltages at a GPIO pin unless it has an alternative analogue function specified. Can you be clearer? \$\endgroup\$
    – Andy aka
    Jun 30, 2017 at 14:05

1 Answer 1

3
\$\begingroup\$

First, there's no ADC on the Raspberry Pi, so you can't just read analog values with Pi even if you scale the voltage range to acceptable limits. All GPIO terminals on the Pi are digital.

If you just want to receive digital signals it's super easy to do with just a transistor. Here on this schematic the R2 and Q1 form a voltage divider. The center point of the divider is connected to GPIO of Pi. When your input voltage is somewhere above 0 (so enough current is flowing into the base of Q1) the transistor will open so voltage between collector and emitter will become low. GPIO level would be low (0). When input voltage is low or negative the transistor will close and it's resistance will be much higher than R1 so GPIO level will be high (1). Effectively it is an inverting input, I think it shouldn't be a problem for your software.

schematic

simulate this circuit – Schematic created using CircuitLab

You would have to connect 3 wires to your Pi GPIO header: +3.3V, GND, and one IO pin (input). And don't forget that input is two wires: the input signal and the ground connection.

The Q1 part number 2N3904 is just an example. Any small signal NPN transistor will work here.

\$\endgroup\$
12
  • \$\begingroup\$ thats simply incredible! perfectly explained for me to undertand – thanks a ton!! \$\endgroup\$
    – benniy
    Jun 30, 2017 at 14:58
  • \$\begingroup\$ can i use "any" 2N3904? finding lots of ones with this name and some letters behind :) like this one: conrad.de/de/… \$\endgroup\$
    – benniy
    Jun 30, 2017 at 15:10
  • 1
    \$\begingroup\$ @benniy yes, the letters after 3904 describe some technical details, most likely packaging. This transistor will work. \$\endgroup\$ Jun 30, 2017 at 15:18
  • \$\begingroup\$ <3 t h a n k y o u ! \$\endgroup\$
    – benniy
    Jun 30, 2017 at 15:21
  • \$\begingroup\$ hei @Volodymyr, i'm back :) have tried around and – it's weird... the first time i forgot the 100k resistor (amn't i stupid?) and it worked. then i recreated the circuit twice and it stopped working. i'll redo it tomorrow, but is there a) any change the 100k resistor is wrong or b) did i do a mistake when duplicating the circuit? here's a picture: picload.org/image/rpdpwccl/screenshot2017-06-30at23.44.20.png \$\endgroup\$
    – benniy
    Jun 30, 2017 at 21:44

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.