Shop OBEX P1 Docs P2 Docs Learn Events
Digital Pots — Parallax Forums

Digital Pots

rapscaLLionrapscaLLion Posts: 75
edited 2012-03-21 15:41 in General Discussion
Hi guys,

I'd love to pick your brains on this one, sorry if it's been covered as I haven't found much in the search.

I need to use a digital pot to variably divide a 30vdc signal. This is to control what is essentially an analog 0-10vdc dimmer, except for whatever reason it uses 30vdc. (I actually read high 28v at the point at the end of the cable).

I'm trying to replace a manual pot with a digitally controllable one. I've got everything else set, but the digital pot I have (MCP41050) doesn't seem to be rated for anything more than 7vdc, and I'm using a 5v rail.

Will a non-inverting op-amp work? Because I can't seem to find much in the way of digital pots that will accept 30vdc through the wiper.

I'm happy to consider any way of scaling up the 0-5v to 0-30v, or using another digital pot or some other method that will allow me to variably divide the 30vdc with a minimum of 128 steps, and ideally 256 steps or more.

Thanks in advance for your thoughts!

Comments

  • piguy101piguy101 Posts: 248
    edited 2012-03-13 16:38
    Sorry, I can't help you with your problem, but I've had the same problem trying to divide a voltage (around 0-16 volts) and was disappointed with the specs on digital pots on data sheets.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-03-13 17:06
    Do you really need a voltage divider, or just a voltage source in the 0-10V range? If the latter, which micro will you be using to control it?

    -Phil
  • Mark_TMark_T Posts: 1,981
    edited 2012-03-13 20:27
    Do you need to divide a 30V signal or do you just need to synthesize a voltage upto 30V? The latter can be done with a DAC and an amplifier... Specialist high voltage opamps are available I believe.
  • ElectricAyeElectricAye Posts: 4,561
    edited 2012-03-14 10:49
    Not only is voltage a matter of concern when dealing with digital pots but you must also keep in mind the limitation of the current running through it. I'm not aware of any digital pots that can handle a lot of current. As others have already mentioned, you might be able to use something like a DAC, and if you aren't worried about ripple, I suppose you could use a crude version, utilizing a PWM-controlled 12 volt signal filtered with a relatively simple circuit that employs a resistor and capacitor. That could give you a 0 to 10 VDC range. You should double check why you think you need 30 VDC if you're operating at 0 to 10 VDC.
  • ercoerco Posts: 20,259
    edited 2012-03-14 12:40
    Redneck solution: use a servo to turn a regular potentiometer. Solves some problems and causes new ones.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-03-14 12:50
    Guys,

    I think the OP has left the building.

    -Phil
  • rapscaLLionrapscaLLion Posts: 75
    edited 2012-03-14 17:21
    Hi guys, sorry about the lack of response. I'm extremely busy at the moment, and I thank you all for taking time out of your equally busy lives to help with this.

    I'm not sure how to explain this any better, but I'll do my best.

    I have a (variable) dimmer, that is operated with a manual slide potentiometer. Lights are at full when the pot is all the way up, lights dim and go out as the pot is brought down. I need to replace this manual pot with a digital pot, so it can be controlled via DMX.

    The dimmer outputs +30vdc down the control cable. This voltage is divided by the manual potentiometer and sent back to the dimmer via the same cable. The dimmer responds by dimming the lights to a level relative to the pot.

    So yes, I think I want a voltage divider. I would be interested in considering how to synthesize the variable voltage required. We want to avoid moving parts in the system.

    Anything you can suggest?


    Thanks again!
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-03-14 17:28
    It could still be that all you really need is a voltage source that scales between 0 and 30V -- or is 0 and 10V, as your first post indicates? It's very unlikely that the dimmer relies on the specific resistance of the divider to function. In any event, what is the voltage on the wiper at full-scale and at full-off?

    -Phil
  • kwinnkwinn Posts: 8,697
    edited 2012-03-14 17:42
    An op amp would work if you could find one that would handle that voltage. An op amp and discrete transistor circuit would do it though. Possibly even one of the audio or half bridge driverchips.
  • T ChapT Chap Posts: 4,223
    edited 2012-03-14 18:24
    http://www.parallax.com/StoreSearchResults/tabid/768/txtSearch/rotary/List/0/SortField/4/ProductID/681/Default.aspx

    One option would be to take a rotary encoder that allows continuous rotation(16 steps per revolution), some code could be easily written using the quadrature encoder object that would allow any number of steps, 128, 256, or any max limit. Scale the counts to a PWM output that controls an opto coupler configured as a voltage divider for the 30Vdc. The following opto acts like a variable resistor.

    http://dspace.dial.pipex.com/isocom/h11f1.htm
  • rapscaLLionrapscaLLion Posts: 75
    edited 2012-03-14 21:11
    Phil: I think you're probably right. I just need something that can output variable voltage between 0vdc and +30vdc. I'm sorry if I was unclear, the dimmer does operate on a 30vdc control signal, at something like 10mA. The resistance itself doesn't seem to matter much, 50k and 25k pots both work. I'm not sure exactly what your asking in regards to voltage. On the existing manual pot utilizing the 30v control line, I get 0v at full off and 28v at full on (the line is quite long). On the digital pot I am currently using I get 0.08v at full off, and 4.5v at full on. Does that help?

    Kwinn: Thanks, I'm going to try it tomorrow. I'm worried that even if it works, the digital pot seems to have an extremely non-linear curve. When wired as a rheostat the resistance is nearly perfectly linear through the step range, but when used as a pot the voltage output is wildly un-linear. I pretty much have control through the whole range from steps 0 to 25. From 25 - 255 there is only about a 0.2v difference... Not great when I need at least 128 steps ideally.

    T Chap: I'm not sure why I would need a rotary or quad encoder. Can you explain further? The idea is that the houselights are computer controlled via the lighting console rather than any manual switch. (There is a manual override for emergency control). I will look into the pwm/opto coupler option though, thanks.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-03-14 21:35
    By using DMX, will you be able to shorten the line, so that the control output is very near to the dimmer? And what micro do you plan to use at the dimmer end? (Gadget Ganster carries a Propeller-based DMX module.)

    -Phil
  • T ChapT Chap Posts: 4,223
    edited 2012-03-14 21:54
    I misunderstood thinking you need a physical pot to interface to the Prop and then control the voltage. If you are just needing a digitally controlled resistor then the opto will work for that purpose. So in a voltage divider circuit PWM will increase the resistance across the FET, and the output will range from 0 - 30v.
  • TubularTubular Posts: 4,712
    edited 2012-03-15 04:12
    The AD7376 goes to 30v (abs max 35v)
  • rapscaLLionrapscaLLion Posts: 75
    edited 2012-03-15 07:58
    Phil: We'd prefer not to shorten the line, and have the control box at the control end. There are multiple reasons but I won't bore you with the details. I am using a prop based board, and am very comfortable with programming the DMX In end of it. Thanks!

    T Chap: So would I be able to take the 30v in from the line, pass it through the FET and send the output back down the line?

    Tubular: Thanks I'll check it out.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-03-15 08:35
    The reason I asked about shortening the line is that there are not many op-amps capable of driving a long cable and remaining stable. I'm not too keen on the FET idea, BTW. Without some sort of feedback, it will be extremely non-linear. It would be much better if you could locate the DMX controller at the dimmer location. A halfway measure might be to put a sense resistor across the analog input right on the dimmer and use a current loop driven at the other end of the cable.

    -Phil
  • Mark_TMark_T Posts: 1,981
    edited 2012-03-15 09:05
    I'll just re-iterate - if the unit is taking a control voltage from the pot, you don't actually need a digital pot, you need a programmable voltage source. Digital pots are only needed when the input voltage to the pot is a waveform, not a constant voltage (such as audio volume control). A DAC followed by a high-voltage amp would generate the control signal. In fact a programmable voltage regulator circuit might be usable in this context - some of them are the equivalent of a high-voltage op-amp...
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-03-15 09:52
    Pursuant to my last suggestion above, this is what I would try:

    attachment.php?attachmentid=90614&d=1331830219

    It has the following advantages:
    • Dimmer is completely isolated from the Propeller control circuit.
    • No op-amps are required to drive the long cable.
    • Output is a regulated current, immune to voltage losses in the cable.
    It works like this: The filtered DUTY mode output from the Prop drives the op-amp's positive input at 0-3.3V. The output of the op-amp drives the LEDs in the optoisolators in series, so each receives the same current. Since all three isolators are in the same package, their current transfer ratios should be pretty well matched, so each phototransistor will pass the same current. One phototransistor is used for feedback to the op-amp. The other two phototransistors are doubled up in parallel, so the output current is twice the feedback current. The feedback current is applied to a 330-ohm sense resistor, which produces a 3.3V feedback voltage when the feedback current is 10 mA, IOW when the output current is 20 mA. And a 20 mA output current will produce 30V across the sense resistor at the other end of the cable, assuming zero cable losses and zero VCE saturation of the isolators. Since the latter conditions are not realistic, you might want to reduce the remote sense resistor to 1.4K. This will give you a 0-28V full scale, with 2V of headroom for the phototransistor and cable losses.

    -Phil
    940 x 460 - 7K
  • rapscaLLionrapscaLLion Posts: 75
    edited 2012-03-15 10:20
    Wow Phil, thank you for going so in depth! I really appreciate it, and I think you've got a great solution. I'll have to order some parts, but I'll let you know how it turns out.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-03-15 11:12
    As to the op-amp and NPN, a plain old LM358 and 2N3904 should work. One triple optoisolator you could try is this one. It's actually a quad isolator, so you don't need to use the fourth section. You might even get by with a dual isolator. Just put two 330R feedback sense resistors in parallel to sense the entire 20 mA. The advantage is that the LED supply could then be reduced to +5V. Just make sure the isolator you pick can handle a lot more than 30V, has a low saturation voltage, and is capable of at least 40 mA continuous output current. I've also added a current-limiting resistor to the LED chain to protect the LEDs from wiring snafus during development. The possible difficulty with using a dual isolator is the transfer behavior at currents above 10 mA and the larger saturation voltage of the phototransistors. But it's definitely worth a try. Here's the schematic:

    attachment.php?attachmentid=90619&d=1331835015

    -Phil
    920 x 440 - 6K
  • ElectricAyeElectricAye Posts: 4,561
    edited 2012-03-15 19:40
    I, too, stand in awe of Phil's detailed response. I'm definitely bookmarking this one. We are not worthy!
  • bsnutbsnut Posts: 521
    edited 2012-03-16 01:48
    Rapscallion,

    Phil's detailed post and diagram will work perfectly if you need to be up and running right a way. I would like to suggest another idea for you to try and that is the HC-8+ by EFX-TEK.com. The HC-8+ has 8 high current transistors (TIP120) which can handle around 2amps and it's also designed to work with DMX. See the EFX-TEK support forums for more info on the HC-8+.

    BTW, I have the same user name on EFX-TEK forums as here.
  • rapscaLLionrapscaLLion Posts: 75
    edited 2012-03-19 11:12
    Hi bsnut,

    Thanks for the suggestion, I'm really not clear on what the HC-8+ is.

    Phil:

    Thanks again for your effort, I really appreciate it! I looked into it, but unfortunately the option of placing the controller by the dimmer is not going to be viable on our end (for various practical, cost and bureaucratic reasons). It could be that the best option for us is going to be going with a servo driven pot. I'm really looking for the simplest option here, as I won't be able to get the hours to implement anything terribly complex.

    Thanks again everyone!
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-03-19 11:21
    ...unfortunately the option of placing the controller by the dimmer is not going to be viable on our end...
    Nor is that necessary with the current loop method that I proposed. The only thing that has to be co-located with the dimmer is the sense resistor.

    -Phil
  • rapscaLLionrapscaLLion Posts: 75
    edited 2012-03-19 13:38
    Hi Phil,

    It won't be possible for me to install anything in or near the dimmer unfortunately. It's permanently installed and I am prohibited by policy to access it. Getting someone in to do it would exceed the budget we have for this little project. Gotta love large institutions!

    Cheers
  • bsnutbsnut Posts: 521
    edited 2012-03-20 02:15
    Rapscallion,

    The HC-8+ is a high current output control board that is a replacement for the DC-16 that was sold by EFX-TEK.com. The cool thing that this new product is able to do is dim high current LEDs used in Halloween props and theater via DMX, since the HC-8+ has a dip switches for setting the DMX address. Contact EFX-TEK.com for more info
  • bsnutbsnut Posts: 521
    edited 2012-03-20 02:35
    Rapscallion,

    Here's the link to the forum page about the HC-8+ http://www.efx-tek.com/php/smf/index.php?topic=1538.0
  • rapscaLLionrapscaLLion Posts: 75
    edited 2012-03-21 13:52
    Thanks bsnut, I'll have to keep an eye out for that either way :)
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2012-03-21 15:41
    Good work Phil... love the opto-isolated current mirror approach.
Sign In or Register to comment.