Reply by October 3, 20132013-10-03
> You have presented no compelling reasons for using a USB port. > And there have been many responses suggesting that it's a bad idea.
The reason is that we have to provide some power source for the charging ho= lder of a portable device, either attached or detached to the A/C plug. If= we supply with attached plug, we have to worry about the A/C plug itself. = USB A/C plugs are widely available and cheap. But because USB ports are a= lso available on PC and laptop, we have to worry about them. However, a properly built PC/laptop USB port should limit the current and/o= r disable the noisy port. USB devices would not have been so popular witho= ut this simple and fundamental safe-guide.=20
Reply by mike October 3, 20132013-10-03
On 10/2/2013 7:46 AM, edward.ming.lee@gmail.com wrote:
> On Wednesday, October 2, 2013 6:05:55 AM UTC-7, Martin Brown wrote: >> On 02/10/2013 12:45, mike wrote: >> >>> On 10/1/2013 7:27 PM, edward.ming.lee@gmail.com wrote: >> >>>>>> 2. Fully charged battery is around 4.2V (for a short time anyway), >>>>>> but the device is 4.0V max. >> >>>>> How much do i need to worry about this over-voltage? >> >>>>> As usual the devil is in the details. And you supplied almost none. >>>>> The word "about" has no place in a specification. >>>>> Without knowing the battery capacity, charge current, load current, >>>>> expected run time, charge time, >> >>>> AAAx3 800mAHr NiMH. Charge via USB PC or Wall adapter. 0.7V diode >>>> drop from 5V. Charge overnight (at least 10 hours). >> >>> Load current between 50mA to 100mA. Stay on during the day. But the >>> customer might forget to charge it at night. >> >>> So, better to allow capacity for several days. >> >>> There you go again. "Several" is NOT A SPEC. "During the day" is NOT A >>> SPEC. >> >>> "50 to 100mA" is NOT A SPEC. >>> You need to decide on numbers that serve as your design goals. >>> Make the decision BEFORE you design it, not after. >> >>> Does it REALLY, REALLY have to run of a computer USB port? > > No, the goal is to charge it with wall plug. But we can't stop the 1% case of plugging it into PC/laptop. > > >> Increasingly the wall warts for many newer consumer items *ARE* on USB >> pinout and using the charging extensions to the spec. Some of hte Apple >> kit can even source upto 2A of current to USB peripherals. >> > > Yes. > >> >> USB can nominally source 500mA if asked nicely. The question is whether >> or not the device he builds will ask the host system to go high power or >> bother to check that the unit is happy to source higher currents. > > USB can source some (100mA?) without asking. The goal is to stay below that limit. > >>> My definition of several is five. >>> My day is 12 hours long. >> >>> So, you need 6 amp-hours of battery capacity. >>> And to charge it in 10 hours, you need more than 600mA of current, >> Or in 12 hours 500mA which is borderline doable on any platform. It >> might tend to ruin portable PC batteries though. The other thing is that >> customers who forget to charge kit also tend to forget to switch it off >> as well so you may need twice the estimated battery capacity and >> protection from overcharging. >> > > Charging it with laptop is even more unlikely. It's not a critical component to take up the dedicated laptop USB port.
We can pretty much rule it out with sharing laptop USB hard drive, either by reasoning or policy/warning sticker. More than likely, it plugs into a PC USB hub port.
>
I missed the part where you described what you were building. Obviously, if you're building a device that runs your artificial heart, the requirements would be more stringent than if it was a throwaway novelty item. USB power has become standard for things like cellphones for a couple of reasons. Smart phones already need the ability to exchange data via the port. The power aspect is free. I have several phone-like devices where the device won't charge from the USB port using the supplied data cables. There's a reason for that. Phones get replaced more often than some people change their shorts. Makes sense to standardize on something that's super-high volume AND is a good match to the requirement. If you're gonna follow that trend, why not just do it. Surely you can buy a single-chip battery management system for a phone. Use a lithium battery and be done with it. Cobbling together some marginal designs that sorta work just so you can risk destroying someone's laptop is ill advised. I'm the poster boy for Murphy's law. I can guarantee you that idiots have unlimited capacity to imagine ways to break stuff. Unlikely is not good enough. You gotta make it IMPOSSIBLE...and still, they'll find ways to do it. Just ask the ER doctors responsible for removing objects from people's orifices. You have presented no compelling reasons for using a USB port. And there have been many responses suggesting that it's a bad idea.
Reply by ehsjr October 3, 20132013-10-03
On 10/2/2013 2:46 AM, edward.ming.lee@gmail.com wrote:
> On Tuesday, October 1, 2013 9:32:10 PM UTC-7, ehsjr wrote: >> On 10/1/2013 1:56 PM, edward.ming.lee@gmail.com wrote: >> >>> I am working on a simple USB charging circuit. Normally, the 3.6V NiMH >> > battery is connected to the device via the NC contacts of a relay. When >> > connected, a 5V relay switch the battery to charge via a diode. So, a >> > fully charged battery is around 4.2V. As someone suggested, i will put >> > a parallel R & C to reduce the hold current of the relay. >>> >> Where are you going to put the parallel RC? Draw a schematic. >> If you put any resistance across the relay coil, it will >> draw more current, not less. > > In series with the coil, probably R1=150 ohms and C1=470uF. Perhaps 0.7s (if i got my zeros right) of 5V dropping to around 3V holding. > > +------------------+ > ----- D1 | +-R1-+ | > | +|-->|--+--+ +-[Relay] +- v (n/o) > | 5 V | +-C1-+ | |--o----[Battery]-----+ > | -|----------------------+ +- ^ (n/c) | > ----- | | | > | +-[R2]-+-[Device]--+ > | | | > | +--[Shunt]---+ > | | > +------------------------+ > >
Ok, thanks for showing it. You don't need it. The diode in the circuit will drop the voltage to the relay by ~.6 V, the 5V relay will operate nicely at 4.4 at lower than nominal current. Is there some reason you haven't mentioned that you want to hold the relay energized at lower current?
> >> >> Your 5V relay will operate at the ~ 4.2 volts after the diode >> drop. Your 3 cell NiMh pack will be charged to 1.4 volts per >> cell. That is not an over voltage for charging an NiMh cell. > > I am not worrying about over voltage for the battery, but for the chips.
> Namely, a PIC32MX575F512. It's unfortunately that it has such low > tolerant for voltage range, driving the internal LDO regulator.
>
Well, you have to worry about overcharging when you use a 5V source to charge a 3.6 volt NiMh battery. That's why I mentioned that the diode takes care of that. Your 3.6 volt requirement is met by the shunt circuit. You snipped the part where that was discussed. Did you read it? Ed
Reply by October 2, 20132013-10-02
On Wednesday, October 2, 2013 6:05:55 AM UTC-7, Martin Brown wrote:
> On 02/10/2013 12:45, mike wrote: >=20 > > On 10/1/2013 7:27 PM, edward.ming.lee@gmail.com wrote: >=20 > >>>> 2. Fully charged battery is around 4.2V (for a short time anyway), > >>>> but the device is 4.0V max. >=20 > >>> How much do i need to worry about this over-voltage? >=20 > >>> As usual the devil is in the details. And you supplied almost none. > >>> The word "about" has no place in a specification. > >>> Without knowing the battery capacity, charge current, load current, > >>> expected run time, charge time, >=20 > >> AAAx3 800mAHr NiMH. Charge via USB PC or Wall adapter. 0.7V diode > >> drop from 5V. Charge overnight (at least 10 hours). >=20 > > Load current between 50mA to 100mA. Stay on during the day. But the > > customer might forget to charge it at night. >=20 > > So, better to allow capacity for several days. >=20 > > There you go again. "Several" is NOT A SPEC. "During the day" is NOT A > > SPEC. >=20 > > "50 to 100mA" is NOT A SPEC. > > You need to decide on numbers that serve as your design goals. > > Make the decision BEFORE you design it, not after. >=20 > > Does it REALLY, REALLY have to run of a computer USB port?
No, the goal is to charge it with wall plug. But we can't stop the 1% case= of plugging it into PC/laptop.
> Increasingly the wall warts for many newer consumer items *ARE* on USB=20 > pinout and using the charging extensions to the spec. Some of hte Apple=
=20
> kit can even source upto 2A of current to USB peripherals. >=20
Yes.
>=20 > USB can nominally source 500mA if asked nicely. The question is whether=
=20
> or not the device he builds will ask the host system to go high power or=
=20
> bother to check that the unit is happy to source higher currents.
USB can source some (100mA?) without asking. The goal is to stay below tha= t limit.
> > My definition of several is five. > > My day is 12 hours long. >=20 > > So, you need 6 amp-hours of battery capacity. > > And to charge it in 10 hours, you need more than 600mA of current, > Or in 12 hours 500mA which is borderline doable on any platform. It=20 > might tend to ruin portable PC batteries though. The other thing is that=
=20
> customers who forget to charge kit also tend to forget to switch it off=
=20
> as well so you may need twice the estimated battery capacity and=20 > protection from overcharging. >=20
Charging it with laptop is even more unlikely. It's not a critical compone= nt to take up the dedicated laptop USB port. We can pretty much rule it ou= t with sharing laptop USB hard drive, either by reasoning or policy/warning= sticker. More than likely, it plugs into a PC USB hub port.
Reply by Martin Brown October 2, 20132013-10-02
On 02/10/2013 12:45, mike wrote:
> On 10/1/2013 7:27 PM, edward.ming.lee@gmail.com wrote: >> >>>> 2. Fully charged battery is around 4.2V (for a short time anyway), >>>> but the device is 4.0V max. >>> >>> How much do i need to worry about this over-voltage? >>> >>> As usual the devil is in the details. And you supplied almost none. >>> The word "about" has no place in a specification. >>> Without knowing the battery capacity, charge current, load current, >>> expected run time, charge time, >> >> AAAx3 800mAHr NiMH. Charge via USB PC or Wall adapter. 0.7V diode >> drop from 5V. Charge overnight (at least 10 hours). > > Load current between 50mA to 100mA. Stay on during the day. But the > customer might forget to charge it at night. > > So, better to allow capacity for several days. > > There you go again. "Several" is NOT A SPEC. "During the day" is NOT A > SPEC. > "50 to 100mA" is NOT A SPEC. > You need to decide on numbers that serve as your design goals. > Make the decision BEFORE you design it, not after. > > Does it REALLY, REALLY have to run of a computer USB port? > There is no excuse for a USB coffee cup warmer, but you can buy 'em. > Many battery powered devices with USB ports won't be able to charge your > device from the battery, and still have juice left in the charging > device the next day. > You're stuck powering the laptop from AC. Skip the middle man and plug > in your device's wall wart.
Increasingly the wall warts for many newer consumer items *ARE* on USB pinout and using the charging extensions to the spec. Some of hte Apple kit can even source upto 2A of current to USB peripherals. http://en.wikipedia.org/wiki/Universal_Serial_Bus#Charging_ports_and_accessory_charging_adapters It is actually a great improvement to having many different mutually incompatible custom random voltage and plug diameter/design wallwarts for every brand of mobile phone, modem etc. you have ever owned sat in a desk drawer. Pity the micro USB connectors are mechanically a bit feeble and inclined to die due to maltreatment. I have killed a a few now due to dragging kit off the bench by the lead accidentally.
> IF a wall wart will do it, your problem gets very much simpler, and > your liability becomes very much less. You can put your design effort > into the device performance instead of trying to squeak by a marginal > power supply.
USB can nominally source 500mA if asked nicely. The question is whether or not the device he builds will ask the host system to go high power or bother to check that the unit is happy to source higher currents.
> My definition of several is five. > My day is 12 hours long. > So, you need 6 amp-hours of battery capacity. > And to charge it in 10 hours, you need more than 600mA of current,
Or in 12 hours 500mA which is borderline doable on any platform. It might tend to ruin portable PC batteries though. The other thing is that customers who forget to charge kit also tend to forget to switch it off as well so you may need twice the estimated battery capacity and protection from overcharging. -- Regards, Martin Brown
Reply by mike October 2, 20132013-10-02
On 10/1/2013 7:27 PM, edward.ming.lee@gmail.com wrote:
> >>> 2. Fully charged battery is around 4.2V (for a short time anyway), but the device is 4.0V max. >> >> How much do i need to worry about this over-voltage? >> >> As usual the devil is in the details. And you supplied almost none. >> The word "about" has no place in a specification. >> Without knowing the battery capacity, charge current, load current, >> expected run time, charge time, > > AAAx3 800mAHr NiMH. Charge via USB PC or Wall adapter. 0.7V diode drop from 5V. Charge overnight (at least 10 hours).
Load current between 50mA to 100mA. Stay on during the day. But the customer might forget to charge it at night. So, better to allow capacity for several days. There you go again. "Several" is NOT A SPEC. "During the day" is NOT A SPEC. "50 to 100mA" is NOT A SPEC. You need to decide on numbers that serve as your design goals. Make the decision BEFORE you design it, not after. Does it REALLY, REALLY have to run of a computer USB port? There is no excuse for a USB coffee cup warmer, but you can buy 'em. Many battery powered devices with USB ports won't be able to charge your device from the battery, and still have juice left in the charging device the next day. You're stuck powering the laptop from AC. Skip the middle man and plug in your device's wall wart. IF a wall wart will do it, your problem gets very much simpler, and your liability becomes very much less. You can put your design effort into the device performance instead of trying to squeak by a marginal power supply. My definition of several is five. My day is 12 hours long. So, you need 6 amp-hours of battery capacity. And to charge it in 10 hours, you need more than 600mA of current, depending on, temperature and a zillion other efficiency considerations. In this case, the term "zillion" represents more issues than you'll probably consider. And that's an average of 600mA over the whole charge cycle. And, because your voltage margins are insane, you won't get nearly full capacity of the battery without using something like a SEPIC or transformer-based switcher. Based on MY assumptions, you can't reliably get there from here. Your assumptions may be different...write them down.
> >> >> Run the chips off a ldo linear regulator and be done with it. > > If i can find one with adjustable drop out down to zero. The battery could drop below 3V.
Not if you expect reliable operation. I'd shoot for higher terminal voltage and lower effective battery capacity. You can get regulators with pretty low dropout. Remember, that parts of your circuit might be able to run off the battery. The regulator may have to supply only part of the system.
> > >> Are we talking USB1? USB2? USB3? >> >> With your relay scheme, what's gonna happen to the customer's >> $2000 laptop when your battery is discharged to 2V and plugs it into >> his USB port...and the relay chatters and all hell breaks loose in >> the USB controller, and his external USB hard drive starts banging >> its heads against the platters? Is it gonna break anything? Maybe not. > > Yes, perhaps we need to add replaceable fuse.
If you were on my engineering staff, I'd be slapping you silly about now. Quit sticking on more band-aids and analyze the entire system. Since you have access to only half of the system you're gonna need a lot of relevant experience. Do some verification experiments. "Hey Sally, can I borrow your $1000 tablet so I can make sure this coffee cup warmer doesn't break it?" A non-replaceable fuse may be a good idea for catastrophic shorts. It won't help you a bit with a limit-cycle oscillation caused by the USB current limit and your device's charging circuit. Listening to your USB disk drive heads slam back and forth against the stops as the platters spin down is not a fun experience. A replaceable fuse is an admission that your design sucks. "Sorry boss, I can't go to the job site today. This piece of crap device blew a fuse and didn't charge last night. And I'm fresh out of these microfuses, so we may be down till I get some from Digikey." And, don't quote me on this, look it up, I think some USB host ports communicate with the client to determine how much power to allocate. You may need to do something about that. And be assured that the next generation of USB chips will do something different. Bottom line is that people think power supply design is trivial. It's NOT! They think a USB port is a free 5V power supply. It's NOT! On a good day, with an experienced power supply designer, your particular situation has more gotchas than a bucket of snakes. I can tell you horror stories until your ears bleed. And you want me to plug it into my tablet computer. Are we having fun yet?
Reply by Martin Brown October 2, 20132013-10-02
On 01/10/2013 21:28, edward.ming.lee@gmail.com wrote:
> On Tuesday, October 1, 2013 12:32:48 PM UTC-7, John Fields wrote: >> On Tue, 1 Oct 2013 10:56:42 -0700 (PDT), edward.ming.lee@gmail.com >> >> wrote: >> >> >> >>> I am working on a simple USB charging circuit. Normally, the 3.6V NiMH battery is connected to the device via the NC contacts of a relay. When connected, a 5V relay switch the battery to charge via a diode. So, a fully charged battery is around 4.2V. As someone suggested, i will put a parallel R & C to reduce the hold current of the relay. >> >> --- >> Why would you want to do that? >> --- > > We want to fully charge the battery at 4.2V, without connecting it to the 3.6V chips. It would likely be connected overnight, so the R & C would reduce the relay power consumptions. > >> >>> 1. What is the minimum safe holding voltage/current of a 5V DC relay? >> > >> we find a relay with a coil very similar to yours with a MUST OPERATE >> voltage which is 75% of rated voltage (max.), and a MUST RELEASE >> voltage which is 10% of rated voltage (min.) > > Yes, but we need a MUST HOLD voltage, perhaps 50%? > >>> 2. Fully charged battery is around 4.2V (for a short time anyway), but the device is 3.6V max. How much do i need to worry about this over-voltage? > >> Since the manufacturer probably expects the device to be operated with >> fully charged cells once in a while, you probably don't have much to >> worry about, but the prudent thing to do would be to ask the >> manufacturer and find out from the horse's mouth. >> > > Let says for example, a PIC32MX575F512 rated at nominal 3.6V and maximum of 4.0V. It seems to work fine at 4.2V. But how much should we worry about this extra 0.2V?
That is an extra 0.2v above the voltage where on a bad day the chip could be destroyed and you would have no comeback against the maker.
> > Alternative, we can drop the 5V with double diodes, but much shorter battery operating range.
Obvious thing to do is use a micropower regulator to feed the voltage sensitive components with the 3.3v or whatever they require and allow the device to charge its battery without messing about with relays. -- Regards, Martin Brown
Reply by October 2, 20132013-10-02
On Tuesday, October 1, 2013 9:32:10 PM UTC-7, ehsjr wrote:
> On 10/1/2013 1:56 PM, edward.ming.lee@gmail.com wrote: > > > I am working on a simple USB charging circuit. Normally, the 3.6V NiMH > > battery is connected to the device via the NC contacts of a relay. When > > connected, a 5V relay switch the battery to charge via a diode. So, a > > fully charged battery is around 4.2V. As someone suggested, i will put > > a parallel R & C to reduce the hold current of the relay. > > > Where are you going to put the parallel RC? Draw a schematic. > If you put any resistance across the relay coil, it will > draw more current, not less.
In series with the coil, probably R1=150 ohms and C1=470uF. Perhaps 0.7s (if i got my zeros right) of 5V dropping to around 3V holding. +------------------+ ----- D1 | +-R1-+ | | +|-->|--+--+ +-[Relay] +- v (n/o) | 5 V | +-C1-+ | |--o----[Battery]-----+ | -|----------------------+ +- ^ (n/c) | ----- | | | | +-[R2]-+-[Device]--+ | | | | +--[Shunt]---+ | | +------------------------+
> > Your 5V relay will operate at the ~ 4.2 volts after the diode > drop. Your 3 cell NiMh pack will be charged to 1.4 volts per > cell. That is not an over voltage for charging an NiMh cell.
I am not worrying about over voltage for the battery, but for the chips. Namely, a PIC32MX575F512. It's unfortunately that it has such low tolerant for voltage range, driving the internal LDO regulator.
Reply by ehsjr October 2, 20132013-10-02
On 10/1/2013 1:56 PM, edward.ming.lee@gmail.com wrote:
> I am working on a simple USB charging circuit. Normally, the 3.6V NiMH
> battery is connected to the device via the NC contacts of a relay. When > connected, a 5V relay switch the battery to charge via a diode. So, a > fully charged battery is around 4.2V. As someone suggested, i will put > a parallel R & C to reduce the hold current of the relay. Where are you going to put the parallel RC? Draw a schematic. If you put any resistance across the relay coil, it will draw more current, not less. Aside from that, for simple (not best) you could do this: (View in fixed font like Courier) +-----------------+ ----- D1 | | | +|--->|---+---[Relay]---+ v (n/o) | 5 V | | ---o---[Battery]---+ | -|----------------------+ ^ (n/c) | ----- | | | | +-[R]-+--[Device]--+ | | | | +--[Shunt]---+ | | +----------------------+ Your 5V relay will operate at the ~ 4.2 volts after the diode drop. Your 3 cell NiMh pack will be charged to 1.4 volts per cell. That is not an over voltage for charging an NiMh cell. The shunt is a TL431 shunt voltage regulator circuit, designed to hold the voltage on the right side of R to no more than 3.6 volts. The circuit can be found on the TL431 datasheet. You stated the device draws between 50 and 100 mA, so R is sized to drop .5 volts at 100 mA device current, making it 5 ohms. At 50 mA device current, it will drop .25 volts. The shunt circuit will draw additional current as needed to drop the voltage on the right side of R to 3.6 volts. Ed
> > Questions: > > 1. What is the minimum safe holding voltage/current of a 5V DC relay? The coil has around 130 ohms, or around 38mA activation current. What should be the values for R & C? > > 2. Fully charged battery is around 4.2V (for a short time anyway), but the device is 3.6V max. How much do i need to worry about this over-voltage? >
Reply by October 1, 20132013-10-01
> > 2. Fully charged battery is around 4.2V (for a short time anyway), but =
the device is 4.0V max.
>=20 > How much do i need to worry about this over-voltage? >=20 > As usual the devil is in the details. And you supplied almost none. > The word "about" has no place in a specification. > Without knowing the battery capacity, charge current, load current,=20 > expected run time, charge time,
AAAx3 800mAHr NiMH. Charge via USB PC or Wall adapter. 0.7V diode drop fr= om 5V. Charge overnight (at least 10 hours). Load current between 50mA to= 100mA. Stay on during the day. But the customer might forget to charge it= at night. So, better to allow capacity for several days.
>=20 > Run the chips off a ldo linear regulator and be done with it.
If i can find one with adjustable drop out down to zero. The battery could= drop below 3V.
> Are we talking USB1? USB2? USB3? >=20 > With your relay scheme, what's gonna happen to the customer's > $2000 laptop when your battery is discharged to 2V and plugs it into > his USB port...and the relay chatters and all hell breaks loose in > the USB controller, and his external USB hard drive starts banging > its heads against the platters? Is it gonna break anything? Maybe not.
Yes, perhaps we need to add replaceable fuse.