FiPy + PyTrack & LiPo no GPS coordinates

  • Hello,

    I have doing some testing with the PyTrack + Fipy and have some problems :

    1. When the board Pytrack start by USB, there are no probleme. I join LoRaWAN network and send data with correct positions.

    2. When th board Pytrack start by LiPo battery (2500 mAh 3.7V ). My device join LoRaWAN network but not send data correctly because I have empty coordinate in LoRaWAN message.
      I suspect the GPS, it dosen't work correctly when is connected by LiPo and return always "None" value.

    My code is similar to your exemple from github for the GPS.

    I can try with Lopy for test, but have you an idea while it's doesn't work with Fipy ?

    Thanks in advance.

  • @robert-hh Thanks for your reply, you have true. I searched components during the starting.

    And I comment this lines codes :

    #wlan = WLAN()
    #bt = Bluetooth()
    #serveur_ftp = Server()

    I don't test with each line only, but now it's working. I have fix coordinate when the Fipy powered by Lipo.

  • @radec FiPy has some strong current peaks, so Vcc may drop to a brownout level, where some component start malfunctioning, like the GPS receiver or some parts of the ESP32, and other parts continue to work.

  • @jcaron Yes, I checked, I wait normally 30-60 seconds to get a fix after starting.
    But I don't understand why in same place with the same hardware (Fipy + Pytrack) and same code I get fix coordinate with powered by USB (on my laptop) and never when it is powered by Lipo.

    And with Lopy4 + Pytrack same place, same code : with Lipo or USB powered, it's work.

    (I will test again with an other method and code (write the data on SD) and check if I have coordinates with Fipy and Pytrack powered by Lipo. )

  • @radec the GPS chip may take a lot longer than 20 seconds to get a fix after starting up, depending on circumstances. You should check the output and wait until a position is actually available.

  • @crumble Thank you for your reply. I do a pause about 20 sec before to get position from GPS (stratup Pytrack, Join LoRaWAN, ...).

    But I try with Lopy4 with Lipo and it's work ! I have GPS coordinate after 2 minutes. It's the same code for Fipy and Lopy .

    And for Fipy, but it's doesn't work only with Lipo.
    When it's start by USB, it get positions.

    After researchs, I found a old topic with the same problem @COMBAINDEFT @PYMIOM :
    I confirm I have the last firmware available for Pytrack (pytrack_0.0.8.dfu) and FiPy.

  • I can try with Lopy for test, but have you an idea while it's doesn't work with Fipy ?

    LoPy will double your problems. LoPy has only a small amount of RAM and the example creates a lot of objects on the heap. So you have to deal with fragmentation.

    Check your startup code. My pytrack needs up to 5 sec to be ready. You may be too fast without debug prints.

    Check for multiple I2C usage. There must be a bug with multithreading. I get faulty data when using the GPS in a thread. Without filtering the bad data, your code may fail.

    @robert-hh mentioned to deinit other device before using the actual one. I tried too solve it with locks, but failed. @paul-thornton from pycom looks right now on my code. If you run into the same problem there will be a workaround in a few days ;)

Pycom on Twitter