Forum Rule: Always post complete source code & details to reproduce any issue!

1. Eurorack voltages to/from Teensy

Hi, I want to interface with eurorack modules using a Teensy and I have some questions that some of you may be able to shed some light on.

Since the digital pins are 5V tolerant I guess these could be used for the gate input/output?

To send CV between -5V and +5V I have found schematics using MCP4822 DACs together with LN324N opamps where sending the value 0 would represent -5V (note C0), 2048 would be 0V (note C5) and 4096 would be +5V (note C10).
But how do I get data the other way, ie read -5V/+5V into the Teensy?
Regards
Johan

2. ...either an external ADC that accepts your range or use an op amp gain and offset circuit and regular analog read....

http://www.ti.com/lit/pdf/sloa097

3. Here's a few options using the OP-amp/offset circuitry:

If you want the -5V/5V to be mapped to 0V/5V (Non inverting solution) :

If you don't mind it being inverted, -5V/5V mapped to 5V/0V ( which is easily fixed in software ) :

4. Originally Posted by RetroD
Here's a few options using the OP-amp/offset circuitry:

If you want the -5V/5V to be mapped to 0V/5V (Non inverting solution) :

If you don't mind it being inverted, -5V/5V mapped to 5V/0V ( which is easily fixed in software ) :

Thanks retroD,
so VIN would be the CV-signal and AnalogInverted would go to an analog input on the teensy?
The analog inputs have been very unstable when I have used potentiometers, would the signal in this circuit generate a stabil reading?
/Johan

I forgot that the analog inputs only accepts 3.3 volts, how would I modify the 5V/0V to 3.3V/0V?

The circuit will devide the instability in half. One way to decrease the voltage sway would be to add a capacitor around 1 to 10 nF between the output of the opamp and ground.

6. The Opamp with +/-12V Supply can kill the 3v3 Input of your teensy.

So i use a railtorail opamp with 3v3/0V Supply for the analoginputs.

7. Originally Posted by RetroD

The circuit will devide the instability in half. One way to decrease the voltage sway would be to add a capacitor around 1 to 10 nF between the output of the opamp and ground.
RetroD, I simulated the second circuit you posted and it worked like a charm.

Regarding Teensy->DAC->Opamp, I found a circuit from https://github.com/elkayem/usbMIDI2C...0Schematic.pdf which unfortunately only generates output values of 0-8.8V.

This is my simulation, the left part (CV_IN->To_Analog_IN) is your circuit and the right (DAC->CV_OUT) is from usbMIDI2CV.

How would I modify your circuit to send out -5V=3.3V, 0V=1.65V and 5V=0V?
Do you have a similar circuit diagram as usbMIDI2CV for sending out -5V/5V from Teensy?

Regards
Johan

8. As Wibbing mentioned you need to use a rail to rail opamp supplied with 3.3V otherwise you might damage your teensy.
Since eurorack modules are usually powered by -12V, 12V, all inputs should be able to handle those voltages.
Rerun your simulation with a sweep between those voltages and see what happens.

Here is a schematic that will convert -5V..5V to 3.3V..0V and has the recommended 100k input impedance.
Voltages outside the +/-5V range will be clamped to 3.3V or 0V.
The -10V reference voltage is obtained from the -12V supply with the help of a resistor and a shunt voltage reference. This to avoid any supply voltage fluctuations effecting the opamp output.
Possible candidate for the rail to rail opamp is MCP6001, MCP6002 or MCP6004, depending on how many opamps you wil need.

How it works:

Gain for Vin = R2/R1 = 0.33
-5V..5V x -0.33 = 1.65V..-1.65V

Gain for AREF = R2/R3 = 0.165
-10V x -0.165 = 1.65V

Now add those two together and the result is
-5V..5V -> 3.3V..0V

9. As far as I know, teensy analog inputs have ESD diodes to Vdd and Vss that make them +/- 12V safe if they have enough series resistance. Even more so at lower voltages (as Paul's circuit does).

The MCP6001 has some similar issues (see the data sheet).

10. Originally Posted by neurofun
As Wibbing mentioned you need to use a rail to rail opamp supplied with 3.3V otherwise you might damage your teensy.
Since eurorack modules are usually powered by -12V, 12V, all inputs should be able to handle those voltages.
Rerun your simulation with a sweep between those voltages and see what happens.

Here is a schematic that will convert -5V..5V to 3.3V..0V and has the recommended 100k input impedance.
Voltages outside the +/-5V range will be clamped to 3.3V or 0V.
The -10V reference voltage is obtained from the -12V supply with the help of a resistor and a shunt voltage reference. This to avoid any supply voltage fluctuations effecting the opamp output.
Possible candidate for the rail to rail opamp is MCP6001, MCP6002 or MCP6004, depending on how many opamps you wil need.

How it works:

Gain for Vin = R2/R1 = 0.33
-5V..5V x -0.33 = 1.65V..-1.65V

Gain for AREF = R2/R3 = 0.165
-10V x -0.165 = 1.65V

Now add those two together and the result is
-5V..5V -> 3.3V..0V

Thanks Neurofun, it seems that the more I research about this teensy/CV-thing the more complicated it gets...
Before Paul mentioned it in his reply I was not aware that the analog inputs only accepts max 1.2V.

I only have rudimentary knowledge of electronics but want to convert my modular system:

to conform to Eurorack standard.

11. Originally Posted by johanbilen
Before Paul mentioned it in his reply I was not aware that the analog inputs only accepts max 1.2V.

Gain formula for inverting opamp is
Gain = Rfeedback/Rin = Vout/Vin

Gain Vin = 1.2V(Vout range)/10V(Vin range) = 0.12
R1 = 100k(input impedance)
R2 = Gain x R1 = 0.12 x 100k = 12k

Gain Aref = 0.6V(Vout offset)/10V(Aref) = 0.06
R3 = R2/Gain = 12k/0.06 = 200k

12. oops, redundant

13. It is not recomendet to use the internal diodes because the current in this diodes will disturbe the multiplexer so that OTHER INPUTS will produse false results! We use 6002 opamp with 3v3 supply.

14. These are my circuits so far, I would like some feedback please:

5V gate input:

5V gate output:

0-8V Controlled Voltage Out

/Johan

Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•