Connect with us

unusual signal conditioner needed

Discussion in 'General Electronics Discussion' started by MM0TJR, Oct 7, 2012.

  1. MM0TJR

    MM0TJR

    15
    0
    Oct 2, 2012
    I wonder if anyone can help: I'm trying to find a device (preferably DIN-rail mountable) that will accept a 0-5V analogue input signal and make a "potentiometer output"

    Vsupply
    ¦
    ¦
    ¦**************¦
    ¦ ¦
    ¦ #----¦-----------------BATT+
    0-5V------ p # ¦
    analog ¦ o #<--¦----------------- OUTPUT COMMAND
    input ¦ t # ¦
    ¦ #----¦----------------BATT-
    ¦__________¦
    ¦
    ¦
    ¦
    gnd_¦____


    This is for computer (arduino) control of an existing proportional hydraulic valve. I guess what I am after is really a voltage controlled potentiometer.
    before I go galloping off to try to design one from scratch, I wonder if there is already an offering available!?
    any help/guidance greatly appreciated.

    ps unfortunately my ascii art did not work. sorry.
     
  2. MM0TJR

    MM0TJR

    15
    0
    Oct 2, 2012
    heres a diagram of the application and the gadget Im trying to find!
     
  3. MM0TJR

    MM0TJR

    15
    0
    Oct 2, 2012
    here it is
     

    Attached Files:

  4. CDRIVE

    CDRIVE Hauling 10' pipe on a Trek Shift3

    4,960
    648
    May 8, 2012
    Google AD5220 and AD5228 Digital Pots.

    Chris
     
  5. MM0TJR

    MM0TJR

    15
    0
    Oct 2, 2012
    Thanks Chris: I had discovered these actually, just wondered if there was a commercial DIN-rail offering already incorporating one....! is there?
     
  6. CDRIVE

    CDRIVE Hauling 10' pipe on a Trek Shift3

    4,960
    648
    May 8, 2012
    Wow, that would be a lot of unused real estate... Nunno.

    Chris
     
  7. virtual1

    virtual1

    13
    0
    Mar 29, 2012
    IMHO that's one of the biggest limitations of the arduino. I recently got into that and have a number of the procs and accessories here. (the ardweenys are a really good deal, check them out) I find myself in need of an analog output on many occasions, and all they offer are digital and PWM. Converting PWM directly to a proportional voltage or resistance isn't too stragithforward that I've found anyway. You can usually get away with PWM for motor speed control, but the max duty cycle appears to be about 50%. You could go with a DAC but then you'd eat up a lot of digital output pins. I haven't seen any DAC that runs on serial output but I'm sure they're around, just haven't put in the work to find them.

    For your application you might be able to use an optical gate and use the PWM to power the LED emitter in the pair and draw your resistances off the receiver. I was looking at your image and it looks like you've solved the problem of getting a linear voltage output from the arduino - how are you doing that?
     
  8. BobK

    BobK

    7,599
    1,641
    Jan 5, 2010
    You can get an analog voltage from PWM with a single stage RC filter. You will probably need to follow it with am opamp to get a low enough impedance. I have even made audio output using only PWM + a single stage RC filter.

    Bob
     
  9. virtual1

    virtual1

    13
    0
    Mar 29, 2012
    What values for R/C would you recommend? The PWM is 0 to 5v p-p at about 550 hz. Duty cycle varies from 0 to 50% when the pwm is set between minimum and maximum.

    Also sorry I'm not experienced with op-amps. For use as a buffer, I assume the - is tied to ground and the input to the +, and the buffered output is the output of the op amp? (on an op amp whose power is ground and the supply voltage)
     
    Last edited: Oct 10, 2012
  10. BobK

    BobK

    7,599
    1,641
    Jan 5, 2010
    A higher PWM frequency would be better. Is there any reason you are using such a low frequency? Also why only 0 to 50%. If you want to use a PWM to output 0 to 5V you would use duty cycles of 0 to 100%, with 0 to 50% you would get 0 to 2.5V out.

    To use a single stage RC filter, you would want it to be something like 1/16 the frequency of the PWM. That would give you -27db of ripple. But at 550Hz / 16 = 34Hz, you are limiting how fast you can change the analog output. A higher PWM frequency would allow you to use a higher cutoff low-pass filter and allow you to change the output more quickly.

    Bob
     
  11. virtual1

    virtual1

    13
    0
    Mar 29, 2012
    I'm just going by observation. The arduino's built-in PWM management dictates those figures. I just give it a pin number and an integer 0-255 and it handles the PWM. The timing and duty cycle are what I observed on an oscilloscope. I'd certainly like to have a higher frequency for other things, but that's what I have to work with on the arduino.

    I was trying to make a switched regulator earlier but at that low of a frequency it's not practical. Ended up ebaying a buck regulator instead.
     
  12. BobK

    BobK

    7,599
    1,641
    Jan 5, 2010
    Well, that pretty much sucks, because the underlying chip is almost certainly capable of much better. I don't use arduino, I use PIC, and I have done audio using 50KHz pwm.

    Bob
     
  13. virtual1

    virtual1

    13
    0
    Mar 29, 2012
    PWM isn't done in hardware, it's a library that runs on an interrupt
     
  14. BobK

    BobK

    7,599
    1,641
    Jan 5, 2010
    That's even worse.

    Bob
     
  15. virtual1

    virtual1

    13
    0
    Mar 29, 2012
    one must work with the tools they have. I tend to specialize in making fuel injectors from rocks and sticks ;)
     
  16. CocaCola

    CocaCola

    3,635
    4
    Apr 7, 2012
    It is, they just need to skip the Ardunio's built in 'easy' routines and access the chips hardware PWM directly...

    It can be and doing it with the hardware is better...

    You have the hardware and tools to do PWM in hardware, you just need to take that road instead of the 'easy' one...

    This is the problem with these user friendly developer platforms like the Arduino, they remove the user from the hardware details and make many assume there are limitations that are not really there...

    Get the ATMEGA datasheet and read up on hardware PWM, and implement that...
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-