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

DHT22 sensor not working #1400

Open
WirthmU opened this issue Jul 15, 2024 · 9 comments
Open

DHT22 sensor not working #1400

WirthmU opened this issue Jul 15, 2024 · 9 comments

Comments

@WirthmU
Copy link

WirthmU commented Jul 15, 2024

I am using a GrovePi Plus HAT with several sensors attached on a Raspberry PI. The board has both digital and analog ports. I could readout the sensor values without any problem with previous OS versions of the RPI. Now after switching to bookworm the board seems no longer supported because of missing python drivers. The digital sensors still are visible via I2C and can be used. However the analogue DHT22 (AM2302; attached to D4 / Pin 12 / PWM0) and the GUVA-S12D (attached to A0) sensors can no longer be read.

Is there any chance the two sensors can get read?

@WirthmU WirthmU changed the title DHT22 not working DHT22 sensor not working Jul 15, 2024
@aaronwmorris
Copy link
Owner

aaronwmorris commented Jul 15, 2024

For the DHT22, from what I have read on the Seeedstudio wiki, it is wired directly to the D4 pin of the Raspberry Pi, so you should be able to read that using the existing DHT22 integration in indi-allsky.

I am looking for references for the GUVA-S12D

Just putting this here for reference.

https://wiki.seeedstudio.com/GrovePi_Plus/

https://wiki.seeedstudio.com/Grove-UV_Sensor/

@WirthmU
Copy link
Author

WirthmU commented Jul 22, 2024

For the DHT22 I have tried both GPIO PWM Pins PWM0 (GPIO 12) and PWM1 (GPIO13) (https://pinout.xyz/pinout/pin32_gpio12/). None of them seem to work.

indi-allsky) pi@meteotux:~/indi-allsky $ ./misc/sensor_test.py
[WARNING]: Initializing [Sensor A] TSL2561 I2C light sensor device @ 0x29
[WARNING]: Initializing [Sensor B] SI1145 I2C light sensor device @ 0x60
[WARNING]: Initializing [Sensor C] DHT22 temperature device
[INFO]: [Sensor A] Switching TSL2561 to day mode - Gain: 0, Integration: 1
[INFO]: [Sensor A] TSL2561 - lux: 24456.4739, broadband: 23595, ir: 8182
[INFO]: Sensor 0: {'sqm_mag': 1.6125747874696768, 'data': (24456.47385791795, 23595, 8182)}
[INFO]: [Sensor B] SI1145 - visible: 5504, ir: 46943, uv: 28.130
[INFO]: Sensor 1: {'data': (5504, 46943, 28.13)}
[ERROR]: SensorReadException: DHT sensor not found, check wiring

@aaronwmorris
Copy link
Owner

Do you have the pull up resistor installed for the DHT22?

@WirthmU
Copy link
Author

WirthmU commented Jul 22, 2024

No - I have not. The Seeedstudio DHT22 pro comes with a cable which one uses to plug it to the D4 port of GrovePi_Plus HAT (https://wiki.seeedstudio.com/Grove-Temperature_and_Humidity_Sensor_Pro/)

@aaronwmorris
Copy link
Owner

Can you confirm which hat you have? GrovePi Plus for Raspberry Pi or GrovePi+

@WirthmU
Copy link
Author

WirthmU commented Jul 22, 2024

It's a GrovePi+ (the blue one).

@aaronwmorris
Copy link
Owner

Okay, that explains my confusion. I got the module conflated when I was researching. For the GrovePi+, the digital pins are hooked to the atmega328 and you have to access the values via the I2C connection between the atmel chip and the raspberry pi. This is not going to work with the existing code.

Let me do some more research.

@WirthmU
Copy link
Author

WirthmU commented Sep 18, 2024

Any news about the Seeedstudio DHT22 pro sensor?

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

2 participants