Uncategorized

Treadle Pot interface problem

***Answer***

*(1) The treadle pot schematic*

[![treadle pot][1]][1]

*(2) ADS1115 Wiring and Testing*

[![ads1115 1][2]][2]

[![ads1115 2][3]][3]

*(3) Rpi4B pinout for reference to connect to treadle pot and ADC*

[![rpi4b pinout][4]][4]

(4) EV-2 + ADS1115 + Rpi4B Schematic
[![ev-2][5]][5]

(5) [EV-2 schematic with pull up to avoid floating input][6]

***References***

(1) [EV-2 Expression/Volume Pedal – Fractal Audio Systems $120][7]

(2) [ADS1115 16-Bit ADC – 4 Channel with Programmable Gain Amplifier – AdaFruit $15][8]

(3) [Why is my linear pot is causing a non-linear voltage at my ADC input? Asked 2020feb08 Viewed 70 times][9]

(4) [Understanding Expression Pedals – 2014mar20][10]

(5) [Use Pi as a MIDI Controller Input – 2019apr28][11]

(6) [EV-2 + ADS1115 + Rpi4Bb Schematic V0.1 – CircuitLab (public)] [12]

(7) [EV-2 + ADS1115 + Rpi4B Schematic V0.1 – PDF (public)][13]

(8) [Strymon Tech Corner #1 – Anatomy of an expression pedal – Terry 2010jul12][14]

(9) [Strymon Tech Corner #1 – Anatomy of an Expression Pedal – 35,062 views 2010jul12][15]

[1]: https://i.stack.imgur.com/muTdH.jpg
[2]: https://i.stack.imgur.com/m14w5.jpg
[3]: https://i.stack.imgur.com/qFKpn.jpg
[4]: https://i.stack.imgur.com/EALcI.jpg
[5]: https://i.stack.imgur.com/q2u5l.jpg
[6]: https://www.circuitlab.com/circuit/kpbne4b569at/ev02-20_2020feb1202/
[7]: https://shop.fractalaudio.com/ev-2-expression-volume-pedal/
[8]: https://www.adafruit.com/product/1085
[9]: https://electronics.stackexchange.com/questions/480171/why-is-my-linear-pot-is-causing-a-non-linear-voltage-at-my-adc-input/480198?noredirect=1#comment1220708_480198
[10]: https://missionengineering.com/understanding-expression-pedals/
[11]: https://raspberrypi.stackexchange.com/questions/98016/use-pi-as-a-midi-controller-input/98026#98026
[12]: https://www.circuitlab.com/circuit/evv92uun29wq/ev-2-expression_volume-pedal-v0_1/
[13]: https://www.circuitlab.com/circuit/evv92uun29wq/render_export/ev-2-expression_volume-pedal-v0_1.pdf?k1=15814982180&k2=81e2f268dca573d2fc029b4c9710da5d&NOTE=Temporary_URL_only._Please_download_and_save_to_your_computer.
[14]: https://www.strymon.net/strymon-tech-corner-1-anatomy-of-an-expression-pedal/
[15]: https://www.youtube.com/watch?time_continue=10&v=qioT-ux_VxM&feature=emb_logo

Asked 
Active today
Viewed 2k times

 

8

 

2

I have a Pi 3b+ in a MIDI foot controller and part of the I/O is a pair of expression pedal sockets. After, ahem, getting the tip and sleeve round the wrong way, they are working correctly now.

But, during testing, I disconnected one while the system was powered up and it shorted out the Pi, which is now dead. The circuit feeds 3.3 V to the ring, which is connected to the pedal potentiometer, and measures the voltage off the tip (connected to the pot’s wiper). When the pedal is disconnected, the plug temporarily shorts the ring (3.3 V) to ground. So I added a 150 Ω resistor on the 3.3 V supply wire. But I don’t know if that’s enough, and I’m not game enough to try it without being fairly certain I won’t destroy another Pi.

Is a current limiting resistor enough? If so, what value is “enough”?

Or do I need something more complicated to protect the Pi?

I don’t know exactly how long the short lasts for, but it’s well less than a second in practice.

Note: The circuit has an switch in the socket, so I can add a little bit of extra resistance when the jack is plugged in. That way, I can detect the “unplugged” state (ADC reads full 3.3 V) and max plugged voltage 3.1 V as separate states.

  • I see the EE guys use 330R. I sometimes use 470R, and if I want to play safe 520R. – tlfong01 20 hours ago   
  • 1
    @tlfong01 Ok sounds like a need a slightly higher value. Still would like to know what the “proper” solution to something like this is. – fret 19 hours ago
  • OK, so we have agreed on the current limiting resistor value. Now let us brainstorm to get a “proper” solution. First thing first, let us look at the (1) schematic: imgur.com/gallery/aRTIokz, (2) QUESTION: electronics.stackexchange.com/questions/480171/….. / to continue, … – tlfong01 18 hours ago   
  • Let us agree what hardware and software we are talking about: (1) Pedal EV-2, (2) ADC ADS1115: (1) EV-2 Expression/Volume Pedal – Fractal Audio Systems $120 shop.fractalaudio.com/ev-2-expression-volume-pedal (2) ADS1115 16-Bit ADC – 4 Channel with Programmable Gain Amplifier – AdaFruit $15 adafruit.com/product/1085 – tlfong01 18 hours ago   
  • Now let us agree on how to connect the treadle pot to Rpi: (1) Positive side of pot to B, (2) Middle of pot to A, (3) Pot ground to C. I am not using names such as Vcc, tip, sleeve, ring etc to avoid confusion. You might like to comment on my naming, or make counter suggestion. – tlfong01 18 hours ago   
  • Now I am drafting an answer. You might like to let me know how you are going to connect the treadle to ADC ADS1115, and Rpi GPIO power pins (5V0 or 3V3) and Rpi GPIO signal input pins (input range between 0V and 3V3), input current preferably less than 2mA.. – tlfong01 18 hours ago   
  • Question: The treadle schematic shows only terminal A, B, and C. How come you inserted the extra terminal that causes all the trouble? – tlfong01 18 hours ago   
  • Question 2: Why are you suing ADS1115 I2C 16 bit ADC? This ADC si not that user friendly, comparing the much more popular SPI 10 bit/12bit MCP3008/Mcp3208. If you are not following as tutorial/instructable, I would suggest you to start with MCP3008, and if everything goes well, you can upgrade to ADS1115. MCP3008 10bit can do 2 ** 10 = 1,024 steps, and MCP3208 12 bit can do 2 ** 12 = 4,096 steps (no proof read dodgy calculation) which I think is more precise and sensitive than my stupid human foot! – tlfong01 17 hours ago   
  • 2
    I already have a bus of i2c devices… and code to work with the ADS1115… it already all works. Bar the short circuiting issue. – fret 16 hours ago
  • I see. So the plug is the only problem. It is not clear why you need the extra terminal in the plug to tell Rpi that no pedal is available. And do you mean to connect this no pedal signal to let GPIO to read. But why no ADS1115, as it is already there? – tlfong01 16 hours ago   
  • 1
    If there is no connection to the ADC when the pedal is unplugged the ADC value just floats randomly. By tying it to 3V3 I get a valid signal when unplugged. The ADS1115 is already there in the circuit reading the value off the socket. Both the plugged and unplugged states are fine. Just the transition between where it shorts. – fret 15 hours ago
  • Ah, let me see. Why not just use a Vcc pull up resistor, say 10k, connected to the input pin of the single ended ADC1115 input channel? Of course you can either pull the otherwise floating input pin to ground, if you like. If you don’t like the little difference between Vcc or Ground that might mislead Rpi, you can easily offset the treadle pot output a little bit. – tlfong01 14 hours ago    
  • How about using connectors that you can’t plug the wrong way in? – Mast 11 hours ago
  • Do you need to use a Pi3b+ for this? A Raspberry Pi Zero-W can be had for $5. – Z4-tier 1 hour ago

3 Answers

 

11

 

How do I avoid a temporary short circuit from destroying the PI?

It’s very easy really:

  • power down your Pi
  • alter the connections
  • power on the Pi again

Electronics are not hot-pluggable by nature, they have to be designed in a special way to be hot-pluggable. People start to forget that because many modern interfaces support hot-plugging, notably USB. In older times you would apply the procedure above if you needed to connect an external keyboard to your laptop.

If you want to design a hot-pluggable interface, you have two options:

  • make sure the connector prevents unwanted contacts and ensures the correct connect-disconnect sequence (as USB does)
  • make sure your device survives any possible connections in any sequence

The latter is how audio jacks are designed: amplifiers have current limitation so they can survive a short, and a headphone can handle 2x voltage if it gets accidentally connected between L and R instead of L/R and GND.

Current limiting resistors are often used in JTAG/UART/debug adaptors to make them hot-pluggable or at least more robust. Whenever such a resistor will be enough depends on the circuit you have designed.

 

  • Yes I think in all the discussion a current limiting resistor is the right solution, but you don’t actually look at what value would be a good choice in this situation? That is the crux of the question. – fret 40 mins ago

 

4

 

If you short circuit the 3.3V rail to Gnd you will instantly kill the Pi.

Frankly anyone who connects a power rail to external circuitry (from the Pi or any other device) is just asking for trouble!

You can use the power rails to provide power to external circuitry with suitable care – which excludes a TRS plug which is practically guaranteed to cause a short – they are designed for audio (or occasionally video) signals. You should NEVER connect power on a live system – devices which are designed for hot plugging e.g. USB use special connectors to ensure safe connection.

No responsible engineer would connect a live power rail to use for logic connection without protection and would not use a TRS jack for power!

If you are powering an external circuit any series resistance will compromise its operation (unless the current is minimal). You DON”T put resistors in power rails.

No one can design your circuit for you, even if you published a proper specification.

 

  • 1
    So USB has a way to “ensure safe connection”. I’d be interested to know what methods are used to allow hot plugging of devices? Also the series resistance in this case just takes away from the total range I can read at the ADC. It’s not like a IC that needs a certain voltage, it’s just a potentiometer connected via a TRS cable. Lots of similar devices do this, so I assume there is a standard way. That’s what I’m asking for… – fret 18 hours ago
  • 3
    USB has connectors designed for the purpose. TRS jacks ARE NOT Despite other answers NOTHING you can do will help if you wire 3.3V to a TRS jack because the tip and ring make contact with Gnd on insertion. – Milliways 16 hours ago
  • @Milliways I completely agree with you in principle (TS speaker cords, for another example), but the audio industry has only recently come up with some purpose-designed connectors for specific things. Thus, we still have the same connector used for myriads of things that it shouldn’t, even by otherwise reputable brands, with the resulting confusion among consumers, hobbyists, and even some professionals. – AaronD 9 hours ago
  • 1
    @fret USB uses contacts of different lengths inside the plug to control which lines connect first. – T.J.L. 5 hours ago
  • 1
    @fret on top of what TJL said, USB is designed with connectors in parallel (relative to the axis of insertion) and a keyed system to prevent an incorrectly-oriented plug from entering, so no contact on either end ever touches a contact on the other end it wasn’t meant to at any point during the insertion/removal process. – Doktor J 3 hours ago

 

1

 

Answer

(1) The treadle pot schematic

treadle pot

(2) ADS1115 Wiring and Testing

ads1115 1

ads1115 2

(3) Rpi4B pinout for reference to connect to treadle pot and ADC

rpi4b pinout

(4) EV-2 + ADS1115 + Rpi4B Schematic ev-2

(5) EV-2 schematic with pull up to avoid floating input


References

(1) EV-2 Expression/Volume Pedal – Fractal Audio Systems $120

(2) ADS1115 16-Bit ADC – 4 Channel with Programmable Gain Amplifier – AdaFruit $15

(3) Why is my linear pot is causing a non-linear voltage at my ADC input? Asked 2020feb08 Viewed 70 times

(4) Understanding Expression Pedals – 2014mar20

(5) Use Pi as a MIDI Controller Input – 2019apr28

(6) EV-2 + ADS1115 + Rpi4Bb Schematic V0.1 – CircuitLab (public)

(7) EV-2 + ADS1115 + Rpi4B Schematic V0.1 – PDF (public)

(8) Strymon Tech Corner #1 – Anatomy of an expression pedal – Terry 2010jul12

(9) Strymon Tech Corner #1 – Anatomy of an Expression Pedal – 35,062 views 2010jul12


 

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


Q: How do I avoid a temporary short circuit from destroying the PI?

fretI have a PI 3b+ in a MIDI foot controller and part of the IO is a pair of expression pedal sockets. After, ahem, getting the tip and sleeve round the wrong way, they are working correctly now. But during testing I disconnected one while the system was powered up and it shorted out the PI, which i…

tlfong01
tlfong01
I see the EE guys use 330R. I sometimes use 470R, and if I want to play safe 520R.
fret
fret
@tlfong01 Ok sounds like a need a slightly higher value. Still would like to know what the “proper” solution to something like this is.

tlfong01

tlfong01
2658
OK, so we have agreed on the current limiting resistor value. Now let us brainstorm to get a “proper” solution. First thing first, let us look at the (1) schematic: imgur.com/gallery/aRTIokz, (2) QUESTION: electronics.stackexchange.com/questions/480171/….. / to continue, …
Let us agree what hardware and software we are talking about: (1) Pedal EV-2, (2) ADC ADS1115: (1) EV-2 Expression/Volume Pedal – Fractal Audio Systems $120 shop.fractalaudio.com/ev-2-expression-volume-pedal (2) ADS1115 16-Bit ADC – 4 Channel with Programmable Gain Amplifier – AdaFruit $15 adafruit.com/product/1085
Now let us agree on how to connect the treadle pot to Rpi: (1) Positive side of pot to B, (2) Middle of pot to A, (3) Pot ground to C. I am not using names such as Vcc, tip, sleeve, ring etc to avoid confusion. You might like to comment on my naming, or make counter suggestion.
Now I am drafting an answer. You might like to let me know how you are going to connect the treadle to ADC ADS1115, and Rpi GPIO power pins (5V0 or 3V3) and Rpi GPIO signal input pins (input range between 0V and 3V3), input current preferably less than 2mA..
Question: The treadle schematic shows only terminal A, B, and C. How come you inserted the extra terminal that causes all the trouble?
Question 2: Why are you suing ADS1115 I2C 16 bit ADC? This ADC si not that user friendly, comparing the much more popular SPI 10 bit/12bit MCP3008/Mcp3208. If you are not following as tutorial/instructable, I would suggest you to start with MCP3008, and if everything goes well, you can upgrade to ADS1115. MCP3008 10bit can do 2 ** 10 = 1,024 steps, and MCP3208 12 bit can do 2 ** 12 = 4,096 steps (no proof read dodgy calculation) which I think is more precise and sensitive than my stupid human foot!
fret
fret
I already have a bus of i2c devices… and code to work with the ADS1115… it already all works. Bar the short circuiting issue.

tlfong01

tlfong01
2658
I see. So the plug is the only problem. It is not clear why you need the extra terminal in the plug to tell Rpi that no pedal is available. And do you mean to connect this no pedal signal to let GPIO to read. But why no ADS1115, as it is already there?

fret

fret
1855
yst 20:17
If there is no connection to the ADC when the pedal is unplugged the ADC value just floats randomly. By tying it to 3V3 I get a valid signal when unplugged. The ADS1115 is already there in the circuit reading the value off the socket. Both the plugged and unplugged states are fine. Just the transition between where it shorts.

tlfong01

tlfong01
2658
Ah, let me see. Why not just use a Vcc pull up resistor, say 10k, connected to the input pin of the single ended ADC1115 input channel? Of course you can either pull the otherwise floating input pin to ground, if you like. If you don’t like the little difference between Vcc or Ground that might mislead Rpi, you can easily offset the treadle pot output a little bit.
2 hours later…
tlfong01
tlfong01
yst 22:19
Ah, sorry, I made a careless mistake. The pull up resistor cannot be too smaller than that 100k pot. So it should be 1M or larger.
The last message was posted 11 hours ago.
tlfong01

.END

Categories: Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: