RAK5010 GPS turning on and off to save power.

Posted on
  • Hi I am interested in starting up the GPS on the RAK5010 module but the documentation only details turning it on in the call

    require("iTracker").setGPSOn(true, function(err, gps){});

    Is the an equivalent method similar to turn it off to save power?

  • you can double check here, but it looks like you just call
    require("iTracker").setGPSOn(false, callback); to turn it off.

  • @yngv126399 that's so simple. I wasn't exactly sure from the documentation. Thanks I will test it out.

  • When I turn on the GPS using ...

    require("iTracker").setGPSOn(true, function(err, gps) .. blah blah

    The setGPSOn does not apparently turn the power on to the GPS antenna . The GPS antenna is active and requires power to be set on.

    P1.07 has to be set high ....

    from the RAK5010 overview doc ...

    GPS Antenna Power Supply Control
    To support low power and long battery life, the active GPS antenna power supply should be shut down when system doesn’t access the data from the GPS module. The GPS power supply is controlled by nRF52840 with MOSFET. The pin map of GPS_EN on Nrf52840 is P1.07, and the circuit is shown in Figures 13 and 14:
    Set P1.07=1, GPS antenna power is on.
    Set P1.07=0, GPS antenna power is off.

    I cant see where P1.07 is defined in espruino in order to write it ...

    Any suggestions ? TIA.

    moodz

  • Sat 2021.09.04

    'from the RAK5010 overview doc'

    'I cant see where P1.07 is defined in espruino'

    That reference is more likely a RAK or Nordic convention.

    Please supply the link to the RAK5010 overview doc, along with the circuit is shown in Figures 13 and 14 link, so that we may follow along to provide the suggestion you are after.

  • Thanks Robin ....
    The nordic doc has the cct and pin under ( see GPS antenna section )
    https://docs.rakwireless.com/Product-Cat­egories/WisTrio/RAK5010-M/Datasheet/#har­dware

    I found the fix from examining the source in ..
    https://github.com/espruino/Espruino/blo­b/master/libs/js/rak/RAK5010.js

    The pin is defined but the code never turns the power on ?? ...
    the comment says
    line 118 // FIXME: GPS_EN pin?

    GPS_EN is mapped to D39 in PINS earlier ...

    So I used this in my code ..
    //turn GPS antenna power on.
    digitalWrite(D39,1);

    sets the GPS antenna power on.

    Checked it ( carefully ... ) with the voltmeter .... 3.6 volts with D39 set to 1 and zero volts when D39 set to 0.
    So I my RAK 5010 is now kinda working for GPS ... I am using the setGPSOn from espruino site example code .. but the parsing is broken maybe because debug is now telling me Im getting position info from the GPS but I am getting broken output. ( which I wasnt before with the antenna power turned off ;-) ) ... I was not getting any output LOL.

    moodz

  • Sat 2021.09.04

    GPS_EN was the next suggestion I had in mind, but wanted to verify with your documentation first.

    'but I am getting broken output'

    By 'broken' , Is it that the output is not complete?

    Is it possible that much more time is needed to sync in more satelites for an accurate reading? Although I'm not familiar with the RAK, I remember that the UBLOX GPS required an initial five minutes or so, in order to sync with at least six satelites, before reliable data was observed.

  • I am a js noob ...but you are right it looks like the RAK5010 takes a few minutes to acquire initial GPS lock and the code seems to re-request the Quectel 96 before it's replied to previous requests.

  • Sun 2021.09.05

    Don't be so hard on yourself @user133902 ,  took me quite a bit of time to learn all the idiosyncrasies of each module, and on which bus type they each passed data.

    Check out this thread I created several years back showing images of the data stream with GPS.
    UART hex data is converted to ASCII text using a protocol decoder.

    Programming the Ublox NEO-6M GPS configuration

    Glad you now have a working solution. . . .

  • Sorry for the delay, I was away last week.

    Thanks for this - I'll ensure I update the library to set GPS_EN. Did you ever figure out the fix parsing?

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

RAK5010 GPS turning on and off to save power.

Posted by Avatar for user132204 @user132204

Actions