Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Duet 3 Board GPIO input heater control

    Scheduled Pinned Locked Moved
    Duet Hardware and wiring
    2
    3
    154
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • vijaysundefined
      vijays
      last edited by

      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.

      1. How to enable GPIO configuration and read the sensor value in Duet 3 Board?
      2. Which GCode should I use to read the sensor from GPIO pin.
      3. 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

      1 Reply Last reply Reply Quote 0
      • achrnundefined
        achrn
        last edited by

        @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.

        vijaysundefined 1 Reply Last reply Reply Quote 0
        • vijaysundefined
          vijays @achrn
          last edited by

          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.

          1 Reply Last reply Reply Quote 0
          • T3P3Tonyundefined T3P3Tony referenced this topic
          • First post
            Last post
          Unless otherwise noted, all forum content is licensed under CC-BY-SA