Hi everyone. It's been about 5 years since I've been on here. I need a bit of guidance with FVRSETUP etc.
Here's the project: a simple clap switch (works fine) based on an 08m2. It's run off a 4.2V Li-ion battery, and I'd like to keep an eye on the battery voltage, so I can alert if the battery drops too low, say to 3.0V.
I've searched a few threads here on FVRSETUP but to be honest I'm still confused! I have an 18K / 18K (1%) resistor voltage divider from the battery positive to ground, with pin c.1 reading the voltage halfway.
I understand that if I simply read that voltage, I'll get a value about 512 steps (halfway to 1024). Even as the battery voltage drops, the ADC will quite happily report that it's getting 512 steps (thank you very much )
So, using FVRSETUP and triggering a 2.048V reference, I should be able to compare it somehow to say at battery voltage = 4.2V, I'm reading 512 steps (say) at c.1, which I can do some maths to convert to 2.1V. If the battery drops to 3.5V, I guess I should be able to trigger the FVR somehow and compare, then some maths to actually give me the 3.5V.
It might be because I'm nearly 50 and my mind isn't as sharp as it usually to be, but I just seem to have a real mental block with this one.
Can someone please help?
Barney
Here's the project: a simple clap switch (works fine) based on an 08m2. It's run off a 4.2V Li-ion battery, and I'd like to keep an eye on the battery voltage, so I can alert if the battery drops too low, say to 3.0V.
I've searched a few threads here on FVRSETUP but to be honest I'm still confused! I have an 18K / 18K (1%) resistor voltage divider from the battery positive to ground, with pin c.1 reading the voltage halfway.
I understand that if I simply read that voltage, I'll get a value about 512 steps (halfway to 1024). Even as the battery voltage drops, the ADC will quite happily report that it's getting 512 steps (thank you very much )
So, using FVRSETUP and triggering a 2.048V reference, I should be able to compare it somehow to say at battery voltage = 4.2V, I'm reading 512 steps (say) at c.1, which I can do some maths to convert to 2.1V. If the battery drops to 3.5V, I guess I should be able to trigger the FVR somehow and compare, then some maths to actually give me the 3.5V.
It might be because I'm nearly 50 and my mind isn't as sharp as it usually to be, but I just seem to have a real mental block with this one.
Can someone please help?
Barney