Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    pysense: lots of invalid temp/hum values

    Scheduled Pinned Locked Moved Getting Started
    pysensetemperaturehumidity
    30 Posts 11 Posters 10.5k Views 13 Watching
    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.
    • T Offline
      thomas
      last edited by

      Hi,

      I am running the following code on a pysense board (with a LoPy):

      from pysense import Pysense
      from SI7006A20 import SI7006A20
      import time
      import pycom

      pycom.heartbeat(False)
      py = Pysense()
      tempHum = SI7006A20(py)

      for i in range(1, 100):
      print("{}/{}".format(tempHum.temp(), tempHum.humidity()))
      time.sleep(60)

      Below is the output. It seems that most of the values are invalid. Is there any issue with my code or any known issue with the board ?

      35.33643/48.2554
      35.30425/174.0031
      5181.098/2693.725
      35.34715/16.50949
      5181.088/48.24777
      35.2828/2756.156
      5181.077/48.27829
      35.27207/47.85104
      35.27207/2662.483
      1260.164/174.0183
      5181.152/2662.49
      5181.152/2662.49
      5181.077/670.1731
      1260.186/47.98837
      1260.164/47.76712
      5181.035/2662.445

      Thanks !

      1 Reply Last reply Reply Quote 0
      • B Offline
        bucknall
        last edited by

        Hi @thomas

        I'm looking into this for you! Thanks for your patience!

        Developer Evangelist - Pycom

        T 1 Reply Last reply Reply Quote 0
        • T Offline
          thomas @bucknall
          last edited by

          Thanks @bucknall !

          Please do not hesitate to get back to me if you want me to perform any test or operation on the pysense.

          B 1 Reply Last reply Reply Quote 0
          • B Offline
            bucknall @thomas
            last edited by

            @thomas Thanks! I'll let you know if I need any help! :)

            Developer Evangelist - Pycom

            1 Reply Last reply Reply Quote 0
            • A Offline
              albert_c
              last edited by

              I have the same thing here!
              I just received my pySense and use it out-of-the box. I upgraded my WiPy firmware to 1.7.4.1b and use the code samples from github (same as thomas above).

              1 Reply Last reply Reply Quote 0
              • A Offline
                albert_c
                last edited by

                The Problem persists after update the pySense firmware with pysense_0.0.2.dfu.

                B 1 Reply Last reply Reply Quote 0
                • B Offline
                  bucknall @albert_c
                  last edited by

                  Hi @albert_c,

                  I've made some changes to the micropython libraries which should increase stability. Could you try them again from https://github.com/pycom/pycom-libraries/tree/master/pysense and let me know if you're still having the same issues?

                  Thanks!

                  Developer Evangelist - Pycom

                  T 1 Reply Last reply Reply Quote 0
                  • A Offline
                    albert_c
                    last edited by

                    I did an overnight test: no errors. Works perfectly!
                    Thanks a lot for the quick fix.

                    B 1 Reply Last reply Reply Quote 1
                    • B Offline
                      bucknall @albert_c
                      last edited by

                      @albert_c Fantastic! Excited to hear about what you're working on!

                      Developer Evangelist - Pycom

                      A 1 Reply Last reply Reply Quote 0
                      • A Offline
                        albert_c @bucknall
                        last edited by

                        @bucknall Currently I'm evaluating my first WiPy's / PySenses around my house and garden. I am a Geologist in Germany and work in a small company focused on environmental measurements. We always check promising new products. The PyCom product family seems like a dream come true. Easy to use, cheap, if it now turns out to be also reliable we will certainly use Pycoms for our business. I wish you success!

                        Btw: a great thing to have would be a MicroPython Modbus library (in case you have spare time and dont know what to do with it :-) ).

                        B L 2 Replies Last reply Reply Quote 0
                        • B Offline
                          bucknall @albert_c
                          last edited by

                          @albert_c That's great to hear! We're pleased you're enjoying using our devices! :)

                          We have a MicroPython Modbus library on the roadmap for internal development; many people in the community have been requesting this library!

                          Developer Evangelist - Pycom

                          M C 2 Replies Last reply Reply Quote 0
                          • L Offline
                            livius @albert_c
                            last edited by

                            @albert_c
                            As start point - here is modbus python(not micro python) lib
                            https://github.com/riptideio/pymodbus/tree/master/pymodbus

                            Maybe this can help somehow

                            think about people first, then computers

                            A 1 Reply Last reply Reply Quote 0
                            • T Offline
                              thomas @bucknall
                              last edited by

                              Hi @bucknall,

                              I've just tested and it's also much better: no more errors so far. Only thing is a ~7° offset with the actual temperature. Any idea ?

                              Thanks anyway for the quick changes, great products, great team !

                              Thomas

                              B A 2 Replies Last reply Reply Quote 1
                              • B Offline
                                bucknall @thomas
                                last edited by

                                Hi @thomas,

                                This is expected as the temp sensor on the pysense is picking up the temperature of lopy as well. We're working on using the LoPy's internal temp sensor to use as an offset for pysense to give you the real world external temperature (One of the issues with having such a small PCB + package!).

                                This is in the works and should be arriving soon!

                                Developer Evangelist - Pycom

                                T S 2 Replies Last reply Reply Quote 0
                                • T Offline
                                  thomas @bucknall
                                  last edited by

                                  Ok, thanks @bucknall for the feedback.

                                  1 Reply Last reply Reply Quote 0
                                  • A Offline
                                    albert_c @livius
                                    last edited by

                                    @livius
                                    Thank you for the hint.
                                    In fact we work with pymodbus, or I should say we use it. I'm not very deep in Modbus and new to Micropython, this is why I currently do not want to go into it deeper. But there are quite a few devices that talk modbus.

                                    1 Reply Last reply Reply Quote 0
                                    • A Offline
                                      albert_c @thomas
                                      last edited by

                                      @thomas, @bucknall
                                      Thanks Thomas for checking thoroughly, thanks Bucknall for explaining the cause.

                                      I managed reduce the offset to < 1 °C by just putting my WiPy on Break-away headers like this one.

                                      The distance is makes clearly a difference. I did the test outdoor, without housing or enclosure, and compared to my simple outdoor thermometer. If you need exact values you certainly should elaborate more, but for my simple need +- 1° is good enough.

                                      1 Reply Last reply Reply Quote 2
                                      • M Offline
                                        mbriarg @bucknall
                                        last edited by

                                        @bucknall Hi Alex.Do you have any librery scheduled?
                                        Just to know if it's matter of weeks or months.

                                        B 1 Reply Last reply Reply Quote 0
                                        • B Offline
                                          bucknall @mbriarg
                                          last edited by

                                          Hi @mbriarg,

                                          What are you referring to? Are you asking about the internal temperature sensor and offset that I mentioned below?

                                          Developer Evangelist - Pycom

                                          1 Reply Last reply Reply Quote 0
                                          • C Offline
                                            chumelnicu @bucknall
                                            last edited by

                                            @bucknall Hi . Any news about micropthyton mbus lib?

                                            Thank you!

                                            B 1 Reply Last reply Reply Quote 0

                                            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                            With your input, this post could be even better 💗

                                            Register Login
                                            • 1
                                            • 2
                                            • 1 / 2
                                            • First post
                                              Last post

                                            Pycom on Twitter

                                            Pycom