Power supply issue by Vin on Sipy + Deep Sleep Shield



  • Hi everyone,

    In one of my projects I want to do without the pysense and use only the Sipy with the deepsleep shield. I have programmed it with the expansion board 2.0 and feeding it with the USB cable works perfect. The code reads several sensors, sends the values to the sigfox backend and goes back to sleep.

    When I feed it directly with a 3.7v 5 Ah lipo battery, it doesn't send anything, i.e. the code doesn't work. I have tried to flash a code that only makes the led blink and changes the colors and this code works properly with the lipo battery.

    I think it doesn't work because of the current requirement that the code has, having to power the sensors and the Sigfox chip, even though the battery is fully charged, does not work.

    I tried feeding it with 5v from a power supply, but I had a problem with the power supply and burned the module. I also tried feed it with 3.3v from external power y does not work.

    Does anyone know if the sigfox contract linked to one Sipy can be passed to another Sipy? What is the reason why my code does not run when I feed it with the 3.7v battery or 3.3v from external power supply, only works with USB?

    Note: the firmware is update.

    Thank you in advance.



  • 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



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



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



  • @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-hh Ok, as soon as I can try to remove the jumpers from the expansion board and try.



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



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



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



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



  • @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?



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



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



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



  • 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).



  • Please, Can anyone replicate my issue?



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



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



  • @nespressif I feed it with ~5V though Vin. I do not use SigFox, but LoRa. But bot use the same Modem chip, and the power pattern should be the same. The SiPy has no SPIRAM, so the Size of Python code it can run is limited. As a rule of thumb, about 500 Python lines of code. If your code needs more RAM for it's data, then less.



  • @robert-hh And you achieve to send data via Sigfox by feeding the module with an external power supply through the Vin? With which voltage do you feed it 3.3v or 5v?

    Because I already tell the code that they don't use Sigfox or ADC work fine, but my code with ADC and Sigfox is turned off. I have to try several codes, to be able to discard more things.


Log in to reply
 

Pycom on Twitter