Hi everyone,
I have a problem that I cannot solve.
I have configured z-uno with a DHT22 sensor and a data reading every 20 seconds.
At home it had been working for a week without any problems.
As soon as I moved it to the greenhouse where I want to put it, here’s the problem.
After an indefinite period of time, it can be minutes or hours, the sensor stops sending data.
The only way to get it back to work is to unplug and plug it back in.
I have changed 6 sensors, I have shortened the wires that separate the sensor from the Z-uno, I have changed 3 power supplies, I have even tried with 2 different Fibaro Smart Implants instead of the Z-uno but the situation does not change.
In the house, where I use the jumper wires to connect the sensor goes, in the greenhouse no.
What else could it be?
Thank you!
Since you already had a look at the electrical side, the only thing that seems to change is the distance between the sensor and the receiver. Too big of a radio distance could trigger this behaviour.
Another thing could be the power supply. But I’d guess you took that in consideration.
Yes, in fact, I cut the cable from 3 meters to 1 meter but I do not solve the problem …
Could it be the clamps for joining the cables?
I am using a 10K resistor, perhaps with cables longer than 20cm a different resistor should be used?
Wait, you did not move the controller and the sensor to the greenhouse, but extended the sensor cables so that the controller stayed indoors whereas the sensor now is in the greenhouse?
With a long connection cable between the DHT22 and the controller you can have all sorts of problems: electromagnetic disturbances, voltage drops, …
Please describe your setup a bit more detailed.
Exact.
Solution that works at home:
DHT22 sensor connected to the Z-UNO board with 20 cm jumper wires, 10k resistance and without terminals.
Everything works perfectly.
Greenhouse solution:
Z-UNO card inserted in an electrical panel positioned outside the greenhouse.
5V powered.
DHT22 sensor inside the greenhouse connected to the board with 2.5mm section electric wires about 3 meters long.
10k resistance.
I used clamps to join cables with a larger section to cables with a smaller section.
Tests carried out:
- changed 6 DHT22 sensors, problem not solved.
- shortened the cable from 3 meters to about 1 meter, problem not solved.
- Changed 2.5mm cables with cat6 network cable, problem not solved.
- Z-UNO board replaced with 2 Fibaro Smart Implants, problem not solved.
- I changed 3 power supplies, problem not solved.
If I disconnect and reconnect the power, it will go back to work for a short time which can be minutes or hours.
I do not know what to think.
Maybe the terminals cause noise?
Wrong resistance with such long cables?
Below is the graph of what happens.
ok, so the datasheet states a maximum cable length of 20m, so 3m should be fine. Do you have a bare sensor or is it mounted to a pcb with some components on it? If its bare, it could help stabilizing the supply voltage by adding a 100nF capacitor directly to the sensor from GND to VCC.
Also: can you see whether its a DHT related problem or a communication problem? Is there some sort of serial log that you can read that could be very helpful…
I tried these sensors and got the same result from all of them.
I don’t know if there is a register to read … the connection with Z-UNO always seems to be active as it happened with the Smarti Implant Fibaro, except that the DHT sensor no longer sends any value.
Puh, at least the most left sesor is what I have here and these have a capacitor on them.
I am running out of ideas…
Can you get rid of all mechanical connections (clamiping/screwing/…) and directly solder the cables?
and just for the sake of a test put the board with the sensor into the greenhouse with short cables? Its against all odds, but I do not see obvious errors any more.
That’s just what I wanted to try to do tonight …
Join the wires without using terminal blocks, but keeping the sensor away from the Z-UNO board.
I don’t think Z-UNO in a greenhouse would stand up to constant 90% humidity.
Surely, this is not a permanent solution, but if it helps identifing the problem, I’d guess its worth a try. Anyway I’m curious what your experiments show
I am fed up and at the same time curious to solve this mystery.
I’ve been there. It is highly frustrating, yet wonderfully satisfing when you find the reason. But some mysteries are not to be solved by mankind, some are just a test of sheer will strength
Ditch the DHT22 and use a BNE280. I2C bus, much better sensor.