Connect with us

Reading iphone pins

Discussion in 'General Electronics Discussion' started by mollekake, Aug 11, 2014.

Scroll to continue with content
  1. mollekake

    mollekake

    37
    0
    Jun 30, 2014
    Hello all
    I want to make a simple iphone charger that lights green when battery is full, or doesn't charge anymore, and red when it's charging. Very simple.
    But, is there a way for a microcontroller, eiter AVR or PIC to read the battery status from an iphone without the use of an app?

    Anyone done anything with the iphone connectors?
     
  2. Gryd3

    Gryd3

    4,098
    875
    Jun 25, 2014
    You could easily get away with sensing current draw from a standard USB end. Current draw will drop, or dip once charging is complete.
    Many of the portable iGo chargers do this to turn themselves off once charging is complete.
     
  3. mollekake

    mollekake

    37
    0
    Jun 30, 2014
    Didn't even think about that! But how would i go on and do something like that?
     
  4. Gryd3

    Gryd3

    4,098
    875
    Jun 25, 2014
    First thing that pops in my head is using a low value, high accuracy shunt resistor.
    As the iPhone or other usb device charges, the current through the resistor will create a small, but negligible voltage drop. You can feed this into a comparator which will be able to detect when the voltage across the resistor (therefore the current being supplied) drops or breaches a pre-determined level. You can adjust the level at which the led switches with a small trim-pot.

    This may require a little digging to determine the best value resistor to use.
    0.5Ω resistor will drop 1V when the device tries to draw 2A... this would not be acceptable if you plan to charge at a high current like this. Using a value that is too small may present difficulty in detecting a difference from your reference voltage.
    Perhaps another will jump in with some ideal values to choose from or present an alternative idea.
     
  5. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,451
    2,809
    Jan 21, 2010
    the shunt resistor doesn't need to have high accuracy. :)
     
  6. mollekake

    mollekake

    37
    0
    Jun 30, 2014
    Ok, so i have to feed the current through the microcontroller, and compare the voltage on the receiving end with what? The voltage output by the source?
    What does shunt mean? ( english isn't my main language :p )
     
  7. Gryd3

    Gryd3

    4,098
    875
    Jun 25, 2014
    No microcontroller is required, this can be done with other parts.
    A shunt resistor is just going to be a resistor that you have connected in series in between the charger and iPhone. The iPhone will pull current from the charger which will in turn pull current through the resistor.
    The comparator will compare the voltage from the shunt resistor, to a voltage that you create with a voltage divider. This will allow you to adjust your circuit based on how much current is being drawn.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-