DX  » Community » Forums
«See all threads (in Product Forum)
Product Forum

Simple Variable Dimming With Potenetiometer

  • MJdub Monday, August 15, 2011 11:23 PM Reply
    Here is a description and photo of how I modified these to dim with a pot. I have somewhat minimal knowledge of the circuit; I know what each component is and can guess as to how they're connected but that's about it. I hope this will help other people of "intermediate" ability to better understand and modify these drivers. As always, be confident of your soldering ability, especially when working with SMDs, or at least be willing to suffer the consequences!

    First, the black wires on the top are replacing the MR16 connectors that I didn't intend to use. Removing these generated a lot of heat and seemed to weaken the contacts and/or the through-hole connection to the diodes on the other side. So I decided to flip it over and solder (very carefully...) directly to the diodes. This is rather tricky so unless you like soldering to SMDs, either be careful removing the MR16 connectors, or just use them as they are.

    The green wires go to a 200k-ohm pot which, of course, dims it. The left green wire is connected to pin 3 (DIM) of the PT4115 chip. The right green wire is connected to the negative wire of the capacitor, which seemed like the easiest point to solder to that was connected to GND of the PT4115.


    https://lh5.googleusercontent.com/-1drDQvCchsM/Tkh3ffkL17I/AAAAAAAABbc/0z3wQUffbSo/s640/PICT0262.JPG
    img src: https://lh5.googleusercontent.com/-1drDQvCchsM/Tkh3ffkL17I/AAAAAAAABbc/0z3wQUffbSo/s640/PICT0262.JPG



    When the resistance between DIM and GND is below about 25k ohms, the LED shuts off. Above this value the LED turns on at about 15% brightness or so, up to full brightness at 200k ohms. If you wanted to dim below that value you would have to use a PWM input to the DIM pin which complicates things a bit. However this works as a cheap and easy output control.

    To sum up the theory I managed to (sort of) learn: the DIM pin, normally floating, accepts a 0V-2.5V input for dimming, or can be shorted (<~25k ohm) to ground to shut off the output. The DIM pin is internally pulled up through 200k ohms to the 5V supply. The 200k ohm pot to ground, in turn, forms a voltage divider providing 2.5 V at its maximum value, and shorting to ground at its minimum. A PWM input to the DIM pin provides a wider range of dimming at the cost of added complexity depending on the application. PT4115 data sheet has all the info you need.

    That's about the extent of my knowledge on the subject, I hope it helps you!

    Here is an animated GIF (~5 MB) of me playing with
    3 of these hooked up to a 3W RGB LED (sku.4530)

    Link Here
    Posts(76) | Reviews | Tip post

    post edited by MJdub on 8/15/2011 at 11:26 PM
  • MJdub Saturday, August 20, 2011 11:32 PM Reply
    I made my first attempt at dimming these with PWM. Having no experience with this, I searched a bit on how to generate PWM with a 555 timer, since I already had a few of these. There are several schematics out there, using different configurations of the LM555. I tried three of them, and the first two would not work. I don't have an oscilloscope and could only do very basic debugging. I could not figure out what was wrong with either of the first two circuits. The configuration I found at http://www.josepino.com/circuits/pwm worked. Since this puts out a 5V PWM signal from pin 3 of the 555, I fed this through a voltage divider to lower it to 2.5V (don't put 5V into the DIM pin of the PT4115!).

    The dimming is very smooth, and goes down much lower than it did with the analog dimming. However, unfortunately it does not go completely off, even if I short the connections on the potentiometer. I'm not sure why this is, again I don't have a scope so I don't know what the quality of the PWM signal from the 555s is, it's possible the duty cycle isn't getting low enough to shut off. It does get very dim though. I posted the close-up photo of the emitters glowing under low power.

    One problem is that the LED seems to ramp up to about 90% for the first half of the pot, and the other half just barely dims it up to full power. So the first half of the pot is very "jumpy", but is very smooth if turned slowly. Not sure if this is the design of the 555 circuits.

    Overall I'm very pleased at what I could do to add dimming to this driver, beginning with no knowledge of PWM generation and adding only about $1.50 worth of electronics (maybe $5 if you pay high retail for all the components -- from the right place it shouldn't cost you more than $2). I can run three of these drivers connected to an RGB LED (sku.4530), plus three of the 555 circuits off of a 9v battery and it works quite well.
  • MJdub Friday, September 02, 2011 11:32 PM Reply
    These dim very well with a PWM signal!

    I recently bought "many" of these drivers ;) because they are very cheap in bulk! I'm finding them very handy to have around for testing/experimenting with any 1W LED. $1.50 each...if you play with lots of [1W] LEDs, and the input voltage is what you're looking for, go ahead and get tons of these! (By the way, do not give these 40V!)

    I recently bought an Arduino, and everything is so much easier with a microcontroller! Using the Arduino to generate a "good" PWM signal, I get excellent results with these drivers.

    I'm still new to much of this, and have been "teaching myself" with the internet and what books I can get my hands on. So all of this has been largely experimentation for me. My soldering skills were quite rusty, and now I find it quite easy to remove the MR16 connectors without overheating the board. The only hard part of modifying them is soldering to the small SMT pin of the PT4115, and I haven't had any real difficulty with that or broken any of the drivers.

    I made a YouTube video showing my test using three of these controlling sku.4530. Here is a link:

    Link to YouTube video.

    I realize now that one of my errors before was that I should have used a pull-down resistor between the DIM pin and ground; this was why I couldn't get the LEDs to turn off when dimmed completely. I added these resistors this time; they were actually needed to keep the outputs of the drivers off until PWM signal is received.

    I'm sorry for the "walls of text" but I hope they help answer the sort of questions I had, for people like me, to save them unneeded experimentation/frustration!
    Posts(76) | Reviews | Tip post

    post edited by MJdub on 9/2/2011 at 11:33 PM
  • MJdub Sunday, September 04, 2011 8:43 PM Reply
    I just tried some new code that dims more than two channels at a time. These seemed to work fine when there were only two channels used, but unfortunately whenever I add in the third channel I have problems. At first I thought it was a current issue, because when I had two colors at full and began to add a third, it would start to dim. However it also has problems at low levels when I use all three colors. As soon as I add the third color in, it begins to dim, and eventually it seems like only the two colors with the highest value are shown.

    I can't figure out why it's doing this; it's very frustrating. As you can see in the video with one or two colors at a time it works perfectly...not sure why the problems when I add the third. I was not having any problems with all three colors before I was using the Arduino, though these aren't the same three drivers.

    I've used almost the exact same code to drive a small 5mm RGB LED directly, and it seems to work fine.

    The power supply I am using is rated at 1A @ 9V
    Posts(76) | Reviews | Tip post

    post edited by MJdub on 9/4/2011 at 8:45 PM
  • mathiaszug Wednesday, October 12, 2011 9:44 AM Reply
    Hi MJDUB
    Nice work. The PWM is not necessary. If you look at page 7 on the chips datasheet you will see that the output current versus dim duty cicle and the output current versus dim voltage are the same and very linear.

    So it is easier to use the voltage dimming. The PWM would be easier if the chip is far away from the controller pot like on remotes because it is easier to generate pwm with a processor than a dc level. But if its like on a table lamp it is much easier to use the pot to change de dc level.

    The vdim maximum ratings are 6v. The normal (typical) is 5v. You can go from 0 to 5 volts on this pin with no problems. But you dont need since 2.5v will be 100% of brightness. (Iout=(0.1xVdim)/(2.5xR)).

    When you use a PWM the frequency should be greater than 100hz to not have flicker.

    Best regards,
    mathias


  • sgwd0 Monday, November 26, 2012 8:31 AM Reply
    hi, you can tell me wich arduino controller you use, in dx, thanks
  • MJdub Monday, November 26, 2012 12:13 PM Reply
    @sgwd0 I used an Arduino Duemilanove, which I did not buy from DX but there are many Arduino-compatible boards/products on DX. sku.118078 is basically the same as what I used. sku.81877 is the same cost but much more compact, and just as easy to work with other than the lack of female headers and a power socket. I only used the Arduino to run some very simple code which generated a PWM signal -- any microcontroller that can generate PWM would have worked fine.

    @mathiaszug It could have been that the trimpots I was using and/or poor connections to the breadboard were keeping it from shorting completely to ground. I was getting much better results with a PWM signal though. It seemed like with the pot it could dim smoothly, however wouldn't shut all the way off. I didn't figure out until later to add pulldown resistors, which would have helped if this were the issue. With pulldown resistors and better/properly-connected pots I may have gotten the results I was looking for.

    Edit: Just realized that post is a year old ... oops!
    Posts(76) | Reviews | Tip post

    post edited by MJdub on 11/26/2012 at 12:14 PM
«Reply to this thread (in Product Forum)
Product Forum

Reply

Subject:

* 50 characters max

Message:

* 5000 characters max
Please note: HTML codes are not allowed anywhere on this page (otherwise you will see an error).

Please note that DealExtreme Forums are not a sales or product support board. While we do constantly participate in this forum, please contact us via support ticket for a guaranteed fast response. We make every effort to make the quickest replies.

WHY CHOOSE DX.COM?

Get great weekly deals and offers like: Collections