We really wanted this week’s Fail to work. [Michael] wanted more juice for his Nikon D3100 camera. The idea he had was to replace the cells of the battery with a Buck converter and add leads for an external battery. This opens up the possibility of running from a wide range of voltage sources; an attractive prospect for devices using specialize batteries. Specifically, he wanted to swap out the stock 7.4V 1030 mAh battery and use an 18 Ah lead acid one instead.
The biggest hurdle to get over in a project like this one is the logic the camera uses to communicate with the battery. For this reason — and for the ease of hitting the right form factor — he scrapped an old battery pack to reuse the logic board and enclosure. His power supply is a free-formed circuit which fits nicely in the allotted space.
The circuit powers up, but only to about 6.4V. This isn’t enough to run the camera, which means this was just an expensive way for [Michael] to practice his soldering. After the jump you can read his recounting of the experience. You’ll also find a few of the build images, and the two hand-drawn schematics he used during development. His Dropbox has the entire collection of images.
The hack was to build a buck converter into the aftermarket battery and run leads out of the battery bay such that the camera (7.4V 1030mAh) may be run from a much larger external Sealed Lead Acid unit (12V 18Ah).
The motivation for this project was realised after I noticed the genuine battery was almost flat after 30mins of HD filming. It was anticipated that the hack would also be very useful for extended runs of time-lapse photography. Whatever the case, it is worth noting that the 216Wh SLA costs about $40 while the genuine Nikon battery (at 9.6Wh) costs about $50 on eBay!
Even with pessimistic efficiency figures for the buck converter, it is plain to see the gross gains in Wh/$.
But I digress.
The fail rises from the disappointing circuit performance. The circuit failed to output the calculated voltage (7.3V nominal) and was instead only able to supply around 6.4V, too low for the camera to even power up.
I’m still unsure what the problem was;
- Miscalculating the component values / inductors not in range?
- Current draw too high?
- Noise in the dead-bug style architecture?
- Incorrectly soldered parts?
- Incorrectly identified how the donor battery’s circuit board functioned?
- Conductivity in the hot glue? (I doubt it)
The photos originally were to serve as a build-log, but are now resigned to merely showcasing some neato dead-bug soldering.
Whatever the fault, I’ve since scrapped the arguably more elegant method that I attempted, and instead plan to use a $5 variable buck converter that one can find on eBay. This unit will be mounted on the large external lead battery and have the output run into an empty shell aftermarket battery. Being a pre-assembled circuit, all I’ll have to get right is the input and output polarities!
You can also see on the schematic .pdf that I was thinking of implementing input polarity protect (the two mosfet circuits). These were from an application note that I now cannot remember how to find, but I’ve found a similar one (PDF). An elegant way to avoid dropping that 0.7V on your garden-variety input diode.
We’re already looking for next week’s fail post topic. Help keep the fun rolling by writing about your past failures and sending us a link to the story.
Bummer. It’s too bad he didn’t take the time to figure out what the original battery’s circuit does. My guess is that the buck is doing its job, but there’s some extra drop from the battery circuit.
I think that the battery has a protection fuse bit on the micro controller much like in my dell’s battery. In order to prevent me from swapping new cells. the only way to bypass is to keep the circuit energized or make an expensive I2C programmer and over-volt the chip to fix the fuse bit. but this has been my experience with such batteries
All the lipo protection circuits I’ve seen (incl my laptop) disengage after all power loss (cell removal, death) and can be kick0started back into action by shorting battery Neg to output Neg (and/or pos:pos as well, but I’ve only seen the Neg line regulated). It’s a “latching relay” configuration but with a mosfet, it just needs to be re-energized to switch back on (and self-sustain as long as there is power)
For 1S and 2S packs, the cell protection usually is “low-side” in that the Batt+ line is always connected (so connecting Pack- to Batt- will kickstart the protector) but with laptop battery circuits (3S or 4S) and other Smart Battery System types will have their protection high-side (the ground line is intact allowing constant communication).
As for Leadcrayon’s comment, I haven’t heard of overvolting the I2C lines to set a fuse bit, considering the communication lines will have some sort of overvoltage protection (usually series resistors and a Zener diode).
You misunderstood me I mean that in order to open the I2C channel on most of the programmer parts you need to over volt the part, not by much usually from the 5.5v to 7 or 8 volts. I have a few programmable Hall effect sensors that require over volt to open communications
I haven’t heard much about fuel gauges requiring a Vprog in order to unlock programming features. The more modern fuel gauges (like the ones from TI) can be unlocked via a certain I2C code. One exception to this was a smaller gauge (the bq26500) that required a 21 volt EEPROM programming pulse.
How about opening the device itself and bypassing the whole damn checking part? I mean you’d think there must be some simple transistor or relay to actually reject the battery, once past that you are in control again.
A quick google search reveals that the D3100 can be powered by an external power source. It appears as if you need to spend $25-$80 for an AC power source and another $25 for an adapter. My guess is that you can purchase the $25 adapter, hack off the source end, and feed it with a fixed DC voltage. Seems like a far cleaner solution.
Sounds like a good plan.
Disconnect original battery circuit, connect 100ohm resistor as dummy load to 34063 circuit and measure output voltage. How much does it read? If it is still 6.4V then SMPS doesn’t work well. Try to replace voltage divider resistors with 33k/6.8k combination.
I read the data sheet and it does not look like the circuit built can supply more than 500ma. Likely the low voltage is current limiting kicking in. Under a constant load reducing voltage will reduce current to an acceptable level so that is how that works. It says right in the data sheet that the chip has, “an active current limit circuit”. Measuring camera current required and load testing a prototyped power supply circuit are things I’d have done before this stage of the project.
With his 0.15ohm current sense resistor he should be able to get 700mA, that seems enough for his camera if 1000mAh battery lasts for three hours. But if camera charges flash at the startup then it is possible it draws more than 700mA current for short period of time, but enough for current limit to kick in.
Ah yes, the old flash charging trap, I always forget about it too.
These cameras use bursts of power. Not just the flash charging but also the electronics in the sensor etc. If you were to hold the shutter open and expose continuously you typically get about 45min out of a battery.
A sufficient capacitor on the output should allow momentary large loads. An LC filter could be used to reduce current ripple/spikes as well.
Cameras are well-suited for battery operation. They draw high currents at times but the average is low. So a picture camera could be using 50mA most of the time, but peak at 3 or 4A. My old Nikon 5600 had that type of requirement: A very high peak current.
Anyway, a 1000mAh battery that drains in half an hour means you’re drawing about 2A. So a 700mA stepdown is not going to cut it. (Actually I trust the rating of the nikon battery. That’s going to be close….)
Are you trying to get 2A out of this? This device can only go up to 1.5A, the problem is probably due to the current limiting.
I haven’t done the math. My spidy sense is telling me that your
switching frequency which is limited by your old switcher IC to 100kHz
which is way too low for your 10uH inductor.
The inductor current limit will be reach very quickly under load and
that’s limiting your PWM duty cycle. Without being able to raise your
duty cycle, your switch cannot reach its set point voltage.
So you’ll have to use higher inductance. Higher inductance means your
inductor is bulky, but on the other hand you’ll have lower output ripple
currents. Want to keep it small, use better switchers and run that at
a higher frequency. 200kHz to 300kHz is the range I usually aim at.
Without knowing what load you have etc, I am guessing that you might
also need external MOSFET/transistor for higher current as that internal
transistor isn’t good for that.
Free form wiring for switchers in general are not good unless you know
how to minimize the loop area for high current paths etc.
You’ll still need to pay good attention to have good low ESR caps for
your input/output caps for ebay converters as you don’t know what crappy
caps they are using onboard.
Oof. I’d like to help out by completely understanding what’s going wrong but I can’t get further than advising to try a dedicated buck converter IC from Linear Technologies. They’re more expensive, but they’ve got a very stable cycle-by-cycle current limiting circuit. TI also makes nice converters. You can also simulate these before building to check what the critical component values are.
A few words on the hypotheses:
* Conductive hot glue: no. Hot glue isolates pretty well.
* Dead bug style noise: I guess not; dead bugging keeps traces quite short in general. Take a look at Jim William’s desk (google)
I saw the probes, so you have a scope; maybe you could post some scope plots of startup behavior and Ct / EMT_S pin?
Here’s another solution. Get your local computer shop guy to pass along the dead laptop battery packs that flow thru his hands. I have yet to see one which did NOT have 18650 batteries. They are everywhere! The new 7 passenger Tesla hyper-car runs on 7,000 of them! They are said to last 3 years. I am currently using batteries out of my old ThinkPads (Win98 era) which are now 16 years old! The packs were stone dead for over a decade and over half of the cells are in full service today. They hold 100% of their spec 2.4 amp hour capacity. Their self-discharge is almost unmeasurable after six months of inactivity. Most packs have pairs of cell in parallel. They are still charge-balanced after all these years. Plastic 18650 battery holders are sold in a 2parallel,2series configuration for about a buck. A two cell AC charger is about $6 ppd from China (and runs the cells in parallel, So, never charge a charge-imbalanced pair in a cheap 2 cell Chinese charger. Buy the single cell chargers instead. If you want capacity, you can parallel 4 of those 2 cell parallel holders thru 4 low drop Shotkey diodes, to prevent any cross charging. The cost would be near zero, the weight would be a small fraction of the SLA battery, no sulphuric acid, no heavy metals, no high self discharge, no switcher supply noise, and good cold weather performance.. What’s not to love? Just engineer the conductors and insulation as if they were for service in a new plastic Boeing airplane!
Bullshit -They wern’t made 16 years ago and they dont last at all well over a month let alone longer .
Actually, I bought the computers new, and recycyled the old battery packs myself. In point of fact, the cells are over 16 years old. Period. Tip: Try not to shoot from the hip, lest you shoot yourself in the foot.
My business recycles old laptops (among other things) and ive frequently seen battery packs that old still functional. Usually hold 80 – 90% percent charge. I have no doudt if you tore apart a pack and only took good batteries you’d find a few that were still at 100%. As to discharge 2 or 3 years and I’ve still seen some life pretty regularly, record was 8 years I think.
The switch limit from the datasheet of the 34063 is actually 1.5A. However, the peak current in the given configuration would actually be 2A, so that might be an issue. I’d actually be suprised the camera really needs 1A, so I’d measure that first, and then adapt the configuration to e.g. 500mA and see if that makes a difference. And if it does indeed really need 1A, then use a MOSFET to drive the extra current. In that case, also use a PNP transistor (+ diode) to actively pull the gate of that mosfet low, in addition to the resistor shown in the datasheet. Here’s a handy calculator for the 34063 that allows you to play around with different currents: http://dics.voicecontrol.ro/tutorials/mc34063/ . I also seem to remember the minimum resistance for that Rsc is 0.2 ohms, though I couldn’t find that in the datasheet right now.
Actually it’ll likely use more. Cameras use power in short bursts. My experience in astro-photography is that a typical SLR lasts about 45min when continuously exposing, so the process of exposing likely draws more than 1A.
Also Nikon’s internal counter in the battery craps itself when I use it on my telescope. It thinks the battery needs to be tossed because it only managed a handful of pictures on full charge :-)
I’d be surprised if it *didn’t* draw more than 500 mA, because it kills a ~1 amp-hour battery in way less than 2 hours (see text). It looks like it needs more like 2 amps.
Oh, and one more thing: measure the voltage with the load that you expect (so, with different resistors), as well as with other loads, to measure the power supply in complete isolation of the camera, etc.
I have spoted there are +/- 10% Resistors in the Circuit. When you take 10% from the wanted voltage you hit the 6,4 Voltes.
Chance the 10 K Resistor with an 15K pot. Connecting end and middel Pin. Turn the pot antil the Voltage get 7,2 Volts. And everything gets fine.
+/-10% resistors have a silver ring. Those are 1% metal film resistors. They have 4
colour rings for their values (3 significant digits and 1 multiplier) and the 5th one is
brown which stands for +/-1%.
Measure the voltage at pin 5 to ground (voltage divider). If that is below the reference
voltage, it means that no amount of trim pot is going to help as the switcher is unable
to crank up its duty cycle to put it in regulation. (see my previous post).
I have noticed that the 2 inductors do not match their values in the “schematic”.
1uH is too high for that few turns of air core and the torroid looks a lot higher.
Doing “air-wire” is not the same as Jim’s dead bug prototyping. He uses a large ground
plane which is missing in this. SMPS requires low inductance connection for the high
current paths. Read up on Linear Tech’s app notes on how to do layouts.
I really wouldn’t bother putting the power supply in the battery, it would be a much better idea to just put a couple of wires and a resistor in the battery shell, then put the smps in an external box, you don’t want something generating heat inside the camera, especially one that has the ability to fail whilst testing.
There is generally a positive, negative and thermistor pin, the thermistor I believe is a sensor for the charger to stop it getting to hot, it’s also used by the camera
This type of mod has been done plenty of times on canon cameras,
For as far as i’ve seen the Nikon AC power adapters open there was no circuitry inside, but today at work ill crack one open and take a picture. Only thing is it doesn’t read the battery capacity properly but it still functions.
I only spent a minute looking at the datasheet and the hand-drawn notes, but your inductor is like at least and order of magnitude too small. for a step down converter you need 220uH, you have 10uH. Why did you pick 10? See pg. 9 of the datasheet.
That completely depends on your requirements, see the datasheet, or check http://dics.voicecontrol.ro/tutorials/mc34063/
when it comes to switchers, i just use the values and manufacturers they recommend. never had a problem with any of my implementations going that route. also, the inductor he used looks like it’s rated for really high current. can get a higher inductance on in the same space if he used one rated for lower current.
He really picked the wrong part to do what he needed. A better choice is exactly what the ebay boards use, the LM2576 or one of its variants. They are the simplest switchers you can build. Only requires 1 inductor, 1 schottky diode, 1 trimmer pot to adjust the voltage output. The parts sold on ebay do not have the ripple filter on the output because that requires a second inductor and increases cost. Look in the chips datasheet for the filter.
Why? The 34063 is cheap (a few cents on aliexpress.com) and should do the job fine. You don’t need that second inductor on the 34063 either.
You do need that second inductor on the 34063 if you want to remove all the switching noise. The ripple filter isn’t unique to one switcher, it is for all switching power supplies.
The 34063 output voltage can be easily set by using a zener diode in the feedback circuit rather than a purely resistive divider, much like one would do in a opamp regulator. Just remember that there’s also a voltage drop into the chip internal reference regulator so the zener voltage has to be slightly different. I don’t remember the details but the chip data sheet is pretty clear.
LM2576 is rated for 3A output while MC34063 is about 500mA at best which
is not eqough for the job.
A camera current requirement may cover a very large range – from power
saving modes to flash charging. By the time you finished calculating an
inductor that could do the job, you’ll find that it would have a lot of
ripples especially at the lower end. Noisy power supply might means
noisy pixels.
Probably should use newer variants of LM2576 as that part switches at a
very low frequency of 57kHz if you are _BUYING_ new parts. e.g. LM2596
at 150kHz. There are also much better parts with higher frequencies and
efficient as they have MOSFET and uses synchronous rectifiers.
The inductor and output cap would only need to store energy until the
next cycle. Higher frequency means less energy needed to be stored, so
much smaller inductor, capacitor and lower ripples.
where does it state that the 34063 has a max output of 500mA?
1500 ma is the amount of switching current not output current.
Switching current = 2 * (output current)
And that is Maximum, you really don’t want to use the max values but derate them.
Yeah.. you have to have a dummy load to keep the switching supply running at proper levels. Looks like there’s already some discussion around that..
Is it worked out now then? Or V-out levels still low?
Tweeks
It’s a 1030 mAh battery, right? And it dies in ~30 minutes? 30 minutes = 0.5 hours. 1030 mAh / 0.5 h is on the order of 2 amps.
MC34063 maximum current = 1.5 amps. Regardless of what you do to attempt to fix this, it won’t work. The camera’s current draw is too high. It might even work for taking pictures with a huge cap (doubt it), but for your intended use, it won’t work.
You’d really want something more like a 3-5 amp regulator.
They could build a circuit with an external pass transistor. That is briefly described in the data sheet for the MC34063
I cracked open the fake battery which was part of a power supply, it is fed by 9v DC. Haven’t had time to check the resistor values etc but here are the pictures.
https://www.dropbox.com/s/y3tpjw7h37n2bvv/DSC_2008%5B1%5D.JPG
https://www.dropbox.com/s/pkb77ooaaopvbmi/DSC_2009%5B1%5D.JPG
Sorry the last ones a bit blurry
The SMPS chip selected wont work for this application. Per the notes the current limit is 1.5A, the Fsw is 33kHz the inductance is 10uH input is 12V and output is 7.4V. The on time for this will be (7.4/12)*(1/33kHz). The change in current through an inductor is (V/L)*dT. For this application the equation works out to be [(12V-7.4V)/10uH]*[(7.4/12)*(1/33kHz)] which is equal to roughly 8.5A of ripple current will be limited to appx 1A and lead to a lower output voltage. I’m honestly surprised that the device gets up to 6ish volts.
I used the part in a 12V to 5V buck converter, 500mA is when the chip
starts to get warm. App. note also show that without external driver. OP
would get even lower current at higher voltage.
Typically, Ipk (switch)=1.5A is about 2*Iout (output current) for their
calculation. The switch has a HUGE 1.1V drop in buck mode due to
darlington configuration, so not going to get much more current in buck
mode.
Yes you *COULD* make a huge SMPS out of this if you add enough parts.
The 1.5A is switching current, NOT what the DC current the chip can
provide.
It is not going to be cheaper than a current part that are designed to
give you 3A or 5A DC Output inside.
Oops. Make that VCE (saturated)1.6V drop @ 1A and about 1.7V at 1.5A per
datasheet. That’s not exactly an efficient design.
I’ve had projects turn out like that. My sympathies.
Whenever I find a camera at the junk yard, I just tear open into the battery and solder on wires to where it used to connect to the battery pcb. Just feed it 3.5~4v and it will be fine. But I guess that only works if you have a decent power supply/variable power supply.
How about this: Use a Battery Grip (what I’m planning to do with a D5100)? Use a battery (with communication chip) in one slot, wire the other slot with some other high cap external battery?
I figured too the MC34063 is a little to weak and unstable to directly power a camera. The max stable current you’ll get (ime) is around 500-600mA. Also the efficiency is quite low at maybe 60-70% and the solution posted here is quite expensive. Maybe try one of these much smaller KIS-3R33S-modules. They’re running at less than 10 bucks for a ten pack including shipping and they’re only slightly larger than the inductor used here. You can adjust output voltage by putting a resistor between ground and ADJ for higher output voltages than 3.33V. Remember to replace the output capacitor for one with a higher voltage rating. The original will go up in smoke at around 4V. The module will kick out currents of up to 4A which should be way more than this camera should require. However it’s always a safe bet adding a 470µ electrolytic to the 1µ+ ceramic on the output.