1. Immya Polzovatelya's Avatar
    Dear everyone,

    I'm working on a project which is a portable solar phone charger. Solar panels charge a battery, and the battery charges the phone through a usb cable. On the phone, I will make an app that shows the battery level on the charger. My question is: can my android phone (Galaxy S6 or S9) somehow read the voltage on the data lines of usb (the voltage will come from a voltmeter that shows the battery level)?

    This question might seem a little off-topic, but it is actually related just to android: is it capable of such a low-level tasks like reading the voltage directly from usb?
    06-03-2018 02:20 PM
  2. Mooncatt's Avatar
    It can read the the input voltage, but that'll change based the charge level of the phone battery. By default, Android doesn't know if it's plugged into a wall charger, battery pack, etc, so it wouldn't be able to determine the external pack's remaining capacity.

    There are possibly two work arounds. One would be to add some level of communication ability to the pack that feeds capacity levels through USB, with a companion app on the phone that knows how to read these. The other (which I have with my headset) would be a Bluetooth connection where the pack reports the capacity to the phone that way.

    I'm not sure if such a battery pack even exists (it may, I just haven't looked heavily at them). It may take a bit of work to design this from the ground up on a custom solar charger.
    06-03-2018 03:43 PM
  3. Rukbat's Avatar
    I think your best bet would be a V-to-F converter in the charger, and a frequency counter calibrated in voltage in the phone app. Reading a DC level on the data lines isn't guaranteed in USB. (It can probably be done, but the reading might be different for different phones. Frequency is frequency - if the charger is generating 3,748 Hz, that's what the app will get. Remember, though, if you're using a lithium battery in the charger, you're going to have to use a DC-to-DC converter to step the 3.8 [nominal] battery voltage to 5 Volts or it won't charge the battery in the phone. If you use 2 in series, you're wasting power in the step-down from 7.6 Volts to 5 Volts.)
    06-03-2018 05:14 PM

Similar Threads

  1. GS5 magnetic USB cable
    By bkenobi69 in forum Samsung Galaxy S5 Accessories
    Replies: 2
    Last Post: 06-03-2018, 03:56 PM
  2. Simple question: where is the task icon on my android galaxy7 phone
    By Android Central Question in forum Ask a Question
    Replies: 1
    Last Post: 06-03-2018, 01:05 PM
  3. iBolt Dock'n Drive App - Turns on whenever I charge
    By J M Brown in forum Samsung Galaxy S9 & S9+
    Replies: 0
    Last Post: 06-03-2018, 12:54 PM
  4. WIFI indicator missing from top left of screen Galaxy S8
    By Android Central Question in forum Ask a Question
    Replies: 1
    Last Post: 06-03-2018, 12:31 PM
  5. Why is there 2 white square icon in the top left hand corner of my htc phone
    By Android Central Question in forum Ask a Question
    Replies: 1
    Last Post: 06-03-2018, 11:45 AM
LINK TO POST COPIED TO CLIPBOARD