Enclosure: temperature sensors etc. on Raspberry Pi 4

I´m wondering about the bad situation of good enclosure plugins - are maybe I´m the fool? Won´t exclude that... let´s see.

I´ve tried the well-known "Octoprint-Enclosure" Plugin, which is stated depracated from it´s author, but it seems to be the most developed plugin overall. I didn´t get my DHT11 or DHT22 temperature sensors to run. Tried the FAQs, two RPI boards, a clean and fresh new Octoprint installation... all sensors are running fine with same cables connected to an Arduino-equipped simple breadboard.

Second problem: The PWM control of connected Noctua Industrial 12V fans is glitchy. After a random period of time the fan speeds up wild for a second without action. I´ve tried the suggested 25 KHz and downto 15 KHz for PWM base frequency, but a setting below 50% duty results in a fan which is not constantly blowing. I´ve to fans of them, both are making same problems. A simple timing circuit using the good old NE555 chip allows me totally smooth and constant control of the fan´s PWM input.

So I test a lot of other small plugins, but most of them can handle only ONE fan, I need at last two, better three PWM outputs for fans. And also at last two temperature sensors. I don´t found any other plugin in the plugin area which supports DHTxx sensors.

What are other users using, when the DHT ones make such issues at the RPi? Is there any other plugin availible which masters two fans using PWM control and two temperature sensors?

The Pi's GPIO clock is based on the CPU core speed... When the CPU speeds up (under load) the GPIO clock gets faster. DHT11 and DHT22 require a stable clock to get them to read properly. They work fine on Pi3B+ and earlier, but the 4 is hit or miss. Same with the PWM

1 Like

Thank you very much for this info! I´ve tried also a Raspberry Pi 3B+ and the behavior is the same.

I partly solved the need for two temperature sensors with switching to the DS18B20 1-Wire sensors. You can add several of them to one single I/O and this works flawless and fine with the Enclosure plugin. Lights on/off etc. using Mosfets are also working. So only the fine-tuning of PWM driven fans won´t work, but I will add a little Atmel Tiny MCU for this seperately, should do the job.