Go Down

Topic: Use imput pullup and 10k res to read voltage on ce pin (nrf24l01) reason not to? (Read 418 times) previous topic - next topic


Hello all!
If you have used nrf24l01 with any smaller mcu, attiny 13 in my case.
You know the pin count are really limited, So last night i got a idea how to squeeze in battery monitoring without using any more pins and this morning i tried it,
using a 10k resistor from the pin controlling CE to gnd and then temporarily changing the pin from output to input and turning on input pullup and then taking a ADC reading (ADC set to internal) and then calculating the voltage from that. And its working, you have to calibrate if you change mcu but other then that it appears to be working perfect.

Now for the question is there anything I'm missing that will come back and bite me later?
(I haven't found anything abut using the pullups like this on google...)
I plan to use this in a attiny13 nrf sensor that i hope will last 2 years+ on batteries would be a bummer if it stops working because i messed this small part up.
i can live without battery monitoring if i have to.

Go Up