Read LED from Adafruit 1000c

Hello together,

i want to read the led from the powerbooster 1000c, the problem is, that two of them are controlled via an negative:

I've connectet the Contact bevor the resistor with A0 from my arduino an want to read the analoge signal to identify which is the value to read.
But the Problem is, that the values fluctuate verry heavy from 0 to 1023. With connectet charger and without i see tendencies but thats not an accurat value :wink:

My Code looks like:

int detect1 = A0;
int val1 = 0;
void setup() {
pinMode(detect1, INPUT);
Serial.begin(9600);
}
void loop() {
val1 = analogRead(detect1);
Serial.println(val1);
}

Did anybody see my Failure?
P.S. from the red and black wires are only two connected: Battery and Ground and these are to an JST with an fuse befor
P.P.S. The Image shows only my old Test-Devices :wink: for real use i have an smaller real arduino nano :wink: (Just in Case because this is not an "real Arduino")

ร‚re the arduinos and the 1000Cs GNDs connected?

couka:
ร‚re the arduinos and the 1000Cs GNDs connected?

Thanks for this, this stabilize the values, but now they are allways around 300 and only when im connecting or disconnecting the power (so that the led normally would be going on) the values drops...
Did i need an resistor to the ground from the led?

I guess you are measuring on the wrong side of the led, but I can't say for sure.
Your diagram doesn't make much sense to me.
What's VBus, where is the Arduino?

VBus is the Power of the 1000c-Powerbooster... so this is allways on.
And the other Side of the LED goes to the controller which is low when i Charge the Battery on it else it is (i think as far as i'm understanding this:

https://cdn-learn.adafruit.com/assets/a ... 1429650091

The orange and green LEDs that already exist on the PowerBoost have separate control pins, and light when the control pins go low. The current-limiting resistor is between the LED and the control pin, so to read the signals with a microcontroller's digital pin, you'll want to tap the low end of the resistor, not the cathode of the LED.

) high.

But Because it doesent work with digital read i try to read the analog value but ive doesnt get it to work :frowning:

You know where the voltage changes, so measure there... If you want us to help, you need to show us what you did.

I can't know how you wired things up without a diagram

Problem soved XD
Without the battery it doesent work XD
Now with the Connectet Ground and the Battery it workes fine!

MANY THANKS :wink: