Asset Tracking device


I am working on a UNI project, our project involves asset tracking (GPS) and if the asset is outside of its designated boundary it can be remotely locked.

I have been using an app on my mobile phone called GPS logger to push GPS coordinates to our back-end server and we can then use a browser to view the asset on a map.

Moving forward Instead of using GPS logger and my mobile-phone, I would like use the following hardware to send coordinates to our server:

  • Pycom LoPY4
  • Pycom Pytrack

I have a few questions and would appreciate it immensely if I could get some guidance.

Question 1: What is the best battery supply considering the device needs to send data every 30 seconds on the sigfox network and is solar an option if yes can you suggest a product.

Question 2: I need to be able to control a locking mechanism (Electric Solenoid Lock Australia) and would like to know if it is possible to attach it to the LoPY or Pytrack.

Thank you in advance.

Hi Sascha,

Welcome to the forum!!

How long were you looking to make the tracker last? And are you looking to use any sleep mode functions? They’ll allow you to push the module a bit further than keeping it idle while you wait.
Solar is definitely the way to go, but sizing the panel and battery off the board’s current requirements is the first step.

You’ll need a pretty hefty battery to be able to open the solenoid lock as the spec lists 12V @ 1.5A. You should be able to get away with using a supercapacitor in the correct configuration if it’s a once-off deal (the project is deployed and once it arrives you only have to open it once or twice).
To activate the module you’ll need a relay or MOSFET to allow for higher current to pass through the coil and activate it.

Re: using Sigfox, these low power radio transmissions usually have restrictions on the amount of bandwidth you can use (definitely worth reading up on Australia’s limitations).


Hi Liam

Thank you for the warm welcome,

I do intend to use sleep mode functions to reduce power consumption, is there perhaps a better option rather than using a solenoid lock? as by the default the lock should be open and only close on request?

Thanks for the heads up on sigfox Ill look into it.

if I do decide to use the relay could you perhaps provide a diagram on how to connect it to the Pycom device.

Once again thanks for you assistance.

1 Like

Hi Sascha,

I cant think of anything that springs to mind immediately, you’d have to confirm with the guys at Core to see if the lock is closed when the power is removed or no signal is sent.

I’ve got a LoPy board myself so can do a bit of an example if you like! You have to power the coil (Apply 5V or 3.3V, NOT FROM THE ONBOARD REGULATOR to the Vcc pin) and connect ground then activating it is as easy as pulling the input pin low.


Hi Liam,

Thanks for the response,

I will speak to the guys at core, if you could do an example that would amazing!!

Look forward to your response.


Hi Sascha,

I’ll grab it out today and get some pics, stay tuned!

In the meantime Tim made a great tutorial on using them with the Pi:

The logic level is the same so the only thing you will have to change is the pin being used (and some different code depending on what language you are programming it in)


Hey Sascha,

In my circuit there are three main parts, the LoPy, relay and the power supply to match. The relay is being powered from a 5V power supply using the dupont connection.

I used a logic level converter between to make sure the current was limited from the GPIO pin on the LoPy. I tested it will work with the raw output of the LoPy (3.3v). The logic level converter shouldn’t matter though since it feds through to the optocoupler anyways on this module.

Heres the code I used:

from machine import Pin
from utime import sleep

import pycom

relay_pin = Pin('P12', mode=Pin.OUT)



Hi Liam,

Thank you so much for putting that all together, there are no words for my appreciation another then this noob which in me is extremely grateful. :rofl:

I have received my initial order from Core (*PS amazing service) which included a lopy4 and the pytrack, once I have successfully got that all working ill move on to your steps.

I have hit a dead end and spent hours troubleshooting my issue. So after updating my lopy4 and the pytrack, the terminal in vscode and atom get stuck with the following message " Connecting to COM 6" and I cant type anything in the terminal, before I done the firmware updates I was able to program the device to change the light colors but now nothing, perhaps any advise on this issue?

Once again thanks for your help.


Hey Sascha,

I use Atom and Pymakr to program it, can you break into the REPL and verify you still have access to the device?


Hi Liam,

I just reinstalled the firmware again and now its working, thanks for your prompt response.