1
\$\begingroup\$

I made a simple circuit with a premade LED driver (Recom RCD-24-0.35), analog-dimmed by a MCP4921 DAC, which is controlled by a 3.3V microcontroller board. You can see the schematic below, Q1 is unrelated to the LED, but is used for switching an external device via common emitter amplifier and is connected to the same 24V source. Since the LED driver analog dimming input is inverted (full dimming is at 4.5V, the voltage divider below the dimming port ensures that 4.5V is the maximum), Q2 logic level FET was added to cut the ground off the driver until the microcontroller board boots up to prevent the LED glowing at full power until it does. S1 allows to turn the LED off manually by the same method.

The circuit

Problem is, when S1 is disconnected or/and Q2 is off, the LED still gets ~1.2mA of current and visibly glows, even though the return path is supposed to be cut off. Another thing that might help is that the glowing intensifies when dimmed more (lower dimming voltage applied) and disappears if the controller board is not powered, so it must be related to the dimming part of the circuit.

Am I missing something obvious here? All ideas are appreciated.

EDIT: Shorting out Q1 removes the annoying glow and the device works as supposed to (besides not having external device control, that is), what could be causing this?

\$\endgroup\$
  • 1
    \$\begingroup\$ What IC is the LED driver? The moment you turn on the circuit there's a potential between V_In and DIM (as DIM will be at 0V). Obviously without knowing the IC it's hard to give exact answers, but generally pulling an ICs input below it's ground is not something you want to do. \$\endgroup\$ – LeoR Jan 29 '15 at 9:42
  • \$\begingroup\$ It's a Recom RCD-24 costant current power supply, not sure if it helps much. \$\endgroup\$ – I have no idea what I'm doing Jan 29 '15 at 9:46
  • 1
    \$\begingroup\$ Could you place Q2 between the 24V supply and the LED driver? \$\endgroup\$ – LeoR Jan 29 '15 at 9:50
  • \$\begingroup\$ I think the track is right though, the LED glows more when lower voltage is applied to the input. \$\endgroup\$ – I have no idea what I'm doing Jan 29 '15 at 9:50
  • 2
    \$\begingroup\$ Ah, you don't switch ground in this module. The PWM pin is what you should be hooking up to your switch. If you turn off Q1 then you're powering the module through the analog dim pin, and the dim pin will be effectively at 0V relative to the module. \$\endgroup\$ – W5VO Jan 29 '15 at 11:03
7
\$\begingroup\$

What's Happening:

Internal to the module, there are some diodes to protect the inputs. Typically these are ESD diodes, but they will conduct DC current if you reverse bias them. It's not a strong power source, and you have resistor limiting of it, so it's not very bright. The current flows from D1, into the driver VDD (weakly powering the module and LED), to the GND net, through the internal ESD diode, out to R1, and then to ground either through the DAC or R2. Note that this will make the DIM pin voltage less than the effective VSS of the module, which would command a full intensity. It may also be possible that the base-emitter junction is going into avalanche and your current is going that way. Typical V_eb max values are about 5V, and if the circuit worked you could be seeing up to 24V there.

When Q1 is shorted, that increases the current flowing through R1 by placing R_L in parallel with the module. This effectively reduces the voltage available to the module by a bit, and pushes the available supply below the minimum required for operation.

enter image description here

What should you do:

This module has an enable pin! You can get the desired functionality with minimal changes by putting a pull-up to 3.3V or 5.0V (either one works), and then using your microcontroller-enabled MOSFET. If you want to have the pull-up with the 24V supply, then you'll need to make a voltage divider to reduce the voltage (the PWM pin can't tolerate 24V). You could also get rid of R5 and replace it with a 3.0V Zener diode to be safe. Since most microcontrollers start with inputs disabled, you might be able to do away with everything except the voltage divider resistors. In that case, you could omit M1 and R2 in the schematic below, and directly connect your PIN5 to the enable.

schematic

simulate this circuit – Schematic created using CircuitLab

Other notes:

  • Make your R4 - Q1 - R_L circuit independent of this circuit (e.g. connect the emitter of Q1 to GND)
  • Your resistor divider as drawn will not actually divide the output voltage (unless R1 is big enough that the input current of DIM will cause a measurable drop). Use the topology below (or omit it entirely, you're not going to hurt it with 5V).
  • Check Q1 before you use it again. It may have been damaged.
  • If you want to know where the current was really going, measure the voltage drop across R1 and across R4. One of these will have a measurable drop. Measure the voltage difference between VDD and GND to see how much voltage the module was actually getting.
\$\endgroup\$
  • \$\begingroup\$ I love your answer, but a few spots were a bit unclear to me. Firstly, what does connecting Q1 to GND accomplish? If Q2 is present, wouldn't it provide a path around for the driver? Then, what tells you the divider won't work? Can't spot a difference between that and yours, it seems to do work as well. I would prefer not to skip it, since I need maximum dimming resolution in this case, and going with 5V gives me useless 4.5V-5V range. And finally, could you clarify where the voltage drop should be measured? Just across the resistor? Won't it be solely dependent on the resistance value? \$\endgroup\$ – I have no idea what I'm doing Jan 29 '15 at 12:53
  • \$\begingroup\$ Voltage between the driver power pins is 3.2-4.8V when the ground is cut off, depending on the dimming voltage. \$\endgroup\$ – I have no idea what I'm doing Jan 29 '15 at 12:56
  • \$\begingroup\$ Also, the suggested circuit is great, but since anything but 24V is coming from the MCU itself I think it will stop working once it's powered down, I would like to avoid that as well since the 24V supply and the MCU are turned on separately and sometimes I just want to leave the supply on even when I'm not using the MCU. Also, if I'm correct the PWM isn't inverted, so I'm thinking about a PNP transistor hooked between GND and PWM input. \$\endgroup\$ – I have no idea what I'm doing Jan 29 '15 at 13:02
  • \$\begingroup\$ Moving Q1 to GND instead of the drain helps eliminate possibly undesired behavior. If you're controlling that pin through the MCU, then any logical OR behavior you're looking for could be just as easily accomplished through code. \$\endgroup\$ – W5VO Jan 29 '15 at 13:44
  • \$\begingroup\$ The resistor divider as I have drawn it divides the DAC output voltage, while your circuit does not. You may be getting a voltage drop across R1, but it wouldn't be because R1 and R2 are generating an output that is 0.9 of the DAC Vout. I'm doubtful you'll see a significant difference in resolution by adding the resistor divider, but that's your choice. \$\endgroup\$ – W5VO Jan 29 '15 at 13:51
2
\$\begingroup\$

ICs have internal diodes between all their inputs and the power rails. So I suspect what's happening is this acts like a diode between Vout and DIM, providing a current path to ground through R1 and R2. The presence of the resistors limits the current to the low value you're seeing.

The solution is to

(a) move the bottom end of R2 to above Q2 so that path is also turned off

(b) put a small Schottky diode from the output pin of the DAC to prevent back-powering through that route. (Actually that might not work, I'm not clear on how the DAC is supposed to interact with R1/R2?)

\$\endgroup\$
  • \$\begingroup\$ R1 and R2 form a voltage divider for the dimming input. DAC outputs 0-5V analog output, and the driver accepts 0-4.5V for the dimming range. I guess moving it above Q2 shouldn't affect how it works. \$\endgroup\$ – I have no idea what I'm doing Jan 29 '15 at 10:18
  • \$\begingroup\$ Unsoldering the grounded resistor does not help with the problem though, if the path was through the resistor it would make sense if the glow was gone? \$\endgroup\$ – I have no idea what I'm doing Jan 29 '15 at 10:41
  • \$\begingroup\$ Hmm. Combined with the "shorting Q1 fixes it" I'm now as confused as you are. Next step: measure the voltage at every node? \$\endgroup\$ – pjc50 Jan 29 '15 at 10:55
  • 1
    \$\begingroup\$ The vout pin should be labeled vss. Your initial conclusion is probably right, and shorting Q1 is effectively shunting the leakage current. \$\endgroup\$ – W5VO Jan 29 '15 at 11:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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