Hi! I'm a noob and I'm hoping maybe I can get some advice...
Basically I've bought some PT4115-based drivers from ebay and can't get the PWM dimming to work.
I've connected three 700mA LEDs in series and power it with with the +12v from a computer power supply and they run fine. I'm connecting the PWM pin to D3 on a Nano and nothing much seems to happen.
If test the voltage on pin 3, I get a 5v, 3v, 0v sequence as expected. I've also tested for continuity between D3 and the PWM pin across the cable, so I know I've got a good connection.
The first pic show the top of the driver board, the second pic shows the way I hooked things up.
The Arduino is powered by a separate USB adapter. By "common" ground, you're saying I can't run the Arduino on a different power supply? How should I would I wire this?
Yup!! That was the problem. I split off the same +12 connector that was powering the LEDs to power the Arduino and success!
I have much to learn, but why did that work...? Both the ATX power supply and the USB adapter were plugged into same power strip... so in my eyes they share a common ground anyway. I guess that's not true! LOL
Wow, great article! ...so had the USB adapter had a third-prong ground, it would have worked? It would have had a path back to meet the ground from the PSU, right?
so had the USB adapter had a third-prong ground, it would have worked? It would have had a path back to meet the ground from the PSU, right?
No, don't confuse the ground from the mains supply with the ground or common for signals.
It would have worked if you connect the -Ve from the USB to the -Ve of your external power supply. All these supplies are said to be "floating" with respect to the mains ground. Meaning that you could connect the +Ve from the USB to the -Ve of the supply if you want to do that, but you will only want to do that under very specific circumstances that you will only confuse yourself if you try and understand at the moment.
Bottom line, if both USB and external power supply were "not floating" then it would have worked but most supplies are much more flexible when they float.
It does this because after a reset all the pins default to being inputs. This means they float and can be pulled by any external load. The normal solution is to put a 10K pull down resistor on that pin.
Just to ensure you don't have anything goofy have you tried using a potentiometer with it for dimming? Connect to 5V, GND, and the wiper to the PWM pin.
Thanks for the help! I'm (obviously) a complete noob so I don't have much in the way of spare components... a potentiometer included.
I do have an interesting discovery, though... if I ground the PWM pin on the drivers, they don't cut off. They just dim a little. Is this expected behavior? Could this play into the problem?
I've isolated several drivers (I have 5) from the Arduino circuit and each one responds the same... grounding the driver PWM pin partly dims the LEDs.
Did some more searching and found an article that states "A logic level below 0.3V at DIM forces PT4115 to turn off the LED". Should grounding the PWM effectively accomplish this? Or is it literally looking for a positive voltage less than .3v? If so, how can I accomplish this default behavior if the Arduino fails to start? Pulling down the Arduino PWM pin with a 10K resistor doesn't seem to do it...
The DIM pin has an internal, 200K pullup. Building your circuit with anything under 200K pulling it down should turn the LED off. Something must be messed up with your circuit.
My guess would be that there's a mistake in the soldering of your board. I'd suggest giving it a close inspection, or if it's not too much trouble you could post a picture on the forum.