I have a project on a Mega that Im being super careful with because I have already fried a set of LED drivers 3 times and I'm a little gun-shy trying to get this to work.
I am working with constant-current LED drivers that are on by default and need a sink to ground to turn off, so I have 10k pull down resistors on each of my output pins to make it so these drivers are off by default and I can set the pin high to turn them on.
The left side of each of these resistors is connected to ground on the under-side of the shield, and on the right side as you can see, they connect to the output pin. The drivers themselves are connected via the screw terminal.
The LED drivers that Im using are these:
First of all... does this seem like a legit solution or is there a better way?
Barring that... my question is this: I was checking the resistance of each of these channels with a multi-meter before I even plugged in the arduino to power and on pins 3 and 5, instead of 10k ohms, I am seeing 48 ohms on pin 3 and 19ohms on pin 5.
This arduino was used with different code prior to this and this is the adruino that I was using when the previous drivers blew out... and I WAS using pins 3 and 5 in that version of the program.... So perhaps the difference in resistance is because I damaged the arduino as well? Or maybe this resistance is normal and happening because we had disabled internal pullups or... something else?
( would disabling pullup resistors in software lead to measureable resistance differences when the hardware is turned off? Do those settings persist?)
I have another adruino mega ( a knockoff from a RAMPS 3d printer kit) that I have laying around, and when I plug the same shield into THAT board ( never been programmed with anything) all of the pins read 10k ohms as expected.
Again, im testing all of this with no power being applied because i want to make sure everything is right and im scared of blowing my drivers again....
Thank you larry. I edited the OP with the link to the drivers.
To be clear... these are high-powered LED Drivers and I want to be off unless I specifically tell them I want them ON... and that includes when I am powering the system on and the arduino is booting up, or if the arduino is not even connected. I dont want to rely on software to keep them off.. I want them on ONLY when the controller gives a signal to turn on.... so that Is why I have these resistors here. Again, if there is a better way.... I'd be interestd to learn!
Which "channels"? Measuring resistance returns bogus on both digital inputs or outputs and can damage pins.
What you can measure is the voltage on the resistors. It should be less than 0.8V for off and greater 2.5V for on. So using PWM for controlled dimming is possible with the Mega or any other Arduino.
I hope that the screw terminals are not connected to Arduino pins by default or bridges?
The 10k pull-down is just a guess at a value based on recommendations elsewhere in this forum where people have discussed good values for pull-downs. If there is a basis for a different value or a different approach entirely, I'm open ears.
These drivers I think were intended for commercial / residential lighting applications where they are used one at a time and are likely turned on and off via mains power switching.. which is why I think they were designed with this "default-on" pullup on their control pin.... just makes use in that case easier.
My situation is quite different: I have banks of high intensity LED's in two colors which I need for stimulating flourescent proteins in plant leaves at two different wavelengths. One instrument switching between colors being controlled by an arduino. So i need these things to be "off" most of the time even while the arduino is unpowered... hence the pull-downs.
"channels" I mean output pins. I have the same 10k resistor connected to D2 through D11, all of them running back to the arduino's GND pad.
All I was doing here when testing the resistors was putting my multi-meter on ohms mode, putting the ground on an arduino ground pad, and then probing the outputs. All of them read 10kohms except for D3 and D5... which I thought was weird.
When I took the shield OFF the arduino and repeated the test, all of the outputs read as 10kohms... so the large difference in resistance Im seeing is somewhere in the arduino... and since these pins, for all my knowledge are supposed to be the same... My suspicion is that something in the arduino itself was damaged when the previous set of drivers melted down...
Is there another reason perhaps why I might see 48 ohms insted of 10k on an individual pin in this scenario?
Any thoughts on the original question of why I am seeing much lower resistance on some pins and not on others?
is it an indication that my arduino is shot? or could that happen normally? If the arduino is fried, I'd rather replace it than risk another set of drivers... but if this is just normal or due to some settings, then i'll save the time and expense.