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

    Disconnect power lines

    Scheduled Pinned Locked Moved Discussion
    10 Posts 3 Posters 73 Views 3 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.
    • E Offline
      ecabanas
      last edited by

      Hi all

      I have a Sipy and I put a deepsleep every 15 minutes. I have a ds18b temp sensor and I saw that may be the energy is on when the pycom is in deep sleep. There is any option to power the lines via pin? I saw an example but I don't know if this line has a mosfet or something that cuts the power in deep

      Thanks'

      Eduard

      robert-hhR 1 Reply Last reply Reply Quote 0
      • robert-hhR Offline
        robert-hh @ecabanas
        last edited by

        @ecabanas you can power the ds18b20 from a gpio pin, which you switch on and off as required.

        1 Reply Last reply Reply Quote 0
        • E Offline
          ecabanas
          last edited by

          Hi @robert-hh

          Do you know if powering via gpio, will no have power leak? I designed a board for arduinos 2 years ago and the only way to avoid power leaks is using mosfets...

          Thanks again

          robert-hhR 1 Reply Last reply Reply Quote 0
          • robert-hhR Offline
            robert-hh @ecabanas
            last edited by

            @ecabanas A good way avoiding that is to switch the GPIO pin to 0 or to input mode before starting deepsleep. That stops potential leakage. The current drawn by the ds18B20 is ~1 mA in active mode. So suppying it from a GPIO is not a problem.
            Take care to connect the pull-up resistor for the data line to the same source.

            K E 2 Replies Last reply Reply Quote 0
            • K Offline
              kjm @robert-hh
              last edited by

              @robert-hh One thing I discovered Rob is not all DS18B20s are created equal. I found my collection of several dozen, acquired over as many years of tinkering, fell into 3 groups of standby power consumption. Group1, standby power <1uA, group2 0-1uA & group3 50uA.

              robert-hhR 1 Reply Last reply Reply Quote 0
              • robert-hhR Offline
                robert-hh @kjm
                last edited by

                @kjm Were these all genuine parts or also some fakes. You sure know this post: https://github.com/cpetrich/counterfeit_DS18B20

                K 1 Reply Last reply Reply Quote 0
                • K Offline
                  kjm @robert-hh
                  last edited by

                  @robert-hh unreal!

                  1 Reply Last reply Reply Quote 0
                  • E Offline
                    ecabanas @robert-hh
                    last edited by

                    @robert-hh

                    Hi,

                    Thanks for your answer and sorry about the delay but I was closing year.

                    I connected to pin0 with the following code:

                    from machine import Pin
                    import utime
                    import time
                    import socket
                    import pycom
                    import machine
                    
                    
                    
                    #Power the sensor
                    pinPwr = Pin('P0', mode=Pin.OUT)
                    pinPwr(True)
                    pycom.heartbeat(False)
                    pycom.rgbled(0x00ff00)
                    time.sleep(2)
                    pinPwr(False)
                    machine.deepsleep(1000*10)
                    

                    But I only have 2.20volts, and the minimum for the sensors are 3.3V, you know why I only have 2,2vlt?

                    Thanks

                    Eduard

                    E robert-hhR 2 Replies Last reply Reply Quote 0
                    • E Offline
                      ecabanas @ecabanas
                      last edited by

                      @ecabanas
                      now is working on pin8

                      ;-)

                      1 Reply Last reply Reply Quote 0
                      • robert-hhR Offline
                        robert-hh @ecabanas
                        last edited by

                        @ecabanas You cannot use P0, because that one is the RX pin of the UART0. Use another pin.

                        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 / 1
                        • First post
                          Last post

                        Pycom on Twitter

                        Pycom