OpenEVSE / openevse_esp32_firmware

OpenEVSE V4 WiFi gateway using ESP32
167 stars 110 forks source link

Temperature monitoring and throttling on ESP32 #331

Open chris1howell opened 2 years ago

chris1howell commented 2 years ago

Move temperature monitoring and throttling responsibility from OpenEVSE controller to ESP32 leaving the OpenEVSE controller only monitoring for emergency shutdown at 72C.

The temperature monitoring and throttling feature on the OpenEVSE controller is not very granular 50% or 100%, and the notification is in RED and causes many support requests. The ESP32 has much more horsepower and can finely adjust current in 1A increments to get the maximum power possible for a given limit temperature.

Implement monitoring and control in ESP32 with user adjustable point between disabled or 60C to 70C, default set to enabled at 65C. Let ESP32 increase/decrease current in 1A increments, to maintain the set MAX temperature. Similar to a PID loop or 3D printer heating element.

Provide a softer message to inform user of throttling while charging at normal color (not RED). Suggestion - Temp 65.0C @ 98% Provide message on screen after charging to inform of throttling during session. Suggestion. Max throttle 2%

chris1howell commented 1 year ago

Minimum temperature to begin charging - Additional feature to support very low temperatures and auxiliary heater.

Allow user to enable/disable /set a minimum temperature to begin charging. Range of -20C to 10C. Default at -20C.

chris1howell commented 1 year ago

@KipK - This seems similar to the limit Engine you just did for limit timers. Do you think this is something you could tackle?

KipK commented 1 year ago

@chris1howell, I guess this is something that could fit directly in the current shaper module. Do we have some simple pid or temporal algo on the table for throttling with temperature ?

edit: also do we have a chart of the growing temperature & current / time ? What would be the default setpoint temperature to start throttling, and the max temperature to disable evse ?

chris1howell commented 1 year ago

@KipK The PID algo can likely be very simple. This library may a bit more than we need but may be useful. https://github.com/br3ttb/Arduino-PID-Library/

The OpenEVSE controller currently shuts down at 72C. It will set pilot to 50% if 65C is reached. If the temperature declines it will then resume 100% once the temperature drops below 62C. With the ESP32/shaper controlling more it makes sense to only leave the emergency shutdown handled by the OpenEVSE controller.

Here are some graphs of current and temperature. https://openev.freshdesk.com/en/support/solutions/articles/6000248724-openevse-charges-vehicle-fully-but-displays-temperature-warning

Default temperature to begin throttling and attempt to maintain should be 65, however we may want to allow the user to select from 60C to 70C.

Shaper should disable below -20C and above 71.5C and the OpenEVSE controller can keep the emergency shutdown at 72C.

KipK commented 1 year ago

hi @chris1howell ,

I was about check that, but I see the ESP32 T° sensor is always way above lcd T) sensor ( it can be at 38°C while it's 10°C outside ) I think it takes the heat from the ESP through the PCB ( I have tried to revert the pcb position to let the esp32 chip at the top but it doesn't change much )

Here is a graph comparing booth sensor until for unknown reason yet , the t° sensor of my lcd stopped reporting so booth T° data merged to the esp32 one.

331557780_761555805360327_2816719198706157626_n

That happened when I've flashed my openevse module with a custom compiled fw, perhaps I have forgot a flag but I don't see which one.

chris1howell commented 1 year ago

You are correct, The WiFi sensor (Temp 4) runs warmer due to its own heat. I ran a test with an external sensor just to verify.

The current version of temperature monitoring/Throttling/shutdown on the OpenEVSE controller only uses Temp1 (retired RTC chip on LCD) or Temp2 Dedicated sensor on LCD. We could use Temp 4 but we would need to add a conversion factor to compensate for the additional heat from the WiFi.

I would suggest using Temp 2 as the primary, as this is what the controller will also use for emergency shut down.

For configurations without a display/temp2, then use Temp 4 with offset. Note the controller will not emergency shutdown in this configuration so we may need logic to shut down if temp runs away.

On Wed, Mar 22, 2023 at 8:35 AM Guillaume S @.***> wrote:

hi @chris1howell https://github.com/chris1howell ,

I was about check that, but I see the ESP32 T° sensor is always way above lcd T) sensor ( it can be at 38°C while it's 10°C outside ) I think it takes the heat from the ESP through the PCB ( I have tried to revert the pcb position to let the esp32 chip at the top but it doesn't change much )

Here is a graph comparing booth sensor until for unknown reason yet , the t° sensor of my lcd stopped reporting so booth T° data merged to the esp32 one.

[image: 331557780_761555805360327_2816719198706157626_n] https://user-images.githubusercontent.com/488789/226906033-8d98c932-887f-46a6-9642-9b5101465f0b.png

That happened when I've flashed my openevse module with a custom compiled fw, perhaps I have forgot a flag but I don't see which one.

— Reply to this email directly, view it on GitHub https://github.com/OpenEVSE/ESP32_WiFi_V4.x/issues/331#issuecomment-1479495611, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAN5QH2UGLEAHI6OK7BX36TW5LWXLANCNFSM5RAI2KZQ . You are receiving this because you were mentioned.Message ID: @.***>

KipK commented 1 year ago

I'm afraid I won't be able for now to check this, my temp sensor on the lcd seems either dead or not detected , I haven't tried yet to fallback the fw ) . Will have to figure out this first.

Also the temp difference between esp sensor and other one is not linear, looks more exponential.

chris1howell commented 1 year ago

Send me a PM to chris {dot} howell at openevse {dot} com , I will send you some extra hardware for development.

On Wed, Mar 22, 2023 at 11:40 AM Guillaume S @.***> wrote:

I'm afraid I won't be able for now to check this, my temp sensor on the lcd seems either dead or not detected , I haven't tried yet to fallback the fw ) . Will have to figure out this first.

— Reply to this email directly, view it on GitHub https://github.com/OpenEVSE/ESP32_WiFi_V4.x/issues/331#issuecomment-1479801098, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAN5QH4XZRQI7LEXAX5QQCLW5MMNRANCNFSM5RAI2KZQ . You are receiving this because you were mentioned.Message ID: @.***>

KipK commented 1 year ago

I got my sensor back, it was probably deactivated on the fw, after making a new one