Using ESP-PoE to power devices over USB?

Started by anicolao, April 06, 2025, 06:21:12 AM

Previous topic - Next topic

anicolao

I had thought that since there was no isolation between the PoE power supply and the USB connector that I could plug in a device and power it over USB from the ESP-PoE side.

This does not seem to work ... is this possible, and if it is what is the power budget that I have to work with, given that I am providing power with a 48V 0.5A PoE injector?

LubOlimex

There is no way to power from the USB, it is only input. The USB interface is just USB device. It lacks the hardware to be configured as USB host.

But this is the safe approach, power all hardware off the ESP32-POE to avoid multiple grounds and damage.

You can use +5V pin from the EXT1 header to power your target.
Technical support and documentation manager at Olimex

anicolao

It turns out that the 5V headers do not supply enough voltage/current to power the target, which is a Raspberry Pi 4B. It seems the Pi wants at least 2.5A and on the schematic it's indicated that it is 5V/2A maximum.

Instead, I plan to power both devices from the same PoE switch, which I believe ought to be safe as my expectation is that the PoE switch will provide a single ground reference to all devices. The Pi PoE hat does provide isolation but that shouldn't pose a problem as far as I can see.

LubOlimex

The ESP32-POE safe threshold is 3W up to 600mA @ 5V. 2.5A at 5V is a lot. Even ESP32-POE2 won't do the job, it is up to 1.5A at 5V(https://www.olimex.com/Products/IoT/ESP32/ESP32-POE2/open-source-hardware).

To be on the safe side measure the voltage difference between grounds before connecting the two sides together. Aka power the RPi, power the ESP32-POE, before connecting RPi to ESP32-POE measure voltage between GND of RPI and ESP32-POE.
Technical support and documentation manager at Olimex

anicolao

Quote from: LubOlimex on April 07, 2025, 12:40:41 PMTo be on the safe side measure the voltage difference between grounds before connecting the two sides together. Aka power the RPi, power the ESP32-POE, before connecting RPi to ESP32-POE measure voltage between GND of RPI and ESP32-POE.

Well that seems either paranoid or very wise, I am not sure which. No need to debate it: I will do that, as it's so easy and should ensure that I am not making a mistake.

anicolao

Quote from: LubOlimex on April 07, 2025, 12:40:41 PM2.5A at 5V is a lot.

So much so that I didn't believe it until I saw it fail to work.

anicolao

So my good meter isn't accessible right now, and I used a potentially dodgy multimeter I bought in high school to measure the ground to ground voltage between the two devices powered from the same PoE switch. The meter (set to 20V DC) showed a voltage that declined down to 0 ... not clear what it was measuring, perhaps RMS. I wasn't expecting an AC signal so it didn't occur to me to switch the meter to AC. But I was concerned enough to pull out the big guns and connect it to the oscilloscope:



Needless to say this did not look good to me. While I was there, I connected across the 5V to ground pins that I had previously failed to power the Pi from, and discovered that there were only about 1-2V available:



So at that point, I got my IND-PoE version but the ground-to-ground waveform was the same:



At least on this device, the 5V pin actually has 5V on it:



So now really the question is why the ground reference isn't the same across the two PoE ports...

LubOlimex

Honestly in the hardware setup I would play it safe and I wouldn't recommend using ESP32-PoE in that setup at all. Even if there is slight voltage difference a lot of power would go trough the boards. I recommend getting ESP32-POE-ISO, with the ESP32-POE something might get damaged eventually even if you use the same power supply for both. ESP32-POE is only safe to be used with one source of power, anything with own power supply connected to it is a hazard.

Even when you use ESP32-POE-ISO, it is again good practice to first connect the grounds before connecting the rest of the signals.
Technical support and documentation manager at Olimex

anicolao

For now, I will deploy the gateway device instead of the PoE device, since I can power it from the Pi4 which is acting as my development computer. These devices literally are getting deployed in the field — at a local farm — but the software isn't read so I'll be working on it from the Pi for the season.

Next year, I can swap out the base station for the PoE base station and retrieve the Pi.

So in practical terms, I have a reasonable plan in place.

However I still confess myself mystified as to why there is a 60V peak to peak potential between the grounds of two devices that are powered by the same PoE switch. The best guess is what a friend came up with, that somehow the PoE power is being delivered out of phase on the various ports. However even that doesn't quite add up since it doesn't seem to matter which ports I power the devices with.

Understanding exactly what's happening here would be worthwhile, it's just that right now I don't even have a theory.

Since long term I don't need both devices, I don't want to make the farm pay for the (much more expensive) ISO devices that won't need isolating.

anicolao

Also, surely the 2V on the 5V pin is a fault in the plain PoE board. Are there debugging steps for that?

LubOlimex

First check if it stays 2V with different ways of powering (e.g. POE, USB, Li-Po battery). Also check the 3.3V pad - is there 3.3V.

But generally start from the 5V pad that you measure and then track backwards from the schematic:

https://github.com/OLIMEX/ESP32-POE/blob/master/HARDWARE/ESP32-PoE-hardware-revision-L1/ESP32-PoE_Rev_L1.pdf

Major parts that might have been damaged are U5 and U2.
Technical support and documentation manager at Olimex