Rockbox Technical Forums

Support and General Use => Hardware => Topic started by: peter_s_d on April 07, 2008, 09:28:32 AM

Title: Sansa E200: current drawn through USB cable.
Post by: peter_s_d on April 07, 2008, 09:28:32 AM
Hi,

I hope that this is useful information, it might relate to the fussiness that E200s have about which USB ports they will talk to.

I have made up a custom cable to connect the 9 pin USB header on my computer's main board to the similar header on the small board that carries the computer's front USB ports.  The only connections made are for Data+, Data-, Ground and +5Volts (which I have cut).  A 200 mA meter is connected into the +5Volt line.  200 mA is not quite as big as what I would like, but it is what I have.  The small board with the USB sockets has the +5Volt and Ground lines of the USB sockets joined together.

So, there is effectively a normal USB socket and a crippled USB socket with power and no data.  The motherboard is an Asus K8V-VM.  All 8 USB ports (4 back panel plus 4 from headers) are claimed to be USB 2.0.

The current drawn by my Sansa E260 is not what I expected.

When the battery is well charged and the E260 is off, plugging the USB cable in causes the Sandisk logo to be displayed and about 150 mA to be drawn.  Then the small text of the RockBox bootloader is displayed and the current drawn *increases* to about 180 mA.  Then, when the OF is running, the current falls to about 90 mA.  The screen with back lighting and scrollwheel seem to take about 45 mA.  The steady state, battery charged, screen off, not playing anything current seems to be about 42 mA.  Calculating from the battery rating of 750 mAh and SanDisk's claim of 20 hours battery life gives a minimum current of 37.5 mA.

If the battery is only half charged when the cable is connected the currents drawn are even greater, sending my 200 mA multimeter off the scale during boot up.

I also tried putting a 12 Ohm resistor in the +5Volt line.  That usually resulted in the E260 showing a warning message like, "Battery too low shutting down".  

I assume that neither bootloader attempts to negotiate current requirements with the host and so neither bootloader (or the E200 as a whole) is compliant with USB 2.0.

Interestingly I can not find any claims by SanDisk that the E200 is USB 2.0 compliant - despite the claim that the Portal Player is USB 2.0 OTG compliant.

There is yet another opportunity for RockBox to surpass the OF.  ;-)

r16884-080329
Title: Re: Sansa E200: current drawn through USB cable.
Post by: petur on April 07, 2008, 10:11:21 AM
12 ohms is way too much as the voltage drop is way too big
(V=I*R with I being up to 0,5A)
Title: Re: Sansa E200: current drawn through USB cable.
Post by: peter_s_d on April 08, 2008, 02:46:39 AM
A 12 Ohm resistor was the smallest that I could lay my hands on.  When I get to a suitable shop I'll buy 1 Ohm and a 0.1 Ohm resistors for current sensing - or maybe a decent multimeter.  Also, I thought that a largish resistor might reduce the current to the compliant range, but something is (falsely) deciding that the battery is dead.  

Compliant devices should not draw more than 100 mA before negotiation.  USB 2.0 allows negotiation up to 500 mA.  I can't find it now, but I think I saw somewhere that later versions will allow up to 1.5 Amps.

Something will have to happen while the bootloader is running to make the E200 compliant.  
Title: Re: Sansa E200: current drawn through USB cable.
Post by: peter_s_d on April 08, 2008, 05:21:36 AM
Found it.  

http://en.wikipedia.org/wiki/Universal_Serial_Bus


Battery Charging Specification 1.0: Released in March 2007.

 Adds support for dedicated chargers (power supplies with USB connectors), host chargers (USB hosts that can act as chargers) and the No Dead Battery provision which allows devices to temporarily draw 100 mA current after they have been attached. If a USB device is connected to dedicated charger or host charger, maximum current drawn by the device may be as high as 1.5 A. (Note that this document is not distributed with USB 2.0 specification package.)
Title: Re: Sansa E200: current drawn through USB cable.
Post by: eevan on April 08, 2008, 08:19:09 AM
I have an c250 (it has 530 mAh battery). I've charged it from OF using a lab power supply (that has built in current and voltage controls and meters). When the battery is almost empty, it draws 0,5 A and as the battery gets charged, the current falls to 40 mA and it's not charging anymore.
Title: Re: Sansa E200: current drawn through USB cable.
Post by: saratoga on April 09, 2008, 03:17:48 PM
A 12 Ohm resistor was the smallest that I could lay my hands on.  When I get to a suitable shop I'll buy 1 Ohm and a 0.1 Ohm resistors for current sensing - or maybe a decent multimeter.  Also, I thought that a largish resistor might reduce the current to the compliant range, but something is (falsely) deciding that the battery is dead.

A resistor reduces current by introducing a voltage drop.  With a 12 ohm resistor, you are only supplying about 3v at start up, which is too low for the voltage regulator to handle.  If you want to do this, remove the battery so that it can't charge.  

Compliant devices should not draw more than 100 mA before negotiation.  USB 2.0 allows negotiation up to 500 mA.  

True, but very few people seem to pay attention to that, and in practice hardware will supply 500ma without negotiation.  

Title: Re: Sansa E200: current drawn through USB cable.
Post by: peter_s_d on April 12, 2008, 03:19:57 AM
Eevan,

0.5 Amps into a 530mAh battery sounds like a lot, but I guess that is the way that Sandisk designed things.  

Saratoga,

The start up current should be less than 100 mA which gives a voltage drop of less than 1.2 Volts.  It was just an experiment.  It turned up a surprising problem with the e200 where it reports a battery problem when it has a supply Voltage problem.  I don't know whether to blame the OF or the hardware.  Either way I'll live with it.  

I expect a _host_charger_ to supply 1.5 Amps, but sadly my PC is not a host charger.  

The e200 is known to have problems with many USB ports.  

I can confirm that my e200 had problems with my computer *before* I loaded RockBox.  It would repeatedly connect and then lose the connection.  Its behaviour seems worse when the battery is flatter.  

I'm trying to work out if it is possible to make an e200 with RF more standards compliant (and reliable) than an e200 with OF.