ATGM336H GPS Module

Hello everyone, I am new to this forum so if I post this at the wrong place just let me know :slight_smile:

I purchased a ATGM336H GPS unit to replace a GY-NEO6MV2 GPS unit. Because the latter had some connection issues, and the unit was too large for the project I want to use it in.

However, even though on the page it says I can simply replace one unit with the other, and use the TinyGPS++ library, I cannot get it to work.

The red LED on the unit starts blinking once every second after a while, which supposedly means that it has found satalites.

But, when running the following script, it keeps displaying “longitude: 0.00, lattitude: 0.00”.

#include <SoftwareSerial.h>
#include <TinyGPS++.h>
SoftwareSerial gpsSerial(8,9); //RX = 8, TX = 9
TinyGPSPlus gps;
float lattitude,longitude;

void setup() {
gpsSerial.begin(9600);
Serial.begin(9600);

}

void loop() {

int data = gpsSerial.read();
if (gps.encode(data))
{
lattitude = (gps.location.lat());
longitude = (gps.location.lng());
Serial.print ("lattitude: ");
Serial.println (lattitude);
Serial.print ("longitude: ");
Serial.println (longitude);
}
}

Unfortunatly I cannot find much information on this unit at all on the internet.

Do any of you have any experience with this module, and have you gotten it to work?
Or do you have any other information that might get it to work?

Thanks in advance!

Could be a problem with the particular type of Arduino you are using, but you have not revealed that important bit of information.

I am using a Uno R3.

chris,

what do your NMEA sentences look like?

john.

HillmanImp:
chris,

what do your NMEA sentences look like?

john.

Hi John,

Thanks for reading into my post.

I did not know what NMEA was until I did some reading up on it after reading your post. So forgive me if I am wrong, but I beleive my NMEA sentences would be the following?:

$GNGGA,121215.000,XXXX.32459,N,XXXXX.79589,E,1,12,0.9,66.5,M,0.0,M,44
$GNGLL,XXXX.32459,N,XXXXX.79589,E,121215.000,A,A
4E
$GPGSA,A,3,02,06,12,14,19,24,25,29,32,1.7,0.9,1.538
$BDGSA,A,3,08,11,13,1.7,0.9,1.5
22
$GPGSV,3,1,10,02,24,102,38,06,24,069,27,12,77,060,25,14,32,305,227C
$GPGSV,3,2,10,19,16,041,21,24,42,137,26,25,64,264,28,29,21,196,17
7E
$GPGSV,3,3,10,31,06,302,13,32,42,276,337B
$BDGSV,1,1,04,08,27,047,25,11,51,084,21,12,15,035,05,13,29,075,27
64
$GNRMC,121215.000,A,XXXX.32459,N,XXXXX.79589,E,0.29,11.49,290320,A45
$GNVTG,11.49,T,M,0.29,N,0.55,K,A
15
$GNZDA,121215.000,29,03,2020,00,0044
$GPTXT,01,01,01,ANTENNA OK
35

This is the message that the GPS module returns when uploading an empty script.

Chris,

Great. All looks good. Your precise location is given there for all to see. If this bothers you, you might like to overwrite the long & lat and re-post the messages. They are contained in the GGA, GLL & RMC sentences.

Your module is working, receiving 10 satellites and has a positional fix.

John.

HillmanImp:
Chris,

Great. All looks good. Your precise location is given there for all to see. If this bothers you, you might like to overwrite the long & lat and re-post the messages. They are contained in the GGA, GLL & RMC sentences.

Your module is working, receiving 10 satellites and has a positional fix.

John.

Good point! I realized that just now. I will block it out.

I have found this video which shows how to extract the data from this message.

Am I correct in thinking that, on the backseat, the TinyGPS++ library does the same? I.e. that NMEA message is send again and again while the library extracts the relevant information?

And do you know why the TinyGPS++ library seemingly does not work for this unit?

Thank you!

Chris,

That video is one I first watched when learning about GPS. There are several good ones.

Those sentences are coming from the module's TX pin. They are all emitted as a bunch once every second.

They contain the "raw" data computed by the receiver. The TinyGPS++ library functions read it and extract the various parameters we need. You can also use the TinyGPS++ functions to determine if the data is valid which is important should the receiver lose its fix.

A couple of interesting things:

The sentences starting "$G" are from the US GPS constellation. That's all I've ever seen. The ones starting with "$B" I am guessing come from the Chinese Beidou constellation. I wonder if TinyGPS++ is not designed to process them and falls over. I use a module similar to the one that does work for you with TinyGPS++.

The sentence "$GPTXT,01,01,01,ANTENNA OK*35" should only appear when the module boots up. If this is repeating it means the module is rebooting. That might be caused by the voltage supply to the receiver being too low. But then, it is reporting a fix.

Do you know about the u-center software from u-blox? That is great for exploring GPS. Much better than an Arduino sketch, which you only really need when you want to do something with the data.

John.

Chris,

I've just watched the David Watts video through. Clearly you've seen the u-center software. You can download it from u-blox.

If it is the $B sentences upsetting TinyGPS++ you might be able to use u-blox to de-select them so they are not generated by the receiver. However u-center is designed for u-blox receivers, perhaps it won't be fully compatible with your new receiver.

The seller's page does say TinyGPS can be used with the unit.

John.

NMEA sentences of the form $GN are when the GPS is setup for GPS + the Russian GLONASS system.

By default the modern Ublox GPSs put out these $GN sentences, and with TinyGPSplus you used to have to turn off the GLONASS bit to get $GP sentences and a fix. Since about 2018 TinyGPSplus has worked with $GP and $GN.

TinyGPSplus will ignore sentences it does not recognise.

Interesting information.

HillmanImp:
The sentence "$GPTXT,01,01,01,ANTENNA OK*35" should only appear when the module boots up. If this is repeating it means the module is rebooting. That might be caused by the voltage supply to the receiver being too low. But then, it is reporting a fix.

It indeed keeps repeating that message every block of information.

According to the data I have on the unit, it should be run on the 3.3 V pin of the Arduino. I tried running it on the 5.0 V pin, this has the same result.

Could this result in less accuracy? I plugged the coordinates that the reciever transmits into Google Maps, and it results in a location about 60 Kilometers from my actual location. I would hope it is possible to obtain more accurate results?

Interestingly, when running the script shown in the video (and altering it to search for GNRMC messages instead of GPRMC), it shows other coordinates, which are exact to my location by about 20 meters.
So for now I guess I can conclude that using the script is my best option, as i cannot get the TinyGPS++ library to work for this unit (played around in the library files, but I quickly got in over my head.)

Thanks for the help and teaching me about parsing!

chris_abc:
So for now I guess I can conclude that using the script is my best option, as i cannot get the TinyGPS++ library to work for this unit (played around in the library files, but I quickly got in over my head.)

As mentioned earlier, make sure your using a non ancient version of TinyGPSplus.

Its heaps easier to use than manual scripting, it just works, no adjustments needed.

chris_abc:
So for now I guess I can conclude that using the script is my best option, as i cannot get the TinyGPS++ library to work for this unit (played around in the library files, but I quickly got in over my head.)

I would suggest using the 'script' form the video is a very bad idea, it uses Strings, which on a low memory device like a Uno will very likley give un-reliable operation.

Use a recent version of TinyGPS++, very easy to use and very stable.

Chris,

You've got an interesting challenge here. I hope you resolve it and keep us posted.

About the ANTENNA message: See what is generated from the moment you power the module. A Neo 6M module produces five or six messages that provide info about the model and software version and the antenna status. It does that once and then settles into generating the NMEA sentences at 1Hz. If the bootup messages keep occurring then I know it has a low voltage supply.

Maybe yours is configured to generate the ANTENNA message every cycle, so it might be normal. I reckon you will get the sense of things from observing messages right from power up.

Re supply voltage: With all these boards we never get authoritative data from the board maker. We never even know who makes them. My impression is they are made in the millions for industry and some are diverted to the ebay market. The sellers provide some data but I don't think they are experts.

Your receiver module requires 3.3v. What does the board require? Remember that the receiver maker is not the board maker. The boards I have used use Neo 6M receivers and all boards require 5v, while the Neo receivers themselves all require 3.3v (no more!). I think I see a voltage regulator on your board which might step down 5v to 3.3v.

I don't supply the board from the Arduino 5v pin. I found that mine (non-genuine) provide not 5v, but 4.8v. and my boards under perform (repeated rebooting) at 4.8v. I power the board direct from the USB.

60 km out is wrong. Low voltage would not give an innaccurate position. That would be unsafe. I think it would be a correct position or none at all.

You could ask Mikal Hart for an opinion. He's the author of TinyGPS++.

Good luck.

John.

Hello, i would like to know how to set the update frequency to 10Hz, standard update rate is 1Hz
Thank you

Check the datasheet of the specific GPS you have, it should tell you the command(s) you need to send to the GPS.

i can’t find anything of ATGM336H, anyone have something?

Does this help?

Thx, talk about "gnss toolkit lite" but i can't find anything online