Thread Tools
Nov 25, 2019, 05:08 AM
Registered User
Thread OP
Discussion

JJRC X9P GPS Upgrade to Beitian BN-180 GPS Module


Hi,

I have recently purchased the JJRC X9P drone. The GPS reception on it is woeful to say the least! I am however in the land of down under so maybe we don't have access to as many satellites down here, who knows ???

Anyhoo, I pulled the cover off the drone and the GPS module looks almost identical to the Beitian BN-180 GPS Module. I thought it might be as easy as a straight swap and upgrade to a much better module.

Unfortunately my thoughts about simply swapping over have been naive I haven't had any success yet with the drone showing any satellite signal. The BN-180 powers on and after about 30 seconds the red light starts flashing to indicate sat's have been picked up, but there is no sat's showing in the JJRC app.

I've tried reversing the rx/tx wires for the sat module in case they were reversed, but it made no difference.

Does anyone know if I would need to do any programming or should it be as simply as swapping the modules over? Have plenty of photos if needed.

Thanks
Sign up now
to remove ads between posts
Nov 25, 2019, 01:13 PM
Registered User
Hi,
Normally a BN-180 ships with 9600 baud, 8N1 and NMEA but the flight controllers talk to the module at start up and tell it to shift to something like ubx binary at 57600. You won't know what the native state of your original module is and it may have different firmware that has it preset to ubx at 57600 in which case the FC firmware would not need to talk to it first and hence your new module won't respond. This s just a worst case situation. Is there any way you can fire up the original module with something like an FTDI widget to check its current settings?
The new GPS is definitely working but you should be getting a blue flashing LED indicating data output. This will flash at 1Hz with original default settings but the FCs usually push the update rate to 5Hz so the LED then flashes faster.
Is it the same connections on the new module and the original? If it is then it is a good chance it is a BN-180 but the firmware may be custom.
Sorry - not a lot of help for your present situation.

Cheers,
David
Nov 25, 2019, 05:39 PM
Registered User
Thread OP
Hi David,
That is a massive help! I'm not sure I understand half of what you said, but some of it makes sense, LOL!
I was hoping it was something to do with the baud rate, but didn't have a clue if it was programmable directly on the GPS module or if it was FC determined. The BN-180 blue light does flash slowly like it is sending something. There was no lights at all on the original module.
The connection is exactly the same with socket and the wiring, I've attached a photo of the 2 to compare. Original is on the left in the photo's. There was no sticker on the original to get a model no. from.
Name: 20191126_092930.jpg
Views: 95
Size: 1.16 MB
Description:

Name: 20191126_092948.jpg
Views: 81
Size: 1.12 MB
Description:
I don't understand the FTDI Widget thing. I've just ordered a USB FT232RL Serial UART interface Converter Adapter from ebay as I think I worked out I could use this with the software UCenter from UBlox to connect to it and possibly change settings, does that sound right at all?

If not, could you help me out and explain what I need to do to check settings on original GPS and then change the new GPS?
Cheers
Nov 25, 2019, 11:56 PM
Registered User
Hi,
The two modules are similar size but the pcbs do look different so it's a bit of a long shot.
The FTDI widget I referred to is indeed the device you have on order. It's a USB to serial bridging device so it takes TTL level data from the module (3.3V non-inverted logic) and makes it appear as a virtual com port via USB. Once you have u-center installed just go to Receiver/Connection and select the Com port which should be highlighted. Remember to connect the GPS module's Tx data to the FTDI's Rx data and vice versa. You may have to try different baud rates under Receiver/Baudrate but there is a little connector icon at the lower right of the screen which blinks green if connected successfully. If you plug in your BN-180 module you will know that it is using 9600 baud and the data should soon appear on screen.
You can change the module's configuration (BN-180) BUT I think this device saves config data either in battery backed RAM or flash. BBR will likely only hold up for a matter of days before the setting reverts to factory default. We can cover this in more detail when you have the FTDI device and have u-center installed.
You say the original GPS was not very good but it may be subjected to all sorts of noise from the proximity of other devices such as the FC, receiver and camera or video gear. It's an awful environment to bury an antenna in and there's a chance the BN-180 may suffer just the same even when or if it's set up. There's a good reason GPS modules are often mounted on stalks above the main electronics - the GPS dielectric patch antenna has low sensitivity to signals below its own horizon (roughly hemispherical) and the mag sensor (often included in the GPS housing) is kept away from the main power conductors.
Good luck and I'll keep a watch out for any of your updates.

Cheers,
David
Dec 03, 2019, 02:51 AM
Registered User
Thread OP
Hi David,

I finally got my USB Uart to test. I've had a play and managed to work out the basics of UCenter and connected to both GPS modules.

First thing I discovered is that the Baud rates were different, the original module is 57,600 and BN-180 is 9,600. So I found out how to change the baud rate on the BN-180 and I have updated and saved that, hoping that would magically work on my quadcopter. Unfortunately it wasn't that simple.

The Baud Rate doesn't change permanently, only while connected to the computer so it seems.

What would be the next steps do you think to see if there's anything I can change to get the BN-180 working?

Thanks,
Mat.
Last edited by meherenow7; Dec 03, 2019 at 04:11 AM.
Dec 03, 2019, 02:36 PM
Registered User
Hi Mat,
You've done well to get that far but I think I have bad news for you.
The BN-180 I believe stores the config data in battery backed RAM so will only hold this information while the voltage on the back-up battery is above about 1.8V. Depending on the condition of the battery this may be be minutes or at best a few days. The back-up battery only gets charged while you're connected to a flight pack and the rest of the time it is discharging so it doesn't have a good charge/discharge ratio to keep alive. I would have thought you should at least be able to disconnect for a few hours but only after you have charged it for a day or so. (charge rate is very low to maintain a good battery life).
My worst fear for you was that the original module was pre-configured to something like ubx protocol at 57600 and hence the flight controller didn't need to talk to or reconfigure the GPS at all. This is quite a valid approach for a proprietary set up whereas something like iNav will do an auto baud to detect a GPS module on any baud rate and then command it to change to 57600 and switch from NMEA to ubx.
Even if you do get the battery to hold up for a few hours or even days it is going to be a problem longer term like 2 weeks if you have to resort to u-center to reconfigure the baud rate before use however it prove the principle.
There are other modules that have the config stored in flash but finding out which ones is a problem. I had read that the BN-220 used flash but I can't confirm this. If they give the exact chip used in the module it should possible find out on u-blox's website.

This from the ublox datasheet-
Configuration settings can be modified with UBX configuration messages. The modified settings remain effective
until power-down or reset. If these settings have been stored in battery-backup RAM, then the modified
configuration will be retained, as long as the backup battery supply is not interrupted.
With the NEO-M8N, configuration settings modified with UBX configuration messages can be saved
permanently. In this case, the modified settings remain effective even after power-down and do not require
backup battery supply.

So it appears any module that uses the M8N chip will hold permanent config changes. This may limit your size options as it's likely to only be used in the larger modules with perhaps compass included rather than the smaller low end modules.
I would still try leaving your module connected to a power source (FTDI?) for a day or more and see if you can keep the module alive at 57600 long enough to perhaps test performance. It's not a solution but it may confirm if it's the original module that's poor or if it's being swamped by noise from other devices. You may be no better off after changing modules in which case you may need to look at noise shielding or putting the GPS on a small stalk to keep it away from the noise.
Sorry it's not better news.

Cheers,
David
Dec 03, 2019, 05:49 PM
Registered User
Thread OP
Hey David,

Ah that makes sense now about the short term battery life! You have reminded me however that I got both the BN-180 and the BN-220 just in case I could use it.

So I will now have a play around with the BN-220 also and see if that stores the settings etc. Amazingly the drone shell actually has a spot to fit the BN-220 so won't be a problem if I have to use that instead.

Will report back in the next day or so, these things take time, LOL.

Cheers again for your advice and help.

Mat.
Dec 04, 2019, 12:00 AM
Registered User
Hi Mat,
You may well find the BN-220 uses flash to store the config. I read this recently but can't confirm myself. I will see if I can find the reference to it.
Good luck.

Cheers,
David
Dec 04, 2019, 12:57 AM
Registered User
Hi Mat,
Check out the second post here-
https://intofpv.com/t-differences-be...280-and-bn-880

So this guy is claiming the BN-220 has Flash for config storage. (The battery is still required for the RTC and other stuff required for hot starts.)
If it's on the internet it must be true........

Cheers and good luck,
David
Dec 07, 2019, 05:10 PM
Registered User
Thread OP
Hi David,
I can confirm the BN-220 stores the changed Baud Rate. I changed it and several days later it still connects with the same rate.
Unfortunately it hasn't resulted in my drone being able to read it however. I still don't get any satellite registering in my drone app, so it looks like there is a lot more to it!
I think i'm going to concede on this one and just put up with it being really slow to find satellites with the original module.
Unless you have know of any other ideas/settings to try?
Thanks.
Dec 08, 2019, 01:18 AM
Registered User
Hi,
Well it's another small step along the way. So the reference about the device storing in flash is correct - that's good to confirm, What you don't know is what the rest of the configuration consists of. Were you able to get the original module to display data? You can now match the baud rate but is it NMEA or ubx protocol? It would appear the original module may be fixed in its set up - i.e. the FC doesn't try to write anything to it to change its settings. This could be confirmed by removing it's Rx data line so the FC can't write to it. Unless you can determine what it's set to it will be difficult to set a permanent baudrate and message format to get it to work. If it was NMEA the ASCII would be quite readable so I'm fairly sure it will be ubx. Not impossible but getting difficult to determine.
If you can't determine what the original module is set to you may have to try some shielding on the original module to see if you can protect it from interfering signals. They could be conducted or radiated signals with the latter more likely. Foil may be worth a try and even anti-static bags are good (and safer) at L1 for shielding. You need to be able to see the number of received satellites to determine if you making things better or worse. Can you lift the GPS module out of the area it normally sits in? It may be worth a try to see if it improves. Even with the small patch antenna you have you should be able to see t least 15 satellites after a few minutes. If not I would then suspect noise.
Good luck.

Cheers,
David
Dec 08, 2019, 03:58 AM
Registered User
Thread OP
Here's a screen shot of the binary data for each module. I'm inside so unfortunately so gps data as such but might be enough to see if it means anything to you.
I've notice now when I connect to the original module it has UBX down the bottom and the BN-220 shows as NMEA.

Name: Original Module Binary Data.jpg
Views: 70
Size: 392.5 KB
Description:

Name: BN-220 Module Binary Data.jpg
Views: 48
Size: 342.5 KB
Description:

So from what you said in your post, sounds like the data is not compatible based on difference in UBX/NMEA. The manual for the BN-220 shows that it can be either, but I wouldn't have a clue how to change it.

Thanks.
Dec 08, 2019, 07:31 PM
Registered User
Hi,
The BN-220 can be either set to NMEA or to ubx (or both) but I believe the flight controller is expecting the latter and is probably not writing to the module to change settings from the usual 9600 NMEA to 57600 ubx. At this stage you don't even know what ubx strings it is using. I've attached a screen shot of the ports set up and you will notice it has protocol in and protocol out. You will have to read up on this but my understanding is protocol in is the various data options it can read from an incoming stream and the protocol out is the data stream it will produce. You could try setting the baud rate to 57600 and only enable ubx. Play with the output but perhaps leave the input as it is so it can read almost anything you throw at it. Check at the bottom of the screen if it says ubx. Remember that you will need to change your monitor baud rate to see the changes as you have left it at 9600
It would pay to make a few notes along the way but you're pretty deep now so give it a go. You should be able to retrace your steps and restore things. This is not an area I've used much so it's very much the blind leading the blind.

Cheers,
David
Dec 10, 2019, 06:46 AM
Registered User
Thread OP
mmm, I think i've stuffed it! LOL.

I reconfigured to UBX protocol for the output, saved the settings and now I can't connect to it

When it connect it to the usb serial port there are no lights on the GPS module flashing like there was. I thought i'd bricked it, but then I tried a download of the config file in u-center and the GPS lit up and downloaded a file, so it's not completely R.S!

Anyway, I appreciate your advise thus far, but I'm calling it quits with this project. Way way beyond my skillset and knowledge and I feel that it's a whole other world to try and learn what's really happening. I'll fly the drone as is with the slow GPS module and try insulating a little more from the FC as you suggested.

Thanks again David and all the best! Cheers.

Mat.
Dec 10, 2019, 02:01 PM
Registered User
Quote:
Originally Posted by meherenow7
mmm, I think i've stuffed it! LOL.

I reconfigured to UBX protocol for the output, saved the settings and now I can't connect to it

When it connect it to the usb serial port there are no lights on the GPS module flashing like there was. I thought i'd bricked it, but then I tried a download of the config file in u-center and the GPS lit up and downloaded a file, so it's not completely R.S!

Anyway, I appreciate your advise thus far, but I'm calling it quits with this project. Way way beyond my skillset and knowledge and I feel that it's a whole other world to try and learn what's really happening. I'll fly the drone as is with the slow GPS module and try insulating a little more from the FC as you suggested.

Thanks again David and all the best! Cheers.

Mat.
Oh no!.
Once you had set it to 57600, ubx protocol your current monitoring settings would no longer talk to it. You started at 9600 NMEA, then told it to change to 57600 ubx but you are still set at 9600. You need to go back to your receiving set up in u-center and change that to 57600 so it can now listen at the correct baud rate. Provided you haven't switched off or changed the Protocol In you should be totally recoverable.
If you think it's set at 57600 and ubx you can always try talking to it at that speed and setting it back to 9600 NMEA. I think there is also an option for using auto-baud so it probably tries all the data rates until it gets a response.
If nothing else the modules are both ideal for doing a FW project with iNav. Sorry we couldn't get this one sorted but with proprietary firmware it can be a lucky dip.

Cheers,
David


Quick Reply
Message:

Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Discussion JJRC X9P GPS Upgrade to Beitian BN-180 GPS Module meherenow7 Multirotor Drone Talk 0 Nov 22, 2019 08:15 AM
New Product Beitian BN-880Q GPS+GLONASS Dual GPS Antenna Module FLASH TTL Level 9600bps for FPV Merch Banggood.com 0 Apr 09, 2019 08:51 PM
New Product Beitian BN-220T GPS GLONASS Module for APM Pixhawk CC3D Naze32 F3 F4 Flight Controlle scousethief Banggood.com 0 Mar 07, 2019 09:13 AM
Discussion Is there a forward direction for the Beitian BN-120 GPS module? day o Multirotor Drone Electronics 6 Jan 26, 2019 04:01 AM