I'm going make a battery monitor circuit (below, not my design) I want to be able to detect 3.41v
Apparently this circuit will allow the voltage to rise at the A/D pin as the battery voltage drops and allows me to turn it on/off
Anyone got any suggestions on the diode to use to give best performance under various temperatures, also anyone any idea what sort of fluctuation I will get due to temperature etc.
I'm going make a battery monitor circuit (below, not my design) I want to be able to detect 3.41v
Apparently this circuit will allow the voltage to rise at the A/D pin as the battery voltage drops and allows me to turn it on/off
Anyone got any suggestions on the diode to use to give best performance under various temperatures, also anyone any idea what sort of fluctuation I will get due to temperature etc.
Your question is a bit confusing?, are you wanting to monitor the supply voltage to the PIC?.
I would suggest using an external precision reference for the A2D (see my PIC analogue tutorial for details). With the reference accurately fixed the A2D input can simply be connected to the Vdd supply by a simple resistive attenuator, allowing you to monitor the Vdd voltage.
I don't think it will allow the voltage to rise as the battery voltage drops.
If you are using the Vcc as the reference voltage then it may allow the reading to rise. Wearing smaller shoes doesn't make you feet get bigger, although it might feel like it does.
First, let me clarify what I'm trying to do, I want to monitor the battery supply to my project, all components are supplied by the same battery.
I normally use what I term "black box" electronics only becuase I'm not very good at electronics :lol:
When I say "black box" I mean IC's that have defined functions and I/O so I know what I'm getting like a "TL7701 voltage supervisor" I was going to use this in my design but I then started to think is there a simpler /cheaper / less space way, hence finding the circuit.
The other forum are saying replace the diode with a TL431 voltage ref and a 1k resistor and this will work better (or maybe even work at all!!)
I might just go back to the TL7701 as I'm loosing it :cry:
You should be OK then, use the TL341 as an external 2.5V reference (as my tutorial does) and connect one of the A2D inputs to Vdd via a potential divider. You can then measure the supply voltage and act accordingly.
I was originally going to use a TLC7701 but I wanted to save space on my board, however I am worried about accuracy, when you read about monitoring voltages it look like a black art
Do you think your suggestion will suffice with what is a 5% voltage difference or is the TLC7701 going to give me waht I'm looking for?
I was originally going to use a TLC7701 but I wanted to save space on my board, however I am worried about accuracy, when you read about monitoring voltages it look like a black art
Do you think your suggestion will suffice with what is a 5% voltage difference or is the TLC7701 going to give me waht I'm looking for?
Being a complete newb, I started looking at this and I think it might do what I want? it's small, I think it fulfils my 5% criteria, I have some already and it's almost understandable (for me that is)
The only problem is all the other voltage comparators when used as a voltage monitor show a potential divider on the spec sheet with info on what to do, however, this one does not, therefore I’m lost and need help again.
1) Will this do as my battery monitor
2) Can I simply use a potential divider to create the threshold voltage
3) If the answer is yes to the above, is there anything else I should be aware of with this device?
Thanks again.
P.S. Sorry for not mentioning this before but I didn't realise what this little IC was and how usefull it was.
The only problem is all the other voltage comparators when used as a voltage monitor show a potential divider on the spec sheet with info on what to do, however, this one does not, therefore I’m lost and need help again.
No, you would be comparing two similar changing values - your reference MUST stay constant - so you could use a TL341 as the reference for it. But again, it means adding an extra IC, when you already have the PIC that is perfectly suited for the job (you've nevermentioned what PIC it was, I presume it's got A2D inputs as your diagram shows?).
The MCU is an AVR Atmega128 not a PIC (Diag. was someone else) so yes it's got A2D and finally I will stop messaging around and go with the TL431 as you suggested.
The problem with electronics is there is always another way to do the job.
The MCU is an AVR Atmega128 not a PIC (Diag. was someone else) so yes it's got A2D and finally I will stop messaging around and go with the TL431 as you suggested.
Sorry for long delay, I have now come to the point where I need to implement this voltage detector and have more problems!!!
I managed to read the voltage at ADC0 pin 61 of the Atmega128 I didn't need an external VREF after all as the M128 has a internal 2.56v VREF. So reading the voltage works fine simply a voltage divider.
However, when I go into low power mode and I turn off the M128 (using a ATtiny13 controlling the REG) I had managed to get the current down to 1.8ua. With the voltage divider attached it draws way too much current, I tried conecting the GND side to a M128 pin hoping this would solve it (as I thought it was not being driven low when off) but still too much current is being drawn.
It even draws too much current when I disconect it from GND altogether! I think it's sinking current via the ADC pin!!! (I know it's the voltage divider thats drawing current by simple disconetcing it from +v and the current drops again)
Anyone any suggestions how I can turn off a voltage divider.
Simply use higher value resistors in the potential divider?, but you need to consult the datasheet to see how much current it might need.
Or, you could try using an I/O to feed the top of the potential divider, switch that pin LOW (or as an input) before calling sleep. Even fed from an I/O pin it should still function perfectly as a battery voltage monitor. With this method you could also only check the battery periodically, saving the current drain of the divider except for when you actually test.
Yes, but the output voltage of the pin is directly proportional to the supply voltage - and not 'minus' the voltage drop due to the divider, but 'divided' by the ratio of the divider (hence it's name).
The MCU is running of a 3.3v reg, not sure if this was or was not stated earlier but it is the case now. I have increased R1/R2 to 2m and the current is now nicley down to 3.8ua when off, also the voltage reading looks good (not sure if this will change with time / temp but when the actual voltage is 3.81 I get 3.8192 and this accuracy good when I change the voltage up and down.
So with your help it looks like this part is done.