Analog input reading problem

Hi everyone,

It's been a long time ago I reached out to the forum. For my modular synthesizer (eurorack) I'm making a teensy based project.

In one part of my project I need to read a varying voltage (-5V to +5V (LF0) and/or 0V - 8V (Envelope)) on one of the analog pins from my teensy. Depending the voltage a red, white or blue led needs to light up. This varing voltage connects to the Teensy trough the jack connector. But when nothing is plugged in to the jack connector a potmeter has to do the same function. So I came up with this. (see picture). When moving the pot in the first 1/3 the red led lights up, in the second 1/3 the white led lights up and in the last third movement the blue led lights up. Same depending the value coming from the CV.

The purpose of 1K resistor R7 is to work in conjunction with the build in clamping diodes to protect the input against negative or higher voltages.

As you can see the moment no jack cable is plugged in to the connector a voltage divider is formed with the pot and the 1K resistor R7. This will effect the input reading from my teensy.

My question is of the voltage divider circuit is a good aproach for this matter? My knowledge is basic so please don't go to deep in detail for this problem. The only purpose is to switch on the leds.

Thanks in advance!

Hi,

I did some testing in a simulator software and it seems this circuit kan work. The connection goin to my teensy is after the resistor R7 and not in the middle from R7 and the pot.

I added 2 pictures from the simulation one when a cable is plugged into the connector and one when it is not plugged in.

I have to go through the circuit once and do the math myself to see if everything wil work.

Does anyone see another problem with this circuit?

Thanks in advance!

J.

No need to use a simulator, it will tell you almost nothing useful.

A potentiometer will certainly give you a variable voltage between zero and 3.3 V in this case. The series resistor should arguably be much larger - at least 10k - to protect against higher voltages (and even then, only up to about 10 V or so).

The ADC will not read a negative voltage - and does need to be protected against negative voltages, so even more protective components should be used - a couple of Schottky diodes. Nor will it read voltages about 3.3 V so if you want to actually read such other voltages, you will need additional circuitry.

Paul__B:
No need to use a simulator, it will tell you almost nothing useful.

A potentiometer will certainly give you a variable voltage between zero and 3.3 V in this case. The series resistor should arguably be much larger - at least 10k - to protect against higher voltages (and even then, only up to about 10 V or so).

The ADC will not read a negative voltage - and does need to be protected against negative voltages, so even more protective components should be used - a couple of Schottky diodes. Nor will it read voltages about 3.3 V so if you want to actually read such other voltages, you will need additional circuitry.

Hi, Thanks for your reply.

When searching this forum regarding my problem I came across some threads saying that the analog inputs from the Uc chip are already protected with clamping diodes so adding another one would make them redundant.

http://electro-music.com/forum/viewtopic.php?t=68022

Therefore a resistor (in my case R5) is needed to limit the current. In my first post I use a resistor from 1K in my second post the 100ohms was a mistake.

I do not need to read negative voltages they also will be canceled out by the diodes.