Duet 3 Board GPIO input heater control
-
Hi,
I want to read some sensor data through Duet 3 GPIO pin.
Based on the sensor data value I want to control heater output.For example, the sensor could be a moisture sensor.
- How to enable GPIO configuration and read the sensor value in Duet 3 Board?
- Which GCode should I use to read the sensor from GPIO pin.
- Is it possible to control the heater based on the sensor value received from GPIO. (Example, If the value of GPIO received is 50 then set the heater to 150C automatically )
Kindly share your insights.
Thanks -
@vijays it depends completely on the sensor - analogue, digital, details?
If you specifically want to measure humidity, a duet can talk to a DHT22 (or AM2302 if you ground the appropriate pin).
M308 S6 P"io3.out+io3.in" Y"dht22" M308 S10 P"S6.1" Y"dhthumidity" A"mb humidity[%]"
will give you a sensor 6 reading temperature and a sensor 10 (named 'mb humidity') reading humidity from a DHT22 sensor.
I don't know how / if you can control a heater from a humidity sensor, but if that's not a built-in functionality and you don't need a very fast response (given that humidity doesn't change fast, that's likely) you could put something in daemon.g that controls the heater on the basis of object model properties.
-
Good Tips. Thanks @achrn.
Yes. I need to read analog input data from sensor.
Using the analog data I want to control the heater. I presume it should be realtime, so that the heaters can quickly adjust to the sensor value.I was not aware of daemon.g and object model properties. Good points. I will explore these possibilities.
Thanks much.
-