Showing posts with label ds18b20. Show all posts
Showing posts with label ds18b20. Show all posts

2025-04-22

Faikin Remote

We have done a lot of small PCB designs over the years, but by far the most popular is my Faikin board. Reports are that even Daikin have recommended it to people wanting Home Assistant integration! It allows control of a lot of Daikin air conditioners over WiFi, MQTT, web, and Home Assistant. Constantly improving, and easy to use with local working not cloud based.

My latest design idea is a rework of a previous "environmental monitor", but specifically targeted at the Faikin users. The concept is that it can be a display and control for the Faikin. Whilst some ducted Daikin have a wall mount control, it is not cheap, so this would work with those and the more typical wall mount Daikin that do not support a wall mount display.

Key functions would be:

  • Display current state of air conditioning unit.
  • Allow change of key settings (power, mode, fan speed, target temp).
  • Remote temperature sensor to allow room temp to be referenced at the controller in "Faikin auto" mode.

But the idea is the board can work with no display as reference temperature or just an environmental monitor for Home Assistant without a Faikin involved.

This is the current board design.

The expensive CO₂ sensor would be optional as it adds over $20 to the cost. Both the tab for it, and the 5 way joystick button, could be snapped off for a purely display or monitoring application.

A Waveshare 2" display fits on the front. Full colour 240x320 pixel. It is designed to fit the header so it can be removed if needed to access WAGOs, etc. The display adds another $20 at least.

User interface

I want to make the user interface simple - anything beyond the basic controls for the aircon you have to do via web interface. That should make it easy to use.

The idea is a joystick allows change of target temp (up/down) or switch to other setting (left/right) and change of mode and fan speed, as well as simple push on/off.

Bluetooth

Whilst it can all work over WiFi and MQTT, my plan is to link to Faikin using BLE as well, both ways. So Faikin reports mode/status, and this advises control and current reference temperature. This should make it extra robust with no need for WiFi or internet to continue working. The plan is a simple announcement BLE, not a connection, much like the many cheap BLE temperature/humidity sensors that exist.

Sensors

The current set of sensors include:

  • MCP9808 Ambient temperature sensor. This is highly regarded as a good temperature sensor.
  • VEML6040 Ambient light sensor (with a night mode to turn off display) including colour.
  • GZP6816D Atmospheric pressure sensor, and additional temp sensor.
  • SCD41 CO₂ sensor, with humidity, and another temp sensor. This would be optional.
  • DS18B20 connection 3 pin WAGO for more temperature sensors.
  • Detecting remote BLE temperature sensor.

All of these would report to Home Assistant as needed, and also report control and one reference temperature of choice to Faikin.

And yes, too many temp sensors, so system will allow a config of which are used and per sensor offset (to allow for heat via PCB). I may even allow averaging of multiple sensors. It will be interesting to see how this all works. DS18B20 are great for adding an "outdoor" sensor to report to HA as well. 

Generic signage

My existing EPD app which is general signage will be extended to handle the sensors as things to display so this can be simply used as a generic environmental display (and HA integration). Indeed this is likely to be the first code I do for these new boards, without a Faikin link.

Packaging

The basic board needs to be sold with and without the SCD41 CO₂ module. The board is likely $30 and the SCD41 adds at least $20 to that, probably more like $30. Not everyone wants CO₂ and humidity. The fluctuating value of the dollar is a pain in this all.

And then I may package with Waveshare 2" display, 8 way 0.1" pitch header, and extra M2 screws. This is likely another $20 or even $30.

Maybe even with DS18B20 sensor as an option. These are quite cheap.

I am not sure I want to do 3D case printing, but I plan a number of STL files.

Tindie makes such options simple, so that is likely the main sales channel initially. We'll see about Amazon as well. Those with A&A accounts will be able to order direct as always.

Update

The first boards (no button) have arrived. I have decided I'll try the TI TMP1075 as an alternative temperature sensor. In practice it seems a DS18B20 is best as it is separate from the board, closely followed by the SCD41. The MCP9808 (and presumably the TMP1075) suffers from some local heating from the PCB. The GZP6816D is close to the ESP32 and so not good at all for temperature (it is there for pressure). The T6793 CO2 sensor is not good, gives silly values (yes, I checked, and this is not a driver error), is bulky, needs 5V (does not work on 3.3V) and is actually not that much cheaper than the SCD41. The VEML6040 light sensor works well, but is a fun exercise for the casework.

Comments

All comments welcome.,

2021-10-17

Tasmota thermostat

The tasmota code has a proper thermostat mode, but it is not in the pre-built code, so I wanted to work out a way to do this with simple rules.

There are examples, yay... But I was struggling to make sense of these.

A simple example, say I want on at 25C and off at 29C...

The obvious rules are something like this :-

ON DS18B20-1#temperature>29 DO Power 0 ENDON

ON DS18B20-1#temperature<25 DO Power 1 ENDON

This works, but every second or so it is doing Power 1 or Power 0 constantly, and reporting that on MQTT, which is a tad annoying. It is worse if you have triggers on power setting to send publish commands to other things, etc.

The other examples I have seen seem to have a similar problem, I think. Some seem to have a timer that reduces the chatter but still, I just wanted something simple that only actually logged something and only actually changed power setting, when the temperature threshold is crossed.

What I came up with is not complicated, and seems to work:-

ON DS18B20-1#temperature>%var1% do backlog var1 999;var2 25;power 0 ENDON

ON DS18B20-1#temperature<%var2% do backlog var2 -999;var1 29;power 1 ENDON

The trick is the this sets the var1/var2 meaning that the temperature is no longer triggering an event all the time once it has changed.

Bingo, it works, and is a pretty simple pair of rules. Probably worth using mem1/mem2 as the 25/29 values here to be tidier, but still. Not complicated, and reacts immediately when the temperature passes the relevant threshold.

It also means the sensor can be a separate Shelly from the relay easily, only sending the publish to change the relay on change, which is also a big improvement.

P.S. For those that do not know, a Shelly 1 is a small ESP8266 based relay/switch that can switch mains power (16A) and typically about £8 (the blue round box). It has good firmware anyway, but Tasmota is an alternative firmware (open source) which can run on most ESP8266 and ESP32 based smart devices, so can run on a Shelly 1. DS18B20 is a common temperature sensor, and more than one can be connected in parallel even (the black wire and metal tube). Shelly do an adaptor (needed for DS18B20 as they would otherwise be mains voltage) to connect to temperature sensors (the black round thing on the Shelly 1).

QR abuse...

I'm known for QR code stuff, and my library, but I have done some abuse of them for fun - I did round pixels  rather than rectangular, f...