Connect with us

Beginner question: diodes?

Discussion in 'General Electronics Discussion' started by Adam Novagen, Dec 7, 2012.

Scroll to continue with content
  1. Adam Novagen

    Adam Novagen

    Dec 7, 2012
    Hello all!

    I think this is the right forum for this question, and a quick search to see if my question had been resolved in years gone by revealed nothing, so here goes.

    I'm doing a little hobby project, which I call the Mega Pi. I'm installing a Raspberry Pi inside the shell of an old SEGA Genesis (Mega Drive). The model 1, in case you're wondering. Rather than simply stick the Pi inside the plastic case, though, I decided to fiddle around with the Genesis' board and see what I could do to make the unit look and feel as much like the original as possible. So far, I have successfully hijacked the original power switch, power input (the R-Pi is powered via microUSB but a quick cable splicing solved that), power LED, and converted the RF output jack to work as the composite video output. I'm now working on the headphone jack, though, and here's where I've hit a slight hiccup.

    For those of you that don't remember or know, the model 1 Genesis had a stereo headphone jack and a lovely potentiometer-controlled volume slider on the console itself, which I intend to put to use. The initial splicing went perfectly, the headphone jack is fully operational as normal with no issues. The volume slider, however, is another story. At first glance, it appears to have six leads connecting it to the motherboard, or two pairs of three. Okay, I thought, left, right, ground. Standard headphone setup, no biggie. After some significant soldering and testing, however, I discovered that four of the six leads are in fact dummies, serving only to anchour the potentiometer to the board; only one pair is actually operational. Alright, I thought, no big deal; I'll just do the obvious, and connect the headphone ground cable to the one active slider, thereby controlling the volume of both channels at once. I quickly discovered it wasn't that simple.

    The connection works perfectly, and acts as it should; however, when I turned the volume down (via the slider), I noticed a strange phenomena. The sound changed; it didn't exactly fade per se, but rather became thinner and distant. I also noticed that certain parts of the music I was using to test the connection stayed perfectly audible, while others disappeared. That's when I realized what was obviously happening.

    The sounds that were disappearing were the more "centred" sounds, the ones that would require both channels to carry the same level of voltage at the same time. I realized that since I had "lowered the volume" by increasing the resistance on the ground line, the left and right channels had simply formed a circuit with each other; that is to say, a mono sound producing the same waveform in both channels at once would simply cancel itself out, while sounds that were different between the two channels would actually "rock" back and forth between them. A kind of two-way mono circuit, if you will.

    The solution seems obvious: diodes. One diode on both the left and the right channel, so that they can no longer "bleed through" each other in this way. The thing is, while I'm great at the theory of circuit logic and electrical flow, I have no actual training in what really makes electronics tick, so I have no idea what diodes I'd need for this - volts, amps, frequency etc, I don't even know what terms to use - or even if this idea would actually work.

    So that's the situation. Sorry for the long post, but I wanted to make sure I provided enough information; any advice?
  2. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    Jan 21, 2010
    Diodes and audio don't mix (there's a pun in there if you look hard enough, I'm sure)

    It sounds like you're shorting the channels together as you lower the volume control.

    If you can draw up a quick circuit diagram of what you've done it will be easier to visualise.

    Is this volume control on a signal output, or a power output (i.e. after a preamp, or after an amp designed to power headphones or even speakers)?
  3. Adam Novagen

    Adam Novagen

    Dec 7, 2012
    Yeah, shorting them together sounds like what I'm trying to describe. As for a circuit diagram, I've put together what I -think- is a proper diagram of what I'm doing. As you can see, it's very basic, mostly because that matches my knowledge of what I'm doing here. :p The "50K-B" label on the potentiometer is gibberish to me, but it was marked as such on this schematic of the Genesis' audio output (lower right corner, marked "VR1") so I figured I'd include it in case it was of any use.

    The intention here is as follows: this is essentially a male-to-female 3.5mm stereo cable. The male plug connects to the Raspberry Pi, and the female jack is the Genesis' original headphone jack, which shall be returned to its normal place in the console's shell. What I need (or rather, want) to do is figure out how to control the volume of the sound along this cable using the single-line potentiometer.

    In case any of the other circuitry on the Genesis schematic catch your eye, I should warn you that I've had this board since it became defunct many years ago, when I was thirteen, and being an avid tinkerer that knew absolutely nothing about what I was doing, I stripped off about half of the capacitors and transistors on the board, including those in the audio region. I have a very capable mini breadboard which I'm already using in this project, so I'm not averse to making my own little circuit to get this volume scheme working if I need to, but don't think any of the components on the schematic will help because they're long gone (and the board itself is in pretty shabby condition there due to my crude methods of removing them).

    Attached Files:

    Last edited: Dec 7, 2012
  4. Harald Kapp

    Harald Kapp Moderator Moderator

    Nov 17, 2011
    When you increase the resistance of the potentiometer, the return path (GND) for the current is gradually closed. Therefore the speakers/headphones will see only the difference signal between left and right. Since this difference is usually small, the sound becomes rather silent.
    You can verify that by two methods:
    - remove the GND wire at all. You should hear the same sound as if the potentiometer is set on high.
    - Apply a pure mono signal to your circuit. The sound should dissappear wehn the pot is turned on high.
    You cannot control the amplitude of a stereo signal with a mono potentiometer. You will need a voltage controlled volume control like the TDA1526.
    It may be easier to buy a fitting stereo potentiometer for your application.

    Last edited: Dec 7, 2012
  5. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    Nov 28, 2011
    As others have pointed out, you can't connect the potentiometer in the ground lead of the headphones. This will cause the problem you describe, where the sound becomes thin and disembodied. This is not just because you only hear the sounds that are far from the middle, it's also because you hear the same sound in the left and right ears, but the two sides are out of phase from each other!

    You also won't be able to connect that potentiometer in series with the headphones at all, because it is a 50 kilohm potentiometer (the "50K-B" marking) and it can't provide enough signal to the headphones, except at its maximum setting, so you will not be able to control the level with it.

    What you need is a separate headphone amplifier. You connect the potentiometer between the Raspberry Pi's output and the headphone amplifier, and connect the headphone amplifier to the headphone socket.

    The Raspberry Pi presumably has a headphone amplifier on-board and it might be possible to modify it to connect your potentiometer in line with the input to that amplifier. If you can point me to a schematic of the Raspberry Pi I may be able to suggest something.

    Are you sure only two terminals are used on the volume potentiometer? Does the Genesis have stereo sound output on the headphone socket, or just mono? The sound through the modulator is just mono. If you have a mono potentiometer, you will need a variable-gain stereo amplifier if you want to control a stereo signal with it. Alternatively, is it possible to replace the slider potentiometer with a stereo one, while keeping the knob the same so the external appearance isn't changed? One final possibility would be to convert the Raspberry Pi's audio output to mono, pass it through the mono potentiometer, then amplify it with a mono headphone amplifier. Of course, this would only give a mono signal to the headphones.

    Edit: Harald has already mentioned the voltage-controlled stereo amplifier, and the option of replacing the potentiometer with a stereo one.

    To the OP: It might be helpful if you uploaded a photo of the unit so we can see the mechanical issues and the details of the original volume potentiometer.
    Last edited: Dec 7, 2012
  6. BobK


    Jan 5, 2010
    Or, your could connect the variable resistor to a current source and then run the voltage across it into an anlog input on the raspberry pi and control the volume in software...

  7. Adam Novagen

    Adam Novagen

    Dec 7, 2012
    Thanks for all the insight, guys! Since you made it clear that the single-line approach wouldn't work, I shifted my thinking. To my delight, I remembered that I had a third working Genesis in storage, as a backup if my main one ever failed. With a little delicate finagling, I removed the volume slider from that one, leaving a jumper cable in its place to leave the headphone jack usable, if locked at maximum volume. Then, with a little plastic melting and bonding, I managed to affix the second potentiometer to the one I had originally connected to the ground line, effectively turning them into a single stereo slider.

    One for left, one for right, and here I am listening to perfect volume-controllable audio that still fits inside the Genesis case and works as it should. Thanks again mates!
  8. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    Nov 28, 2011
    Cool! Nice work.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day