Need input for DIY USB power bank - Hardware Hacking General

I've been contemplating making my own USB power bank, and have decided to move forwards in the project. Plans so far:
Use 2x 10.000mAh Lithium-Polymer batteries in series
Each battery consists of 4x2500mAh cells in parallel. In theory, this concludes a 4p2s configuration.
Pull down voltage with UBEC for better efficiency (here)
Now what I'm confused about in regards to this, is charging the power bank. As the 2 batteries are "identical", both brand new - and there's only one output - should there be need for a balancing of charge?
I'm considering 2 parallel outputs - would this complicate things if they're used simultaniously?

Related

[update apr.16] Non stop working solar powered HD2

Ok guys, so nuclear war stroke the planet, your brand new tv and pc got busted in the initial attack and you're left with your precious HD2 running some custom rom and about 16-32gb of storage. Hope you don't get borred, there won't be many apps on marketplace, or even a marketplace (servers got busted by the nuke )
Now to get more seriously i can't figure out why i would need a phone able to be powered on 24/24. But i guess at least it could be useful on camping trips or stuff like this.
This is the start of a project, are goals are something like this:
1. reverse engineer the charge algorithm used by HD2 (in involves at least 2 charging modes each with 2 stages, as i know so far)
2. assemble or buy a 5-10W solar panel (only the panel and a Schottky type fast diode)
3. get myself some old laptop batteries and strip them down for cells and controllers.
4. design and assemble a cell pack as a buffer between the solar panel and phone
5. design a switching mode voltage stabilizer and make a custom usb hub in order to also have usb host functionality if i feel geeky and need linux
6. design a charge controller for the cell pack when using solar power.
7. put all things together and test
The goal is simple. Although there are solar batteries that provide some extra juice to laptops or pda's they function somewhat like 2-3 hours discharge, about one day in full sun to recharge.
I want a system that can power a full load working hd2 (worst scenario) non stop (day and night) including cloudy days, nuclear winter or whatever. The system must also be able to power about 3-4 usb devices and sustain a full 500mA drain on each port while still being able to power the hd2 non stop. Aaah, yes, the thing must be portable, plug&play, reliable and maintenance free. At most, it should have the size of a regular 15 inch laptop and about 2kg weight (all things included).
Stage 1 completed
So i figured out how hd2 charges it's battery. It's pretty simple actually.
Charging is made in the same way for either wall charger or usb charging. Same pins are used. However, when the wall charger is used, charging current can be as high as 800-900mA. This will decrease to some 20-30mA when the battery will be almost 100% charged.
If you however connect the usb data pins to hd2 and to something (computer, hub etc) hd2 will change the charging mode to usb. This feature ensures that when connected to a pc, the phone will never try to get 8-900mA from a 500mA usb port pretty neat. Instead, maximum charge current is limited to about 400mA.
If you get access to the usb wires inside the cable you can trigger either mode by simply disconnecting or reconnecting the data pins (green+white on standard usb cables). This is useful because i can devise some means of redirecting the charge current to either external battery (let's say after a night of use for the hd2) or to the hd2 if .. for some reason it's internal battery is discharged.
A usb enabled pic microcontroller (say 18f2550) can be used to control the charging process of either internal or external battery by simulating a pc connection, thus enabling hd2 to switch to low current charge. However if i'm guessing right, a simple usb hub could also do the job as it also contains a microcontoller that "knows" the usb protocol. So because i will use an external powered hub for linux, I'll try to use it also for switching between charging modes. Besides is more easier this way and i (or others) will be spared the time needed to program a microcontroller, or fabricate a pcb for it and it's corresponding components. And.. in case of nuclear attack there won't be any radio shack or electronics store where you could buy microcontrollers
Stage 2 completed:
Well i got myself some time ago a cheap 10watt polycrystaline solar panel for use with a robot i'm building. It was about $50 here in Romania. I guess i'll be using this one, even if it's quite big (something like a 16 inch laptop). Anyway i could also power other things with it. Will do some tests, and if it's suited for the job, it will be used. It arrived completely assembled so it also spares me the trouble and time of connecting individual cells into to form a solar panel.
Update : completed, will use the spare 10watt panel, until a new one arrives.
Stage 3 completed:
Got some 5-6 old laptop batteries. Stripped them down and got some ~30 cells. I'll test them out and sort about 4-6 of them.
Stage 4 completed: I'm currently sorting out some cells. As far as design goes, the capacity of the "extended battery" will be 14400mAh (single charge, using no solar power). That could easily power a full 15 inch laptop for about 4 hours, so i guess hd2 will have no problems staying alive for one night until next day and the sunrise to kick in for the solar charging to take place
Stage 5+6 completed:
There won't be any linear voltage stabilizer design for the buffer between the battery and hd2. They are quite inefficient with 30-40% power lost in the form of heat. Switching mode stabilizers+converters will be the way for this design. Found a ready made voltage stabilizer (converter) that's suited for the job , Saved some good hours that would otherwise have been spent on designing one from available parts.
Stage 7: yep, i'm now building the damn thing. I've simplified the design as much as i could, while keeping it safe for the phone, i guess the project will be possible to make by anyone with basic soldering skills.
apr. 13 - update: construction delayed due to one cell failure (the difference in internal resistance between the cells was greater then i expected). Will now search for a replacement, recalibrate the battery pack and recharge. However I expect that the battery module should be ready by the end of this day or tomorrow.
ok then.. it was built, it was tested and i'm already using it or at least.. trying to figure out a use for it
Anyway, if you're the camping type, if you feel geeky or wanna make a eco-friendly charger for the hd2 (or other usb charging enabled things) here's how to build one
You'll need the following materials:
- patience, this is a long post, try not to get bored while reading it
- some basic electronics skills, basic understanding of components, measurements and circuit troubleshooting (this is not a beginner project i guess, as hard as i tried to make it, if done improperly... well of course, you risk killing the poor phone in the process).
- some second hand laptop batteries, 3-4 would be ideal, they can be kind of old, but must be functional to some degree.
- a cheap usb charger used for cars, the one that plugs into the cigarette jack OR some good electronics skills to design a switching power supply. Guess most of people will go with the first option, in order to be more helpful i also designed this circuit using this option. You should buy the cheapest adapter, the cheaper the better. That's because the expensive ones have a feature that enables them to stop working if the voltage of the car battery drops to a certain point. That's supposed to be some sort of protection not to allow the car battery to discharge and thus preventing you to start your car. We don't want this protection, we want to be cheap asses, we want dirt cheap. However the adapter you want to buy must deliver 5V at around 1-1.5Amps minimum. 5Volts at 500mA is to little, it will simply kill itself when you start the thing once it's completed.
- a standard usb hub, any will do. This is if you want usb host functionality or use linux.
- a 5-10W solar panel. The bigger the better - it will allow to recharge the buffer battery (the one you'll be building) at a faster rate. This is the single most expensive part of this build. If you simply want an external battery for the hd2 you can skip the panel, if you want solar charging.. this is .. of course, a must.
- one fast rectifier diode or a schottky diode, you should buy it if you use a solar panel, the supplier of solar panel could also recommend one to use with that specific panel. We have to use one, this will make sure the current goes from the panel to the battery, not the other way around.
- bunch of wires, a multimeter and a soldering tool witch you're not afraid to use.
- a variable power supply, either it be a wall charger with variable output voltage, a laboratory power supply, or some charger that can output anywhere from 3.6 to 4.5 volts at anywhere from 300mA to 1A. Any combination will do. This is required only once in order to precharge the cells to a specific voltage.
- one switch or something similar in order to ... switch the thing on and off.
- spare time/understanding wife/coffee etc
1. Ok, first of all you need to get those laptop batteries open. Use some sharp tool, your karate skills or whatever necessary to crack those batteries open and expose the individual cells inside. Be careful not to damage the cells in the process, at least if you use some sharp tools. Once exposed, the cells will be linked to each other, you need to separate them by cutting the wires or metal bands that links them. Once done sort them out, if you have multiple batteries, sort the cells from each battery in a different case or basket or whatever you want, the idea is not to mix them.
Here's mine:
2. You now need to measure up individual cells with a multimeter. You're looking for the voltage rating of each cell. If you find cells with 0 volts, they're dead. If you place the multimeter in continuity testing mode and the 0 volts cells are showing continuity across their leads, yep.. they're really dead. Never use these. Good cells have anywhere from 1volt to 3-4volts.
Once you selected your good cells start forming a pack. The idea is simple. The more cells you put, the longer the thing will last. Standard laptop cells are rated to a minimum of 3.7Volts and 2400mAh. Each of them is almost double the capacity of the standard battery that comes with the HD2. However since you're going to use second-hand ones, they will have sign of usage, a smaller capacity then that of a new one. Still they will perform at least the same as hd2 battery in terms of battery life. Minimum configuration starts with 2 cells, i recommend 4 cells as a decent start but you can go and add more cells if you like. The more cells the longer battery life but at the expense of added weight. My choice was 6 cells. If you had 2 laptop batteries and each of them had 6 cells, you can make your pack on anywhere from 2 to 12 cells.
Let's say you choose 6 cells (always an even number). If 6 is you choice, you will need to divide that number by 2. So you get 3. You need 3 working cells from the same laptop battery to form a pair. Go back to the place you kept the cells and select 3 cells, NEVER mix cells from different batteries. These 3 cells you have (first pair) will need to be linked in parallel connection. The negative ( - ) of each cell is linked to the negative of the other and the positive to the other 2 cell's positive. We'll get there, but at a future step. Now we need the second pair of 3 cells. Again look in your cell basket and try to find 3 more cells from the same battery. This battery may be different then that first one you selected cells for the first pair. Yet again, the 3 cells must come from a single battery, no mixes. And.... again, these 3 cells must be placed in parallel. So if we already imagine them connected, we would have 2 pairs, each of them with 3 cells linked in parallel. The 2 pairs must be linked in series, so the minus of one pair will go to the plus (positive pins) of the other. The unconnected pins of each pairs (one minus one plus) will be used for voltage supply - you'll get the combined voltage of the cell pack here. If i were to draw this things for you to better understand.. it would look something like this.
green is one cell pair, orange the other. The black things are wires. This are the connections for a 6 cell pack. If you have 8 cells, you will make pairs from 4 cells (2 pairs). If you have 4 cells - the pairs will have 2 cells. A charged cell will have something like 4 volts. A pair made up of several cells in parallel will still have 4 volts across it's leads, but the overall current capacity of the pair is increased by the number of cells it contains. So if you have 3 cells each with 4v and 2200mAh, the pair will have 4 volts but with 6600mAh. If you place 2 pairs in series like on that drawing, you increase the voltage of the group by the number of pairs you add while still having the same current capacity. So if you get 2 pairs of 4 volts and 6600mAh, you will have 1 group, 8 volts and still 6600mAh. That's the total output of your pack. Because hd2 needs 5V (not 8 !!) we need something to decrease the voltage from 8 to 5 volts. That's why we need that car usb charger. It normally uses the 12V available at the cigarette jack to output 5v your phone can use. Cheaper ones, can use 8 volts, or 7 volts (lower voltages) because they don't have a circuit to prevent deep discharging the car battery like expensive one have. We need one without this circuit, because our battery pack only outputs 8V. So the car usb charger will take the 8 volts at it's input and give us 5volts at output.
3. before linking cells to each other, you need to charge them to the same voltage. Use a charger/power supply etc. I used a lab. variable power supply, if i had none, my weapon of choice would be a nokia standard wall charger (or another brand), older ones, i would cut off it's jack, expose the wires and connect them to my cells, it outputs 3.7 volts, enough to charge each cell. So charge each cell to about 3.7 volts. You will need to connect the multimeter in parallel to the cell and monitor the charging process. When a cell reaches 3.7 V disconnect it and charge another one, until all of them have 3.7 V. After this, leave the cells for one day. Next day you will be measuring each cell again. If one of them drops charge by it's own and you find.. let's say 3 V, you got a defective one, back to step 1&2 and select other cell pairs. If all cells still have the same aprox. level (somewhere around 3.5 to 3.7 volts) you're good to go.
Here's one cell linked to my voltage supply.
4. start thinking of either a case of something to contain your build. I used copper plated pcb (from electronics stores, radio shack etc). I will be connecting my cells to this thing, kind of like a pcb assembly. You may use some plastic housing and connect the cells with wires and secure them with some glue. If you have experience working with pcb, etching the copper layer and such things, feel free to try using pcb.
Here's my blank pcb for this job - i've already cut it to required dimensions. It's the orange metallic thing in the center. Beside it you can see my hub and the usb car adapter i will use.
5. disassemble (i repeat disassemble.. no more karate skills) your hub (if you're going to use one) and your car usb adapter. My usb adapter looks something like this.
The hub interior will look different, we'll get on that on a later step. Anyway, speaking of the usb car adapter, i'll be needing that small pcb with the components, so i'll remove it from there. The board contains the switching mode voltage converter, yummy yummy, i want that. It basically has 1 chip that generates a pulse signal that is feed to the input of a power transistor which pulses the input voltage across a coil. By autoinduction the coil produces another current, other components rectify and filter it so the second smaller current, produced by the coil, it's basically what powers on the devices connected at the output. In simple terms .. that's how it works. Again.. we need this, don't break it
Mine has a funny oval shaped form, so i'll be cutting my pcb in order to insert it inside.
There are 2 wires coming out of the small board inside. That's were the cigarette jack was connected. We will connect our cell pack to that, so you might wanna remember their position. The red one will be the positive one, black being negative. In a cigarette jack, the center pin is always positive, so if your wires have other colors, the one that's linked to the center pin will be the positive one.
6. Look for a way to place the cells inside your casing or on your pcb. Since i will do a pcb with them, i'm trying to find a possible placement for them.
this was one way, but i figured it was easier for me to simply place each pair on a line and form 2 single lines of cells instead of 3. Once done, i begun drawing the pcb with some paint marker. I will then etch the pcb, so only the paint covered areas will remain.
here's the pcb after etching, i'm connecting various wires to complete the cell pack circuit before connecting the cell themselves.
If you're using some sort of case, it's time to begin assembling your cells together. Use the solder gun or whatever you have for soldering to attach some wires to the each cell leads. Li-ion and heat aren't good friends, be as quick as possible when soldering, you don't want to heat up the cell too much. If it starts to make any strange noise, hiss or is venting anything from it... run away, don't touch it, don't throw it.. simply leave it and run away. Of course, this is a very rare scenario.. but take your safety when working with high reactivity materials like li-ion cells.
You want to arrange the cells in that paint draw up in the post. 2 pairs, linked in series. First solder wires to make one pair, then the other, then connect the pairs to each other. If you use a case, use some insulator to cover the solder points and to avoid some accidental short circuits in the future.
Back to my pcb solution, here's my assembly.
7. If you want to use an usb hub, you can try to salvage some usb port from an old pc or laptop's motherboard. This way you could avoid using a permanently attached wire to the device you're building in order to have the hub connected to the phone. I found an old laptop motherboard with an intact usb jack.
i remove the usb port from it and soldered on my board.
8. Next you need to connect the car usb charger's pcb to the battery pack you assembled. Basically the 2 wires from the charger must be linked with the 2 wires from the battery pack. Insert a switch on the cable in order to be able to turn on and off the whole thing. In my case, i'll now connect the car charger's pcb to my pcb, in the portion i've cut.
9. now you need to modify your hub to be able to power on hd2 during usb hosting mode. There's a link in the linux section (ubuntu for hd2) about this, you may want to read that also. I basically soldered a wire across each hub's usb port positive pin (the 4 usb jacks) and the input usb jack. The ground connection is the same for all jacks. So all jacks including the one used for connecting to a usb host device (pc) have the power pins linked together. Those 2 power pins must also be linked to the output of the usb car charger so that when you power up the thing using the switch, the charger also powers up the usb hub. After you solder all the wires, also insulate the soldering points and secure the hub in your casing along with the battery pack and usb car charger's pcb.
Here's mine, it was soldered on my pcb.
as you can see, there are some couple of wires coming out from it. Those need to be connected to the phone for me to have usb host functionality. So i'll connect these wires to the usb port i've mounted at step 7 so i can use a standard usb - microusb cable to link this thing to the phone. If you want to make it simpler, cut out a usb - microusb cable and directly solder the wires onto the hub's pcb as shown in the guide on the ubuntu linux thread for hd2.
In my case, i use that port i salvaged, as i said before.
10. assemble the whole thing and carefull inspect the connections. The order of this will be - battery pack - linked to the car usb charger - that's linked to the hub power pins (for each usb port). You'll then have one usb port for use when requiring usb host functionality, 4 usb ports for connecting all sort of usb slave devices, and one usb port (the one that it's soldered to the car usb charger) for use when you want to simply charge your device normally.
Here's my build. I've also placed a fuse between the battery and the usb charger, so that in case of malfunction it breaks the circuit. The fuse holding pin is the black thing at the opposite side of the usb hub. Near the pcb, you can see the fuse and it's cap.
11. Check again all connections. when ready, press the switch and bring the thing to life. Use the multimeter and check all usb ports voltage. You shoudn't have more then 5.5Volts and no less then 4.5Volts. If you do, then you did something wrong, turn off, disassemble and recheck. If you did it right, you'll get a voltage inside the above interval. Inspect the device once again and make sure all things are safely placed and secured inside. Try plugging some cheap usb devices you may have, a mouse, usb flashlight, another hub etc. If they receive power and all it's ok you may try to connect the phone.
Voila.. usb charging from the ghetto style external battery.
And here's a small video of preliminary testing (i haven't yet tested the usb hosting capability but i have no reason to think it will not work). At this time i didn't placed any switch on the board so i switch on and off the thing by placing the fuse inside the holder or removing it
http://www.youtube.com/watch?v=yf6kRpNNqkw
Next step... maybe some of you may think.. well how does this thing recharge when the batteries are depleted. At this stage the battery pack is recharged by connecting a 8.4 voltage supply across the battery pack leads (wires) but the next logical step will be adding the solar panel to the build and securing this pcb to the back of the panel. Then.. further testing. I'll be keeping the panel and that rectifier diode handy. This is still work in progress.
When are we getting it?
i guess it will take about 1-2 weeks to do the job.
i'm also involved in 2 more projects, it could be done as soon as i finish my automatic dog feeder with video-streaming over internet, food sensors and audio feedback. )
facdemol said:
i guess it will take about 1-2 weeks to do the job.
i'm also involved in 2 more projects, it could be done as soon as i finish my automatic dog feeder with video-streaming over internet, food sensors and audio feedback. )
Click to expand...
Click to collapse
Hey facdemol I am not as versed in electronics as you are my friend. So my question to you is this is something that someone with a fair level of intelligents can attempt also? Secound is this, is the list you give in your first post all some one needs to try this? I would really like try this myself and maybe correspond my findings with you. Also thank you totally of you ammazing knowledge filled posts here on XDA.
lol.... Im not sure how to respond to this
Cant wait to see how it turns out, best of luck
sounds interesting!
Good man, keep us updated however things turn out... you sound like someone who isn't afraid of experimenting with electronics for the thrill!
Sent from my Nexus One
Wow! Pretty interesting
Hey facdemol I thought you might like to check this article in the Portal out if you have not already. Looking forward to hearing back from you here on your project.
good article, was inspiring
stage 2 and 3 are completed. Now working to design a high performance dc-dc (switching mode) converter that would take 8.4V input and give me some 5V @ 2.5A output for hd2's charging and the usb hub. Some work needs to be done here and some careful testing, if for whatever reason this converter fails, hd2 motherboard could get fried Working on a way to implement some safeties, also i'm studying the way older pda's and pna's used switching mode power supply's and converters. I'm thinking i could either salvage one of these modules or build one specifically for hd2.
Update : found a way to make this pretty DIY for anyone with basic electronics skill (so that you can avoid designing switching mode converters, making PCB's, winding coils etc).
I found some dirt cheap car adapters that output 5v (pc usb jack) and can be used for various usb charging enabled devices. I'm testing to see their performance with my custom battery pack and the solar panel. Results are pretty good so far, i managed to run them stable at arout 5.5-6Volts input voltage. 2 of these will be required for this project (2 amp max current) or one if the output transistor inside is changed or a heatsink is mounted on it. I will come back with results and in the end, a guide with the required modifications.
The second post contains the updated progress on this project.
Third post will contain some sort of guide for a DIY assembly of such device.
These are updated daily.
If everything goes smooth, i guess i will posting some pictures and guides to build such things, by the end of this day or tomorrow.
Current features of this design :
- 10watt solar panel module
- 14400mAh battery module - cell pack designed as 3p2s
- 2 charge modes (slow - similar to a pc's usb port and fast - similar to hd's wall charger)
- 4 powered usb ports (usb host capable)
- 1 high-power usb port (it can charge any device requiring 5V at around 500mA - 1500mA)
- uses standard usb-microusb cables, no need for other hacks or special cables
- feels geeky
facdemol said:
The second post contains the updated progress on this project.
Third post will contain some sort of guide for a DIY assembly of such device.
These are updated daily.
If everything goes smooth, i guess i will posting some pictures and guides to build such things, by the end of this day or tomorrow.
Click to expand...
Click to collapse
Sounds greet I will bee waiting to see what you have come up with man, this could be something that can change how we can use our HD2s on the go. n
Keep up the good work facdemol, I am also waiting to see if you post any more power consumption results in your other thread.
I would like to ask anyone reading this to help vote this to be published in the XDA portal by clicking the vote bottom at the top right of the first post by facdemol, he deserves recognition for his great work with this project and his others.
Very Interesting ! Good luck with the project! will be following to see what develops!
I love this. Great concept.
it took a while to charge the independent cells to the same level and to form a pack. The charge alignment is a must, otherwise, the battery back will discharge at an uneven rate among each cell. One done properly it should allow the maximum battery life and no future maintenance.
I've done some testing on it, already hooked up the hd2 to this thing, it's working properly, both charging modes, usb host etc. I guess i'll come back today with the guide and pictures to make this, it took the better part of yesterday to manually charge/discharge each of the 6 cells in the pack.
updated post 3, half of the buid is already done and operational. The battery and hub+charger module needs to be linked up to the solar panel and some of case to be built.
There are some pics and one video with the thing working. Just basic testing for now, i just finished it.
Very interesting...great job mate...

Need some help from someone who knows legit electronics(diodes, resistors, etc.)

So, i'm trying to add in a usb microsd adapter to my Kindle Fire.
Threads before I started, just discussing ideas:
KF forum: http://forum.xda-developers.com/showthread.php?t=1615055
Hardware hacking forum: http://forum.xda-developers.com/showthread.php?t=1615059
Now, I just about completed the project, but I dropped the motherboard and broke it while soldering a wire onto it. I've just bought another KF off of ebay and will continue at that point, but while i'm waiting I need some advice/help.
I've made a diagram of what i'm going to do. It's pretty horrible, but I think it's understandable.
Few questions that go with the diagram:
*DC only flows one way, do I need the diodes?
*If I should use the diodes will these work? (max output they would need to withstand would be 7v and 1A cause of the wall charger)
*The wall charger puts out 1000mA(1A) when charging. USB puts out 100mA, would that 1A ruin the adapter since it's designed for USB? If so, should I use some resistors?(Unsure cause they would change the regular, lower output to the adapter)(Or the resistors could be put into the charger)
*More questions/concerns on the diagram
Diagram:
Taken off because it was incorrect.
I'm still a bit fuzzy on what's going on here.
I'm not sure what the (2) 3.7V batteries and the 4.4V boards are.
Is that the stock Kindle Fire power supply that you are showing?
Th first question: Have you gotten the USB SD card to work normally plugged in externally?
If not, have you gotten the USB SD card to work through a powered hub?
All the diodes on the black lines are drawn backwards.
You don't need any diodes there or even a reed switch on the black line.
You might have a problem activating the 4 (remaining) reed switches simultaneously and reliably.
If you've never seen voltage out of the KF USB connector, that means that you've not gotten it into USB host mode.
Oh, of course the KF has a single 3.7V battery so I don't know what that whole right side is doing.
Renate NST said:
I'm still a bit fuzzy on what's going on here.
I'm not sure what the (2) 3.7V batteries and the 4.4V boards are.
Is that the stock Kindle Fire power supply that you are showing?
Th first question: Have you gotten the USB SD card to work normally plugged in externally?
If not, have you gotten the USB SD card to work through a powered hub?
All the diodes on the black lines are drawn backwards.
You don't need any diodes there or even a reed switch on the black line.
You might have a problem activating the 4 (remaining) reed switches simultaneously and reliably.
If you've never seen voltage out of the KF USB connector, that means that you've not gotten it into USB host mode.
Oh, of course the KF has a single 3.7V battery so I don't know what that whole right side is doing.
Click to expand...
Click to collapse
The battery is made up of two 3.7v batteries, they just stuck them together and put a board there to control the power flow or whatever. I said it's lowered to 4.4v cause normally when two batteries are put together their voltage gets added together, but that 4.4v is coming from the very end pins, there are 10 total. I get 4.4v when trying the other pins too, so since i'm only connecting it to one set of pins i'm just going with 4.4v.
No, I haven't. I have not been able to successfully get USB host working at all, even with a USB host cable. I don't have a powered hub, but I tried taking the power from a USB port on my computer and that didn't work either. Other people have it working though, some with powered hubs, and a few without.
It might have just been my Kindle, so i'll see when I get the other Kindle I ordered.
I thought I was doing them backwards, I know how they go on physically, but I wasn't sure about on paper.
I'm not sure that i'll need all the reed switches, I may just need two; one to disconnect the ID(blue wire) from the back, and one to disconnect one of the data lines. I wasn't able to experiment though since I never got USB host working.
I tried measuring the voltage directly on the board and from the USB host cable and didn't a reading from either.(When I measured on the board I shorted out the ID an GND wires like they are on a USB host cable)
What I was trying to do with the battery there was prevent power from the charger going directly to the battery, that would be bad. So I do need at least one diode on each line there, but the other two I added cause I didn't want any extra power to be wasted. Of course, it doesn't make much sense to me(not sure what I was thinking), that's why I asked if it was necessary.
Picture of the battery and the board connected to it. I took it apart and removed the second one to move it over and resolder it so there was space down the middle for the wires. The adapter will be at the top where the speakers are.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
This whole idea has lots of problems.
Taking power directly off the battery is not a good idea for many reasons,
the least of which is that many (most?) USB devices won't work on 4.4 volt.
Throw in a silicon diode and you're down a further 0.7 volts.
Ok, you could make it a Schottky diode if you want.
You're still going to have to disconnect both data lines to get this to work,
unless you are planning to only use the external USB connector for charging.
Using host mode, the power should be coming out of the USB interface.
As mentioned, if you don't have it there, it's not working.
Here's a sequence of a Kindle Fire teardown: http://www.ifixit.com/Teardown/Kindle-Fire-Teardown/7099/1
Renate NST said:
This whole idea has lots of problems.
Taking power directly off the battery is not a good idea for many reasons,
the least of which is that many (most?) USB devices won't work on 4.4 volt.
Throw in a silicon diode and you're down a further 0.7 volts.
Ok, you could make it a Schottky diode if you want.
You're still going to have to disconnect both data lines to get this to work,
unless you are planning to only use the external USB connector for charging.
Using host mode, the power should be coming out of the USB interface.
As mentioned, if you don't have it there, it's not working.
Here's a sequence of a Kindle Fire teardown: http://www.ifixit.com/Teardown/Kindle-Fire-Teardown/7099/1
Click to expand...
Click to collapse
Taking power straight from the battery is only a temporary solution, the devs working on the 3.0 kernel is working on fixing the OTG issues and trying to remove the kernel limit of 3v. Also, from what I understand there are other issues that the KF is having regulating the voltage out, people report that below 50% battery USB host stops working.
So, if the issues get fixed i'll just disconnect the battery, or, as I said before, it may have just been my Kindle. I got it used & broken and fixed it myself, so it may have been damaged more than I was aware. I would be able to provide more definitive answers if I had something to experiment with, but I won't have the other Kindle for a few days.
Also, since i'll have a second battery now, i'm not as worried about the battery being damaged.
I do realize that the diodes drop the voltage by .7v, but people who have USB host working report that the KF is putting out 3.3v, and some people have gotten certain flash drives and other devices to work off of that. I believe the microsd adapter I have will work off of that lower voltage.
I only charge using a wall adapter, and charging did work for me as long as the ID and GND cables were separated. My main concern is that adb and fastboot work since i'll just be transferring files to the Kindle and the sdcard with FTP. Which, if adb works so will mass storage, so...
Without using the battery it's just and internal OTG USB host set up with a switch/es, so in theory it should work.
I also don't need and diodes if it's not connected to the battery. I was just hooking it up to the battery cause I wasn't getting any power from the Kindle.
As for the reed switches not working reliably, I did read something before that said that they might screw each other up if they were all right next to each other. What if they were lined up end to end, would they interfere with each other like that? If they do work properly end to end all I need is a custom, long, slender, and rectangular neodymium magnet.
Again, I didn't really have much time to experiment since gravity and I screwed up my motherboard. I had just done some physical modding to the housing and framing to make space for everything, and done some testing on the voltages that it was putting out.
Also, thanks for the help and advice
Ok, here's what I was planning on doing without the battery, any problems now, besides the potential issues with the reed switches?
Ok, the TWL6030 used in the KF uses an LDO regulator for VBUS on USB for OTG
and is speced for 3.3V at 35 mA
http://www.ti.com/lit/ds/symlink/twl6030.pdf
The Nook Touch that I have uses a TPS65921 (a/k/a TWL4030) which uses a charge pump
and is speced for 5.0V and guaranteed for 50 to 100 mA depending on battery voltage.
http://www.ti.com/lit/ds/swcs048f/swcs048f.pdf page 16
I've seen some devices that won't even work at 4.5V
Keyboards generally draw about 5mA.
I've seen audio adapters at 25 mA.
Some thumb drives take a lot of current.
Keeping the red connected all the time may or may not be a problem.
An inactive USB device should not be drawing much (any?) current, but you can never tell.
Bottom line, I don't think that the KF is a very good candidate for stand-alone OTG.
I'd use a powered (and back-powering) hub if I owned a KF.
I don't know what's going on here.. but I corrected your power supply in the schematic above.
Renate NST said:
Ok, the TWL6030 used in the KF uses an LDO regulator for VBUS on USB for OTG
and is speced for 3.3V at 35 mA
http://www.ti.com/lit/ds/symlink/twl6030.pdf
The Nook Touch that I have uses a TPS65921 (a/k/a TWL4030) which uses a charge pump
and is speced for 5.0V and guaranteed for 50 to 100 mA depending on battery voltage.
http://www.ti.com/lit/ds/swcs048f/swcs048f.pdf page 16
I've seen some devices that won't even work at 4.5V
Keyboards generally draw about 5mA.
I've seen audio adapters at 25 mA.
Some thumb drives take a lot of current.
Keeping the red connected all the time may or may not be a problem.
An inactive USB device should not be drawing much (any?) current, but you can never tell.
Bottom line, I don't think that the KF is a very good candidate for stand-alone OTG.
I'd use a powered (and back-powering) hub if I owned a KF.
Click to expand...
Click to collapse
Thanks for the info, I cut open a cable and plugged it into my computer with a resistor hooked up to it and got the voltage down to about 3.4v and the adapter that i'm using still ran and was recognized. I'm unsure about the current though.
It's not really OTG if it has to be hooked up to a separate power supply :/
AdamOutler said:
I don't know what's going on here.. but I corrected your power supply in the schematic above.
Click to expand...
Click to collapse
I don't understand why i'd need a 5v regulator on the battery when it's only putting out 4.4v? (Again, current-wise i'm unsure)
Also, the ID wire(blue) needs to be connected to the GND to activate USB host mode, it tells the device that it's a master and not a slave.
And I don't know if you read my previous posts, but I may not even be using the battery if I can get USB host working like everyone else. And the diodes were there cause I didn't want power going directly to the battery since it could mess it up.
Well, your circuit is wrong in a bunch of different ways so I redesigned it.
0. USB requires 5V regulated power.
1. the ground diodes are pointing the wrong way so the power would not flow.
2. When charging the battery you'd kill your device
3. zener diodes breakover at a certain voltage, not regulate. Those zener would just prevent any voltage from flowing. You'd want a Silicone Controlled Rectifier.
4. The 2 extra diodes do nothing at all in your circuit.
5. Each diode drops .7V. Your circuit effectively uses 4 of them between power and ground from the battery. so, by the end of your circuit, the microSD adapter gets 1.6 volts.... no where near what's required to run the device.
So, I corrected the circuit.
Didn't read that you were using any other method, still havn't.. Just wanted to correct the circuit in case someone else tries to do it.
I built my own car charger using a similar circuit. It's the same thing you'll find in a powered usb hub, although they may use diodes to prevent a backflow of power into the computer.
AdamOutler said:
Well, your circuit is wrong in a bunch of different ways so I redesigned it.
0. USB requires 5V regulated power.
1. the ground diodes are pointing the wrong way so the power would not flow.
2. When charging the battery you'd kill your device
3. zener diodes breakover at a certain voltage, not regulate. Those zener would just prevent any voltage from flowing. You'd want a Silicone Controlled Rectifier.
4. The 2 extra diodes do nothing at all in your circuit.
5. Each diode drops .7V. Your circuit effectively uses 4 of them between power and ground from the battery. so, by the end of your circuit, the microSD adapter gets 1.6 volts.... no where near what's required to run the device.
So, I corrected the circuit.
Didn't read that you were using any other method, still havn't.. Just wanted to correct the circuit in case someone else tries to do it.
Click to expand...
Click to collapse
AdamOutler said:
I built my own car charger using a similar circuit. It's the same thing you'll find in a powered usb hub, although they may use diodes to prevent a backflow of power into the computer.
Click to expand...
Click to collapse
*If it requires 5v then how do devices run with less with USB host on other people's KFs?
*I'm aware that the ground diodes are the wrong way, I asked in my og diagram, and mentioned in a previous post that I know how they go on physically, just not in a diagram.
*That's why I had the diodes, to prevent messing up the battery and device
*I still don't understand how/why it needs to be regulated when it's only 4.4v, it's not over 5v.
I know what zener diodes are, all I would need is to prevent power going straight into the battery, and that's what the diodes would do.
*I wasn't going to use those extra two diodes on each battery line unless someone said that it did something, it was suggested to me by someone who has less electronical knowledge than me and I figured it doesn't hurt to ask.
*And with the 3.3v from the Kindle and 4.4v from the battery minus the 2.8v required for four diodes it equals 4.9v, which should work, but hopefully I don't have to use the battery.
Also, if you look at the picture in my post here it shows exactly what a OTG USB host cable does minus the switches. All I did was add the battery and diodes to prevent power from the charger going into the battery and power from the battery going into the charge port. In theory that should work out. And like I said before, hopefully I don't need to use the battery at all.
I removed the picture in the first post since it was incorrect; while I doubt anyone is going to try it at this point, I understand your sentiment.
Look, im not saying my way is totally up to standards, but it comes much closer than yours with fewer parts, less work and i gaurantee it will work. The proper way is to buy a powered hub and connect to that. If you dont want feedback, dont post in a discussion forum.
Im done wasting my time on this thread. Youre doing it wrong.
AdamOutler said:
Look, im not saying my way is totally up to standards, but it comes much closer than yours with fewer parts, less work and i gaurantee it will work. The proper way is to buy a powered hub and connect to that. If you dont want feedback, dont post in a discussion forum.
Im done wasting my time on this thread. Youre doing it wrong.
Click to expand...
Click to collapse
No need to get all upset bro, i'm just replying to what you've said(Like you said, discussion forum). You said you didn't read any previous posts, and it was obvious, you kept saying things that had already been brought up. And you say things like "Those zener would just prevent any voltage from flowing" when I was saying that was what I was trying to do anyways. Your comment implies that you think that I shouldn't use them, but with no explanation as to why not.
It's not that I don't want feedback, but you keep saying i'm doing it wrong, but you're not answering the questions that I ask. You're just saying "My way is right, your way is wrong," basically.
I repeatedly asked why it needs to be regulated when it's already less than 5v.
I also asked "If it requires 5v then how do devices run with less with USB host on other people's KFs?"
And I realize I didn't post this, but my next question was going to be, with the regulator there I would still need to put the diodes in to prevent power from the battery from going into the charge port and power from the charger going directly into the battery, correct?
Tl;dr:
You're right, you're wasting your and my time because you're not answering my questions, you're not explaining why your way is correct, and you keep bringing up things that were already discussed that I know about.
aaricchavez said:
If it requires 5v then how do devices run with less with USB host on other people's KFs?
Click to expand...
Click to collapse
Um, luck? Sure, a lot of devices are not picky about power.
The specification for USB is 5.0 V
Some devices may not have enough voltage to run at 3.3 V
Some devices may not have enough current to run at 35 mA
Some may simply not detect the presence until it rises over a threshold of 4.5 V
An SD card all by itself uses a nominal 3.3 V
The USB interface circuit is a separate issue.
aaricchavez said:
And with the 3.3v from the Kindle and 4.4v from the battery minus the 2.8v required for four diodes it equals 4.9v
Click to expand...
Click to collapse
The math may be correct, but unfortunately the circuit is not in series.
The voltages just don't add up that way.
You'd need a "floating" battery (not the built-in one) to make the voltages add.
Getting a higher voltage from somewhere and using a 5 V voltage regulator would work.
However, you might need up to 7 V input because your garden-variety regulator has a "dropout voltage" of about 2.0 at full current.
That's why there are special "low dropout" (LDO) regulators designed for such cases.
Still, they can't make more voltage than what they take in.
For that we use charge pumps or boost regulators.
Both of those are active switching devices.
aaricchavez said:
I repeatedly asked why it needs to be regulated when it's already less than 5v.
I also asked "If it requires 5v then how do devices run with less with USB host on other people's KFs?"
Click to expand...
Click to collapse
Sorry didnt read all of the posts, butfor this you can use simple step-up converter.
I have solar charger also with li-ion battery which can provide max 4,22 V and I need 5 Volts.
I bought this module on ebay:
http://www.ebay.com/itm/DC-DC-Conve...175?pt=LH_DefaultDomain_0&hash=item4165891a1f
Works great, provides nice clean 5V output, max is about 2 Amps, even they are telling more... Could also post my complete solution photo if you want
Renate NST said:
The math may be correct, but unfortunately the circuit is not in series.
The voltages just don't add up that way.
You'd need a "floating" battery (not the built-in one) to make the voltages add.
Getting a higher voltage from somewhere and using a 5 V voltage regulator would work.
However, you might need up to 7 V input because your garden-variety regulator has a "dropout voltage" of about 2.0 at full current.
That's why there are special "low dropout" (LDO) regulators designed for such cases.
Still, they can't make more voltage than what they take in.
For that we use charge pumps or boost regulators.
Both of those are active switching devices.
Click to expand...
Click to collapse
What's the difference between the built in battery vs an outside battery that would make it add up?
Adding another power source would basically end up being the same as getting a powered hub.
So what Helium, the poster below you, said should work with the 3.3v that the KF already puts out?
HeliumX10 said:
Sorry didnt read all of the posts, butfor this you can use simple step-up converter.
I have solar charger also with li-ion battery which can provide max 4,22 V and I need 5 Volts.
I bought this module on ebay:
http://www.ebay.com/itm/DC-DC-Conve...175?pt=LH_DefaultDomain_0&hash=item4165891a1f
Works great, provides nice clean 5V output, max is about 2 Amps, even they are telling more... Could also post my complete solution photo if you want
Click to expand...
Click to collapse
I would like to see the photo, if you don't mind.
This one should work as well, correct? http://www.ebay.com/itm/DC-DC-3V-to...932?pt=LH_DefaultDomain_0&hash=item3a722f7ccc
aaricchavez said:
What's the difference between the built in battery vs an outside battery that would make it add up?
Click to expand...
Click to collapse
Many many ..
Power outputs form every mobile devices are not designed to provide big current. It is many times about 50-100 mA, which is sufficient for flash sticks,keyboards or mouses but not for e .g. hard drives.
If you connect step-up converter to for example 3,3V and 100mA, on output you will get 5V 50mA - this is really not sufficien for even mouse...
But if you use battery insted, it can provide huge current - normally 2000mA max. So if you connect battery to converter you will get 3,7V 2000mA and on output 5V 1400mA. Which could be usable even for low power 2,5" hard driver. Also battery has bigger voltage, so it means, that efficiency will rise up a little.
aaricchavez said:
So what Helium, the poster below you, said should work with the 3.3v that the KF already puts out?
Click to expand...
Click to collapse
Yes, look up in this post
aaricchavez said:
I would like to see the photo, if you don't mind.
Click to expand...
Click to collapse
Here there are - as you can see. I am charging my phone from standart li-ion battery from GPS with standart 5V USB
aaricchavez said:
This one should work as well, correct?
Click to expand...
Click to collapse
Yes, could. But I recommend that I posted before - it has bigger mosfet package, which allows about 0,5W thermal dissipation. On your module are SMD transistors, which can dissipate only 0,1W and are very sensitive to aḿbient temperature. I dont trust SMD components in power solutions.
I'd actually recommend keeping the boost regulator on the smaller side.
Besides the space consideration, it would be nice if there were some current limiting.
I just measured the current draw on a 4GB microSD in a IOGear USB adapter and it was 45 mA.
The wireless mouse dongle that I measured was 15 mA.
I don't have any wired mice to measure, but I'd guess that they would all be around that.
Renate NST said:
I'd actually recommend keeping the boost regulator on the smaller side.
Besides the space consideration, it would be nice if there were some current limiting.
I just measured the current draw on a 4GB microSD in a IOGear USB adapter and it was 45 mA.
Click to expand...
Click to collapse
Sure, but you wrote, that his device provides 35 mA max, so it wont be enought for most flash drives. Besides that - you measured in low power (3,3V) or high power (5V) USB mode? Because I expect 5V mode so it means than in 3,3V will be much more miliamps...
Anyway, with boost module it will enable him to use almost everything which has drivers. Not only tiny consumption devices, it will be full equipped active host hub also could be connected with switch as emergency charger...

Measuring battery current accurately

It's been a pending project of mine to try to accurately measure what is using the battery.
Yes, there are all kinds of numbers that you can get off the battery stats,
but to be able to see in real-time and kill/disable things is helpful.
Moreover, there is a continuing problem of Nooks not sleeping sometimes.
I'd really like to get a handle on that.
Measuring current into the USB charging port will not give you a realistic measurement.
The best way is to measure the battery current using a "battery eliminator".
That's a power supply that hooks into where the battery was.
One of the problems is hacking the battery ID and NTC thermistor so that the device will think that a battery is connected.
Here's my layout that I just got working.
Battery connector is a 6 pin JST SH from SparkFun.
I do have numbers coming off it right now.
I need to write some host software to plot a scrolling graph.
Very nice Renate! But 6-pin! Sound quite a lot, perhaps 2 pins are the same?
It would be interesting to know what gas-gauge that battery is using. I posted
something about this HERE (for a different device/battery).
The Nook pinout is:
Code:
1 red battery
2 red battery
3 yellow temperature (10K NTC thermistor to ground)
4 green ID (30K to ground)
5 black ground
6 black ground
This has been verified to the extent that the Nook won't boot up on a power supply without two resistors.
Also, I can play with the thermistor resistor and get freezing or boiling temperature.
Are you reading actual current draw through the battery, or using the power supply current along with the battery?
Parallel connections can not supply actual current draw measurements, you must be connected and read this measurement in series only. Voltage is able to be read in parallel.
Charge rate is also read through the thermistor, as a change ( or delta) of the actual current fed to the battery, and adjusted to compensate for charge level, and current capacity of the battery as a single cell.
Temperature comes into play, and this is the job of the temp probe (thermistor), and is fed back to the charge controller.
Sent from my Nexus 7 using xda app-developers app
Look, Ma, no battery!
AECRADIO said:
Are you reading actual current draw through the battery...
Click to expand...
Click to collapse
Battery? What battery?
That 6 pin plug is going in where the battery was.
At 4V, peak current at boot is around 250 mA.
Lowest idle current measured is 8 mA.
battery current/voltage
I was not suggesting there was a battery connected currently, but was curious on how current was measured.
I saw the configuration you posted, and without seeing the setup up close, the pic does not detail the method used to decipher battery current witth the setup you supplied. Power supplies do not suffer from actual current drain as the supply is always constant, and should the supply be robust enough, there should be no sag in current level over actual draw. I see why you did this, and I was simply trying to figure out the method used to measure actual battery current draw, nothing more.
Thank you for the information.
There are 3 ways to measure current.
The first is to use a current transformer, this only works with AC currents.
The second is a Hall effect sensor.
The third is the tried-and-true method of inserting as small a resistor as possible inline and measuring the voltage across it.
The resistor can be in the hot lead or the ground lead of the low.
This is referred to as high-side or low-side monitoring.
High side monitoring is more desired because you have a single "ground" voltage.
Most small DC power converters do not have accurate, accessible current measurement.
For example, a normal PC power supply can not measure the current on the 5V or 12V.
I bought the specific DC converter that I use because it offers a constant current mode and the measuring resistor was visible in the photo.
I had presumed that it was high-side monitoring because I thought they would have mentioned it in the product description if it were not.
I found out that it was low-side monitoring.
That means that the input "ground" pin is not the same as the output "ground" pin.
In fact, that small resistor is the connection between the two.
The INA219B has a differential input that goes to the measurement resistor.
It is generally used as a high-side monitor because it is designed to handle the high common mode voltages up to 26V.
Yes, you can use it to measure low-side monitoring, but then you lose the auxiliary ability to measure the supply voltage.
Since the measurement resistor goes straight across the two "grounds" I can measure the voltage at the PCB terminals instead of soldering into the measurement resistor.
Of course at the low resistances involved this adds additional resistance which must be calibrated out.
The resistor on the PC board is 0.050 ohms.
I can and will add an external 0.050 resistor on the high side to enable me to measure current and voltage simultaneously with a single INA219B.
Of course, this will add 100 mV drop to the supply at a 2 A drain.
I'll break out the voltage sense of the supply to the far end of the external resistor and that drop will be compensated for.
Current measurement.
Renate NST said:
There are 3 ways to measure current.
The first is to use a current transformer, this only works with AC currents.
The second is a Hall effect sensor.
The third is the tried-and-true method of inserting as small a resistor as possible inline and measuring the voltage across it.
The resistor can be in the hot lead or the ground lead of the low.
This is referred to as high-side or low-side monitoring.
High side monitoring is more desired because you have a single "ground" voltage.
Most small DC power converters do not have accurate, accessible current measurement.
For example, a normal PC power supply can not measure the current on the 5V or 12V.
I bought the specific DC converter that I use because it offers a constant current mode and the measuring resistor was visible in the photo.
I had presumed that it was high-side monitoring because I thought they would have mentioned it in the product description if it were not.
I found out that it was low-side monitoring.
That means that the input "ground" pin is not the same as the output "ground" pin.
In fact, that small resistor is the connection between the two.
The INA219B has a differential input that goes to the measurement resistor.
It is generally used as a high-side monitor because it is designed to handle the high common mode voltages up to 26V.
Yes, you can use it to measure low-side monitoring, but then you lose the auxiliary ability to measure the supply voltage.
Since the measurement resistor goes straight across the two "grounds" I can measure the voltage at the PCB terminals instead of soldering into the measurement resistor.
Of course at the low resistances involved this adds additional resistance which must be calibrated out.
The resistor on the PC board is 0.050 ohms.
I can and will add an external 0.050 resistor on the high side to enable me to measure current and voltage simultaneously with a single INA219B.
Of course, this will add 100 mV drop to the supply at a 2 A drain.
I'll break out the voltage sense of the supply to the far end of the external resistor and that drop will be compensated for.
Click to expand...
Click to collapse
Looking at the device's ratings, I see how you are performing the measurement, using the shunt to measure current, taking loss into consideration.
The '219B is the more precise of the two I looked at. Common-Mode rejection is good, @ 100 dB, which essentially removes the device from the circuit, and you get a more pure reading, without the inherent noise from the device while it is operating.
Differential swing is full range, and Common-Mode is normal with a reduced voltage range from -0.3 V to +26 V as you would not have a negative-leading current or voltage with a battery powered device, so the negative readings are inconsequential and of little use, unless you plan on shorting the battery to ground for some reason, or attempting to measure negative I/V.
Do your findings to date match those of the factory-defined measurements for current drain and battery life?
There are times I find manufacturer specs to be a little more lenient than accurate, but give a good, overall idea on performance while in real-time operation.
Are you able to identify the time required to charge your battery from depletion to full charge, and how long this takes?
What is your actual current draw while charging, and does the voltage change dramatically during charge, IE: +3.2 V depleted/charge begin, to +4.4 V end-of-charge state.
I hope you will post all of your findings/readings so others will understand what you have done, and why.
I am certain there are plenty of interested parties awaiting your report.
To make this a little more understandable, here's the Texas Instrument data sheet for the actual device:
http://www.ti.com/lit/ds/symlink/ina219.pdf
There are two types, with identical pins, only transposed, so one can flip one bug over on its back if necessary.
I'm still using the serial out of the ATMega32u4 right now to get the data.
I have to switch that to USB HID so that I can free up the USB com cable to use for the console monitor.
I (mostly) finished up the scrolling host GUI.
The Y scale is adjustable with mouse scroll wheel.
The X axis is 5 seconds for the minor divisions, 30 seconds for the major divisions.
Here's an interesting example from my Nook sitting idle on the launcher.
The big spikes every 60 seconds are the display updating the clock in the status bar.
The 40 mA or so square waves are a mystery.
However, the big surprise is from the left to the right side of the graph.
The device was fresh booted, the left side is showing a minimum of 95 mA.
The right side is showing a minimum of 10 mA.
That's a major difference.
What caused it to change? A ping over WiFi. (See the 4 little spikes.)
Something is clearly wrong.
This all goes to show that ps and top won't tell you where your current is going.
Edit: It's running on USB HID sensor now and in a case.
The strange 5 second 40 mA waves have been traced down, if not explained.
I'm running a console on a UART with a USB serial adapter.
Normally the dmesg comes streaming out the console.
When you hit a single key on the console, it gets eaten and a 5 second timeout begins during which 40 mA more are consumed.
If another key is hit during this time, it is actually processed by the console shell.
This also extends the 5 second timeout.
By continuously typing the 40 mA excess never times out.
Clearly there is a bug somewhere. It could be a wait loop eating CPU (and current).
So why the randomness?
The stock software has this on ttyS0, which does not have any level shifters.
I reconfigured this to be ttyS1 which has 3.3V level shifters.
If I don't have a console UART cable connected the RX in flaps in the breeze without a pullup.
Random noise causes 5 second 40 mA waves.
Could you dig out the schematics or model name of that huge buck 4V buck converter? I like it.
The CV/CC buck power supply is from eBay
The INA219B and a small SOIC8 breakout board were from DigiKey.
The 0.050 ohm resistor was from a small ebay seller.
(I can dig out the details later if you are interested.)
I scavenged some acrylic "light pipes" out of a power strip.
They are 3mm or 1/8" in diameter and about 15mm or 5/8" in length.
The have a flange that mounts with glue to the underside of the panel.
If somebody knows where I could find more of these?
They are the perfect size to route the LED lights out of the power supply.
Thank you! I am interested in the solution in general as soon I'll need to make similar measurement setup for few embedded devices. I might go with LDO converter though to maximize accuracy of power source (though the 50mv ripple doesn't seem to matter in this kind of solution THAT much, whatcha think?)
Are you planning to opensource I(t) GUI when it's ready? ; >
//edit: oh yea - LED pipes stuff http://www.mouser.com/Mobile/Optoelectronics/LED-Indication/LED-Light-Pipes/_/N-b1d20
One of the advantages to using a buck converter over a linear regulator is that you can short the output for fun.
This is a convenient way to set the current limiting.
I have a shorting plug for just such a purpose.
@Rebellos: Thanks for the hint on light pipes.
I had (wrongly) presumed that they were all custom manufactured pieces.
I got a ZTE Awe at a Black Friday price of $20 so I'm playing with that.
I made a "fake battery" out of a Radio Shack 1" x 2" x 3" project enclosure front panel.
The panel has ridges that fit the battery compartment width perfectly.
I cut the length down about 1/2".
The battery contacts are on 0.1" centers, so using a bit of perfboard as a template I drilled some holes in the cover.
I stuck a 3 pin header through the holes, glued it and soldered wires.
The central pin needed about a 47K resistor to ground to look like the thermistor.
Directly to the left (on the small photo) is a 5 hole place for factory pogo pins.
3 of the pins are a direct connect to the battery connector.
2 of the pins are running about 1.8V.
They could be contact closures or I2C or UART or who knows what.
Not enough pins for SPI or JTAG.
So one thing that I have been wondering about is the current draw from your USB audio adapter. I was specifically wanting to know the battery life while listening to music with the screen turned off. I seem to remember there being a draw of 150mA if the Nook is in host mode, period. If so, is this some sort of software inefficiency, is it contingent on the USB audio adapter, or is it something else entirely? My ultimate goal is to use the Nook heavily as an MP3 player, even if that means honing some rookie Java skills.
@t_0_0_l: Apperently the Nook is running in a tight loop.
It eats up that much current just in USB mode with nothing connected.
Getting slightly off tangent here, but this info could be useful to someone.
The mystery 2 pins on the 5 pin connector on the back of the ZTE Awe
prove to be contact closures to ground for VolumeUp and Reset.
The VolumeUp pin is directly in parallel to the side pushbutton.
Powering up the Awe with VolumeUp pressed sets it in FTM mode.
This works well if you increase battery size
Just a quick thanks for this post...
Renate NST said:
The Nook pinout is:
Code:
1 red battery
2 red battery
3 yellow temperature (10K NTC thermistor to ground)
4 green ID (30K to ground)
5 black ground
6 black ground
This has been verified to the extent that the Nook won't boot up on a power supply without two resistors.
Also, I can play with the thermistor resistor and get freezing or boiling temperature.
Click to expand...
Click to collapse
I just completed a project to root a Nook ST and convert it into a flight computer... As I'm a new user you'll just have to cut and paste vimeo.com/67223752 into your browser to see an old iteration of this in action.
Connected to the internal UART input I have used a couple of different serial GPS modules... one with a barometric sensor as well. Soldering is a bit tricky but achievable for someone with a bit of practice.
I used a "3.7v 4000mah Replacement Battery for 7'' Scroll Explore Tablet" from eBay as a replacement battery for the existing Nook ST battery, with a couple of resistors that were somewhat similar in value to the above (just what I had lying around). These were soldered inline to 'hack' the new battery so the Nook would accept it. So, with the GPS module running and software on full power/refresh mode, the Nook runs for something like 10+ hours continuously when I tested it (the unmodified version returns 4 hours). This is what you'd expect with the original battery having 1500mah. The case did need to be modified fairly extensively to fit the new 'fat' battery. Although I have no doubt that I could cook up a 3D printed back, it would require kit that I don't have to scan the existing one to a high degree of accuracy before I could mod it. So, I hacked a big chunk out of the middle of the back and then stuck a new flat plate on top of that, which provided the extra mm or so of depth needed for this fatter battery.
So, anyway, if you are thinking of fitting a huge battery to the Nook ST big thanks to Renate for this info as it works very well. The new battery does indeed charge without any issues. The only issue it seems to have with mine is that the battery percentage is a bit random (as I assume that is set in the firmware to correspond with the existing hardware). The battery I'm using has its own protection circuitry on it, so likely the Nook can't really understand what is happening. Proof of the pudding is really in the length of time you have to play with device before it gives up, and obviously with a battery this big you don't need to worry about power saving measures!!
As this project is a mix of hardware hacking and software hacking there is no one location that I can post the project to on the XDA forum as I think it falls foul of the 'no hardware' rules on the software forums and 'no hardware' on the software forums, but I suspect that there aren't many paraglider, hanglider and sailplane pilots on here for which this would be of interest anyway, but if you do want the gory detail please post up here!

Using Lipo Charger to directly power android tablet

My android tablet suddenly died on me and refuses to power up. Unable to charge the battery as well.
Am thinking of removing the battery from the tablet and then hooking up a lipo charger to the black and red wires on the circuit board. Hopefully this can power it on directly without the battery.
This is a simple and inexpensive lipo charger I'm looking at:
www[dot]sgbotic[dot]com/index.php?dispatch=products.view&product_id=999
Few concerns that I have:
Can the lipo charger be used as a direct power supply? I know voltage-wise, it's safe (3.7V). But I'm not sure if circuitry-wise, a charger works the same way as a power supply
Is 500mA current output from the charger enough to power on the tablet? If not, what is the recommended current output?
How do I know if the tablet has any logic to detect the presence of a battery? From what I see on the circuit board, there are only 2 black+red connectors (no data connector or anything)
A proper battery should less than that $15 charger. Even if you did bypass the battery you should be able to find a less expensive power supply.
Sent from my SM-N900T using Tapatalk
Spoo76 said:
A proper battery should less than that $15 charger. Even if you did bypass the battery you should be able to find a less expensive power supply.
Sent from my SM-N900T using Tapatalk
Click to expand...
Click to collapse
It uses a 12000mAh battery, which I think cost $40-60. The thing is, I'm not sure whether the issue lies with the battery. So i thought of bypassing the battery and see if it is a circuit board problem.
Here's the "tablet" I have. It's actually the viewing panel of my digital door viewer. Essentially a stripped down Android tablet:
www[dot]rollupcn.com/index.php/iHome4/show/19.html
Btw here're the pics of how the battery and the mainboard look like:
https[colon]//d3nevzfk7ii3be[dot]cloudfront.net/igi/SYJVWTdAPAPBRVCG
https[colon]//d3nevzfk7ii3be[dot]cloudfront.net/igi/q52LQk2X1s6NOaTK
Thing is - I'm not sure if the problem lies with the battery or the mainboard. Any suggestion on how to troubleshoot?
If you want to hack your Power from battery to directly input,
but fails to bypass battery check.
I have a idea that works. (some electricity knowledge required)
You can use a capacitor to "cheat" PMIC, and running on usb cable power.
Go buy a super capacitor (a 4.0F V-type should be OK.)
Charge it with the working voltage. (a few seconds is enough for that.)
Then remove your battery. Strip off the battery controller that you'll need.
Find out the positive and negative on it.(Important!)
And connect the charged super capacitor with battery controller, and put it back battery slot (It's small and fits)
And you can boot on cable power without battery!
In case you still look for a solution, I would connect a functioning Li-Ion battery, either 18650 or from another phone with at least 2000mAh capacity and hook a single cell Li-Ion charger with at least 1A rating.
Things to consider:
- the charger is likely to be noisy and needs a battery to smooth out the wave. It may or may not be an issue. Having a battery connected will dampen it down.
- connecting a smaller battery and powering the tablet via USB may dump too much current into the battery
- the tablet may draw up to 4A on boot, probably 800mA min, so your charger will need a full battery as a backup
- don't use a charger for a different battery chemistry. There is a chance of damage or even fire.
- some devices use I2C interface to talk to the BMS, but this is unlikely in your case
- make sure the temp battery you are using has a BMS

Has anyone tried connecting 5 Volts directly to the internal battery terminals ?

Does it damage the Board or not?
I accidentally did connect 5v for a second or so,
it did power on, i disconnected immediately, and after that it didnt power on for several hours,
but not sure if it was because of the interruption during boot, or overvoltage.
Can somebody confirm?
(i cant use a diode for voltage reduction, its a bit complicated, i use a load sharing capable solar charger board etc)
its a nook simple touch
Yow, don't do that!
Ok, it should be able to take it, but still.
I've often fed 4V to devices which had their battery blow up.
In worst cases I've used a diode for drop, but the voltage can be pretty variable over load.
The uboot on most things will not continue if there is zero voltage on the battery.
Also, the peak current of a device can go up to 600 mA or more at times.
That kind of current often can't come in through the USB connector.
Finally, battery packs have ID connections and thermistor.
Entirely disconnecting a battery pack will often prevent booting even when voltage is present.
If you have a dead battery pack always keep the the connector, cable and tiny PCB inside.
Attach a power supply to where the naked cells used to connect to the PCB.
For wiring of the battery pack see: https://forum.xda-developers.com/showpost.php?p=42552349&postcount=5
thanks, 2 weeks ago i prepared to measure possible resistors but did a google search before, found your description...
i use the protection board with a 18650 3000mAh lithium manganese (to prevent blow (up)) etc cell and charge it externally,
which requires switching between charging the batt + powering the nook over the batt terminals,
and using the batt for powering the nook , all that while the usb keyboard is connected and in use,
this is done via relay and a really big capacitor, which works great but is a bit ghettostyle.
i tried to use another charger board with load sharing circuitry instead,
but the only easy available module requires 5v minimum input, passes this 5v to load if the ac adapter is plugged in,
if not, it passes the battery voltage to load,
so a diode(+ parallel resistor to maintain voltage drop) or LDO doesnt work because it would at least steal around 0,5 v,
which is to much reduction for the battery voltage, because the nst powers off at ~ 3,7v,
easiest would be to just let the 5v to the nook but seems no good idea.
anyways, it works with the relay

Categories

Resources