Back to Smartcitizen.me

Configuring GPS module for SCK

Hello,

I am developing a similar project to Almabike with a SCK 2.1 and a GPS module. The idea is to attach several kits to different bicycles and collect their GPS + PM + Noise data via the SmartCitizen API if possible, and consume it from a different platform.

First of all, the module I have already tried is the GPS: GPS Seeed Studio (SIM28)

I’ve been having trouble connecting the GPS to the kit, from SCK’s shell doesn’t detect anything on AUX port, and when I try to enable the GPS sensor manually it doesn’t give any feedback (see photo).
aux

Recently, I have bought the NEO-M8U GPS module to try it also with the kit as it’s stated as the official one for Almabike project, the thing is that there is no documentation about how the connection with the Data Board is done.

I’ve been searching through the docs and the guides but I couldn’t find anything about configuring a GPS module for the kit. I have also found this topic #1402 but again it doen’t lead me to any further clue. Is there any guide that I can follow or any advice that you can give me to do this? Is the Almabike project’s source-code open (couldn’t find it)?

Thanks in advance,
Ander

1 Like

I am not official support but I can say this:
The neo 8mu gps connects to the SCK using i2c connection. (The “aux” connector on the data board.) It will need the shortest available Grove cable you can get (100mm I think).
Be careful (gentle) handling the aux connector, I managed to break mine and it was a hassle soldering it back on.
If your appears not working check the connection (using a magnifying glass and a bright light) as a starting point.

The I2C address of the neo board is given on the sparkfun documentation. Is it one of the “found” addresses ?

When I got my neo I also purchased separately an antenna from Digikey which is a flat flexible type.
I am uncertain if sparkfun can also supply them.

The antenna must have the correct size miniature coaxial connector to fit the tiny gold coloured connector on the gps board. It is a single wire connection. For the bicycle kit the antenna will need to be as short as possible so it fits into the enclosure bag.
No antenna = no gps signal = no readings

You will need to work out an appropriate mounting for the gps and the antenna.

Firmware config:
You seem to have this under wraps.

Thank you very much @bryn.parrott for your quick answer.

Let me answer you by topics.

AUX port and I2C:

  • The kit is only recognizing UrbanBoard’s sensors, as you can see (see photo) the AUX I2C bus it’s empty, therefore the GPS from Seeed Studio is not being recognized (the one I’m currently using).
    image
  • The question here is, is there something that is need to be done in order to the kit to be able to recognize this module?

NEO M8U:
Regarding the Grove connection,

  • The module only has 2 connection ports: USB-C and ‘qwiic’
  • In Almabike’s project the port they use is the ‘qwiic’ one (see photo)
    image
  • So, the question is, is it possible to connect this ‘qwiic’ port to a Grove one without a specific driver? (and therefore connect the NEO GPS module to the Data Board)

Antenna:

  • It is no problem because I have an already tested functional one

GPS Seeed Studio:

  • I checked that is working with a different board
  • Is it possible to have this module working with the current firmware? (I found some code that relates to this particular module but it doesn’t recognize it)

Summary:

  • I don’t know how to connect the NEO M8U module from a ‘qwiic’ port to the DataBoard’s AUX.
  • If I use the GPS Seed Studio module it doesn’t detect it

These are the main issues right now. Any help or guidance is more than welcome.

Thank you again

Edit1: is ‘qwiic’ and not ‘qwiik’
Edit2: @bryn.parrott Now I see your point on the cable, by ‘shortest Grove you can get’ you meant this type of cable , didn’t you? So the question remains, the only way to connect them is to buy an specific driver?

Hi @ander.eguiluz

Nice to hear from your project!

We currently support this list of GPS modules only, and the NEO M8U and SEEED ones should be detected. In principle, any I2C device that is connected via the AUX port should be detected in the bus, although it will not be read by the SCK if it’s not implemented. If the GPS is not being recognised, I am afraid there might be some problem as @bryn.parrott suggests and it needs some debugging.

Regarding the connection between the NEO M8U, you need this cable and nothing else. In the latest version of the firmware the GPS should be automatically detected. If you want to post all the data to the platform you should use the advanced kit selection and select SCK 2.1 GPS (Smart Citizen Kit 2.1 with GPS) [32]

Regarding the data forwarding, you can implement if you want in scdata, more in particular in this section with these instructions. You can implement this in the package if you want and make a PR, or follow a similar structure and manage it yourself in a server, both should be fine.

Let us know if this helps,

Óscar

Thanks a lot for your fast response @oscgonfer !

Concerning the AUX port I’ll take a closer look and see if there is any problem there.

Concerning the qwiic-Grove cable I’ll try to have the NEO-M8U module working as soon as I get the cable.

Finally, I already configured the advanced kit selection (SCK with GPS) that you mention and I am waiting for confirmation from your team to upgrade my status from ‘citizen’ to ‘researcher’ (in order to be able to post geolocated data). Once I manage to get the GPS working, I will begin with the data forwarding.

Thank you again for your answer and I’ll keep you posted.
Ander

Hi Andre, as indicated by Oscar, the qwiic connection is electrically equivalent to Grove. They just connect together with no need for a software driver.
Both power and data signalling is handled in the one cable. IIC is actually a single wire signal but there is an extra wire for clocking.

The I2c address of the Neo board is 0x42 which is what you should see on the data board output when it is recognised.

It’s clear that you lack the correct connection cable and that would likely be the core of your problem.
If you have problems after receiving the cable please let us know.

If you decide to try testing the neo board using a regular seeeduino MCU board that has an i2c grove connector it’s the same cable as mentioned earlier. Or you could try a sparkfun MCU board with a qwiic connector in which case you will need the qwiic to qwiic connection.
When compiling a test/sample sketch (eg one of the demo sketches) Be sure to use the library supplied by sparkfun for the neo board, not some other library for a generic GPS that you might get from (say) Seeed.
Also examine the code in the sample to make certain the I2C address is correct. You may need to edit the sketch.

The seeed gps and the sparkfun neo gps both work with SCK/SCS but they are not identical, as they use different chips. And they use different libraries.

Cheers and have fun

Thank you again for your answer @bryn.parrott !

The cable is expected to arrive tomorrow, however, thanks to a friend who is more a electronic than I am and has helped me welding the pins from the GPS board, the Data Board is able to recognize the NEO-m8u GPS already! (photos)


Captura de pantalla de 2021-05-04 13-37-01

Unfortunately, it can’t recognize any Satellites, therefore I collect no data about Latitude or Longitude nor this data can be passed to the platform. (photo)
Captura de pantalla de 2021-05-04 13-37-40

Tomorrow I will try it separately with another board to try to isolate the issue on why it doesn’t recognize any satellites. If you have any idea on why this could be is more than welcomed :slight_smile:

I’ll keep you and @oscgonfer posted!

Thanks again,
Ander

Also @bryn.parrott I’ll follow your advices about testing the module with the official libraries and see if everything works fine :slight_smile:

Hi @Ander!

The GPS needs to get the location, and ideally it would be seen in the LED in the GPS board next to the red power LED (blinking sporadically in blue): Almabike sensors - Smart Citizen Docs

The GPS needs visibility and this is normally better achieve outdoors. If it’s the first time the GPS is being powered, it will take longer, but it should eventually find it’s position.

What type of antenna are you using? If you are using the ceramic patch antenna from Molex, be very careful with the connection of the cable to the antenna itself (see image):

image

Also, check this for more information: https://www.molex.com/pdm_docs/as/2066400001-AS.pdf

Hi Andre,

Oscar has it in one.
Some tips and further info. You can google it too.

When you get a gps sensor of any type and apply power, the first thing it must do is to download a block of data called “ephemeris” which is like a schedule of where the satellite will be in 3 dimensional space at any point in time. There are around 72 gps satellites I believe and up to 5 of each constellation (beidou, glonass, etc) might be above the horizon at your location at any point in time, so it’s a lot of data which is cached in your gps chip, the reason you need that little battery. The ephemeris data is only loaded at fixed time intervals each day. But the satellite continuously transmits a highly accurate timing signal that tells everyone where it is, referring to the ephemera.

So, it can take some time before your gps has loaded all the ephemera data and you see no satellites until your gps chip has ephemera for minimum of 5 satellites. Think of maybe 15 to 30 mins time needed.
Only the first time you need to take this amount of trouble. Next time, your gps chip will remember ephemera from before, providing the battery is fitted.

The ephemera data gets old, it is periodically refreshed, but if you leave your kit turned off indoors a long time then it may take longer to get the fix again.

Your gps antenna must have an unobstructed view of the sky over a large range of degrees to “see” as many satellites as possible to get the “fix” it needs.

As Oscar said, it’s best outside, maybe your garden or rooftop of your apartment building. Indoors might work after you have the initial ephemera loaded and if your device is adjacent to a clear glass window that has at least 90 x 180 degrees of 3D sky visible and there is no metal fly screen or metallised solar foil stuck to the glass, and the apartment building next door is not too close. The front window of most cars will not work due to metallised inner coatings.

Enjoy !

Thank you so much guys!
It is now working!


It worked exactly as you predicted, the thing is that it needed to stay 15-20 minutes loading the ephemera data (thank you for the lesson on GPS functioning @bryn.parrott )

I have it on my apartment, (it is the last store) and is working perfectly.

However, the platform is not showing any results nor any published data despite the SCK’s reporting a successful communication, I think might be because of not being able to publish GPS data (my status is citizen and not researcher). I contacted with the support team 3 weeks ago but I haven’t received a response yet.

Do you have any clue on this?

Let me say thank you again for your time and your patience guiding me through the process @bryn.parrott @oscgonfer . I hope to have the SCK mounted on a bike as soon as I get to access the GPS data from the API :).

I’ll try to share my results with you.

KR,
Ander

Congratulations! Ander on your success in making the GPS work.

I think you will now appreciate the value of Smart Citizen in helping people to learn and its design is flexible allowing people to add useful sensors, in the case of bike kit, being mobile, the ever changing location is useful data to go with the environmental readings.

1 Like