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

    M308 add a new sensor

    Scheduled Pinned Locked Moved Solved
    Duet Hardware and wiring
    6
    20
    766
    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.
    • moth4017undefined
      moth4017
      last edited by

      @dc42 , BME 280 ordered to try when the v3.5 is out..

      <

      1 Reply Last reply Reply Quote 0
      • moth4017undefined
        moth4017
        last edited by

        @dc42 is there any info on how to connect and setup the BME280?

        <

        Exerqtorundefined dc42undefined 2 Replies Last reply Reply Quote 0
        • Exerqtorundefined
          Exerqtor @moth4017
          last edited by Exerqtor

          @moth4017 said in M308 add a new sensor:

          @dc42 is there any info on how to connect and setup the BME280?

          It's been added to M308 for RRF3.5 and later at least.

          Reguarding how to connect it i would guess you do it just like you would with a DHT sensor.

          moth4017undefined 1 Reply Last reply Reply Quote 0
          • moth4017undefined
            moth4017 @Exerqtor
            last edited by

            @Exerqtor Hi the NME280 is an SPI device , so im guessing there is more to set up and im not sure which chip select pin is used.

            <

            1 Reply Last reply Reply Quote 0
            • dc42undefined
              dc42 administrators @moth4017
              last edited by

              @moth4017 the BME280 can be connected to the SPI daughter board connector. You can use any one of the CS pins on that connector.

              Duet WiFi hardware designer and firmware engineer
              Please do not ask me for Duet support via PM or email, use the forum
              http://www.escher3d.com, https://miscsolutions.wordpress.com

              moth4017undefined 1 Reply Last reply Reply Quote 0
              • moth4017undefined
                moth4017 @dc42
                last edited by

                @dc42 Thanks, do you have to define the CS pin like this?

                if i was to use spi2 CS2

                M308 S1 P"spi2.cs2" Y"BME280" A"BME280"

                <

                dc42undefined 1 Reply Last reply Reply Quote 0
                • dc42undefined
                  dc42 administrators @moth4017
                  last edited by

                  @moth4017 yes it's the same as how you would define the CS pin for a PT100 or thermocouple board.

                  Accessing the 2 additional sensors in the BME280 is similar to how you access humidity on a DHT22. Here's how I configured a BME280 on a Duet 3 Mini:

                  m308 s11 y"bme280" p"spi.cs1" a"Ambient temp"
                  m308 s12 y"bmepressure" p"s11.1" a"Pressure[hPa]"
                  m308 s13 y"bmehumidity" p"s11.2" a"Humidity[%]"

                  Duet WiFi hardware designer and firmware engineer
                  Please do not ask me for Duet support via PM or email, use the forum
                  http://www.escher3d.com, https://miscsolutions.wordpress.com

                  Exerqtorundefined 1 Reply Last reply Reply Quote 1
                  • Exerqtorundefined
                    Exerqtor @dc42
                    last edited by Exerqtor

                    @dc42

                    I assume we don't connect/use the clock pin on the BME280 ?

                    dc42undefined 1 Reply Last reply Reply Quote 0
                    • dc42undefined
                      dc42 administrators @Exerqtor
                      last edited by dc42

                      @Exerqtor you need to connect the SDI, SDO and SCK pins of the BME280 to MOSI, MISO and SCLK respectively. And of course also connect CS, 3.3V power and ground.

                      Duet WiFi hardware designer and firmware engineer
                      Please do not ask me for Duet support via PM or email, use the forum
                      http://www.escher3d.com, https://miscsolutions.wordpress.com

                      1 Reply Last reply Reply Quote 0
                      • moth4017undefined
                        moth4017
                        last edited by moth4017

                        BME connected and working , i have used spi.cs2

                        M308 s11 y"bme280" p"spi.cs2" A"Ambient temp"
                        M308 s12 y"bmepressure" p"s11.1" A"Pressure[hPa]"
                        M308 s13 y"bmehumidity" p"s11.2" A"Humidity[%]"

                        cf7e4170-657a-4a27-8a85-cac90f2e42bc-image.png

                        A bit of info as the Pin out description on the BME not the same as Duet board

                        Duet Temp Daughter Board to BME 280
                        pin 1 .................................................. CSB
                        pin2 ................................................... GND
                        pin3
                        pin4.................................................... SCL
                        pin5 ................................................... SDA
                        pin6.................................................... SDO
                        pin7
                        pin8................................................... VCC
                        pin9
                        pin10

                        <

                        1 Reply Last reply Reply Quote 2
                        • moth4017undefined moth4017 referenced this topic
                        • dc42undefined dc42 marked this topic as a question
                        • dc42undefined dc42 has marked this topic as solved
                        • Tinchusundefined
                          Tinchus
                          last edited by

                          Hello all. Just to confirm: using the BME280 is not possible yet on version 3.4 versions of firmware?

                          jay_s_ukundefined 1 Reply Last reply Reply Quote 0
                          • jay_s_ukundefined
                            jay_s_uk @Tinchus
                            last edited by

                            @Tinchus correct. its part of 3.5

                            Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

                            Tinchusundefined 1 Reply Last reply Reply Quote 0
                            • Tinchusundefined
                              Tinchus @jay_s_uk
                              last edited by

                              @jay_s_uk Hello Thanks for the answer, then I should update to 3.5 beta to test this.

                              Docs talk about connecting the BME280 to the temperature daughter board. I have a thermocouple doughter board, it will work?

                              jay_s_ukundefined 1 Reply Last reply Reply Quote 0
                              • jay_s_ukundefined
                                jay_s_uk @Tinchus
                                last edited by

                                @Tinchus depending on which board you have. best off opening a new thread

                                Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

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