This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

AUTOMATICALLY ACTIVATE GPS WHEN IT DETECTS MOVEMENT

Hi,

I am working on the asset_tracker application example on a Thingy:91 device. As I understand it, to activate the GPS it is necessary to keep the button pressed for a long time. Once active, the GPS could be activated by detecting a movement (using the accelerometer), but this happens when the GPS has been previously activated by prolonged pressing of the button.
However, I would like to make a modification that does the following:

1) The device is in sleep mode until it detects a movement.
2) When it detects a movement with the accelerometer it searches for LTE communication and activates the GPS automatically.
4) The device must have the GPS active and send position until a command is received (e.g. press the button).

I understand that it shouldn't be too complicated, but the tests I have done have not been satisfactory and I would appreciate any help.

Thank you!

Parents
  • Hi Raquel,

    I have discussed this with my team and here are a few things to start with.

    1) The device is in sleep mode until it detects a movement.

    I heard that there is some code for ADXL362 for Thingy:52 that is worth checking out. I would also recommend to look into the details of the sensor as it has some nice features for waking up. Like programming the two interrupt pins according to the requirements of your application. The sensor has a FIFO that allows you to analyze and verify if the movement that triggered the interrupt is what you actually want to detect and not only some strong vibrations. Also, if you want to do some serious power saving you could design your hw to use the interrupt from the sensor to enable necessary power rails on your board. Solder a bridge on the board if you want to use Int2 from the sensor.

    2) When it detects a movement with the accelerometer it searches for LTE communication and activates the GPS automatically.

    Will you be using eDRX or PSM? Here is a relevant thread on the topic https://devzone.nordicsemi.com/f/nordic-q-a/63075/nrf9160-psm-and-edrx-modes. More info on the two modes over at Link-Labs: PSM or eDRX.

    Check out set_gps_enable in long_press_handler which starts and stops the gps link in asset_tracker. You could perhaps modify this and make it into something like a "wake on movement handler"? For example, if motion from the accelerometer then wake from PSM, connect to base station and activate GPS. Please also check out aGPS(which is using less current and has a faster TTFF(time to first fix)).

    4) The device must have the GPS active and send position until a command is received (e.g. press the button).

     nRF91 sleeps in PSM mode when GPS is active. You can then wake up from PSM to send over LTE. This should be the principle but I have not yet checked the details.

    Let me know what you think.

    Best regards,

    Håkon

Reply
  • Hi Raquel,

    I have discussed this with my team and here are a few things to start with.

    1) The device is in sleep mode until it detects a movement.

    I heard that there is some code for ADXL362 for Thingy:52 that is worth checking out. I would also recommend to look into the details of the sensor as it has some nice features for waking up. Like programming the two interrupt pins according to the requirements of your application. The sensor has a FIFO that allows you to analyze and verify if the movement that triggered the interrupt is what you actually want to detect and not only some strong vibrations. Also, if you want to do some serious power saving you could design your hw to use the interrupt from the sensor to enable necessary power rails on your board. Solder a bridge on the board if you want to use Int2 from the sensor.

    2) When it detects a movement with the accelerometer it searches for LTE communication and activates the GPS automatically.

    Will you be using eDRX or PSM? Here is a relevant thread on the topic https://devzone.nordicsemi.com/f/nordic-q-a/63075/nrf9160-psm-and-edrx-modes. More info on the two modes over at Link-Labs: PSM or eDRX.

    Check out set_gps_enable in long_press_handler which starts and stops the gps link in asset_tracker. You could perhaps modify this and make it into something like a "wake on movement handler"? For example, if motion from the accelerometer then wake from PSM, connect to base station and activate GPS. Please also check out aGPS(which is using less current and has a faster TTFF(time to first fix)).

    4) The device must have the GPS active and send position until a command is received (e.g. press the button).

     nRF91 sleeps in PSM mode when GPS is active. You can then wake up from PSM to send over LTE. This should be the principle but I have not yet checked the details.

    Let me know what you think.

    Best regards,

    Håkon

Children
No Data
Related