David De Laet

Forum Replies Created

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • in reply to: Relay Box #733
    David De LaetDavid De Laet
    Participant

    Hi,

    For the power consumption I still need to some extra measuring.
    The heat in my enclosure was +-1.5°C higher than a sensor without enclosure on 240Mhz
    It lowered down to +-1.1 °C on 160Mhz. Unfortunately this is not an constant value as this depends on the room temp. Or I have to design a bigger case where the ESP and DHT are even more separated.

    My thoughts was to run an XML/SOAP server or any other usable protocol on the ESP/relay , which receives sensor data from multiple ESP/DHT.
    Where the ESP/DHT polls the temp, sends it to the Relay ESP, and goes back to deep sleep.(for example every minute or even longer). This should lower the power consumption to a point where it could operate on a battery. There is a easy to understand guide for how and why: https://www.youtube.com/watch?v=heD1zw3bMhw

    As for a radiator head we need an “mini” linear actuator that can be controller by 0-100 value with a small controller; ESP32 or other controller. The radiator has a small metal pin when pushed the valve closes and visa versa.
    To drive a small motor we only need a NPN transistor, 1 resistor and one diode. (only on or off type)
    If we want to know the position of the motor, we need a stepper motor and this can be driven by a driver on chip, for example the L293 series.

    Example of a slightly bigger linear motor.

    I have designed some electronic boards in fritzing, but mostly for hobby purposes.

    There are also commercial versions of this system. Unfortunately closed, expensive and thus no fun!
    https://www.fibaro.com/en/products/the-heat-controller/

    These where just some thoughts for a fun hobby project.
    PS: name is David De Laet from Belgium.

    in reply to: Relay Box #728
    David De LaetDavid De Laet
    Participant

    .ino files where not allow to upload. trying .txt

    in reply to: Relay Box #727
    David De LaetDavid De Laet
    Participant

    Hi,

    I changed the code to a specific ESP/DHT library. https://github.com/beegee-tokyo/DHTesp
    – Added time stamp logging to the serial port.
    – Scaled down the CPU to 160Mhz instead of 240Mhz (line 57; Change RTC_CPU_FREQ_160M to RTC_CPU_FREQ_240M etc.. )
    for lower power consumption and heat.
    – Added the error status in the logging header, and a status drop when it fails.
    – Auto detect Sensor type, or manual selection for DHT11, DHT22, AM2302, RHT03.

    Things I could improve:
    – Fahrenheit <-> Celsius conversion is built in the library and could be simplified.
    – Maybe multiple sensors on a second webserver port?
    – Code cleanup

    Some features I would like to look in for feasibility if time permits 🙂
    – Deep sleep by using one Sensor collector (for example the ESP32_RELAY)
    Send the Sensor data to the collector by low power BT or WIFI.
    – Designing a thermostat head to control separate radiators.

    And of course you can use my code 🙂
    Let me know if you can use any of the code.

    Greetz,
    David

    in reply to: Relay Box #724
    David De LaetDavid De Laet
    Participant

    Hi,

    Indeed this the lib I used.

    This is code I changed, still quick & dirty, as I wanted to wait your response before I would clean the code up and add some more error catching. As this code is your work, I wanted you to have the final word 🙂 although I’m happy to help..

    int chk = SimpleDHTErrSuccess;
    double celsiusTemp = -10000;
    double fahrenheitTemp = -10000;
    float temperature = 0;
    float humidity = 0;
    if (DHTTYPE == 22) {
    chk = dht22.read2(DHTPin,&temperature, &humidity, NULL );

    } else {
    chk = dht11.read2(DHTPin,&temperature, &humidity, NULL );
    }

    if (chk == SimpleDHTErrSuccess) {
    thError=””;
    Serial.print(“DHT OK,\t”); Serial.print(“TempCelcius= “);
    Serial.print((float)temperature); Serial.print(” C°\t”);
    Serial.print(“Humidity= “);
    Serial.print((float)humidity); Serial.print(“\t”);
    celsiusTemp = (float)temperature;
    fahrenheitTemp = celsius2Fahrenheit(celsiusTemp);

    } else {
    switch (chk)
    {
    case SimpleDHTErrDataChecksum:
    thError = “Checksum error”;
    break;

    default:
    thError = “Unknown error”;
    break;
    }
    Serial.print(thError);
    }

    in reply to: Relay Box #719
    David De LaetDavid De Laet
    Participant

    Hi,

    I changed your code to use the SimpleDHT library, and added the temp readings to serial output.
    Including catching the DHT errors, and had no timeouts anymore.

    Ps: found a small bug in the app. If you leave the calibration value empty instead of an value, the app will crash.

    Connecting to *********
    ….
    WiFi connected
    IP address: 192.168.60.50
    MAC: ***********
    New client
    GET / HTTP/1.1
    Host: 192.168.60.50
    Connection: Keep-Alive
    Accept-Encoding: gzip
    User-Agent: okhttp/3.9.0

    DHT OK, TempCelcius= 24.60 C° Humidity= 53.90 client disconnected
    Tue Apr 3 17:31:26 2018

    New client
    GET / HTTP/1.1
    Host: 192.168.60.50
    Connection: Keep-Alive
    Accept-Encoding: gzip
    User-Agent: okhttp/3.9.0

    DHT OK, TempCelcius= 24.60 C° Humidity= 53.40 client disconnected
    Tue Apr 3 17:31:36 2018

    New client
    GET / HTTP/1.1
    Host: 192.168.60.50
    Connection: Keep-Alive
    Accept-Encoding: gzip
    User-Agent: okhttp/3.9.0

    DHT OK, TempCelcius= 24.50 C° Humidity= 53.20 client disconnected
    Tue Apr 3 17:31:46 2018

    New client
    GET / HTTP/1.1
    Host: 192.168.60.50
    Connection: Keep-Alive
    Accept-Encoding: gzip
    User-Agent: okhttp/3.9.0

    DHT OK, TempCelcius= 24.60 C° Humidity= 53.20 client disconnected
    Tue Apr 3 17:31:56 2018

    New client
    GET / HTTP/1.1
    Host: 192.168.60.50
    Connection: Keep-Alive
    Accept-Encoding: gzip
    User-Agent: okhttp/3.9.0

    DHT OK, TempCelcius= 24.60 C° Humidity= 53.20 client disconnected
    Tue Apr 3 17:32:06 2018

    New client
    GET / HTTP/1.1
    Host: 192.168.60.50
    Connection: Keep-Alive
    Accept-Encoding: gzip
    User-Agent: okhttp/3.9.0

    DHT OK, TempCelcius= 24.60 C° Humidity= 53.20 client disconnected
    Tue Apr 3 17:32:16 2018

    New client
    GET / HTTP/1.1
    Host: 192.168.60.50
    Connection: Keep-Alive
    Accept-Encoding: gzip
    User-Agent: okhttp/3.9.0

    DHT OK, TempCelcius= 24.60 C° Humidity= 53.10 client disconnected
    Tue Apr 3 17:32:26 2018

    New client
    GET / HTTP/1.1
    Host: 192.168.60.50
    Connection: Keep-Alive
    Accept-Encoding: gzip
    User-Agent: okhttp/3.9.0

    DHT OK, TempCelcius= 24.60 C° Humidity= 53.00 client disconnected
    Tue Apr 3 17:32:36 2018

    New client
    GET / HTTP/1.1
    Host: 192.168.60.50
    Connection: Keep-Alive
    Accept-Encoding: gzip
    User-Agent: okhttp/3.9.0

    DHT OK, TempCelcius= 24.60 C° Humidity= 53.00 client disconnected
    Tue Apr 3 17:32:46 2018

    New client
    GET / HTTP/1.1
    Host: 192.168.60.50
    Connection: Keep-Alive
    Accept-Encoding: gzip
    User-Agent: okhttp/3.9.0

    DHT OK, TempCelcius= 24.60 C° Humidity= 53.00 client disconnected
    Tue Apr 3 17:32:56 2018

    New client
    GET / HTTP/1.1
    Host: 192.168.60.50
    Connection: Keep-Alive
    Accept-Encoding: gzip
    User-Agent: okhttp/3.9.0

    DHT OK, TempCelcius= 24.60 C° Humidity= 53.00 client disconnected
    Tue Apr 3 17:33:06 2018

    in reply to: Relay Box #718
    David De LaetDavid De Laet
    Participant

    Hi,

    Indeed, after adding a time stamp to the sketch, I see a poll every 10 sec. 🙂
    I assumed a polling issue, as many people on esp32 forums had this problem. My bad..

    Below the time stamp logs. I will try with another DHT lib en post the results.
    New client
    GET / HTTP/1.1
    Host: 192.168.60.50
    Connection: Keep-Alive
    Accept-Encoding: gzip
    User-Agent: okhttp/3.9.0

    DHT OK, client disconnected
    Tue Apr 3 18:35:55 2018

    New client
    GET / HTTP/1.1
    Host: 192.168.60.50
    Connection: Keep-Alive
    Accept-Encoding: gzip
    User-Agent: okhttp/3.9.0

    DHT OK, client disconnected
    Tue Apr 3 18:36:05 2018

    New client
    GET / HTTP/1.1
    Host: 192.168.60.50
    Connection: Keep-Alive
    Accept-Encoding: gzip
    User-Agent: okhttp/3.9.0

    DHT OK, client disconnected
    Tue Apr 3 18:36:15 2018

    New client
    GET / HTTP/1.1
    Host: 192.168.60.50
    Connection: Keep-Alive
    Accept-Encoding: gzip
    User-Agent: okhttp/3.9.0

    DHT OK, client disconnected
    Tue Apr 3 18:36:25 2018

    New client
    GET / HTTP/1.1
    Host: 192.168.60.50
    Connection: Keep-Alive
    Accept-Encoding: gzip
    User-Agent: okhttp/3.9.0

    Timeout errorclient disconnected
    Tue Apr 3 18:36:35 2018

    in reply to: Relay Box #716
    David De LaetDavid De Laet
    Participant

    Hi,

    I am using the DHT22 board from keyes. I do have some timeout errors, 1 out of 5 polls.
    I’m looking at the sketch, with the Serial Console..
    My first impression is that we are polling to fast, the DHT22 can only be polled every 2 sec. (2.5 to be safe) I would even poll only every minute.
    I have added time stamps into the code for debugging, and will try some other dht libraries this evening.

    Mvg,

    in reply to: Relay Box #711
    David De LaetDavid De Laet
    Participant

    Added some extra details of the drawing.

    in reply to: Relay Box #709
    David De LaetDavid De Laet
    Participant

    The stl files will be available soon on thingiverse.
    If someone want a printed version, I could send one for the price of filament, electricity & shipping costs.

    Attachments:
    in reply to: Relay Box #704
    David De LaetDavid De Laet
    Participant

    The first version of the sensor box is ready.
    All the pins are soldered, and is assembled with snap-ins.

    and a wall mount bracket will be available soon.

    in reply to: Calibration Option #703
    David De LaetDavid De Laet
    Participant

    Hi,

    Indeed the calibration option is now working, thanks alot!

    Gr,
    David

    in reply to: Relay Box #686
    David De LaetDavid De Laet
    Participant

    Hi,

    As requested, a pictures from inside the box. Don’t mind the extra cables, Converted a Default High to a Default low relay.

    Red: VCC 5v -> esp32
    White: Ground -> esp32
    Yellow: Pin18 ->esp32
    Purple: short COM+GND

Viewing 12 posts - 1 through 12 (of 12 total)