External analogue voltage reference help
Posted: Wed Sep 11, 2024 5:57 pm
Hi, I have set up this circuit using LM4040 -10v voltage reference to use with ADC for measuring control voltage input for a digital oscillator design (using design from BHH link below). I have the power and voltage reference circuits working correctly supplying -10V. I am using Arduino Nano for testing for now but target MCU is STM32F11 - so guidance in using the STM32 is what I need.
I have tested pitch control voltage input from Beatstep Pro controller directly to ADC0 pin on Arduino. This works fine and I get different voltages for each note. But when I send the control voltage directly through the MCP6002 opamp it gets no signal - I'm guessing this is because it requires the -10v VREF to boost the signal.
So this how it should work: CV1 pitch input + -10v VREF through MCP6002 to ADC pin.
I have been following this circuit. MCP6002 opamp is used for circuit protection.
Do I need to do connect the AREF to STM32 board and do anything special in software? I saw reference to this here: https://tronixstuff.com/2013/12/12/ardu ... -aref-pin/
Circuit reference:
https://blog.thea.codes/designing-big-honking-button/
------------------------------------------------------------------
These are the calculations from designing-big-honking-button, if interested.
The MCP600 opamp:
(-10v * 82kΩ / 510kΩ) = 1.608v out
"This means whatever input is coming into CV in is added to 1.608v.
That fixed voltage plus the CV in ends up in the range of 0v to 3.3v for the input range of -2v to +2v. Applying the same transfer function for the minimum and maximum input voltage and summing them with the fixed voltage from the regulator shows this:"
-(-2v * 82kΩ / 100kΩ) = 1.64v so 1.64v + 1.608v = 3.248v
-(2v * 82kΩ / 100kΩ) = -1.64v so 1.64v - 1.608v = 0.032v
---------------------------------------------------------------------
I have tested pitch control voltage input from Beatstep Pro controller directly to ADC0 pin on Arduino. This works fine and I get different voltages for each note. But when I send the control voltage directly through the MCP6002 opamp it gets no signal - I'm guessing this is because it requires the -10v VREF to boost the signal.
So this how it should work: CV1 pitch input + -10v VREF through MCP6002 to ADC pin.
I have been following this circuit. MCP6002 opamp is used for circuit protection.
Do I need to do connect the AREF to STM32 board and do anything special in software? I saw reference to this here: https://tronixstuff.com/2013/12/12/ardu ... -aref-pin/
Circuit reference:
https://blog.thea.codes/designing-big-honking-button/
------------------------------------------------------------------
These are the calculations from designing-big-honking-button, if interested.
The MCP600 opamp:
(-10v * 82kΩ / 510kΩ) = 1.608v out
"This means whatever input is coming into CV in is added to 1.608v.
That fixed voltage plus the CV in ends up in the range of 0v to 3.3v for the input range of -2v to +2v. Applying the same transfer function for the minimum and maximum input voltage and summing them with the fixed voltage from the regulator shows this:"
-(-2v * 82kΩ / 100kΩ) = 1.64v so 1.64v + 1.608v = 3.248v
-(2v * 82kΩ / 100kΩ) = -1.64v so 1.64v - 1.608v = 0.032v
---------------------------------------------------------------------