Advice welcome; read thermistor, transmit over LTE, deepsleep

  • My plan is to get the GPy and solder a thermistor to the board and take analog readings. (I've already done this on a pyboard) I then want to make an HTTP POST request over LTE to my server (as I plan to put this out in the field) and enter a deep sleep to save battery life (ideally I'd like this to run for several days).

    As a complete beginner, I'd love to hear people's advice. Things I should look out for. Things you wish you knew when you were getting started.

    I have a few questions to start with.

    • I read LTE is the same as 4G. Is that true? Here in the UK can I just use a GiffGaff 4G sim card?
    • How long can I expect this project to run for on a 6000mah battery? How would I work this out?

    Thanks again. Apologies for such basic questions 🙏


  • @nwjlyons In addition, *Py modules are notoriously fiddly when it comes to deep sleep, and the GPy/FiPy even more. If you read through the forum, you'll see lots of stories about modules drawing more current than expected, modules not going to sleep or not waking up, etc.

    Be prepared to spend quite some time on that. It can do what is stated on the can, but it can be quite difficult to achieve. Be sure to get the correct firmware updates for both the ESP32 and the modem and the correct sequence of boot-attach-send-detach-sleep.

    Also make sure you get one of the newly calibrated GPys, they're supposed to give much better results.

    Finally, how do you plan to connect the battery? Behaviour can be quite different on battery than when running over USB. If you add a Pysense or Pytrack in between the battery and the GPy that's yet another thing that can quite a bit of complexity, especially when it comes to deep sleep and power consumption in deep sleep. If you connect the battery more or less directly, I remember having seen discussions about *Pys failing to wake in some circumstances.

    Nevertheless, many people achieved what you want to do, so do not despair. Just be warned that it may take a lot longer than just putting the things together and throwing a bit of code at it. Make sure you have the right tools at hand to mesure and monitor power consumption.

  • @nwjlyons LTE and 4G are the same, but remember that the GPy and FiPy only support the "narrowband" versions: LTE Cat-M1 and NB-IoT. So your carrier needs to support one of them, which is not universally the case. Some may have support limited geographically, or may require a specific SIM or plan, or may require prior registration, etc. Also, many networks support one or the other, not both. Additionally, it may be available only when contracting directly with the carrier which operated the network and not via MVNOs.

    Pycom had a page which listed which networks supported what but that has not been updated for years.

    The GSMA has a coverage map but it's definitely not up-to-date, O2 UK has both NB-IoT and CAT-M1 but they aren't listed, for instance. Three UK is currently trialing both technologies before a nationwide rollout that is "expected to take several years".

  • This post is deleted!

  • @kjm thanks 🙏. So if I took a reading every five minutes the GPy could run for about a week.

    2400 cycles * 5 minutes = 120,000 minutes runtime

    120,000 minutes runtime in days ~= 8 days.

  • To wake up, read a sensor, attach, connect, send the data, detach, disconnect takes about 30s and ~30ws(say 0,01Wh in round numbers) of energy, so a 24wh battery should give you around 2400 such cycles. GPYs will happily run CAT-M1 with a regular 4G/LTE sim.

  • This post is deleted!

Log in to reply

Pycom on Twitter