Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

BNO055 IMU and Ultimate GPS Breakout V3 Not Working Together
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

BNO055 IMU and Ultimate GPS Breakout V3 Not Working Together

by RoyASU on Fri Jun 26, 2020 12:36 am

Hi Guys,
Need Urgent help


I have a BNO055 IMU, I'm able to fetch data from this IMU.
I have a Ultimate GPS Breakout V3, I'm able to fetch from this GPS.

The Problem is,

When i combine the code for IMU and GPS in one single code, I'm getting the data from the IMU but not from the GPS. GPS.fix is always 0.

What is the problem here?
FYI I'm using Arduino Nano / Serial.begin(115200) / GPS.begin(9600)

RoyASU
 
Posts: 4
Joined: Fri Jun 26, 2020 12:19 am

Re: BNO055 IMU and Ultimate GPS Breakout V3 Not Working Toge

by gammaburst on Fri Jun 26, 2020 6:52 pm

I suggest providing more information so folks can help you troubleshoot.
Include a photo or diagram that shows how you've wired-up the project.
Include a small complete code/sketch that demonstrates the problem.

gammaburst
 
Posts: 486
Joined: Thu Dec 31, 2015 12:06 pm

Re: BNO055 IMU and Ultimate GPS Breakout V3 Not Working Toge

by RoyASU on Fri Jun 26, 2020 8:54 pm

Hi Guys,
1-The code for IMU is (Only_IMU.ino)
2-The code for GPS is (Only_GPS.ino)
3-Combined code for IMU+GPS is (IMU_GPS.ino).

As mentioned earlier, both 1&2 is giving me the desired output, but the combined code 3 is only giving me the IMU output not the GPS output.
Attachments
Only_IMU.ino
IMU to fetch Heading Velocity
(2.85 KiB) Downloaded 2 times
Only_GPS.ino
GPS to fetch Latitude and Longitude
(4.28 KiB) Downloaded 2 times
IMU_GPS.ino
The output of GPS.fix() is always 0, But The GPS is blinking every 15 seconds.
(6.09 KiB) Downloaded 1 time

RoyASU
 
Posts: 4
Joined: Fri Jun 26, 2020 12:19 am

Re: BNO055 IMU and Ultimate GPS Breakout V3 Not Working Toge

by gammaburst on Sun Jun 28, 2020 6:30 am

You're using SoftwareSerial for the GPS. That's a likely culprit. I would try switching to a real hardware serial controller. The Nano probably has no spare serial ports. Or maybe someone else has another idea.

gammaburst
 
Posts: 486
Joined: Thu Dec 31, 2015 12:06 pm

Re: BNO055 IMU and Ultimate GPS Breakout V3 Not Working Toge

by RoyASU on Mon Jun 29, 2020 6:52 pm

Thanks GAMMABURST

Anyone else have any idea how to resolve this issue??

Thanks

RoyASU
 
Posts: 4
Joined: Fri Jun 26, 2020 12:19 am

Re: BNO055 IMU and Ultimate GPS Breakout V3 Not Working Toge

by RoyASU on Tue Jun 30, 2020 4:07 am

RoyASU wrote:Thanks GAMMABURST

Anyone else have any idea how to resolve this issue??

Thanks
Attachments
Diagram.png
This is how i connected my IMU and GPS.
Diagram.png (527.71 KiB) Viewed 51 times

RoyASU
 
Posts: 4
Joined: Fri Jun 26, 2020 12:19 am

Re: BNO055 IMU and Ultimate GPS Breakout V3 Not Working Toge

by gammaburst on Thu Jul 02, 2020 3:35 am

I think your incoming GPS data falters because SoftwareSerial has poor tolerance of other interrupts. Your project uses default I2C, default serial port (USB link), and default timer, and they all use interrupts.

If I was stranded on a desert island and couldn't get another microcontroller with more serial ports, I would consider trying several things. I'm not sure which technique or combination of techniques has the best chance of success.

1. Look for some way to change the I2C controller from interrupt-driven to polling. If that's not possible, replace the default I2C controller with a software bit-banged I2C controller that uses no interrupts. Be sure it supports I2C clock-stretching (required by the BNO055). I have done that successfully, and have shared my code around here somewhere.

2. Reduce all serial baud rates as slow as possible, then look for some way to change the main serial port (USB interface) from interrupt-driven to polling. That would probably also require sprinkling all your code with frequent calls to a serial port polling function. If that's not possible, try changing the main serial port to another awful SoftwareSerial port, and study the guidelines about running multiple SoftwareSerial ports. I've never tried doing any of that.

3. Try rearranging your overall communication sequencing to avoid simultaneous communication over both serial ports. I don't know if your project can be arranged that way.

gammaburst
 
Posts: 486
Joined: Thu Dec 31, 2015 12:06 pm

Please be positive and constructive with your questions and comments.