Shop OBEX P1 Docs P2 Docs Learn Events
Propeller and Rechargable Battery — Parallax Forums

Propeller and Rechargable Battery

BenClarkBenClark Posts: 20
edited 2010-07-28 12:15 in Propeller 1
I am designing a project using the Propeller and an XBee chip.
I am using a 9 V battery as the power source.
What I would like to do is have a wall power adapter that can plug into the device
and charge the battery (It is a re-chargable battery).
It doesn't need to be fancy.
Device unplugged. Runs off of battery.
Device plugged. Battery charging, device CANNOT be used.

Can anyone point me to an article or tutorial on setting up something like this?

Thanks
Ben

Comments

  • LeonLeon Posts: 7,620
    edited 2010-07-26 17:20
    A 9V battery is a very poor choice for an application like that.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Leon Heller
    Amateur radio callsign: G1HSM
  • BenClarkBenClark Posts: 20
    edited 2010-07-26 17:41
    Why?
  • jazzedjazzed Posts: 11,803
    edited 2010-07-26 17:43
    A 9V battery does not have much current capacity in ma-Hours.

    A 3 pack of AA or AAA NiCad batteries is a perfect solution for Propeller battery power assuming no 5V parts are used. You don't even need a voltage regulator.

    Each NiCad cell produces typically 1.2 VDC (at most 1.3 VDC fully charged but quickly settles to 1.2VDC). 3 * 1.2 = 3.6VDC which is at the high end of Propeller's operational range (3 fully chared NiCads can produce 3.9VDC which is under Propeller's absolute maximum rating of 4.0VDC).

    Cheers,
    --Steve

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Pages: Propeller JVM
  • BenClarkBenClark Posts: 20
    edited 2010-07-26 17:49
    OK, so can you give me a direction to follow?

    Where can I find a charging curcuit that I can use?

    As I said, the device will be used until the batteries are almost dead.

    Then I want to plug the device into a charger.

    Just like using a cell phone.

    The charging curcuit needs to become a part of the device. The batteries will not be easily removed.

    The charge cord will plug directly into the device for charging.



    Thanks
  • LeonLeon Posts: 7,620
    edited 2010-07-26 17:59
    With most rechargeable cells the voltage drops off very rapidly when they are discharged. Yiour idea of using them until they are almost dead won't work!

    Try the battery makers' web sites for app notes on battery selection and charging techniques.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Leon Heller
    Amateur radio callsign: G1HSM
  • jazzedjazzed Posts: 11,803
    edited 2010-07-26 18:00
    Wish I could help you more on building the charger. I would also like to have such an interface.
    I use AAA battery packs and an old wireless phone for charging on prototype hack projects.
    A friend of mine suggests using Li-ion batteries and there are charger chips for that.

    Google is your friend. Try "nicad li-ion charger circuit"
    First result is a good starting point en.wikipedia.org/wiki/Nickel-cadmium_battery

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Pages: Propeller JVM
  • Kevin WoodKevin Wood Posts: 1,266
    edited 2010-07-26 18:17
    You could use a lithium polymer battery and a MAX1555 to charge it.

    SparkFun sells the batteries, and they also have a charger module that you can view the schematic for a sample circuit.

    You can also look at the Arduino Fio schematic, which uses a MAX1555/USB + XBee on board, if you want to see a circuit closer to what you are trying to build.
  • Miner_with_a_PICMiner_with_a_PIC Posts: 123
    edited 2010-07-26 18:43
    Agreed with all that a 9V battery is a poor choice all round based on capacity and so on. Whatever battery you use you should study its characteristics in both charge and discharge, the internet is a great choice for this type of research...if simplicity is what you want choose a robust battery like a Ni-Cd or (Ni-Metal hydride) and pair it with a regulated voltage source that is also current limited to prevent battery damage. A quick circuit could be thrown together by using a zener shunt with current limiting resistor and a standard diode to prevent the battery current from flowing out of the battery. so...

    battery(+)---|<---zener(cathode)
    resistor
    wallwart(+)
    battery (-)
    zener(Anode)
    wallwart(-)


    be sure to consider heating due to power dissipation (resistor and zener), peak voltage expected at the battery and peak charge current.
  • Christof Eb.Christof Eb. Posts: 1,247
    edited 2010-07-27 10:36
    Hi Ben,

    about the simple method with NiCd of NiMH and a resistor:

    If you give the resistor a value, that allows a current of <=0,1*Capacity (for example 100mA for a Capacity of 1000mAh) of the cells, there is no problem with overcharging, but you need >=14 hours of charging.

    You will need some method to prevent the batteries to be discharged too much. The current has to be switched off at for example 0,8Volts per NiMH Cell.

    (Have you already measured or calculated the current draw of your design? I have found that the prop is a little bit hungry...)

    Christof
  • BenClarkBenClark Posts: 20
    edited 2010-07-27 10:56
    Thank you for your responses.
    I have not measured the current draw yet because the device has not been built yet.
    I am trying to get a feel for all the parts, etc...

    Thanks
  • LarryGLarryG Posts: 50
    edited 2010-07-27 13:36
    Hi Ben.

    I just did one with a Li-Po batt and the Max1555. It could not be easier. Just use the reference circuit in the datasheet.
  • BenClarkBenClark Posts: 20
    edited 2010-07-27 17:51
    Thank you.
    I know milleage may very, but using just the Gadget Ganster Module SD and an xbee standard chip, about how long can I expect the battery to last?
    minutes
    2 - 3 hours
    10 - 20 hours
    several days
    weeks

    Thank you again
  • Bobb FwedBobb Fwed Posts: 1,119
    edited 2010-07-27 19:50
    I've been using Li-Ion on my projects for quite a while.
    I use a 6000mAH battery and the MCP73862 charger/controller. Never had a problem. The controller requires a few external parts, but nothing you don't already have.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    April, 2008: when I discovered the answers to all my micro-computational-botherations!

    Some of my objects:
    MCP3X0X ADC Driver - Programmable Schmitt inputs, frequency reading, and more!
    Simple Propeller-based Database - Making life easier and more readable for all your EEPROM storage needs.
    String Manipulation Library - Don't allow strings to be the bane of the Propeller, bend them to your will!
    Fast Inter-Propeller Comm - Fast communication between two propellers (1.37MB/s @100MHz)!
  • LeonLeon Posts: 7,620
    edited 2010-07-27 20:27
    BenClark said...
    Thank you.
    I know milleage may very, but using just the Gadget Ganster Module SD and an xbee standard chip, about how long can I expect the battery to last?
    minutes
    2 - 3 hours
    10 - 20 hours
    several days
    weeks

    Thank you again

    Get the relevant data and calculate the current consumption. You will then be able to estimate how long a given battery will last.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Leon Heller
    Amateur radio callsign: G1HSM
  • jazzedjazzed Posts: 11,803
    edited 2010-07-27 21:12
    Leon said...
    Get the relevant data and calculate the current consumption. You will then be able to estimate how long a given battery will last.
    I wouldn't want to assume too much, but it seems like the poster may not know how to do that. There are curves in the Propeller data-sheet that can help with such estimates for the number of COGs in use, but the milliamp-hour mAH ratings of the battery are key to approximating how long the battery will last.

    It would be very useful for many who care about this if you could describe how to calculate useful battery time given 900 mAH, 10ma current consumed, a starting voltage at 3.6, and a power fail point of say 2.8V.

    Cheers,
    --Steve

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Pages: Propeller JVM
  • LeonLeon Posts: 7,620
    edited 2010-07-27 21:38
    You need to choose a battery.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Leon Heller
    Amateur radio callsign: G1HSM
  • jazzedjazzed Posts: 11,803
    edited 2010-07-27 21:42
    3 AAA NiCads rated at total 900mAH

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Pages: Propeller JVM
  • BADHABITBADHABIT Posts: 138
    edited 2010-07-27 22:39
    About 63hrs

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    BH skull.gif
  • HarleyHarley Posts: 997
    edited 2010-07-28 00:11
    BH
    BADHABIT said...
    About 63hrs
    Was that 'off the top of your head' or a compute from a data sheet?

    I too am new to estimating battery time usage. There probably is some simple math and data to figure such.

    Rayman said he ran his PTP board and LCD about 6 hours on batteries at UPEW. That sole me on his 3.5" touchscreen LED. And I had some years old AAAs from All Electronics which have been running some 2+ hours by now probably. that was a surprise the batteries were still charged and useful; about 1.57v each years later. That sure sold me on the 3.5" module. Super display, for sure.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Harley Shanko
  • jazzedjazzed Posts: 11,803
    edited 2010-07-28 00:22
    63 hours is definitely in the ball park. Still waiting for a methodology from Leon though. The LCD needs a constant back-light voltage otherwise it would last longer. OLED displays consume less current but are more expensive. I know a guy who has Propeller monitoring solutions in the field running 3 years on D-cells but most of the time the COGs are sleeping.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Pages: Propeller JVM
  • BenClarkBenClark Posts: 20
    edited 2010-07-28 12:15
    Thank you all for your replies.
    Yes, it would be nice to have a formula to gestimate run time.
    Once I have a couple of the actual devices completed, I intend to run multiple tests to determine actual performance characteristics, etc...

    My main concern at this point in time is this;
    The devices will be used all day Friday, Saturday and Sunday (10 - 12 hours a day) every week of the year.
    On Monday - Thursday, the devices will be in transit from one location to another.
    I need to be able to charge the devices over night on Thursday, and they can run safely, all the way through Sunday.
    If the batteries last 10 hours, days, months or even years longer than those 3 days, great! I just have to make sure they make it through the 3 days.
    My tests on the actual devices will tell me how long they will actually last.

    So, from what I am reading in all of your answers, 3 days shouldn't be a problem, but I need to use a formula to make certain I can get at least that long.
    Hopefully, someone can give us an example of a formula to use.

    Thanks again
    Ben
Sign In or Register to comment.