Mini 5+ and DHT21 sensor
-
I haven't tried that on my mini 5+ yet, but are you sure it shouldn't read spi2.cs1 in your M308? You only have spi.cs1.
Also - make sure you have the newest firmware (3.2.2). 3.2 had a regression bug that caused DHT2x to not work and show 2k all the time.
-
@pkos i thuoght SPI2.CS1 too but it tells me it does not exists... naming are a bit ...naive
-
Ah right. Then check 3.2.2 - it fixes the DHT problem
-
no it does not fix the issue
-
I'll be working on my mini 5+ tomorrow. If nobody gives you any good hints before then I'll take a look to see if I can get the DHT to run.
-
@pkos thanks !
-
I confirm that there appears to be a problem with DHT sensor support on the Duet 3 Mini. I have configured a DHT22 on pin spi.cs2. I can see the firmware requesting a reading and the sensor responding, but it looks like the firmware isn't picking up the response.
-
I found the problem. The spi.cs# pins on the 3 Mini don't support interrupts. I am looking for alternative pins to use.
-
ok thanks... will be then the third time i redo the connector LOL
-
The solution will be to connect the DHT sensor to one of the 5-pin IO connectors. The signal wire will need to be connected to both the iox.in and iox.out pins. The Vcc and ground pins can be connected to 3v3 and GND on the same connector. The firmware support will be in RRF 3.3beta1, due to be released shortly.
-
ohh great that's where it was before... damn cut again and rewire
So i have to Y the signal to BOTH in and out pins ?
@dc42 and the configuration in firmware what pin would it call in
Sxx P"..." ?P.S. I think you would concur that this a pretty weird wiring setup... wonder how come the cs pins are as they are...
thanks
-
The issue is that on the MCU used in the Duet 3 Mini, only some pins have a pin change interrupt facility. We assigned the available interrupts to input pins. However, the input pins have a 10K series resistor to make them tolerant of high input voltages, so they can't be used as outputs in this application.
The configuration line you will need is this or similar:
M308 S10 P"io4.out+io4.in" Y"dht21" A"Chbr Temp [C]" ; Set DHT21 for chamber temp
I have this working now.
-
wow in + out LOL would never have thought about that
my wires are ready !
thanks
-
This is now released, see https://forum.duet3d.com/topic/21597/reprapfirmware-3-3beta1-now-available.
-
@dc42 Thank you for the prompt feedback. Will check it out, test and report back
-
@dc42 just to clarify the daughter board cs pins can be used if 10k resistor is unsoldered and pads are bridged? or all daughter board cs pins can't handle interrupts?
-
@MikeS which daughter board do you ref to ?
-
@dc42 said in Mini 5+ and DHT21 sensor:
M308 S10 P"io4.out+io4.in" Y"dht21" A"Chbr Temp [C]"
tested with Rel 3.3 Beta 1
it is working now, thanks
-
@oc_geek i thought you were using the daughterboard connection for the DHT which is made to be used with this: https://duet3d.dozuki.com/Wiki/PT100_temperature_sensor_daughter_board. Now i saw that you used the 12864_EXP* one. I don't understand if all expansion / daughterboard SPI pins can't use interrupts, or maybe some have it but they have the 10k resistor. In the second case the resistor could be unsoldered and, with the pads bridged, only one pin used for I/O.
-
no i do not use any Temp DB as the mini 5+ has direct support for DHT21
i was using the Temp DB plug to get the cs pin but it doesn't work so..
now I'm using the IO4 5 pin receptacle and with the Y cable (in and out bridged to signal) it works (with rel 3.3 beta1)