Hi Darrel
Pretty cool, I really like your wiring savvy. It sure gets rid of a lot of components. Thanks for pointing that out to me. I'll give it a try today and see how it works out.
Thanks
jessey
Hi Darrel
Pretty cool, I really like your wiring savvy. It sure gets rid of a lot of components. Thanks for pointing that out to me. I'll give it a try today and see how it works out.
Thanks
jessey
Hi Darrel
Your re-wiring of my schematics solved all my problems ....... good show. It now maintains the 4.99 vdc in either power mode. I thought I would have to change the code that I have to read the battery voltage but when I adjusted the LM336BZ-5 reference chip to output 4.30V it worked out perfectly to display the actual battery voltage. Another thing I noticed is that when I was using the two voltage regulators in my circuit and running the circuit on batteries & only when the micro was in the sleep mode and the milliamp draw was at about .126mA to .235 mA then the circuit battery voltage output of the MIC2954-03BZ would fluctuate from about 5.21 vdc up to as high as 5.43 vdc but now it maintains the proper 4.99 vdc in sleep as well, which is great. Any ideas what could have been causing that?
Another question if you have the time, the reason I'm monitoring the battery voltage is so I can have a low battery alarm sound when the battery voltage drops to a certain level that is user programmable with push buttons, if that's an accepted way of doing it. I have it all coded and working good for the 4 AA batteries and it seems to be functioning great.
My thoughts were that the user could switch to a different voltage rated battery other than just being limited to using the mains (TX) or the 4 double AA batteries to operate the circuit. Possibly to be able to switch to use a 6 or 12 volt deep cycle battery as well for remote areas. I was thinking I could have the code set up for two different receptacles, one to plug in the 4 AA batteries and another one for either a 6 or 12 volt deep cycle battery. Whichever battery that was plugged in first would disable the other receptacle and automatically configure the proper set level and voltage divider for that battery. Doable anyway, and I'm sure I could write code for that easily from what I've learned so far with picbasic pro.
I haven't read any discussions on doing this and this is my first attempt at a battery operated circuit so I'm a little in the dark on this one. Does the voltage level alone determine when to change the batteries or battery, or is it the remaining amperage level of the batteries that determines when to change them, or is it a combination of both? I've read in the archives that there are voltage regulators that have a low battery alarm built into the chip that outputs a low signal when the battery level gets low but no discussions on how to do a home brew of it or how it determines that the battery is getting too low to operate the circuit? I've heard of load testing an automotive battery but am not sure how the procedure works or if it would apply to pic circuits in any modified form? Would you have any ideas or suggestions that could get me started or pointed in the right direction to accomplishing this or would I be better off just using a regulator with a built in alarm?
Thanks
jessey
WooHoo, that's great.
That's odd about the voltage in sleep mode. The only thing I can see is the voltage divider coming from the battery. If RC4 were set to input when going to sleep, it would leave just a 10K resistor between the batteries and RA1. Since the battery voltage is higher than VDD, it would conduct through the protection diodes of the RA1 pin to VDD. With 10K and 6V you could easily push 100uA or more thru that way. With the pic in sleep mode it will draw less current than is flowing thru the diode, causing VDD to rise.
However, I don't see any reason why it shouldn't still be doing that. Like I said ... That's odd.
Added: Unless the battery voltage has dropped to a point where it's not pushing as much current thru the diode??
... there are voltage regulators that have a low battery alarm built into the chip ...
The MIC2954-08BM is similar to what you're using but also has an ERROR output that goes low when the output voltage drops below it's regulation point. But its an 8-pin SOP package, so it may not be the best choice if you're making a through hole board.
About the dead battery detection, hopefully somebody else here can answer that one. I don't know enough about them.
Last edited by Darrel Taylor; - 16th August 2005 at 11:21.
DT
Ha ha!
I just scrolled up and looked at the schematic again. And if you actually wired it that way, then it makes sense now.
I put the voltage sense on VDD instead of the batteries. That way there's no leakage through the diodes. And, since you have a reference that is independant of VDD you should be able to tell when the batteries are too low to hold the regulation point. But, my previous explanation is probably what was happening before.
What a memory, NOT!
Darrel
Bookmarks