Hey. I'm trying to make an LED matrix powered and controlled by current flow. I have a finished device that outputs 0-27mA through a 3.5mm Aux cord to electrodes. I was wondering If I could put an intermediate series LED matrix with an Aux input and Aux output. So the finished device would output a current between 0-27mA through an Aux, that Aux inputs into an LED matrix, the LED matrix has an output Aux that flows into the electrodes.
The goal with this is to:
Allow series current flow from device --> LED matrix --> electrodes
LEDS would not need an external power source, since it is powered by current flow
LED matrix would have an Auxillary Input and Auxillary output
The number of LEDs that light up correlates with the magnitude of current flow (0mA = no light, 27mA = all Lights on)
So you would have convert your 0- 27ma signal into digital data in order to control the WS2812 LEDs. It would require a separate power supply some analog circuits and a microcontroller for each matrix.
So what is the advantage of using 0-27ma signal?
That's a little confusing... But it seems possible...
It's unusual to have a "current source", but OK...
The matrix will need an external power source. The Arduino can share the same 5V power supply. Make sure the power supply can put-out the necessary current (typically 60mA per RGB LED).
In general, the current 0-27mA would be an Arduino input. The Matrix is the output. They are tied-together by software.
So first, you should be able to read the current, and you should be able to control the matrix, then you can write the in-between software.
Current through a resistor/resistance is proportional to voltage. Resistance is "the resistance to current flow", or as defined by Ohm's Law, Current = Voltage/Resistance.
The Arduino's ADC (analog-to-digital converter) reads voltage. But not directly in units of "volts".
So, 2V through 74 Ohms is 27mA. 75 Ohms is probably the closest value you can find. If you put a 75-Ohm resistor in parallel with the Arduino analog input, you can read the voltage and convert to current. But if you do the algebra, your sketch (code) doesn't have to calculate the actual current. It's going to be reading a number that's proportional to voltage & current and you can use that number in any way you like.
Yes i do thank you for asking. I was incorrect about the voltage. The device outputs 0v-15v correlating with 0-27mA. Would i be able to have the device output these through an Aux cord. Have that input into an analog pin, and have the LED matrix respond. Then have another pin output the same current that was read by the analog pin for the electrodes.
We may be having some technical terms confusion.
Maybe you should draw a simple diagram explaining what you want to do and how this 27mA current source works