Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. My Project
  3. Voltage divider resistors - using different resistor values

Voltage divider resistors - using different resistor values

Scheduled Pinned Locked Moved My Project
battery
2 Posts 2 Posters 51 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mitchdes
    wrote on last edited by
    #1

    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

    mfalkviddM 1 Reply Last reply
    0
    • M mitchdes

      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

      mfalkviddM Offline
      mfalkviddM Offline
      mfalkvidd
      Mod
      wrote on last edited by
      #2

      Welcome to the forum @mitchdes

      Yes, you are correct.

      1 Reply Last reply
      1
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      20

      Online

      11.7k

      Users

      11.2k

      Topics

      113.1k

      Posts


      Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • MySensors
      • OpenHardware.io
      • Categories
      • Recent
      • Tags
      • Popular