Hi all!
How can i detect when USB plug is connected?. I use a standard USB module to feed a Lipo battery and feed the Arduino nano and also charge the battery. The main goal is to have an action when USB is plugged in.
Regards!
Hi all!
How can i detect when USB plug is connected?. I use a standard USB module to feed a Lipo battery and feed the Arduino nano and also charge the battery. The main goal is to have an action when USB is plugged in.
Regards!
voltage on VUSB will bigger as on VCC
ok, i don't get what you mean. Should i do something?. Thanks!
From what power source is the controller running when that USB plug isn't connected?
I have a Lipo Battery 3.7v 3000 MHa. The USB module charges the battery until full charge, then stops and works as a UPS when power outlet is cut, i need to measure that power conmutation in order to take action.
Schematics please.
I don´t have it but is simple as this:
The code checks the A0 pin:
int pinInput = analogRead(A0);
float voltage = pinInput * (5.0 / 1024.0);
Serial.println(voltage);
Ok, the thing is that with that configuration i have measures of 0.49, 0,50, 0,51 volts using the 5v charger. I print that in a OLED screen.
If i disconnect the 5v charger i get similar values as before and i cannot make the difference between power outage and battery use. I need to have that commutation so i can send a GPRS message to my phone.
I know i'm doing this the wrong way but is what i have at hand.
Regards!
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.