PSU plus battery?

Status
Not open for further replies.

Tomble

New Member
Hi everyone! Eh, I guess I joined the forum a fair few months ago now but despite the odd comment, never really introduced myself or for that matter, got around to posting any of the questions I meant to ask

So for the "introduction" part: I did a tiny bit of electronics when I was also tiny (one or two trivial LED things, and something out of a kit) and later studied it a little in A-Level Physics classes at 6th-Form College (age 17ish), but up until about 2 years ago, most of my life I've mostly just been programming rather than having anything to do with electronics. In those past 2 years OTOH I've read a lot, experimented a bit, and made a few circuits. But no blue smoke yet! I'm much more happy with DC stuff than AC (aside from op-amps, which I like), and I think I'm pretty comfortable with any DC-related terms and concepts I can think of.

So yeah, that's me, hello, etc Anyway, to business! One thing I've been wrestling with over the past N months is the issue of a power supply for a simple, modular PIC programmer circuit I've been designing and building.

Yes, of course the 5V supply is easy with 7805s or my little SMPSU brick. But programming (most) PIC chips also needs a "VPP" voltage of 13V, give or take a bit. And though I have another, fairly hefty PSU brick that can give about 16V open-circuit, or about 15V or so with a very small load (the brick is labelled as 13V at 2A IIRC), there was an issue of sorting out a workable regulator to get 13.3V or so with the potentially low headroom: I think it'd be too tight for an LM317 and I'm wary of my own design for a "low-dropout" style regulator as I'm not sure if it might oscillate. And I currently am quite hard-up so I'm quite strongly against the idea of buying any more bits if I can possibly avoid it!! I already have like £300 worth of parts from last year, that ought to be plenty

Anyway. Yesterday it struck me: I have that 5V SMPSU (seems reasonably regulated), which would be fine for most of the circuit; what if I just stuck an 8.4V or 9V PP3 battery on top of that?! AFAIK that SHOULD give a pretty reliable 13.4V (with an optional diode), unless there's something I'm missing. The diagram attached shows what I mean, if it's not glaringly obvious. It should need NOTHING I don't already have AFAIK, it seems so quick and simple, I could probably just use my breadboard even. And I wouldn't have to worry about calibrating the voltage with my skewed voltmeter (no, it's not quite broken enough to deserve replacing)

That'd be a lot of problems solved. And yet, "If something sounds too good to be true, it probably is", "things are rarely that simple", and the idea reminds me of those vague mysterious warnings we used to get about not mixing different brands of battery or whatever, so I'm feeling very paranoid. WILL this work as I hope? The VPP line doesn't need much current except perhaps in transients but I feel like I might be missing something. And is it SAFE? I have this image of the battery bursting into flames for some reason Sorry for the post length BTW, I expected lots of "You should just..." comments otherwise

View attachment psu_and_battery.pdf
 
Last edited:
It should work OK for testing and / or ocasional programming. - Of course, in an "industrial" enviroment you would need a lot of batteries

Add a good bypass between the Vpp line and ground - say a 100 to 470 :mu:F electrolytic and a 0.1:mu:F ceramic in parallel.

Also a "backwards" diode across the 7805 to protect it against capacitor's discharge (Cathode to the supply, anode to the +5V line, see the 7005's datasheet)
 
Many "9V" rechargable batteries are 7.2V since they contain 6 AAAA cells.
A 7.2V Ni-cad or Ni-MH battery is 8.7V fresh out of the charger. An "8.4V" one is 10.2V fresh out of the charger.

A 9V alkaline battery quickly drops to 7.2V then slowly drops to 6V when it is considered to be dead.

So the idea of using a battery has no voltage regulation whatsoever.
 
I have a rechargable 9V battery that's 8.4V or 9.6V when freshly charged and it has rectangular shaped buttom cells rather than AAAA cells.
 
Hmmm, thanks for the replies...
Rather disappointing to hear that about the battery voltages, I knew they dropped somewhat as they got discharged, but that much?

Re the Ni-Cads though, I have one here that I know hasn't been charged in years despite occasional use, is specifically labelled "8.4V", still works and seems currently to have slightly less than 9V, oddly. I presume at least that'd be a 7-cell, 8.4V type, right?

I went to find some actual graphs of the discharge pattern you describe, and it does look like NiCads are vaguely flat in the middle 60% or so of their usage (and that this is where they're at their nominal voltage)- at least, flat enough for my own purposes where I can deal with it being a few 100mV off, and in the short-term could compensate for something that changes a bit from day to day (add or remove a diode as needed) as long as it doesn't change from minute to minute. Considering the usage (the chips apparently don't use the VPP for any sort of power, merely a reference), I wouldn't expect the voltage to drop quite that quickly (if in that middle region), but maybe I'm still wrong.

Assuming I can deal with the voltage drop described, any remaining issues with the idea? Is it possible for instance that there will be even more losses than that due to the particular arrangement (battery in series with PSU)? Or as I say, some safety issue?

I mostly want this for a kind of bootstrapping- get something working so I can be sure the other parts are ok and maybe program up a chip or two with something to help work on a more permanent replacement (the programmer was meant to be modular for that sort of reason). It doesn't need to be extremely accurate, but I don't want something oscillating all over the place because I think that'd be disastrous.
 
Energizer's "9V" Ni-MH battery is 175mAh now. It is 7.2V.
How many mAh is your 8.4V one? I bet it is less.
 
It's 150mAh.

What's more important voltage or capacity?

Well it depends on the load of course, that 7.2V Energizer batter wouldn't be much good in my multimeter which gives a low battery warning when the voltage drops to 7.4V but in another appliance that works reliably down to 7V it would be much more useful.
 
I wouldn't use a rechargable battery in a multimeter. Its self-discharge happens too quickly.
The 9V alkaline battery in my Fluke DMM lasts for years because it turns itself off when I forget to.
 
I haven't had such a good experiance with meters, the batteries tend to last for a couple of months at best which is why I use rechargeables.
 
audioguru said:
I wouldn't use a rechargable battery in a multimeter. Its self-discharge happens too quickly.

I would agree, and most instruction books would tell you not to either.
 
If all you're trying to do is build a PIC programmer with a 13V HV section and you want to run it with a simple power supply I think I solved the 5V to 13V problem fairly elegantly. Take a look at the Inchworm or Inchworm+ PIC ICD2 on my site. I used to run the Inchworm on 6xAAA NiCAD batteries but I now have a USB powered upgrade UNICORN adapter that I use.
 
Last edited:
audioguru said:
I wouldn't use a rechargable battery in a multimeter. Its self-discharge happens too quickly.
The 9V alkaline battery in my Fluke DMM lasts for years because it turns itself off when I forget to.

All good meters turn themselves off during inactivity. The cheap ones will run down the batteries. Since the user saved money on a cheap meter, he has plenty leftover to buy more batteries.
 
Tomble said:
I mostly want this for a kind of bootstrapping- get something working so I can be sure the other parts are ok and maybe program up a chip or two with something to help work on a more permanent replacement
The 9V battery stacked on top of the 5V supply will be fine as a temporary solution. Microchip specs the VPP voltage to be a minimum of Vdd + 3.5 (8.5V) and a max of 13.5V so you do have some leeway. Just make sure you don't exceed 14V on Vpp so add a diode or two when the battery is fresh. Aim for 13V on Vpp when programming.
As a second solution, have you considered using low voltage programming?
 
Hi again guys, nice to see even more comments thanks
After getting offline last night I thought a bit more, and figured that a cautious estimate for the energy usage (from the 13V line) for this thing would be about 0.5mAH per session- 5mAH for 5 minutes. A more likely figure might be about a tenth of that. Either way, that works out as less than 1% of the total charge of that 110mAH battery I've got (yeah, even less capacity than Hero999's one); I think even in freshly charged batteries that wouldn't be enough for the voltage to drop too far at once, and I don't think this one's fresh.

Another idea that occurred to me: the main problem with regulators (in the down-from-15V-or-so situation) is in the control side, where a badly-compensated one (or one without enough headroom) could do a very crappy job of actually adjusting the output voltage (I assume that the "oscillation" they suffer is of substantial amplitude?). But feedback could still be used for simply monitoring a voltage from the battery-based design, eg using a window-comparator type arrangement, helping a human operator (eg: me) tweak it to stay within spec.

Longer term, maybe such a mode of feedback could be used within a digitally-controlled regulator of some sort with the 15V brick, that could simply try to keep the voltage reasonably within the window, rather than trying to track something precise; the voltage would certainly still oscillate, but between acceptable levels. Hopefully the ripple wouldn't be a big deal for the chips.
 
(I had been going to post one big reply but it looked too huge so I'm splitting it instead )
blueroomelectronics said:
If all you're trying to do is build a PIC programmer with a 13V HV section and you want to run it with a simple power supply I think I solved the 5V to 13V problem fairly elegantly. Take a look at the Inchworm or Inchworm+ PIC ICD2 on my site.
Hmm, thanks for the suggestion! Eh, looking at the docs I found, it sounds like you're talking about deriving it from the 232 chips. Conveniently the PC interface module of my programmer does use an SP232, but back when I checked the output levels of the voltage doubler pins, they were IIRC quite a bit lower than spec (this might have been when I tested it in the breadboard, which I guess would mess it up a bit). Other than that, the problem isn't really one of getting a voltage of over 13V as that other brick I have does deliver at least that much, but it's nothing very specific I can rely on without regulation, and probably not enough to be able to use normal regulation very easily. I could probably figure something out later-on, or just buy more parts when I've actual spare cash.

BTW, some very nice-sounding kits there, and real pretty CAD models of them too! Shame it seemed like the website menu used Javascript links though, some of us like to use "open in new window" *nudge nudge* Otherwise a really cool site!
 
kchriste said:
Microchip specs the VPP voltage to be a minimum of Vdd + 3.5 (8.5V) and a max of 13.5V so you do have some leeway.
*Nod* I know some of the chips have Vdd+3.5 listed as the minimum, conveniently including one of the first chips I'll want to program, the 12F6; unfortunately all the others I have list it as just 12.5 to 13.5. Could it be that the Vdd+3.5V actually does apply to all the Flash chips regardless of what the individual datasheets claim, a bit like how they like to say that certain opcodes are deprecated even where they work? But anyhow yeah, I figured I could make use of at least a 1V window.
kchriste said:
Just make sure you don't exceed 14V
Hmm. Does that mean this is like a particular "stuff blowing up" type threshold whereas the usual 13.5V isn't such a big deal?
kchriste said:
Aim for 13V on Vpp when programming.
Yeah, that was my general intent on picking things like 13.3V and 13.4V: The programmer still has to switch the Vpp on and off, so I try to accommodate for a little bit of voltage drop that way.
kchriste said:
As a second solution, have you considered using low voltage programming?
First chip I tried, in the first programmer I built (not my own design and didn't work for me) was using LVP, as it made sense that I could more easily test it out without having to worry about the 13V. But the chip's peculiarities meant it made sense for me to mount it on its own board with fancy bypassing and so on; it's quite possible that the programming failed because that board was messed up somehow (or that any of the various other factors could have played a part, including the chip itself maybe being b0rken) so I don't really trust that chip so much and would rather try one of the simpler ones first. All things considered, the 12F6 sounds the safest bet in that regard
 

Many of the 'FLASH' PIC's are actually EEPROM anyway, and not FLASH (just a marketing ploy following the lead of ATMEL who started calling their EEPROM devices FLASH years ago).

Personally I would ignore any +3.5V claims (as it's much too restrictive), and aim for 13V like most programmers do.
 
Optikon said:
All good meters turn themselves off during inactivity. The cheap ones will run down the batteries. Since the user saved money on a cheap meter, he has plenty leftover to buy more batteries.

I bought a cheapy DMM recently for 6.5 US $ it has the same features which my very expensive Digital Clamp/Volt meter have also it has automatically turn off feature too.Accuracy quite enough but dunno how lung it will stay with me
 
Use two 9V alkaline batteries in series and an LM317 voltage regulator adjusted for an output ov 13V. The current (only 0.5mA?) is very low and the batteries will last for years.

The voltage regulator IC doesn't oscillate. its output voltage is solid.
 
the max232 (and clones) is a pretty versatile chip. I've seen it used for this sort of thing in a number of places. I've also seen it used in ultrasonic applications where it helps to drive the transmitter at a much higher voltage (and thus power).

What is the concern about oscillation of a linear vreg? low load?
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…