Voltage divider resistors - using different resistor values
-
Hi everyone - Okay this is my first time with mysensors and really excited to get started. I’ve built a gateway with an ESP which seems to be working fine. It’s recognised in the Mozilla Webthings controller and the serial output all seems okay.
I am making a sensor test board with which i can try out different sensors before building into standalone devices and just needing a bit of help with measuring the battery voltage using a voltage divider. The mysensors sketch uses a 1m and 470k resistors for the voltage divider.
My issue is that I only have a 1m resistor and a 480k rather than the 470k and want to know if the sketch can be modified to work with this 480k resistor.
My sensor will be powered with a single 18560 cell as I have lots freely available and boosted to 5v for my mini pro (again because i have quite a few of these). So max battery voltage will be 4.2v and minimum voltage around 2.7v.
Divider using 470k resistor: 1.343v (Vbatt=4.2v) and 0.863v (Vbatt=2.7v)
Divider using 480k resistor: 1.362v (Vbat=4.2v) and 0.876v (Vbatt=2.7v)Is as simple as altering the math in the sketch to account for the different readings?
Thanks
-
Hi everyone - Okay this is my first time with mysensors and really excited to get started. I’ve built a gateway with an ESP which seems to be working fine. It’s recognised in the Mozilla Webthings controller and the serial output all seems okay.
I am making a sensor test board with which i can try out different sensors before building into standalone devices and just needing a bit of help with measuring the battery voltage using a voltage divider. The mysensors sketch uses a 1m and 470k resistors for the voltage divider.
My issue is that I only have a 1m resistor and a 480k rather than the 470k and want to know if the sketch can be modified to work with this 480k resistor.
My sensor will be powered with a single 18560 cell as I have lots freely available and boosted to 5v for my mini pro (again because i have quite a few of these). So max battery voltage will be 4.2v and minimum voltage around 2.7v.
Divider using 470k resistor: 1.343v (Vbatt=4.2v) and 0.863v (Vbatt=2.7v)
Divider using 480k resistor: 1.362v (Vbat=4.2v) and 0.876v (Vbatt=2.7v)Is as simple as altering the math in the sketch to account for the different readings?
Thanks
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login