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

    Power supply issue by Vin on Sipy + Deep Sleep Shield

    Scheduled Pinned Locked Moved SiPy
    vinsipypower supply
    30 Posts 4 Posters 4.8k Views 4 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.
    • nespressifN Offline
      nespressif @robert-hh
      last edited by nespressif

      @robert-hh My code works fine when I feed the module with the expansion board or pysense by USB or with the lipo battery in the JST connector.

      This is why I think it's not a code problem, in addition, all libraries are integrated into the firmware as frozen code, as you suggested, so most of the code does not count for those 500 lines, only the main.py and little more.

      I will try with other codes and also try with 5v stable through Vin.

      Do you think that if I connect the 5.72v that my ATX power supply gives to the Vin, will I damage the module?
      Since the data sheet indicates a range of 3.5-5.5v, yesterday I didn't dare to try, I don't want to break another module.

      1 Reply Last reply Reply Quote 0
      • nespressifN Offline
        nespressif
        last edited by nespressif

        @robert-hh @dan I've already achieved to isolate the problem,this function crashes the program only when I feed the module from the Vin, with or without ds shield. Everything else works fine, it sleeps and wakes up as expected, I still have to measure the consumption.

        wake_s = ds.get_wake_status()
        

        In this function of the deepsleep.py library, the program breaks, when the usb cable is not connected in the expansion board.

        def get_wake_status(self):
                # bits as they are returned from PIC:
                #   0: PIN 0 value after awake
                #   1: PIN 1 value after awake
                #   2: PIN 2 value after awake
                #   3: PIN 3 value after awake
                #   4: TIMEOUT
                #   5: POWER ON
        
                wake_r = self.peek(WAKE_STATUS_ADDR)
                return {'wake': wake_r & (TIMER_WAKE | POWER_ON_WAKE),
                        'P10': wake_r & 0x01, 'P17': (wake_r & 0x02) >> 1,
                        'P18': (wake_r & 0x08) >> 3}
        

        I don't know if it's a bug, it's strange that no one's ever reported it before.

        So if I feed it with a battery I can't know the reason wake up, which for me is interesting. Nor can I know what error reports, because I do not have connected the cable uart.

        1 Reply Last reply Reply Quote 0
        • nespressifN Offline
          nespressif
          last edited by

          Please, Can anyone replicate my issue?

          1 Reply Last reply Reply Quote 0
          • R Offline
            reidfo
            last edited by

            I'm not sure if this will help or not, but I use the FiPy with expansion board 3.0. If I try to boot off just the LiPo battery it will not boot. The solution to that is to tie P8 to high (3V3).

            nespressifN 1 Reply Last reply Reply Quote 0
            • nespressifN Offline
              nespressif @reidfo
              last edited by nespressif

              @reidfo Thanks for your input, that problem is already reported for the expansion board 3.0, but it is not the same.

              The problem here is that when you use only Sipy+ds shield feeding it from the Vin, if you use the mentioned function, the program breaks.

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

                @nespressif At which point do you connect Vin. At the SiPy or at the DS-Shield? As far as I understand it, it has to be at the DS Shield's bottom side pins.

                nespressifN 1 Reply Last reply Reply Quote 0
                • nespressifN Offline
                  nespressif @robert-hh
                  last edited by nespressif

                  @robert-hh I usually connect it through the pins at the bottom of the deep sleep shield. But no matter where I connect it, if I don't use the deepsleep.py library, the Sipy works perfectly feeding it through the Vin. If I use Sipy+ds shield with the deepsleep.py library and I don't use the ds.get_wake_status() function, everything works perfectly.

                  The problem occurs when I use Sipy+ds shield+deepsleep.py+ds.get_wake_status() and feed it through Vin (without expansion board). If I add the expansion board and feed it with USB, everything works perfectly.

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

                    @nespressif That sounds as if some other Pins that are connected with the expansion board interfere with the DS shield behaviour. You mentioned to use Expansion Board 2.
                    Does the behaviour change if you remove all jumpers from the expansion board, and if yes, which jumper makes a difference?

                    nespressifN 1 Reply Last reply Reply Quote 0
                    • nespressifN Offline
                      nespressif @robert-hh
                      last edited by nespressif

                      @robert-hh No, I really only use the expansion board to program the Sipy, once programmed I no longer use it, I only use the Sipy+DS Shield+3.7v Lipo Battery, only these three elements and nothing else, connecting the positive to the Vin of the Shield and the gnd to the gnd of the shield, if I include in my program the get_wake_status() function does not work and without the function, it works fine.

                      I think it is a problem of the deepsleep.py library, the get_wake_status() function uses the functions self.peek() and self.magic() and within this self._send() function that uses self.uart.write(bytes(data)). I don't know how it works, but the error may be due to the fact that you want to write data to Uart and it doesn't have the expansion board connected, you don't have uart. But this is just a supposition of mine, I don't know how the library works.

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

                        @nespressif That was nto my intention. You said it works with Expansion boartd and does not w/o. So I suggested to get with the expansion board the electrical status w/o by opening all connections besides GND and Vin.

                        nespressifN 1 Reply Last reply Reply Quote 0
                        • nespressifN Offline
                          nespressif @robert-hh
                          last edited by nespressif

                          @robert-hh Ok, I didn't make myself clear. What I mean is that if I use the expansion board to feed the Sipy+ds shield, the program with the function get_wake_status() works fine and doesn't break.

                          But I just want to use the Sipy+ds shield+3.7v lipo battery.

                          Please, read my previous comment, I think I explain myself better. I will also upload some photos soon.0_1542801022855_IMG_20181121_124232.jpg

                          0_1542801041803_IMG_20181121_124220.jpg

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

                            @nespressif I understood your statements well. I suggested to test, whether it fails with expansion board, but all jumpers from the expansion board removed.

                            nespressifN 2 Replies Last reply Reply Quote 0
                            • nespressifN Offline
                              nespressif @robert-hh
                              last edited by

                              @robert-hh Ok, as soon as I can try to remove the jumpers from the expansion board and try.

                              1 Reply Last reply Reply Quote 0
                              • nespressifN Offline
                                nespressif @robert-hh
                                last edited by

                                @robert-hh I've already tried it, with the expansion board it works well with the jumpers as well as without them.
                                0_1542804640500_IMG_20181121_134642.jpg

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

                                  @nespressif That's .. interesting. I assume it is hardware related. And without the jumpers and without a SD card inserted, at least according to the 1.2 schematics of the expansion board, nothing stays connected but the button at P10, which is open, and Vin, GND and 3.3V. There are additional capacitors at 3.3V and Vin (10µ + 0.1µ). Of course, the wires on the board add a small capcitive load, but that should not change so much.

                                  nespressifN 1 Reply Last reply Reply Quote 0
                                  • nespressifN Offline
                                    nespressif @robert-hh
                                    last edited by

                                    @robert-hh Like I said before, I don't know much about electronics. I think it's a problem with the deepsleep.py library, but it strikes me that no one has reported the error before, because if you feed it with batteries through Vin, you can't use the get_wake_status() function and therefore, you can't know why he woke up. But let's see if someone from Pycom can solve something for us.

                                    I have two questions about Deep Sleep Shield, to see if you can help me:

                                    1.- What is the Deep Sleep Onewire Comm Pin (P10) for?
                                    2.- Looking at the diagram I see that there are some Pins with voltage dividers. Can I use some pin of the Shield, to measure the charge of the battery that feeds it through Vin?

                                    Thanks for your help

                                    1 Reply Last reply Reply Quote 0
                                    • nespressifN Offline
                                      nespressif
                                      last edited by

                                      To close this post, I wanted to say that the issues I found in the deep sleep shield, have already been reported before in this forum.
                                      My mistake was not to do an exhaustive search before posting.

                                      Conclusion: the deep sleep shield has quite a few problems when powered by a lipo battery.

                                      *bradnz hace 12 meses
                                      For any one interested, or has this issue in the future I have resolved this by doing the following:

                                      Rolled back firmware to 1.7.9.b3
                                      Used version 1.0.0 of the deepsleep.py file from github.

                                      Works fine now.*

                                      post1

                                      post2

                                      post3

                                      1 Reply Last reply Reply Quote 1

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

                                      Pycom on Twitter

                                      Pycom