Duet3d DHT 22
-
This post is deleted! -
@droftarts said in Duet3d DHT 22:
@Sotidii Move it to an SPI pin and try:
M308 S10 P"0.spi.cs1" Y"dht22" A"Filament Temp" ; define DHT22 temperature sensor
M308 S11 P"S10.1" Y"dhthumidity" A"Filament Hum[%]" ; Attach DHT22 humidity sensor to secondary output of temperature sensorSee P"nnn" parameter for "dhthumidty" section of https://duet3d.dozuki.com/Wiki/Gcode#Section_M308_Set_or_report_sensor_parameters
Ian
Sorry for entering this thread with a related question, but I didn´t want to open a new one for it:
RRF3.1.1 running on a duet2ethernet-1.0.4 board
Which SPI-Pin to use, there are so many:
32) SPI1_SCK_BE
33) SPI1_MOSI-B
34) SPI1_MISO
47) SPI0...
48) SPI0...
49) SPI0...Should be one of the MISO ("slave sending to master" - since I guess the board is the "master" and the sensor is the "slave"?)
(Could not find "0.spi.cs1" on https://duet3d.dozuki.com/Wiki/Duet_2_Pinout_table, https://duet3d.dozuki.com/Wiki/RepRapFirmware_3_overview#Section_Pin_names_for_Duet_2_WiFi_Ethernet nor https://duet3d.dozuki.com/Wiki/Using_servos_and_controlling_unused_IO_pins#Section_Duet_2_WiFi_and_Duet_2_Ethernet)
-
See the Duet 2 wiring diagram at https://duet3d.dozuki.com/Wiki/Duet_Wiring_Diagrams. You can use any of the following pins:
On the daughter board connector (if you don't have a daughter board plugged in to it): SPI0_CS1, SPI0_CS2, CS3, CS4
On the expansion connector (if you don't have a DueX connected): E2_STOP, E3_STOP, E4_STOP, E5_STOP, E6_STOP
On CONN_LCD: ENC_A, ENC_B
-
This post is deleted! -
Thanks so much!
I mixed it up with "expansion" then! It is referring to "TEMP DAUGTHERBOARD" where there is a " 3) SPIO_CS1 ", guess that´s the one then! Thanks!
Now I connected it here, but still cannot get a signal:
The code snippets in my config.g is actually just copied out of the g-code-reference:
M308 S10 P"0.spi.cs1" Y"dht22" A"Filament Temp" ; define DHT22 temperature sensor M308 S11 P"S10.1" Y"dhthumidity" A"Filament Hum[%]" ; Attach DHT22 humidity sensor to secondary output of temperature sensor
Did I choose the wrong pins, or do I miss anything in the config.g?
-
Test whether your M308 commands are accepted, either by running them from the console of by running M98 P"config.g".
As you are running on Duet 2 you should use pin name "spi.cs1" not "0.spi.cs1".
-
As usual - thanks! That was it!
changed to:
M308 S10 P"spi.cs1" Y"dht22" A"Filament Temp" ; define DHT22 temperature sensor M308 S11 P"S10.1" Y"dhthumidity" A"Filament Hum[%]" ; Attach DHT22 humidity sensor to secondary output of temperature sensor
and now it works
All nicely now in the monitor:
(As a noob I am a little bit confused why with duet2 the "0." had to be deleted - hope the duet-team finds time to improve the explanation for beginners like me on the RRF3.x pin-structure and wording. For me it would maybe be nice to use the schematic https://d17kynu4zpq5hy.cloudfront.net/igi/duet3d/4k56ZjaaAHrTJI6Z.huge and add next to or replace the wording with the new pin-names in RRF3.x I know that is quite some work but maybe someone can help out?)
-
@LB said in Duet3d DHT 22:
As a noob I am a little bit confused why with duet2 the "0." had to be deleted
The "0." part is the CAN address of the board, with 0 being the address of the main board. As the Duet 2 doesn't support CAN, it doesn't need a CAN address.
On Duet 3 you can leave out the "0." and it will default to the main board.
-
@dc42 said in Duet3d DHT 22:
@LB said in Duet3d DHT 22:
As a noob I am a little bit confused why with duet2 the "0." had to be deleted
The "0." part is the CAN address of the board, with 0 being the address of the main board. As the Duet 2 doesn't support CAN, it doesn't need a CAN address.
On Duet 3 you can leave out the "0." and it will default to the main board.
Thanks so much!
Can we/I add this bit of info in the wiki like:
"boards prior to duet3 that can also run RRF>=3 have to omit "0." because these boards do not support CAN and do not need a CAN-address."-> I have now 2 dht22 running successfully: 1 for the printchamber, 1 for the filamentbox. Do you plan to support up to 2 dht´s on the new duet3mini? There is an expansion port for the temp-daughter-boards, and since that is using spi...
-
@LB said in Duet3d DHT 22:
Can we/I add this bit of info in the wiki like:
"boards prior to duet3 that can also run RRF>=3 have to omit "0." because these boards do not support CAN and do not need a CAN-address."Where in the wiki would you like to see this?
-
@Phaedrux said in Duet3d DHT 22:
"boards prior to duet3 that can also run RRF>=3 have to omit "0." because these boards do not support CAN and do not need a CAN-address."
Thanks so much for coming back to it , maybe here
https://duet3d.dozuki.com/Wiki/Gcode#Section_M308_Set_or_report_sensor_parameters
(there was no dedicated site that I could find with "https://duet3d.dozuki.com/Search?query=dht") :
Maybe it even could be more general like:
"boards without can-bus that run RRF>=3 have to omit "0.", since it would imply the can-address" or somthing similar...(I am running now:
M308 S10 P"spi.cs1" Y"dht22" A"Chamb Temp" ; define DHT22 temperature sensor M308 S11 P"S10.1" Y"dhthumidity" A"Chamb Humid[%]" ; Attach DHT22 humidity sensor to secondary output of temperature sensor
and it works nice)
-
BTW we already allow a redundant "0." prefix to be used in front of drive numbers on Duet 2. I will probably allow the same for port names in a future release.
-
@dc42 said in Duet3d DHT 22:
BTW we already allow a redundant "0." prefix to be used in front of drive numbers on Duet 2. I will probably allow the same for port names in a future release.
All working fine for me now - Thanks!