circuit help needed to change voltage

Discussion in 'The Projects Forum' started by minkey01, Aug 16, 2014.

  1. minkey01

    Thread Starter Member

    Jul 23, 2014
    171
    0
    Hi. Not sure what the official term is for this type of circuit, so I will just explain what needs to happen.

    I would like to change a ±10V DC signal to a 0 to 5V DC signal.

    The amps are small as it is just a control signal coming from this : http://www.expert-sleepers.co.uk/es3.html

    And going into an Arduino thing pin.

    Anyone have a circuit to give? Thanks!!
     
  2. mcgyvr

    AAC Fanatic!

    Oct 15, 2009
    4,769
    969
  3. minkey01

    Thread Starter Member

    Jul 23, 2014
    171
    0
    Awesome! That page is exactly what I was looking for. Thank you.

    Could someone check my math and circuit. I think it's right.

    To shift my ±10V DC signal to a 0 to 5V DC signal, I have :

    R1 = 25 kΩ
    R2 = 25 kΩ
    R3 = 12.5 kΩ

    see attached pic.

    Last question: That +5V in the circuit is from power, correct? My exact power supply is +5.25V. How would this change my math and resistor values? I still want to keep the final result of 0-5V control signal into the microcontroller.

    Thank you!!
     
    Last edited: Aug 16, 2014
  4. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    You realize that this circuit is ratiometric with respect to the 5V rail. Any noise or variation on the 5V rail winds up in the AD input...
     
  5. shteii01

    AAC Fanatic!

    Feb 19, 2010
    3,377
    494
    Arduino boards usually have 5V output you can use to power devices. They could source the 5 volts for the circuit from Arduino board. I don't know off hand how stable it is, but I hope it is better than just noisy wall wart.
     
  6. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    The Arduino's onboard 5V regulator powers the Atmel and USB chips. They are running at 16Mhz, and the 5V rail has the typical digital hash on it. It is even worse if the Arduino is plugged into the USB spigot and there is no seconary wall-wart or input power to the onboard regulator.

    I would not use the Arduino's 5V (without extensive filtering) as a reference voltage for anything that winds up back into the AD input...
     
  7. shteii01

    AAC Fanatic!

    Feb 19, 2010
    3,377
    494
    So, external 5 volt precision regulator?
     
  8. minkey01

    Thread Starter Member

    Jul 23, 2014
    171
    0
    Thank you guys for the suggestions. I am actually using one of these, which is an Arduino clone kind of thing :

    Teensy 3.1

    https://www.pjrc.com/teensy/teensy31.html

    Those wouldn't have a stable V you were talking about do they?
     
  9. minkey01

    Thread Starter Member

    Jul 23, 2014
    171
    0
  10. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    My reading of the Teensy data is that it expects an input of 5.5V, and outputs a regulated voltage of 3.3V (not 5V)

    The reference for the Atmel AD converter is a filtered version of the 3.3V. The REF is available as a pin, and could be used as a reference (provided that only a tiny current is drawn) for external circuitry...

    The wall wart puts out 5.25V (less than the 5.5V that the Teensy expects)? Since it is a switcher, likely going to be noisy...
     
    Last edited: Aug 16, 2014
  11. minkey01

    Thread Starter Member

    Jul 23, 2014
    171
    0
    Teensy is powered by Vin (3.7V to 5.5V), so I'm ok with my 5.25V power. See this page with the Vin pin :

    http://www.pjrc.com/teensy/pinout.html

    I do believe you are correct with only outputting the regulated 3.3V. This won't work for my circuit? I would need some sort of external voltage regulator at 5v it seems?

    Could anyone help me with a part number for the voltage regulator and how to wire it to my existing circuit in the posts a few above?

    Thank you! ;)
     
  12. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    If the goal is to offset the -10V to +10V to the dynamic range of the AD input (0 to 3.3V), then the circuit you have posted will not work, and will have to be redesigned for the reference you actually have (3.3V)
     
  13. minkey01

    Thread Starter Member

    Jul 23, 2014
    171
    0
    ahh, got it. i see what you are saying. thank you for the help!
     
  14. shteii01

    AAC Fanatic!

    Feb 19, 2010
    3,377
    494
    So Teensy is like Arduino Due and works with 3.3 volt analog and digital voltages?
     
  15. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    Here is a level shifter that will work. How fast does the real input change from -10V to +10V? That effects C1....
     
  16. minkey01

    Thread Starter Member

    Jul 23, 2014
    171
    0
    yes 3.3v analog and digital on Teensy 3.1. except that it is also 5v tolerant on digital inputs.
     
  17. minkey01

    Thread Starter Member

    Jul 23, 2014
    171
    0
    Mike - The signal is coming from a DAW (Digital Audio Workstation) into the ES-3. DAW are software programs that people use to edit music. So as fast as an audio waveform changes. Not sure if this answers your question. I don't know how to find out how fast. Is that enough info to figure out the cap spec? If not how could I find out the speed?

    Thanks for that circuit! Totally awesome of you!!
     
  18. shteii01

    AAC Fanatic!

    Feb 19, 2010
    3,377
    494
    General rule of thumb is that audio is 2 Hz to 20 kHz. So if you dealing with analog audio, then you can safely assume that 20 kHz will be the highest frequency.
     
  19. minkey01

    Thread Starter Member

    Jul 23, 2014
    171
    0
    ahhh right.. i remember this. unless you are a porpoise or something it can go higher. :D
     
  20. shteii01

    AAC Fanatic!

    Feb 19, 2010
    3,377
    494
    Let me check my beak.
     
Loading...