GPS Modules with Ar...
 
Notifications
Clear all

GPS Modules with Arduino and Raspberry Pi

Page 2 / 2

byron
(@byron)
Honorable Member
Joined: 2 years ago
Posts: 678
 
Posted by: @dronebot-workshop

And I'm currently working on another video/article about GPS RTK

You may end up putting a big dent in my wallet!  I'm sure that GPS RTK is what I need for my outdoor bot, but have put off buying RTK modules until I'm ready to recommence working again on my bot.  

I'm always buying things way too far in advance because I anticipate I will be using them real soon, only to find many months down the track when I'm good to go, something better and shinier is available.  Many a chip lies unused in my cabinet, its blushes unseen, its sweetness wasted in the dark cupboard air.

But I may find the temptation too strong, after all I can stick a couple of RTK boards outside in a 3D printed boxes with batteries, even though they will not move much 😎,  and have a play with the code in the evening even if my bot build is some way off.

Are you chopping down those trees to have a good view of the sky for the GPS or is this just a coincident?

I hope you are going to use your own base station to transmit the correction data to the bot rather than getting your correction data from an internet source, but, whatever, I look forward to this with much interest.

 


ReplyQuote
Magic Smoke
(@magic-smoke)
Active Member
Joined: 2 months ago
Posts: 11
 

I'm trying to get a Beitian BN-180 GPS module working but it's not returning data.  I've tried it in various unobstructed locations outside but to no avail. The module and code all seem OK, but it doesn't seem to be picking up the GPS signal? I'm in the UK, but I was under the impression this shouldn't make any difference.

Anyone with more experience with GPS than I have (which is just about anyone) got any suggestions?  If I'm doing something daft, please be gentle, I'm new to all this.

I've attached a screen shot of the serial monitor.

Screenshot 2021 09 21 at 16.52.04

 


ReplyQuote
Will
 Will
(@will)
Honorable Member
Joined: 4 months ago
Posts: 647
 

@magic-smoke 

Have you looked at this yet ...

https://github.com/StuartsProjects/GPSTutorial


ReplyQuote
Magic Smoke
(@magic-smoke)
Active Member
Joined: 2 months ago
Posts: 11
 

Many thanks Will.  I hadn't seen it but I will take a look.

A friend who does a lot of walking in the Yorkshire Dales near to where I live, uses a hand-held GPS but says reception is hit and miss. Luckily I purchased the cheapest GPS module and so if it ends up not working well, I've not lost much and it's all experience.


ReplyQuote
DaveE
(@davee)
Estimable Member
Joined: 5 months ago
Posts: 153
 

Hi @magic-smoke,

  My direct experience is limited to commercial wrist-watch and everyday 'sat nav' stuff, including Android phone. So just a couple of comments to try -- and apologies if you have already tried them.

  1. Make sure you are in a position that there are likely to be number of satellites in view ... outside, in an 'open' situation, away from buildings, trees, nearby hills, etc. GPS relies on digging a tiny signal out from below the noise level (floor). For a 'cold' start, when the receiver is first switched on, with no recent data, it has  much harder job finding that signal, compared to a 'warm start', in which the receiver has  'good' idea 'where to look'. Hence, 'cold start' needs the best possible receiving location - and more patience. My GPS watch typically takes 2-3 minutes, sometimes considerably longer. (I saw a YouTube video in which the presenter tested several modules in his 'office' and reported cold start times of an our or more, but he did say he thought they would be much quicker outside.)
  2. I am not familiar with the software you are using ... I guess it is the same as Bill used for his second demonstration ... and I noted a column labelled "Chars Rx", which I guess is the number of characters received from the GPS module. If my guess is correct, I would be interested to see what those 'characters' are. For this, Bill's first demonstration mode, starting at about 11 minutes into his video should do. It is probable that it will be similar to Bill's experience in the lab. Note Bill's demo in the lab showed a discernable albeit uninteresting 'message', not just random characters. If it is like (i.e. almost identical to) Bill's, assuming you are outside, etc. try leaving it to run for a while... several minutes at least ... to see if it changes. (If it is random characters, check things like Baud rate, etc. as you have a mismatch.) Also, there maybe (or may not be!) clues in the uninteresting message? That would be a read the manual job!

Good luck with your voyage of discovery!


ReplyQuote
jBo
 jBo
(@jbo)
Trusted Member
Joined: 11 months ago
Posts: 81
 

@will @magic-smoke  I would second that comment about the Stuarts Project article on GitHub. I've only gone through it once, but it is very well written, and seems excellent advice.

I also looked up product descriptions of  the Beitian BN-180 module on the usual suspects of e-commerce sites. Those descriptions can be a little hit or miss; still, I noticed a few things.

The device outputs NMEA-0183 sentences. I would expect this, it's very common among devices.

It uses the L1 frequency, 1.57542 GHz. So, though the distance is great, antenna size is comparable to WiFi antennas, i.e. small.

At least one description I found said the BN-180 would consume 50 mA at 5V. Perhaps it needs separate power?

They claim it also uses the Russian Glonass signals; interesting, though I don't know anything about that system.

Some general observations based on my own experience and a refresher from the W

It may well take longer the first time, for a unit to get its first fix. Once it's going, it can update position and velocity once a second or faster, but getting the "almanac," list of all the satellites and what they'll be doing for the next few weeks, takes  longer. The complete almanac is 12 1⁄2 minutes, so if you just missed the start of one, it could theoretically be 25 minutes before you get a whole almanac. After that, and if you reboot the device, it should be faster.

Another thing to note, in relation to phones, is that when we say "my phone's GPS," it really means a modern, ingenious and very slick implementation of GPS signals plus signals from known WiFi towers, working together with the strengths of both systems. This is why a brand new phone, just opened after manufacture in China, can be used for car navigation. There's a lot going on there.

I'm in the UK, but I was under the impression this shouldn't make any difference

You're right; it doesn't. The satellites are in polar orbits, so coverage is not an issue. As @davee says, several other things are worth checking, the clear sky, the antenna (though I don't know you'd test an integrated antenna other than the tests of the whole unit, which you are doing). 

It wasn't clear from your comment, but are you connecting this directly to a laptop? Or to an Arduino in typical test/development mode,  with USB? If the latter, then Stuart's point about only having one hardware serial interface is well taken. Regardless of how the GPS device is connected, laptop or Arduino, it is still serial data. You might try writing a simple serial read program, to see if you're getting any data at all. Just read characters, until you get the end-of-line (carriage return + line feed). 9600 baud is fine. 

Good luck with your project!  John

In theory, theory and practice are the same.
In practice, they're different.


ReplyQuote
jBo
 jBo
(@jbo)
Trusted Member
Joined: 11 months ago
Posts: 81
 

Regarding the time to first fix, I should qualify my remarks. If the device goes through the long process of getting the almanac - and then stores that data - then it should find a fix much faster next time. But depending on your application, I don't know if that will happen. The -180 does not appear to have flash storage, or a battery; I think the -880 does, but check the specs 🙂

In that article mentioned by @madmisha in a previous post, there is an example:

Without the battery the GPS always cold-start so the initial GPS lock takes more time. The battery is automatically charged when power is applied and maintains data for up to two weeks without power.

That said, it may still be OK to use a module which needs some startup time. A "base station" for differential GPS would already have power, possibly solar panels plus a separate battery system. A small balloon launch is usually going to take longer than 25 minutes for all the other preparations, so connecting the GPS is not going to delay the whole "mission" by itself. But if one expects to drive out somewhere, turn on the robot, and have it start navigating, then yes, that would be a hassle. Hope this helps, -John.

In theory, theory and practice are the same.
In practice, they're different.


ReplyQuote
Magic Smoke
(@magic-smoke)
Active Member
Joined: 2 months ago
Posts: 11
 

Firstly, huge thanks to @will @davee and @jbo for their advice - it's really appreciated. I followed Bill's Arduino setup and code for the BN-180 but I have tried other code as well, with the same results. Everything seems to point towards reception rather than an issue with the module itself.

I had to smile when jBo suggested a "clear sky" because I live in North Yorkshire and clear skies can be a bit of a rarity. Looking outside right now, I can just see a patch of blue in the far distance 😀.

I tried to find the equivalent of a data sheet for the BN-180 but came up with nothing useful. It's a matter of piecing the information together from many websites and videos. 

The module has a small battery (see attached image) and was I wondering about that. I didn't want to take it out to test it, because I didn't know if that would upset the GPS function or not?  I see rechargeable cells of this size are available but without removing it, I can't tell which type of battery this is.

I'll build a unit with a separate voltage supply (as suggested) and pass selected data into an LCD or OLED.  Then I'll take it out into the wider countryside away from any possible obstructions and see if I can get it going - weather permitting!

If I get it going, I'll post my experience here, which might help others.

Many thanks again

Screenshot 2021 09 23 at 08.56.43


 


ReplyQuote
Page 2 / 2