Currently I have a constant current driver being powered by an external source (not the arduino board), that has a 0-5V control input pin which is powered by the arduino. It all works fine, except that for a split second between the program compiling and being uploaded the arduino turns off, causing the LED to be at full brightness, until the arduino turns on again. How can I fix this?
It all works fine, except that for a split second between the program compiling and being uploaded the arduino turns off, causing the LED to be at full brightness, until the arduino turns on again.
The Arduino pin 10 will go to Hi Z when downloading or Reset.
JRules:
except that for a split second between the program compiling and being uploaded the arduino turns off, causing the LED to be at full brightness, until the arduino turns on again. How can I fix this?
An external pull-down or pull-up resistor will help getting the signal from floating when the pin goes into High-Z mode. (up or down depends on what the module needs to be "off".) Resistor probably on the order of 10k, maybe 100k. You can play with the value to see what works.
JRules:
What does Hi Z mean?
High Impedance (Z). Means the pin switches to INPUT, effectively looking like an open (which isn't really possible, so it is very high impedance.)
JRules:
And now when I do analogWrite(10,255) it only gives me about 3.3V. Hm.
Generally means the load that the pin is connected to, draws more than 40mA. What pin on the current driver are you connecting the arduino to?
[quote author=James C4S link=topic=178813.msg1325440#msg1325440 date=1374523674]
An external pull-down or pull-up resistor will help getting the signal from floating when the pin goes into High-Z mode. (up or down depends on what the module needs to be "off".) Resistor probably on the order of 10k, maybe 100k. You can play with the value to see what works. [/quote]
Ok I need the Arduino to be giving 5V for the LED to be off. Which would I need?
The arduino connects to the Control pin on the driver.
[quote author=James C4S link=topic=178813.msg1325440#msg1325440 date=1374523674]
An external pull-down or pull-up resistor will help getting the signal from floating when the pin goes into High-Z mode. (up or down depends on what the module needs to be "off".) Resistor probably on the order of 10k, maybe 100k. You can play with the value to see what works.
Ok I need the Arduino to be giving 5V for the LED to be off. Which would I need?[/quote]
Pull-Up