UAVCAN based GPS is not detected

Hi there, I’m having trouble bringing my GNSS to life. The GNSS turns on and eventually finds a fix (indicated by green LED switching on for a few ms at roughly 1 Hz). However, it seems like the communication to the GNSS is not working at all: Even with a fix, my position as indicated by APMplanner is lat/long = 0,0. No GPS fix is indicated by Ardupilot, and of course 0 satellites are in view. Interesting enough, MissionPlanner does not show any Node in Setup/Optional Hardware/UAVCAN.

I think I set all relevant parameters for this to work:

CAN_D1_PROTOCOL,1
CAN_D1_UC_ESC_BM,0
CAN_D1_UC_NODE,10
CAN_D1_UC_SRV_BM,0
CAN_D1_UC_SRV_RT,50
CAN_D2_PROTOCOL,0
CAN_P1_BITRATE,1000000
CAN_P1_DRIVER,1
CAN_P2_DRIVER,0
CAN_SLCAN_CPORT,1
CAN_SLCAN_SERNUM,-1
CAN_SLCAN_TIMOUT,0
GPS_TYPE,9
GPS_TYPE2,0

The hardware is a Matek H743 Wing together with the Matek M8Q-CAN GNSS module. Currently I’m running Arduplane 4.0.8. The GNSS is directly wired to the FC with the included JST cable.

Any advice what else I could look at is very welcome!

Directly wired to where? Have you used SLCAN to set the unique GPS Uavcan ID?

@mike Yes, directly wired with the JST cable which was supplied by the M8Q-CAN module. I did not touch SLCAN. The connector in the middle of the GNSS module is wired to the can port, a JST connector on the FC, directly below the JST connector for the USB port.

Where can I find information about this?

If you have connected the GPS to a serial port, you must take these parameters: Matek M8Q DroneCAN/MSP GPS/MAG/BARO — Copter documentation

@Rolf This does not seem to be the case. I use the JST CAN connector on the bottom side of the middle PCB of the H743 (http://www.mateksys.com/?portfolio=h743-wing#tab-id-3, http://www.mateksys.com/?portfolio=m8q-can#tab-id-4) together with the middle connector of the GNSS.

I do have a H743-Wing with ardurover and two Emlid Edge Uavcan GNSS receivers. They would not work at first, too, giving me an unhappy red blinking LED. They started working after I powered the H743 from lipo first, then connecting USB. Now they work fine, no matter in which order I power the H743.

For me it works with Arduplane dev. A blue LED flashes when the CAN bus is working. Are the compass and baro values displayed? The Clickmate connector had a loose contact and I had to solder a new connector.

This is not my issue, I tried both orders of powering up the thing - no luck.

How does the blue LED on the GPS flash? Can you describe it with duty cycle and frequency?

Rolf

@Rolf Interesting, the GNSS is blinking similar for me! Did you have problems before switching to dev?

I just noticed, the order of the cables on my cable is different that in the picture from Matek On the GNSS side it is red, yellow, blue, black (5V, CAN-H, CAN-L, GND). On the FC side of the cable I have yellow, blue, black, red (CAN-H, CAN-L, GND, 5V), while the FC board itself should have CAN-L, CAN-H, GND, 5V, according to this. I will try and swap them.

No problems with the “onboard” hardware (GPS, Compass, Baro) but instead I am annoyed with the SDP33 airspeed sensor connected to the Matek:

Does compass or barometer work for you ? If not, this would also be an indication of a defective cable. The cable has different connectors, at the FC the order is 5V-GND-CAN high-CAN low. The Clickmate connector is correctly standardized with 5V - CAN-h - CAN-l - GND.

Rolf

I’m not sure about compass and barometer. I was unable to calibrate the compass (probably related to missing GNSS fix). Barometer works, but the H743 comes with one onboard, so that’s no indicator on the cable. I notices that after the cable swap, GPS_FIX now is 1 instead of 0. What does it mean? The cables should be correct now.

After swapping the cables, now the GPS is at least detected in the UAVCAN section of MissionPlanner. I guess my issue is solved. Thank you for the advice and help!

Sounds like you are working now. But. Each canbus must have unique ID’s for every device. You use the SLCAN device to tap into the bus and watch what is going on and query devices. You can set the device parameters this way.
Each bus must be terminated at the ends of the bus. The FC has one terminator and you should terminate the other end for reliability.

More information about UAVCAN if you are interested:

Cheers

1 Like

Hello guys,

I have an issue with my M8Q-CAN GNSS module plugged to my Mateksys H743-Wing. It won’t allow me to access the SLCAN.

My M8Q-CAN GNSS module would not power on when connected through USB, but it’ll work like a charm when powered through the batteries (I’ve done missions and its tracking).

I double-checked the parameters stated at ardupilot at all looks good.

Should the module go on when on USB?

I want to add my MS4525 airspeed sensor to it but can’t as I can’t change the to: * MS4525 set ARSP_TYPE → 1.

I’m also scared of changing the firmware. Currently running on ArduRover V4.1.5.
As I got an airspeed available I need it to log temperature and pressure (not using the airspeed function)

TIA

Reference:
https://ardupilot.org/copter/docs/common-matek-m8q.html?highlight=m8q

Just replied my own question:

Connecting a GPS/Compass module

This board does not include a GPS or compass so an external GPS/compass should be connected in order for autonomous modes to function.

If the GPS is attached to UART2 TX/RX and powered from the adjacent 4.5V pins, it will be powered when connected via USB, as would the RX if powered from the adjacent 4.5V pins to UART6.

A battery must be plugged in for power to be provided to the pins marked 5V on the board.
Mateksys H743-Wing/SLIM/MINI/WLITE — Copter documentation

See Matek controllers power circuit below:

This video demonstrates someone powering the board through the batteries and the USB at the same time on the MATEK h743 wing. In order to use the SLCAN.

Hope this is helpful to someone (wish I found it earlier).