0
\$\begingroup\$

I'm trying to monitor a battery that is unrelated to my ESP32. The battery powers my gate and the ESP32 is powered by POE. The battery is a 12v battery. I am using a voltage divider and the ADC to periodically check the voltage and report it. Attached is my circuit (Pin 1 is ground on the ESP32). Is it ok to connect the grounds of the ESP32 and the battery together? I know I need to be reading the voltage in reference to ground but was worried the two different grounds will cause an issue.

schematic

Edit to add POE device:

enter image description here

\$\endgroup\$
2
  • \$\begingroup\$ It depends on your PoE PD implementation. Do you have a schematic or specs how the PoE PD is implemented? \$\endgroup\$
    – Justme
    Commented Sep 9, 2023 at 17:34
  • \$\begingroup\$ I just attached a schematic of the POE device to my question. It's a TTGO ESP32 POE \$\endgroup\$
    – Paul B
    Commented Sep 9, 2023 at 17:58

1 Answer 1

1
\$\begingroup\$

The PoE PD is correctly isolated from MCU ground.

And you must connect MCU ground to battery negative to measure battery voltage with MCU.

So whether or not that is a problem, depends on what external connections your system has to other systems.

And the USB-C input is not compliant with USB specs - no compliant Type-C supply will ever provide any voltage to this design (except an USB cable with Type-A to Type-C plugs which has no choise).

\$\endgroup\$
3
  • \$\begingroup\$ All the other connections are to the control board fed by the battery so I think I should be good. Thanks for your reply. Out of curiosity, where are you seeing that the PD is isolated from the ground? Also, I'm not understanding about the USB-C input. The manual on the device states it can be used to power the device and also upload the code to the MCU. Once it is in place in my setup, the USB-C won't be connected. \$\endgroup\$
    – Paul B
    Commented Sep 9, 2023 at 21:28
  • \$\begingroup\$ I think I'm seeing what you're talking about now with the ground. Looks like the POE PD has the grounds labeled as Vss and the MCU is GND \$\endgroup\$
    – Paul B
    Commented Sep 9, 2023 at 21:33
  • \$\begingroup\$ Disregard the USB-C input being used for uploading code. That's not correct and I can see the data lines on the connector aren't connected. There's a separate board that connects for uploading code \$\endgroup\$
    – Paul B
    Commented Sep 9, 2023 at 21:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.