Read the full blog post at https://blues.dev/blog/using-an-external-gps-with-the-notecard and continue the discussion here.
Does this instruction work for LoRa Notecards as well? (I mean not only hardware connection to an external GPS but also the settings like card.location etc.)
Hey @e669danesh - No this instruction does not apply to LoRa Notecards. To use an external GPS/GNSS module, the card.aux.serial request is needed, and this request is not supported on the LoRa Notecards.
Thanks
Youssif
Thank you, Youssif. So the only way to add this functionality is through the MCU, correct? If that’s the case, can we modify note.templates to send Lon/Lat data (eg, using _lat and _lan) ?
Hey @e669danesh - yes that’s correct, you can connect the external GPS to your MCU, send the data from the MCU to the Notecard, and then use templated notes to push this data to Notehub.
Thanks
Youssif
I’m following this, and my question is: can I use the external GPS connected to a Notecarrier X, and then connect the Qwiic/I2C interface to a Raspberry Pi 2 W which then communicates with the Notecard via I2C?
I already have a test with the Notecard + Notecarrier Pi via I2C working, but my use case requires the external GPS like proposed in this post.
Thanks,
Henrique Cabral
Hi @hcabral
Thanks for the follow-up. Just to confirm my understanding, you’re planning to have the setup shown in the image below, where the Pico communicates with the Notecard over I2C, and the Notecard is connected to an external GPS via the AUX UART pins?
If that’s the case, then yes, this configuration should work, as long as the Notecard is not the LoRa variant (which doesn’t support an external GPS). This is in fact the recommended approach for applications that require continuous positioning or frequent location updates.
You can also connect the Raspberry Pi to the Notecard using the standard UART pins instead of I2C if you prefer. Whichever setup you choose, please make sure all components share a common GND and receive the correct supply voltage.
You can find more details in the following resources:
Let us know if you run into any issues or have any other questions.
Thanks
Youssif
Hi @Youssif thanks for getting back to me.
Yes, that’s more or less my setup, a 2W instead of a Pico. Regarding power, yes, I need to take that into account, and perhaps feed the Notecarrier X and Notecard separately if applicable.
I’m exchanging some ideas with @RobLauer here in this topic where he mentioned using serial RX/TX instead of I2C.
There are 3 GND on the Notecarrier X, so you say I should connect both the Ada Fruit GPS GND and Pi 2 W GND to the same one in the X?
Thanks,
Henrique
Hey @hcabral
Yes, that’s correct, all GND pins on the Notecarrier X are tied together, so you can safely connect both the Pi 2 W and the Adafruit GPS’s GND to any of them.
Rob is correct, using serial TX/RX for the connection between the Pi 2 W and the Notecard is indeed the preferred approach, because of the the Pi’s I2C clock stretching issues.
Let us know if this answers your question or if there’s anything else we can help you with.
Thanks
Youssif
Hi @Youssif,
Yes, I will give it a try and keep this thread updated with my results. Thanks!
Henrique
Just an update on this topic: I managed to make it work using the external GPS ↔ Notecard X and the Raspberry Pi 2 W connected to the Notecard X using the RX/TX serial connections. So thank you for the clarifications and help! =)
Does the motion detection feature also actuates in the communication with serial port?
Following up, is my assumption correct the the {"req": "card.location"} will never return bearing and velocity? Is it a function of the track mechanism inherent to Notecard?
It seems that the velocity and bearing may be available in the JSON event (not in the payload/body), but I can’t seem to access that information from the Route that I created (for now a simple webhook). Are you able to confirm these assumptions for now?
Cheers,
Henrique Cabral
Hi @hcabral,
Does the motion detection feature also actuates in the communication with serial port?
Yes, the Notecard treats and external GPS the same way as its onboard GPS.
Following up, is my assumption correct the the
{"req": "card.location"}will never return bearing and velocity? Is it a function of thetrackmechanism inherent to Notecard?
Correct. The bearing and velocity fields are calculated and only appear in _track.qo Notes on Notehub. They won’t appear locally on the Notecard.
It seems that the velocity and bearing may be available in the JSON event (not in the payload/body), but I can’t seem to access that information from the Route that I created (for now a simple webhook).
If those fields are available, they should appear in the body of an event on Notehub. Please review this doc on the _track.qo Notefile for more detailed information about how/when those fields should appear.
Thanks,
Rob
Thanks once more @RobLauer.
Do you know if there’s a limit or hard configuration on the refresh rate of the external GPS? Even though it can do 1-10Hz, I can only get an updated location from card.location every 5 seconds. I’m using the card location in continuous mode with the accelerometer disabled.
Cheers,
Henrique
Hi @hcabral,
Good catch! Yes, the most frequently you can access updated GPS data is every 5 seconds. This limit exists because, while GPS modules can send NMEA sentences at a high frequency, without rate limiting this would cause excessive flash wear and high processing overhead on the Notecard.
Rob
