1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

DeltaT circuit using 10K thermistors to output 2-10vdc control voltage

Discussion in 'Electronic Projects Design/Ideas/Reviews' started by weekendguy, Dec 5, 2016.

  1. weekendguy

    weekendguy New Member

    Joined:
    Dec 5, 2016
    Messages:
    14
    Likes:
    0
    spec You are too good to me. :) Many Many thanks. Please excuse the dumb question but the 0-10vdc output is with respect to the 0v line? Also, I will need to have the output flatten out at some point and be scaled. It may turn out that the 0-10vdc range only needs to reflect a 30C range where anything above 30C it pins at 10v and any diff <= 0C outputs something higher than 0, perhaps 4. I probably did not do a thorough job explaining this in my first post.

    Is there a place in this circuit where I can adjust "range" and "floor" by changing components?

    If this is becoming too complicated I could revisit the Arduino approach. I would then just need a way to get the 0-5v output shifted up to 5-10v. I guess that may only need a voltage divider...?
     
  2. spec

    spec Well-Known Member Most Helpful Member

    Joined:
    Oct 27, 2015
    Messages:
    5,828
    Likes:
    709
    Location:
    Somerset UK GMT
    No probs WEG,

    You are correct, the output is with respect to the 0V supply line- I was sloppy and did not show that on the schematic.

    Yes, I think all that you mention can be done. If you can post an itemized list describing exactly what you want I will have a go at incorporating it in the circuit.

    spec
     
  3. weekendguy

    weekendguy New Member

    Joined:
    Dec 5, 2016
    Messages:
    14
    Likes:
    0
    Hi spec

    Thank you - you are awesome.

    This is a bit of a lab tool so I will need to tweak somewhat as I implement. First, as I have researched this it seems unlikely that the motor speed would be less than 50% so for a 0-10vdc speed controller would need a "floor" at 5vdc - some speed controllers are 2-10vdc so 50% would be 6v. Trimmer?

    The ranging would determine the diff range that is correlated with the 0-10vdc output (before the floor). Even though I specified a wide possible range, in practice it may be much less. Would want that range to map into the output (0-10 or 2-10vdc).

    Spec - I appreciate your advice but this may be getting beyond my build skills :banghead: and I don't want to take up any more of your time if I can't reliably implement your design. I was picturing an op amp and a few resistors/trimpots but of course I under-estimated the need. Before you spend any more time on my behalf, let me again think through a micro approach. I have working code for the DS18B20 sensors and just need to solve a DAC analog voltage level problem.

    I am much less likely to let out the magic smoke when using a standard board... ;) (although I've even done that a few times...) - Argh - software guys....!

    WEG
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. spec

    spec Well-Known Member Most Helpful Member

    Joined:
    Oct 27, 2015
    Messages:
    5,828
    Likes:
    709
    Location:
    Somerset UK GMT

    Thanks for your comments WEG,

    OK I, will leave the circuit for now while you consider the best approach for your application.

    My view is that a processor-based implementation will be best and will give you unlimited flexibility, especially as you are a software man.:)

    spec
     
  6. weekendguy

    weekendguy New Member

    Joined:
    Dec 5, 2016
    Messages:
    14
    Likes:
    0
    spec Thanks for your comment. Can you advise me on the DAC output from the arduino?
    It will output 0.58V to 2.8V so the actual range is only 2.24V. I need this to scale to 6-10vdc. I assume because of the scaling requirement using a voltage divider will not work and I need some gain? opamp again?
     
  7. spec

    spec Well-Known Member Most Helpful Member

    Joined:
    Oct 27, 2015
    Messages:
    5,828
    Likes:
    709
    Location:
    Somerset UK GMT
    No probs WEG,

    You will need an operational amplifier (opamp).

    I would suggest an OPA2192 opamp running off a 12V supply line. If there are other opamps you would like to use, just post the type number and i will see if they are suitable.

    I will then post a suitable circuit.

    spec
     
  8. weekendguy

    weekendguy New Member

    Joined:
    Dec 5, 2016
    Messages:
    14
    Likes:
    0
    spec Thank you. I'll see what I have in my box this evening and let you know. - WEG
     
  9. MikeMl

    MikeMl Well-Known Member Most Helpful Member

    Joined:
    Mar 17, 2009
    Messages:
    11,049
    Likes:
    541
    Location:
    AZ 86334
    A single, non-inverting, opamp with a gain of (10-4)/(2.8-0.58) = 4/2.22 = 1.802 and an offset of (4-0.58) = 3.42V will do that. Here is a prototype circuit using ideal value resistors: (click on the thumbnail)

    D8.png

    Now, even though the opamp will work on a single positive 12V power supply, the circuit needs an accurate voltage-source offset of -6.179V, which requires a regulated negative voltage to generate.

    So, the final circuit requires you to tell us what supply voltages you have available, and how well regulated they are.

    A two-opamp circuit that uses the Vref used in your micro's DAC (5.00V?) as the source of the offset voltage would be much more stable.

    Can you use software to reverse the sense of the micro's output, i.e. make 0.58V into 2.8V and vice-versa? If so, we can do it with a single opamp that uses micro's Vref, and is not ratiometric with respect to any other power supply voltage drift.

    Here is a hack, using 1% resistors, based on inverting the input in software, and assuming that the micro's Vref is 5.00V:

    D8a.png

    If Vref is different in your micro, the values of R3/R4 will have to be adjusted.
     
    Last edited: Dec 8, 2016
  10. weekendguy

    weekendguy New Member

    Joined:
    Dec 5, 2016
    Messages:
    14
    Likes:
    0
    spec @mikemi I investigated the AnalogWrite() function in the Arduino IDE and it turns out it is not truly analog - it's PWM. Maybe I should look for an add-on board that is a true DAC and then I can see the voltage requirements of that. Also, I can use a stepped output - I do not need true analog voltage - 10 steps between 6vdc and 10 vdc would be adequate. Maybe there is a simpler way to address the whole problem considering the step option? Thank you both.
     
  11. MikeMl

    MikeMl Well-Known Member Most Helpful Member

    Joined:
    Mar 17, 2009
    Messages:
    11,049
    Likes:
    541
    Location:
    AZ 86334
    Use a low-pass filter to convert the Arduino's PWM to a filtered level.
    The default PWM frequency for your Arduino is 500Hz?
    How rapidly do you need to slew the motor speed? (Question goes to what the cutoff frequency of the LPF needs to be).

    The opamp I showed in post 29 can simultaneously filter, gain, and offset the PWM pin from the Arduino
     
    Last edited: Dec 8, 2016
  12. weekendguy

    weekendguy New Member

    Joined:
    Dec 5, 2016
    Messages:
    14
    Likes:
    0
    spec

    MikeMl


    I think I have a simple solution.

    I can use a 256 step digital pot. It seems to me that if I need 6-10vdc, I can make a 12v powered voltage divider with a 1k fixed resistor and a 5k digipot. When the digipot wiper is at full scale, the divider should give me 5/6 of 12v = 10vdc. Moving the wiper to 1K will output 1/2 of 12vdc = 6vdc. There are 256 steps and this would effectively use the range from 1K-5K so that 4/5 of 256 = ~200 steps. This is plenty of resolution for what I am doing.

    Or maybe this will work...? Go easy on me.

    EDIT - ok I see that the DIP versions of the digipots are almost all 5v max. I'm trying to find some higher voltage parts now...
     
    Last edited: Dec 8, 2016
  13. weekendguy

    weekendguy New Member

    Joined:
    Dec 5, 2016
    Messages:
    14
    Likes:
    0
    So far I have not found a DIP package digipot that can take 12v on the analog side and has SPI or I2C interface. The higher voltage seems to be the killer. I'll look some more tonight.
     
  14. MikeMl

    MikeMl Well-Known Member Most Helpful Member

    Joined:
    Mar 17, 2009
    Messages:
    11,049
    Likes:
    541
    Location:
    AZ 86334
    Here is how to filter the PWM from the Arduino, and then set the gain and offset. To model the PWM, I am using two pulse trains, and then selecting one or the other using a rudimentary multiplexer. Note that the filtered value settles within ~50ms. Obviously, this could be simplifed a bit, depending on how quick it needs to settle, how much ripple (feedthrough from the PWM) you can tolerate, and the required precision.

    D8p.png
     
  15. MikeMl

    MikeMl Well-Known Member Most Helpful Member

    Joined:
    Mar 17, 2009
    Messages:
    11,049
    Likes:
    541
    Location:
    AZ 86334
    Duplicate post
     
    Last edited: May 3, 2017

Share This Page