Make a fake lipo battery for a camera - Page 1
Forum section: electronics / projects

author: Erwin Ried
author_rank: Regular Contributor
timestamp: October 31, 2013, 04:35:29 am
content: Hi, my camera does not have DC/IN (a cheap Insignia camera ns-dv1080p) and I was trying to make a fake lipo with an usb input:In this moment, the voltage is perfect 3.9V (original is 3.7V rated and 4V fully charged). The problem is the middle connector. The camera recognizes that the battery is fake and does not start (led blinks). Any hint how to emulate the third pin very easily?What I have tried is: Using 1.9V zener diode between + and middle pin, and 10K resistor between - and middle (because is what I can measure with the multitester in the original battery) and I am guessing 10k is a temp probe.

author: Legit-Design
author_rank: Frequent Contributor
timestamp: October 31, 2013, 05:16:43 am
content: Quote from: Erwin Ried on October 31, 2013, 04:35:29 amActually it does have:http://shop.retrevo.com/m/search/offergroup?c=4&m=23938766&og=1022922you need one of those adapters, looks like mini usb plug to camera 3.5mm or similar plug. Multiple contacts like those which are used for microphone/audio left-right/composite out.Seems to be right one for you.http://www.gomadic.com/tip-21.htmlQuotehttp://www.gomadic.com/cabletip.htmlI take no responsibility if it's not the right tip for you, but you can make sure yourself by contacting them.http://www.ebay.com/itm/Battery-for-INSIGNIA-NS-DV1080P-NS-DV720P-NS-DCC5HB09-NSDCC5HB09-5-0MP-Camcorder-/170950166923?pt=Batteries_Chargers&hash=item27cd6c898bWould be a lot easier just to measure/take apart existing battery if you really want to do it that way. I would just get cheap battery and that adapter, or just take the camera apart since it seems to piece of t*rd anyways, no offence. That camera seems to have extremely tiny lens on it, maybe it is good for bright daylight tho.I hope it's not a problem to order this stuff to chile, I heard some countries have customs which make it easier just to mod stuff or make it yourself.

author: sleemanj
author_rank: Super Contributor
timestamp: October 31, 2013, 05:53:57 am
content: Quote from: Erwin Ried on October 31, 2013, 04:35:29 amIf it's a simple voltage output, measure the voltage at that pin (relative to ground) on your actual real battery (when fully charged), create a resistor divider in your fake which provides that same voltage (use high value resistors so the current is minimal).Of course, it may be more intelligent, but that's worth a shot.Also; if it doesn't have any DC input, how on earth does it charge that lipo in the first place?

author: Erwin Ried
author_rank: Regular Contributor
timestamp: October 31, 2013, 06:20:19 am
content: Quote from: Legit-Design on October 31, 2013, 05:16:43 amThe usb that says DC/IN has 2 rows of 4 contacts, I don't know how to get that connector but I tried with normal USB-mini plugs and they don't act as dc-in. Sorry but my camera model is: Insignia NS-DV111080F, but it seems uses the same connector. No luck using it.Quote from: sleemanj on October 31, 2013, 05:53:57 amIn the battery there is a uC. I removed it an tried to use it as bypass -> 3.9V emulating the lipo cell, passing thru circuit. No luck either, maybe the uC do some diagnostics over the cell. I can put an attiny to emulate any signal but I don't know what really to emulate.I recharged the battery with a generic charger (adjustable pins).

author: sleemanj
author_rank: Super Contributor
timestamp: October 31, 2013, 07:07:26 am
content: Quote from: Erwin Ried on October 31, 2013, 06:20:19 amHave a look to see what is happening with that pin in the real battery when it's connected up, if it's passing digital data, or is a steady analog state, maybe it's even just a simple boolean output "Batt Good, Batt Bad".

author: AmmoJammo
author_rank: Frequent Contributor
timestamp: October 31, 2013, 07:13:57 am
content: why not just charge the battery while its in the camera?Leave the original battery in place, feed ~4volts into it.

author: Dago
author_rank: Frequent Contributor
timestamp: October 31, 2013, 08:05:30 am
content: Quote from: AmmoJammo on October 31, 2013, 07:13:57 amYou absolutely cannot and should not trickle charge lithium batteries. You WILL damage them or maybe even cause a fire.

author: AmmoJammo
author_rank: Frequent Contributor
timestamp: October 31, 2013, 08:24:06 am
content: Quote from: Dago on October 31, 2013, 08:05:30 amThen set it to 4.2volts!

author: amyk
author_rank: Super Contributor
timestamp: October 31, 2013, 01:30:02 pm
content: What's the model of the uC in the battery? It's a little surprising that a cheap camera would have such a smart battery (e.g. the majority of mobile phones have + T - for a thermistor only) - you'll need to see what data gets exchanged between the two and replicate that communication.Quote from: AmmoJammo on October 31, 2013, 08:24:06 am3.9-4.0 to be safe. It'll just stop charging when it gets to that voltage.

author: Erwin Ried
author_rank: Regular Contributor
timestamp: October 31, 2013, 04:26:32 pm
content: I tried to reuse the same circuit with 3.9V but it does not work, maybe last resource is just to wire up the middle pin to an oscilloscope to spy the "initialization", if any.Big chip says 5N20 and small one DBA1Quote from: AmmoJammo on October 31, 2013, 07:13:57 amThis camera never recharged the batteries while in use: old crusty design of electronic appliance. Similar to these cheap chinese android tablets with 2 port, usb + one for charging.

author: AmmoJammo
author_rank: Frequent Contributor
timestamp: October 31, 2013, 08:26:42 pm
content: Quote from: Erwin Ried on October 31, 2013, 04:26:32 pmMy suggestion was to modify the camera, or battery, so it could be charged in circuit

author: ohmineer
author_rank: Contributor
timestamp: October 31, 2013, 08:29:52 pm
content: Could you read top marking of battery uC? I think this chip will be a fuel gauge.Simple fuel gauges does not feature authentication and, in that case, you should be able to replicate the communication and turn your camera on successfully. On the other hand, if battery chip uses authentication methods such as CRC or SHA it will be much more difficult.Good luck!

author: NiHaoMike
author_rank: Super Contributor
timestamp: October 31, 2013, 09:20:02 pm
content: Are you sure your PSU can supply enough peak current? It's very usual for the flash boost to draw an amp or two in order to accelerate flash capture rate.Quote from: Dago on October 31, 2013, 08:05:30 amNo problem holding 4V/cell for an indefinite time. You just don't want to hold it above 4.1V/cell or so for too long.

author: AmmoJammo
author_rank: Frequent Contributor
timestamp: October 31, 2013, 09:28:34 pm
content: Quote from: NiHaoMike on October 31, 2013, 09:20:02 pmI am quite happy to see a number of people agreeing with my suggestion...I wasn't entirely sure that it was the best idea, and when I had someone tell me it was a terrible idea, I assumed they actually knew what they were talking about...But, I guess this is the internet.Thanks for the reassurance that it isn't such a terrible idea afterall!In hindsight, I'd maybe suggest a 3.9volt constant charge (which is pretty much what amyk said anyway, thanks for your input too!), as I believe you generally don't want to storage charge lipos at much more than this, so if the battery is fully charged when you connect your power supply, it will simply discharge the battery down to 3.9volts, before the power supply takes over running the camera

author: sleemanj
author_rank: Super Contributor
timestamp: November 01, 2013, 12:00:35 am
content: Quote from: Erwin Ried on October 31, 2013, 04:26:32 pmJust by noticing the combination of those two devices, it looks like a lithium battery protection circuit to me. I have noticed that the DW01 for the 6 pin, and FS8205A for the 8 pin, are sold in massive quantities in China at the moment for this purpose, and the circuit topology is similarYour 8 pin device will be this dual fet:http://pdf1.alldatasheet.com/datasheet-pdf/view/534099/TYSEMI/5N20V.htmlThe 6 pin device I couldn't find but it would not surprise me if your DBA1 is pin compatible with the DW01 or at least close enough you can work out what that 3rd tab on your fake battery is likely connected to...http://www.ic-fortune.com/upload/Download/DW01-G-DS-10_EN.pdf

author: sleemanj
author_rank: Super Contributor
timestamp: November 01, 2013, 12:24:15 am
content: Found your DBA1http://item.taobao.com/item.htm?spm=a230r.1.14.47.kAulyG&id=22865452655Looks like it is replaced by VA7021I found a chinese datasheet for thishttps://drive.google.com/file/d/0B7NRgk3zdvv3ZDRyNGJXbWFndDg/edit?usp=sharing, if you look at the example on page 6, compare that to the example in the DW01 you should be able to work out what is what.Here is a poor google attempt at translating that PDF...https://docs.google.com/document/d/14UkgZ7iBsOguYQZUSsRPnpGTBONOookf-rdlpkfvD28/edit?usp=sharing

author: Alex
author_rank: Regular Contributor
timestamp: November 01, 2013, 12:33:15 am
content: In this class of batteries the small SOT23 device is a charging supervisor/protection controller which in turn drives the TSSOP device which is a power transistor.I recently had to hack such a battery (although Li-ion) for a panic button. Reverse-engineering the circuit showed that the phone detects the presence of the battery via a resistor and its temperature via a thermistor. This part of the battery circuit appeared to operate independently and indeed isolating these two components did the trick.You can read more about it, including picture of the battery pcb,here.Alex.

author: bwack
author_rank: Contributor
timestamp: November 01, 2013, 01:20:46 am
content: What about the battery door. Does it have a door switch on it? My Canon 20D has and the camera won't power up if the battery door is open (for data integrity reasons I guess).As mentioned earlier you should try with adding caps to stabilize and decouple the lm317 regulator. Digital devices draw large but short peaks of current.. While the camera design might rely on the exdelent low resistance of the L-ion battery, now you have long wires and no decoupling. What source do you use for the usb ? (Computer? mains 2 usb transformer?)

author: Erwin Ried
author_rank: Regular Contributor
timestamp: November 01, 2013, 03:08:00 am
content: Quote from: sleemanj on November 01, 2013, 12:24:15 amwonderful! thanks mate, I still don't understand why the camera does not boot when I supply the 3.9V in the back of the circuitry and relink the 3 contacts to my new ones. I will check the datasheets to see if there is something extra I am missing.Quote from: bwack on November 01, 2013, 01:20:46 amThe batt door does not have any switch, it works opened, so no troubles here. I want to use a 2A adapter for my galaxy tablet, that is why I didn't used caps.Quote from: AmmoJammo on October 31, 2013, 09:28:34 pmI still don't fully understand your suggestion, you say that I should link the contacts of the lipo to a lipo charger while is inside the camera?Quote from: Alex on November 01, 2013, 12:33:15 amAs I said, I tried to do exactly what you tell, but camera isn't starting. You didn't used the original battery circuit right (it looks very similar to mine)?http://postimg.org/image/k7xpgnast/Can you tell me what did you did here:http://postimg.org/image/ftkmr2aul/it is just to switch the source ?

author: sleemanj
author_rank: Super Contributor
timestamp: November 01, 2013, 04:52:29 am
content: Quote from: Erwin Ried on November 01, 2013, 03:08:00 amIn the first post I think you said you tried a Zener diode and a resistor. That's not likely exactly how it would be setup in the battery, so perhaps a brief note on how thermistors are used will help you (or at least it might help somebody in the future who stumbles across this thread)...A thermistor has a specified resistance (say 10k) at a very specific temperature (25 C). The resistance changes in a known fashion depending on the temperature. So if you know the immediate resistance, you can calculate (or look up) the temperature.Of course, to know that immediate resistance you can apply Ohm's law - but that means you have to know both the voltage, and the current if you want to calculate the resistance.So you form a voltage divider using a resistor of a known resistance.(+) -- [known R] -(midpoint)- [ thermistor] -- (-)Now you can easily measure the voltage at (+) and at (midpoint) and at (-) if it's not zero.So now you know the (+) voltage, you know the [known R] and you read the (midpoint) voltage, Ohm's law gives the current through the known resistor and we assume that the measurement at midpoint is high impedance, so therefore the current through thermistor is the same.Now you know the current through the thermistor, and you know the voltage at midpoint, so simple Ohm's law gives you the current resistance of the thermistor.Now you know the resistance of the thermistor, you can calculate (or lookup from a table) the temperature of the thermistor.For a typical NTC thermistor, the calculation of temperature is...TemperatureC = 1 / ( (natural_log( Rthermistor / RthermistorAt25C ) / Beta) + (1 / 298.15) ) - 273.15Beta value depends on the thermistor, but 3950 is a good guess if you don't know it, for clarity I'll note that 298.15 is 25 degrees C in Kelvin, and 273.15 is 0 degrees C in Kelvin.So, what does this mean for you? The unknown pin of your battery is likely to be the midpoint of such a voltage divider. It would be a reasonable guess that the thermistor is 10k at 25 degrees C because that's common, and it would be a reasonable guess that the resistor is 10k because that's convenient, but you should be able to measure both if you can find them in the existing circuit.Where does the zener come into it? If there's a zener there at all, then it will be forming the reference across which this voltage divider is attached (thereby negating the need to measure the (+) because it will always be the zener voltage), see attached...

author: Dago
author_rank: Frequent Contributor
timestamp: November 01, 2013, 06:26:41 am
content: Quote from: NiHaoMike on October 31, 2013, 09:20:02 pmYes but you need at least current limiting, otherwise the battery might get charged too fast. And while you're at it you could just do it properly and use a real lithium charger circuit

author: Nerull
author_rank: Frequent Contributor
timestamp: November 01, 2013, 02:51:25 pm
content: The general rule of thumb is that lithium batteries should be charged at a rate no higher than it's capacity, or 1C. A 1200mAh battery can be safely charged at 1.2A but no higher unless the manufacturer specifically states that it can. Higher current can at best shorten the life of the battery and at worst set it on fire.

author: Eviltech
author_rank: Contributor
timestamp: November 01, 2013, 07:01:06 pm
content: Quote from: Dago on October 31, 2013, 08:05:30 amYou can, just use lower voltage - 3.7V-3.9V I have been usind a phone battery in the same way for 2 years now...

author: amyk
author_rank: Super Contributor
timestamp: November 02, 2013, 10:53:30 am
content: Quote from: Eviltech on November 01, 2013, 07:01:06 pmI wouldn't consider that tricklecharging, it's more like just holding a voltage.