esphome-panasonic-ac icon indicating copy to clipboard operation
esphome-panasonic-ac copied to clipboard

External temperature sensor

Open Driekes opened this issue 2 years ago • 55 comments

Is it possible with this board to use an external temperature sensor?

I currently have two TZ models. They have a theoretical lowest power consumption of 200W. However, I have only seen it when the outside temperature is low enough (oddly enough).

E.g. outside 4 degrees, inside 17 degrees, it is able to work on 200W for a sustained period of time. However, when I increase to 18 degrees inside, it shoots up to 380W and starts going on/off continuously and will never get back to 200W consistent use, while the on/off usage results in 300W+ average use. Very strange.

So I was looking into ways to prevent this, not sure if your system has any options in this area?

  • External temperature sensor?
  • Some power up script to gradually increase set temperature to 'help' the system stay within the boundaries?

Driekes avatar Jan 09 '22 12:01 Driekes

There is no pre-made board for this repo, it's just a normal ESP8266 or ESP32 dev board. As such it can do everything an ESP can do through ESPHome: https://esphome.io/

If you want a dedicated board you can check out this: https://github.com/jnicolson/panasonic_ac_wifi

As for the software side:

External temperature sensor

It's possible already but needs to be added either via ESPHome (see https://esphome.io/#sensor-components) or via Home Assistant.

Some power up script to gradually increase set temperature to 'help' the system stay within the boundaries?

Not sure what exactly you need but you can add automation either via ESPHome directly or via Home Assistant, so pretty much anything is possible.

However, when I increase to 18 degrees inside, it shoots up to 380W and starts going on/off continuously

How do you measure the energy usage? The energy measurement inside of the unit is not very precise and is just an estimate.

DomiStyle avatar Jan 10 '22 10:01 DomiStyle

Thanks for the feedback, I don't have too much ESP experience yet, but it is cool to see that this is possible, and remove the dependency of the cloud.

  • External software temperature sensor, I mean using an external sensor to have the air conditioning decide to turn off/on. Now it is using an internal one which is very sensitive to temperature change of the unit itself of course. So not just an external sensor for additional information, but one that is actively used. I know an external thermostat is possible, so thought maybe with this ESP board you can feed an external source to control the AC
  • I will have to dive into ESP possibilities, so that will be another couple of weeks of testing and learning I think :)
  • I measure power with Shelly 2.5PM, so there I see the continuous up and down spikes, which are indeed averaged out in the Pana reporting.

Driekes avatar Jan 10 '22 12:01 Driekes

@DomiStyle does is it mean i can in the esphome yaml file point to a sensor i have in HASS that reads the temperature ? The internal temperature sensor quickly reaches the temperature but the room temperature is not there yet so it would be quite usefull that when the climate device comes into HASS that it can use a different temperature sensor. I see there is current_temperature_sensor , can i set this to sensor.my_temperature <- a sensor in hass ?

donnib avatar Jan 25 '22 10:01 donnib

@donnib I did get an advice online to get into the service menu and set parameter 58 (heatshift) to +3. As far as I understand under normal circumstances when you set the thermostat to 20 degrees, it can go up to 22 and shut down.

With this setting it has a bit more range, up to +5 in total if you set the above setting to +3.

It seems the Panasonic can only run in 200W mode when it is set between 16-18 degrees. So with this setting I can set it to 18 and the effective room temperature will be around 21/22. Due to the longer range it has time to reach 200W consistently.

Your experience may be different, but I hope this helps you as well!

Driekes avatar Jan 25 '22 10:01 Driekes

@Driekes ok that sounds interesting, can you link to where and how you access the service menu ?

donnib avatar Jan 25 '22 10:01 donnib

https://www.manualslib.com/manual/1803115/Panasonic-Cs-Tz20wkew.html?page=123#manual code 58, see the manual for instructions how to operate with the remote.

Driekes avatar Jan 25 '22 10:01 Driekes

@Driekes Thx, i see 3C is max to set and i think it's not enough in my case so using an external sensor would yield better results so i am still insterested in getting an answer on my question from @DomiStyle

donnib avatar Jan 25 '22 11:01 donnib

@donnib default is +2, this gives you +3 extra, so +5. You can try, the behavior of the device on my attic has been great, runs of 200W for hours, instead of continuous on/off (and consuming average of over 300W). Temperature recorded it around 20/21 degrees in the room while set at 16 or 17. Silent ánd energy efficient.

Driekes avatar Jan 25 '22 11:01 Driekes

@Driekes Are you running the "summer house mode" or just normal heat and set to 18C ?

donnib avatar Jan 26 '22 15:01 donnib

Normal heat at 16/17 degrees.

Driekes avatar Jan 26 '22 16:01 Driekes

@donnib Yes, you can use the Home Assistant sensor to get an external temperature sensor into ESPHome: https://esphome.io/components/sensor/homeassistant.html

Of course you have to write the temperature logic yourself.

DomiStyle avatar Jan 26 '22 22:01 DomiStyle

@donnib My current approach is to use a digital potentiometer and put it in parallel (or possibly as replacement at some point of the temperature sensor.). It seems this is a NTC, I just have to find out the curve, so I can set it to a level I need it to be. My skill level is not yet there, so this might take a while. If I succeed, I'll make sure to share the approach.

Driekes avatar May 02 '22 18:05 Driekes

@DomiStyle Just to come back to this topic, as I now understand it a bit better. Is it possible to use an external temp sensor to be used by the Panasonic unit? E.g. the pansonic will no longer use its internal temp sensor, but the external one? This would be simimlar to using a remote controller I guess. This would allow me to control the target temperature and hopefully also prevent on/off behaviour due to build up of heat around the AC.

Driekes avatar May 27 '22 06:05 Driekes

You would have to switch between max and min temperature and heat and cool mode. That should make the AC ignore any internal temperature reading and always heat/cool forever.

DomiStyle avatar May 27 '22 07:05 DomiStyle

How would the max/min work? I currently use manual heat or cool selection.

My main goal is to allow the AC to work in the 200W range continuously and currently that is only possible when heating is set between 16 and 18 degrees, but that is not warm enough.

A bit more detail:

  • E.g. I want to have it 21 degrees, I can set the AC to heat to 21, but if the outside temp is high enough it will continuously go on and off and the minimum power consumption is 400W. I would like to find a situation in which i can have a continuous 200W mode. The only way I currently know is to interfere with the internal sensor creating an offset with a potentiometer, but it would be even better if we can use a (fake) external sensor as input for the AC directly. A lot more elegant :)

And I read that MHI allows this, using the interface that is otherwise use for external (thermostat) control, so that is why I checked here again! I hope my story makes sense.

Driekes avatar May 27 '22 07:05 Driekes

We have changed our hardware design a little to fit a DS18B20 1-Wire Temperature Sensor like this: image

If enough people are interested we could run a small batch with this version. Check https://espthings.io/p11

image

This would fit the same small case we shared here: https://www.espthings.io/index.php/2021/08/03/panasonic-climate-wifi-interface-for-esphome-and-home-assistant/#Enclosure

Features:

DNSK-P11:

  • 100% drop in replacement for the original DNSK-P11 PCB and a perfect fit for the original enclosure!
  • ESP32, so you can also use BLE for location tracking of your phones etc.
  • Status LED
  • Fits the original Panasonic connector, no wire cutting or splicing required!
  • No soldering required
  • Micro-USB terminal for installing the firmware (USB chip for auto-programming)
  • Pre-programmed with a default esphome configuration with Hotspot, captive portal and web server enabled, so you can upload your own config OTA!
  • Optional external temperature sensor
  • Fully tested before shipping!

CZ-TACG1 (for CN-CNT connector):

  • Small footprint, fits inside your unit!
  • ESP32, so you can also use BLE for location tracking of your phones etc.
  • Status LED
  • Custom cable to connect to the CN-CNT connector
  • No soldering required, no need to cut the original wires!
  • Micro-USB terminal for installing the firmware (USB chip for auto-programming)
  • Pre-programmed with a default esphome configuration with Hotspot, captive portal and web server enabled, so you can upload your own config OTA!
  • Option to print or order a great tiny 3D-printable enclosure that exposes the CN-CNT cable and USB-port.
  • Optional external temperature sensor
  • Fully tested before shipping!

Cheers,

Michel

HA-TB303 avatar Jul 23 '22 08:07 HA-TB303

I already bought the existing version, which works excellent, so no need for this, appreciate the effort!

My goal was mainly to have the AC use a different source for temperature, because due to the AC location the difference in room and AC can be a couple degrees. I don't think it is resolved with the above solution.

So my alternative approach (that I haven't tested yet) is to add a programmable resistence and put it in a serial way to the AC temperature measurement so I can offset it by a couple degrees. I have seen one do it with a manual resistance so a programmable one I just still need to test.

Driekes avatar Jul 26 '22 14:07 Driekes

Why don't you just get the correct temperature from an external HA temperature sensor en feed it to the correct esphome entity?

HA-TB303 avatar Jul 26 '22 14:07 HA-TB303

I need to feed this temperature to the AC to use as reference. I do not think it is possible to do that currently.

It would be perfect if I could use a HA temperature as source for the AC. I know I can get it onto the ESP, but not as external override for the AC. E.g. it would be possible to use the current AC internal temperature sensor and just extend it with a cable to the position I need it. But if possible I would like to prevent it, as I can't hide the cable.

PS: I know that there are Panasonic/other brands that have the option to use wired external temperature sources to use as reference, but I'm not aware if they exist from my TZ model and/or if this is possible through the ESP board.

PS2: I feel I'm explaining it slightly incorrect because the answers are always a bit our of line with my expectations, I hope this one clarifies it a bit more :)

Driekes avatar Jul 26 '22 14:07 Driekes

is there any news about using an external temperature sensor for steering the airco. I have some serious issues with the location of my unit. In no-time the temperature reported is 25 or more causing the unit to stop before the room temperature is reached.

Wired remote controllers can be attached via the CN-RMT port. I expect this port should be able to receive a temperature but I have not confirmed this yet.

alternatively I wonder if we could replace the internal temperature sensor using a long cable (I would manage to get it somewhere else with the use of some drilling). Would that be something like this? https://www.ebay.com/itm/284409985888

best option of course would be if we can somehow feed this external temperature via the CN-CNT connector but I'm not sure this is even possible. If the hardware supports it at least we could maybe try making it in software

marnixt avatar Nov 07 '22 23:11 marnixt

I did some more investigations (way too much in fact). It seems like the RAC (domestic) units only support the simple CZ-RD514C wired remote. This one does not measure the temperature. Only the more advanced CZ-RTC4, CZ-RTC5 etc. wired remotes which are only for non-residential (ECOi & PACi / VRF) seem to be able to be used as an external temperature sensor. They are connected via the RC1/RC2 port apparently: image

anyway, now it looks like I'm royally f*cked. I will contact Panasonic and my installer again.

marnixt avatar Nov 13 '22 09:11 marnixt

@Marnixt: The temperature sensor is right under the hood in front of the heat exchanger. Why don't you just cut the cable, extend it and place it somewhere else?

I also want my unit to run at 200W constant (to utilize solar energy for heating as much as possible on cloudy days). The on/off behavior drives me crazy.

I think the best way to completely control the unit is to use an analog output of the ESP32 and feed it right into the sensor input of the indoor unit. The resistance curve of the NTC sensor is published in the service manual for the indoor unit.

A simpler approach is to use a fix resistor to let the unit think it is always somewhere between 16-18 degrees in the room (based on your statement above in the thread to allow 200W operation). Then you can use the temperature setting to directly control the power of the unit.

hppi-johnsson avatar Nov 22 '22 10:11 hppi-johnsson

@hppi-johnsson I have ordered a digital pot meter so I can control the resistance and thus the temperature that the AC is measuring. My inspiration comes from here: https://community.home-assistant.io/t/control-digital-potentiometer-through-home-assistant-via-esphome/142704/48

However, I have no idea if this works, but will get back here as soon as I have it working. Basically the AC will be set to 16 always and I can manage the 'measured temperature' to control the AC. So a bit reverse :p

Driekes avatar Nov 22 '22 10:11 Driekes

Off course it will work!

The digital potentiometer approach is not necessary in our case. It is enough to set a voltage on one of the wires of the NTC sensor. The ESP32 can do this without a potentiometer. The voltage over R62 needs to be set: Capture

hppi-johnsson avatar Nov 22 '22 10:11 hppi-johnsson

@hppi-johnsson I'm unaware of that functionality. What voltage should be applied / how to simulate proper working of the NTC? Plus, should you leave the NTC intact and adjust it with some additional voltage, or would you remove the NTC completely?

E.g. I try to relay measured tempurate from the room thermostat to the AC.

PS: I assume you mean R62?

Edit: Ah wait, I might understand. The thermistor combined with the 15k resistor will result in a voltage. So you can simulate that voltage directly. I only don't know where to connect I guess. Some additional advice is still appreciated as I understand some basics, but this requires a bit more detail.

Driekes avatar Nov 22 '22 11:11 Driekes

Yes, R62 off course.

ESP32 has a built in DAC: https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/dac.html

I would completely remove the NTC thermistor, but it can stay in the circuit since it has a relatively large resistance. The ESP32 analog output would simply force the voltage to the set value.

The service manual specifies the NTC resistor to have 20k at 20 deg. That means the voltage over R62 is 2.14 V (5V*15k/(15k+20k)). At 15 deg. the value is 25k --> 1.875V. Capture

NTC thermistor are usually modeled with the Steinhart–Hart Approximation. So you can write code to perfectly mimic the behavior of the NTC thermistor. Here is some further info: https://makersportal.com/blog/2019/1/15/arduino-thermistor-theory-calibration-and-experiment

hppi-johnsson avatar Nov 22 '22 12:11 hppi-johnsson

@Marnixt: The temperature sensor is right under the hood in front of the heat exchanger. Why don't you just cut the cable, extend it and place it somewhere else?

I also want my unit to run at 200W constant (to utilize solar energy for heating as much as possible on cloudy days). The on/off behavior drives me crazy.

I think the best way to completely control the unit is to use an analog output of the ESP32 and feed it right into the sensor input of the indoor unit. The resistance curve of the NTC sensor is published in the service manual for the indoor unit.

A simpler approach is to use a fix resistor to let the unit think it is always somewhere between 16-18 degrees in the room (based on your statement above in the thread to allow 200W operation). Then you can use the temperature setting to directly control the power of the unit.

my 2nd unit (7.1kW) behaves better now, but even with the lower temperatures in the Netherlands now the 3.5kW in the small room still jumps into on/off cycles if you set it even at 20 degrees or lower. And thank god we have parameter 58 (thermo shift adjustment) otherwise the unit would be practically unusabIe. So I did discuss this with my installer and they in turn talked with Panasonic technical people. The result was something like this "we discussed moving the intake air temp sensor but they advise against it because incorrect or too long running times because you would have to put the sensor in a cold corner".

I don't know but that seems exactly what we need. My esp32 board should be arriving any moment now (https://www.espthings.io/index.php/2021/08/03/panasonic-climate-wifi-interface-for-esphome-and-home-assistant/) and using the DAC for directly steering the temperature seems like the perfect solution.

So now I'm wondering if I should

  • push my installer to move the temp sensor,
  • move the temp sensor myself
  • wait / try the ESP32 solution. Is there any risk blowing up the unit using the ESP32 DAC?

marnixt avatar Nov 22 '22 16:11 marnixt

The ESP32 DAC delivers 0-3.3V, which is within the standard range of the temperature sensor. I will try this myself in the next days.

However, the DAC outputs GPIO25 & 26 don't seem to be wired out on the board you have ordered. You would need to get the signal directly from the ESP32 IC by soldering a wire to it.

Thanks for the tip with parameter 58 by the way. Exactly what I needed.

hppi-johnsson avatar Nov 23 '22 11:11 hppi-johnsson

what is the reason that panasonic has son arrangement. I don't think the 2.5-2.0 kw has this. only the 3.5 kw. I put a 5k potentiometer between 1 wire of the ntc. and can rotate back 5 degrees. it works well because the original ntc varies with it.

i follow this thread

redbullterror avatar Nov 25 '22 21:11 redbullterror

if you need pictures of the mainboard i have them. indoor unit and outdoor unit

redbullterror avatar Nov 25 '22 21:11 redbullterror