Take the 2-minute tour ×
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It's 100% free, no registration required.

I'm going to take a 5V 500mA power supply and pass it through a digital potentiometer AD5235 and then step it up through an op-amp with a gain 2 to get up to 10V output and put that into voltage based meanwell dimmer controller.

schematic diagram

I'm a little confused on how to handle grounding with this. They are circled blue. Can I "ground" the -5V from the pot, and the -10V from the dimmer and the opamp together without damaging the pot by connecting them on the power supply -5V terminal of the wall wart I'll be using?

Also I have a couple questions about the pin meanings:

  • WP - Optional Write Protect. When active low, WP prevents any changes to the present contents
  • PR - Optional Hardware Override Preset. Refreshes the scratchpad register with current contents of the EEMEM register. PR is activated at the logic high transition.
  • RDY - Ready. Active high open-drain output

What is active low vs just low, why the verb active?

What do Logic high transitions and active high open-drain output mean exactly?

share|improve this question
2  
I gave you +1 for the epic schematic. Don't most of those controllers have PWM though? The above obviously needs a microcontroller or similar for SPI so if the controller you're using supports that it will be much easier and drop the additional parts count to pretty much zero. –  PeterJ Jan 17 '13 at 12:09
    
    
"active low" means the feature the pin controls is "active" when the input is "low". A logic high transition means the instant at which a logic input was low, and then became high. An open drain output is just the MOSFET equivalent of an open collector. –  Phil Frost Jan 17 '13 at 12:23
    
@PeterJ The dimming function does allow pwm "DIMMING CONTROL (OPTIONAL) 1 ~ 10VDC or PWM signal : 100Hz ~ 3KHz" but I thought changing the PWM frequency changes the Atmega's timers and disrupts operations specially if your using arduino based hardware. –  Bob R Jan 17 '13 at 12:32
    
@Bob R, I'ved used AVRs but not Ardunino as such, but if the particular AVR has hardware PWM changing the register is a few a cycles (doesn't affect anything else while running) and will certainly be faster to change than an external SPI pot / ADC. But does depend on the chip and how clocks are set as to what you can get in that range. –  PeterJ Jan 17 '13 at 12:37
show 3 more comments

2 Answers

up vote 3 down vote accepted

Suggestion:

You don't really need the digital pot, the op amp to amplify the pot's output voltage, or the nice multicolor marker lines, to do what you require.

Explanation:

"DIMMING CONTROL (OPTIONAL) 1 ~ 10VDC or PWM signal : 100Hz ~ 3KHz" means the dimmer can be operated either by varying a DC analog voltage (Solution 1 below), or by varying only the duty cycle a PWM signal at your choice of frequency in the 100 Hz to 3 KHz range (Solution 2 below).


Solution 1:

Use a 10 volt regulated power supply such as a wall-wart, or even just a 9 Volt battery, and a potentiometer, in the following configuration:

Dimmer using potentiometer

A 9 Volt battery would be good enough for general use, the only constraint being it would reach only up to 90% of full brightness setting of the dimmer.

The center wiper contact of the potentiometer goes to the analog dimming input pin D+, and the negative side of the battery connects to one of the end contacts of the pot, and to the D- pin of the dimmer.


Solution 2:

Connect one of the PWM outputs of the Arduino, for example pin 3, 9, 10, or 11, to the PWM input pin D+ of the dimmer, and connect one of the GND pins of the Arduino to the D- pin of the dimmer. The default PWM frequency of the Arduino is approximately 490 Hz, within the acceptable range for your dimmer.

Set the dimming level you want, on a scale of 0 to 255, using AnalogWrite() in an Arduino sketch. By not changing any default frequencies, the operation of the Arduino will not be affected in any adverse way.


EDIT: Added Solution 3, from a Meanwell dimming thread on a discussion forum.

This solution is useful for Meanwell dimmers which only support the 0-10 Volt analog dimming method, and do not have a PWM option.

PWM to 1-10V dimming

From the relevant post: This circuit will let you dim a D driver with the PWM outputs from the Arduino.


Notes:

  • The dimmer input Ground pin referred to above should be one of the pins of the control input connector of the dimmer - NOT the neutral line of the mains, if the dimmer you refer to is used for mains dimming
  • A link to the datasheet of the dimmer will be useful to determine whether the dimmer control input needs some form of optoisolator - should not be the case, but better safe than sorry
    Update: Meanwell dimmer controller D+ and D- input pins do not need to be externally isolated.
  • Assumption: Your concept of using the op-amp was to be able to achieve a 10 Volt signal range without providing any 10 Volt power supply... That doesn't work, the op amp itself requires a 10 volt supply at the minimum, to be able to provide 0 to 10 Volt output.
  • Assumption: Your use of the digital potentiometer was purely for the purpose of programmatically controlling voltage from a microcontroller. In that case, the analog potentiometer voltage divider shown above in Solution 1 can be used as an input to the microcontroller, powered from the microcontroller's Vcc pin instead of the battery. The PWM output as in Solution 2 would then remain as stated, for actually controlling the dimmer.
  • OP mentions in a comment that the PWM dimming works thus: 100 Hz = supply off, 3 KHz = max brightness. The datasheet for the Meanwell ELN-30/60-XXD(P) contradicts this, stating: Meanwell datasheet excerpt In other words, the PWM duty cycle defines the brightness, regardless of the PWM frequency, within the allowable range of 100 Hz to 3 KHz.
share|improve this answer
    
Low or off for the supply is at 100 Hz and full brightness is at 3Khz, at 490 Hz I would only see about 2%of the voltage to the light source. –  Bob R Jan 17 '13 at 18:31
    
@BobR Please share the datasheet for your specific dimmer. The datasheet for one of the Meanwell dimmers clearly states that the duty cycle determines dimming, not the frequency. Note the updates in my answer above. –  Anindo Ghosh Jan 17 '13 at 19:16
    
Thank you Anindo Ghosh! –  Bob R Jan 18 '13 at 2:21
add comment

Your schematic doesn't show where the SPI is coming from - presumably a microcontroller?

There's a bit more detail in table 4 of the datasheet.

"Active low" means "this signal has its effect when it is low and has no effect when it is high". So in order to write protect the device, pull the ~WP pin low. (Active low signals are usually represented with a "bar" over the name, or a ~ in front, or _N on the end of the name)

"Open drain" means that it's connected to the drain side of a MOSFET; so the device can pull the pin low but not drive it high. Normally this means you must have a pull-up resistor.

Edit: about your title - you discuss various power supplies (+5V, -5V, -10V?) without showing them on the schematic or where they're coming from.

share|improve this answer
    
Green id -5V from a wall wart, red the positive from the wart, 10 from the output side of the op-amp and -10 would be the other leg of the grey dimmer and the magenta ground symbol I have circled in blue.. They are labled 2 and 3. –  Bob R Jan 17 '13 at 18:37
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.