Trying to save energy WT32-eth01

arjen1
Posts: 27
Joined: Sun Aug 06, 2023 4:48 pm

Trying to save energy WT32-eth01

Postby arjen1 » Fri Jan 24, 2025 6:48 pm

Dear forum.

Got a WT32-eth01 board. I tried a few examples it works.

I do not need extreme speed, I do need less energy consumption. It now draws on average some 160mA

I read (part) of the datasheets. Lowering the CPU frequency should help and also lowering the LAN speed should help. In theory it can work with ~75mA so I read......

I am using the Arduino IDE, call me old fashioned but I am pretty 'loose' on this piece of software.

I managed to lower the CPU freq from 240MHz to 80 MHz with result of a 120mA draw:

In the setup:

Code: Select all

    // Set the CPU frequency to 80 MHz for consumption optimization
  setCpuFrequencyMhz(80);

  // Print the XTAL crystal frequency
  Serial.print("XTAL Crystal Frequency: ");
  Serial.print(getXtalFrequencyMhz());
  Serial.println(" MHz");

  // Print the CPU frequency
  Serial.print("CPU Frequency: ");
  Serial.print(getCpuFrequencyMhz());
  Serial.println(" MHz");

  // Print the APB bus frequency
  Serial.print("APB Bus Frequency: ");
  Serial.print(getApbFrequency());
  Serial.println(" Hz");
It is possible to set the frequency even lower (I tried 10Mhz, 20, 40), but then (in my case), no communication with LAN was possible anymore.

Next would be to lower he link speed of the LAN8720A chip. It should be possible to lower that speed from 100Mb to 10Mb, and in theory (datasheet) that would roughly half its energy consumption.

However, I do not know how to do this. I found this thread: https://esp32.com/viewtopic.php?t=40956

It says: Try to get Ethernet handler https://github.com/espressif/arduino-es ... ETH.h#L165

But when I click that I am at a loss what to do.

Question 1: Can I use a lower than 80Mhz CPU speed and still maintain network via Ethernet?
Question 2: (Most important for now) How can I set the LAN8720A speed to 10Mb ?

Hope someone can help me....

Thanks

arjen1
Posts: 27
Joined: Sun Aug 06, 2023 4:48 pm

Re: Trying to save energy WT32-eth01

Postby arjen1 » Mon Jan 27, 2025 11:36 pm

UPDATE

I managed to set it to 10M. Done some research. The LAN8720A chip I have is a 'C' version and does not have the anomaly that versions A and B have. I did, however, also tried to set the registers directly.

Now the strange thing is that when i do NOT (re)set it to 10M the current consumption is ~120mA. But when I do set it to 10M -expecting a lower current consumption- it is actually drawing more current, ~160mA.

Very strange behaviour. Could someone shed a light on that?

Thanks.

arjen1
Posts: 27
Joined: Sun Aug 06, 2023 4:48 pm

Re: Trying to save energy WT32-eth01

Postby arjen1 » Tue Jan 28, 2025 10:56 am

Apparently the overall power consumption in 10Base T will increase (dramatically I might say):

From the datasheet of the LAN8720A chip:

Note 5-7 Current measurements do not include power applied to the magnetics or the optional external LEDs.
The Ethernet component current is typically 41mA in 100BASE-TX mode and 100mA in 10BASE-T
mode, independent of the 2.5V or 3.3V supply rail of the transformer.

Who is online

Users browsing this forum: No registered users and 42 guests