and lastly,
i want to use a 9v battery to power the system. I want to add a led to signal when the battery need to be changed. would you know at what voltage this would be ?
and lastly,
i want to use a 9v battery to power the system. I want to add a led to signal when the battery need to be changed. would you know at what voltage this would be ?
It will depend wich regulator you use and wich voltage your PIC run.
For battery operated device i will suggest a LDO regulator instead of those grandpa 7805.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
For one thing, I don't know what your system is made of (I know bits and pieces, that's it, not the whole thing). And another thing, a 9v battery would be dead in a short matter of days running this system, especially if you're using a linear regulator (7805 type), even if you set it up to spend most of it's time sleeping and only waking up like once a minute or so.
Better idea would be to go with a 4 cell (AAA or AA, doesn't matter) NiMH pack and skip the regulators altogether, then charge it up for about 12 hours using a 9v wall wart and an inline 200-ish ohm series resistor (less resistor = quicker charge at the expense of battery life). 4 2000mAh NiMH batteries would last a LOT longer than a 9v battery.
But if you insist on a 9v battery, I'd hook it up to an unused A/D input thru a voltage divider consisting of 2 equal resistors. Get the A/D input working and displaying correctly, then turn on the 'change battery' light at about 6.5v. Anything below that and the regulator won't regulate (if you're using a 7805 type).
ok so i guess I will chucking those LM7805 out of th house...
I have four 2300 nimh AA for my digital camera, guess I could use those for now, not need for voltage regulator right, just want to double check .
but with this setup , how would I have a regulated voltage to compare the batteries voltage, , How would I implement my blinking led for low voltage ?
What are the implications is the unit's power runs out? (might help to figure that bit out if I knew how badly the unit had to stay powered up).
How about this? Use a 2.5v reference chip from Microchip, MCP1525. Use that as Vref+ for an A/D input on the PIC. Take your battery pack, put a v-divider on it, say 2:1 ratio, 10K & 10K, or whatever, pluck the signal off the middle of that, read that to an A/D channel, and presto...instant voltage reading...with some math of course.
Ground on Vref-, 2.5v (from MCP1525) on Vref+.
Batt+ to one side of 40K resistor, Batt- to one side of 10K resistor. Other 2 ends of resistor connected together and fed to A/D input (say AN0 for example).
Do a read on AN0 A/D input. I forget what PIC you're using, but say it has a 10 bit A/D converter. That means that your 10 bit A/D converter would have a resolution (based on the 2.5v Vref+) of 2.44xxx mV. Since the voltage going into the converter is divided by 2, the real resolution of the total voltage across the battery is 4.8828125mV.
If you're project doesn't drain much current, you could probably run it down to about 3.6v (.9v/cell). So, while reading the A/D, your reading is going down. When it hits 737 (737 x .0048828125 = 3.598v), turn on the low battery light. Actually, you'll probably want the light on sooner to give yourself some time to get them charged up. And the MCP1525 comes in TO-92 & SOT-23 packages. Easy to use.
Last edited by skimask; - 31st December 2006 at 03:27.
my father cuts meat and has a cold room in the garage, This unit is wireless receiver that will give him the temperature. It is not crucial if there is a downtime to charge the battery, (or a downtime of a few hours if the compressot breaks down) but at least a warning that they are running low.
The transmitter is in the room and it's wireless/battery powered? And the receiver is elsewhere, plugged into the wall or something?
Ya know for that matter, you could (and probably are but I'm not sure), transmit the transmitter's battery voltage along with temperature data to the receiver.
nope, the transmitter is in the garage, pluged into the wall, there is a 40 feet line runnin gfrom the sending module to the sensor, becasue the sensor is inside the fridge. This part is done, I installed the module up high inthe garage with the antenna sticking out, it is a straight line to the house. The receiving module is wireless, so he cantake it in his room or the kitchen etc..
Bookmarks