USB charger circuit

I am working on a simple USB charging circuit. Normally, the 3.6V NiMH bat tery is connected to the device via the NC contacts of a relay. When conne cted, a 5V relay switch the battery to charge via a diode. So, a fully char ged battery is around 4.2V. As someone suggested, i will put a parallel R & C to reduce the hold current of the relay.

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 b e the values for R & C?

  1. 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 to
edward.ming.lee
Loading thread data ...

--
Why would you want to do that?
Reply to
John Fields

battery is connected to the device via the NC contacts of a relay. When co nnected, a 5V relay switch the battery to charge via a diode. So, a fully c harged battery is around 4.2V. As someone suggested, i will put a parallel R & C to reduce the hold current of the relay.

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 redu ce the relay power consumptions.

Yes, but we need a MUST HOLD voltage, perhaps 50%?

he device is 3.6V max. How much do i need to worry about this over-voltage ?

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?

Alternative, we can drop the 5V with double diodes, but much shorter batter y operating range.

Reply to
edward.ming.lee

Um, no. Rated 3.0 to 3.6 with 3.3v being nominal. 4.0v is the absolute maximum where the chip will not be destroyed but it is not guaranteed to work properly. 4.2v is way out.

Reply to
David Eather

So, we really need a 2 and 1/2 cells battery (3 cells 4.2V/3.6V is too high and 2 cells 2.8V/2.4V is too low).

With 3 cells, we can only use half the capacities.

  1. Diode before battery: 1/2 charge and full discharge.
  2. Diode after battery: full charge and 1/2 discharge.
Reply to
edward.ming.lee

A lithium cell and a 3v regulator will do or 2 x 1.5v or 2 x 1.2v and one of this range:

formatting link

There are heaps of options. But you should dump the relay for something else that more reliable, quieter, faster and generally less problematic.

Reply to
David Eather

--
So what? 

The relay's only dissipating a couple of hundred milliwatts, and it's 
designed to do that forever, so why is that a problem? 

Also, if you're _designing_ a charger, why don't you just design it to 
maintain the battery at 3.6V and knock off all the bullshit?
Reply to
John Fields

3.6V is only 1/2 charged. Fully charged battery is 4.2V.
Reply to
edward.ming.lee

This is not quite right. The terminal voltage does NOT reliably indicate the charge. A fast-charge might put 4.2V onto the terminals, but a fully-charged battery under load still reads 3.6V when loaded. You must remove the charger and deliver current to a load when doing any useful testing, because that's the way batteries are used.

Reply to
whit3rd

Yes, after charging it overnight. I measured 4.1V with a load of 50mA.

Reply to
edward.ming.lee

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.

activation current. What should be the values for R & C?

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, it's impossible to make the many tradeoffs you need to consider.

But here's some things to think about.

If you're building ONE device...or if it's a Chinese throw-away device with no warranty or vendor reputation at stake, stick a light bulb in series to charge the battery at some low rate and be done with it. Cordless phones have been doing this for decades... but light bulb works better than a resistor because you have so little headroom. Use a stock cordless phone battery so you can replace it easily.

Run the chips off a ldo linear regulator and be done with it. If you wanna get clever, and have a VCC independent reference, you can make a microcontroller regulate its own VCC.

If you are building something with a warranty, UL or equivalent test requirements and a vendor reputation, your problem just got a lot harder.

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. How lucky you feeling? I'd spend a lot of time thinking about the usb sources, from AC plugin ones to expensive laptops. You don't want the cheap crap to break your device or your device to break the expensive ones.

Worry about fault conditions. The things that you don't consider are the ones that will cause the most grief. If it has a cable, somebody's dog is gonna chew thru one eventually.

Many of the component issues have already been addressed in this thread.

>
Reply to
mike

the device is 4.0V max.

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.

If i can find one with adjustable drop out down to zero. The battery could drop below 3V.

Yes, perhaps we need to add replaceable fuse.

Reply to
edward.ming.lee

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

Reply to
ehsjr

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]---+ | | +------------------------+

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 to
edward.ming.lee

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.

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 to
Martin Brown

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.

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.

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 to
mike

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.

formatting link

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.

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.

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 to
Martin Brown

No, the goal is to charge it with wall plug. But we can't stop the 1% case of plugging it into PC/laptop.

Yes.

USB can source some (100mA?) without asking. The goal is to stay below tha t limit.

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 to
edward.ming.lee

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?

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 to
ehsjr

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 to
mike

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.