Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Softreset init problem Tasmota 4.3.3 on Wemos D1 and DHT22 #22482

Open
EkkiBrue opened this issue Nov 14, 2024 · 5 comments
Open

Softreset init problem Tasmota 4.3.3 on Wemos D1 and DHT22 #22482

EkkiBrue opened this issue Nov 14, 2024 · 5 comments

Comments

@EkkiBrue
Copy link

EkkiBrue commented Nov 14, 2024

Tasmota v14.3.0 on Wemos D1 with a DHT22 (AM2302) connected to 5v and D4

Pinout: DHT22 (AM2302) — Wemos D1

+	 	—	 	1	 	—	 	5v
OUT	 	—	 	2	 	—	 	D4
-	 	—	 	3	 	—	 	G

I reported this in a resolved DHT22 thread - but it seems the topic there was already closed . So I have to bring this up again as a new bug as it´s not exactly correlating to the former problem:

After a softreset from inside Tasmota, the data immediately becomes invalid (null). Only unplugging and replugging the DATA-Cable will restart the "send data process" again.

After reset via resetbutton or unplugging the power cord, data is displayed correctly and seems to remain.

I made a short video to make clear what my actual problem is.

https://m1z.eu/tasmobug2
pw: tasmota_14.3.0

Hope it helps to make clear that the bug has to do something with the init-part of the reset-code of Tasmota...

@tsmoneta
Copy link

Does your version of the DHT22 have an onboard 10 Kohm resistor between VCC and the data pin? If not, you need to add one.

@EkkiBrue
Copy link
Author

It´s this one: https://components101.com/sensors/dht22-pinout-specs-datasheet#:~:text=How%20to%20use%20DHT22%20Sensor

In the "howto section" linked they talk about a 5K pullup resistor between VDD and DATA on MCU side - ist that what you mean ?

I still wonder why a soft-reset differs so much on initialising the data connection compared to a hard reset. Is this a bug in the hardware (MCU or DHT?) or in tasmota software ? Other sensors don´t need any resistors to function. I just try to understand why this is.

@tsmoneta
Copy link

The pull-up resistor on a DHT22 sensor is used to maintain the data line at the Vcc level when the sensor is not actively sending data, ensuring proper communication with the microcontroller by defining a clear voltage state for the data signal to transition between high and low levels during data transmission; it's essentially a mechanism to keep the data line in a known state when not being actively driven by the sensor itself. Some versions include the resistor, some don't.

@EkkiBrue
Copy link
Author

EkkiBrue commented Nov 17, 2024

Hi @tsmoneta . Thank you for your detailed answer. I guess it´s not the problem as my platine based DHT22 seems to have the resistor onboard. Please look at this picture: My Modell is the one on the black PCB.

https://deepbluembedded.com/arduino-dht22-library-code-examples tutorial/#:~:text=How%20to%20connect%20DHT22%20to%20Arduino%3F

There are two versions of the DHT22 sensors in the market. The bare DHT22 sensor (on the right) has 4 pins, and the DHT22 sensor’s module (on the left) has 3 pins. No external pull-up resistor is needed with the data pin of the DHT22 sensor, unlike the DHT11 sensor.

I updated the link to the explaining video above as the old MKV link didn´t work with most browsers. Please watch for reference.

@crhass
Copy link

crhass commented Nov 28, 2024

I think you are using GPIO2, try GPIO14

See. #3522

I can also confirm that I run bare DHT22 sensors without the external pull up resistor and they work fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants