hutscape / capsicum

🫑 Retrofit a wired doorbell to add WiFi and make it connected 🔔
https://hutscape.com/capsicum
2 stars 0 forks source link

Battery measurement circuit does not work #6

Closed sayanee closed 4 months ago

sayanee commented 7 months ago

Describe the bug GPIO6, the BATT_EN is always 0V and the MOSFET Q1 is never turned ON.

image

To Reproduce Steps to reproduce the behavior:

  1. Ensure the bodge is applied #5
  2. Upload the measure-battery-level.ino firmware to the board
  3. Measure GPIO6 voltage with multimeter
  4. See that the voltage at that pin does not change

Expected behavior The voltage measured at GPIO6 should change every 2 seconds to turn on and off the MOSFET so that GPIO0 can measure the analog level.

Actual behavior The voltage measured at GPIO6 is always at 0V.

Versions (please complete the following information):

Additional context

The Falstad simulation works!

image

TODO

Bodge this issue and #5 to release new Gerbers and version.

sayanee commented 4 months ago

ADC 4095 is at 2.8V (not 3.3V) [Reference]

sayanee commented 4 months ago

Closed with 61efc72173ea0ea0a2b0cf0940e66e0a65f15c36

Both resistors in the potential divider should be 100k, but used 33k for the unavailability of parts.