Serial port problems

Hi, Ive been trawling through the posts on here trying to fix this thing for weeks now.
Im stuck now so thought Id ask if anyone can see where im going wrong.

Im running a cube orange setup. First I had it configured with Herelink controller and here3 gps, I then added an Emlid M+ second gps for RTK work and right from the start it kept failing. I had to flash firmware on the M+ and cube to finally get them to talk, but after a couple of weeks the NO GPS stared being a permanent thing. So I decided to go with lora radios instead and moved on.

Next problem was the gimbal and camera control being intermittent. Sometimes it all seemed to work and the LUA script wold run fine. Then it would just stop. I could either control the gimbal manually via the herelink or trigger the camera but not both. Then it became apparent that mission planner had no direct control over the gimbal, so pretty useless when setting auto missions when camera and gimbal control are needed.

So I decided to ditch the herelink for now and go the simple rout of standard tx/rx with Sik radios and a hd video downlink, all as separate hardware and get things working as it should.

Thats where I am now, Ive wiped all settings from the cube to start over but I cant get anything working at all now.
I have followed the setup for the Sik radios and they are updated and connected fine. I just dont appear to have any connection to the flight controller. No red data light at all on both telem 1 and telem 2 ports. Further to that ive tried the telemetry s-port wire setup to the tx16s with Yaapu running and nothing there either. Ive tried using GPS2 (same port the M+ was originally on until it kept failing) as well and still nothing.

The gremsy T3V3 gimbal is also designed to connect to telem2 or gps2 (comes with direct cables to match the ports) and having followed all the steps to set that up using mavlink I get nothing!

So thats where im stuck at now, Im pretty close to saying the cube is faulty as there seem to be too many different faults all stemming from the serial ports. But I wanted to make sure Ive not been doing something stupid and messed something up first.

So any help would be much appreciated.

Thanks
Luke

For the Emlid GPS, maybe you have incorrect protocol setting?

For the gimbal, Ardupilot have gimbal control. See
https://ardupilot.org/copter/docs/common-cameras-and-gimbals.html

The only gimbal problem that Herelink has, is that there are only 1 wheel which gives only 1 axis control.

Also, did you modify the cables for serial connection?

Hi, thanks for the reply.

With the reach m+ I configured it as required, I had it working with ERB protocol originally after having to reset the firmware. At the time others had been having problems with the current emlid firmware and that seemed to fix it.
But after a few flights it just stopped being detected by the cube and I gave up.
It’s worked fine on the lora radio direct to the base station ever since so it’s fine.

As for the gimbal, with herelink it’s an SBUS cable. The herelink air station has 2 bus control, so it controlled the gimbal directly, you use a script to switch gimbal axis on the wheel giving you control over pan and tilt.
To control the Gremsy gimbal via the cube/mission planner you connect it to serial port 2 or 4 with a dedicated cable provided by gremsy. That’s supposed to alow mavlink commands to control the gimbal.
I’ve set everything up as instructed again by both gremsy and also the link you provided, but I get no communication to the gimbal.

The other thing is the Sik radios don’t work either, they should pretty much just work out of the box, but nothing again. Have checked all the connections and protocol settings but nothing.

For the m+, are both Cube and M+ still powered when they disconnected?

Can you show me a picture of your connection? It sounds like all of the serial connections are not working, which is weird.

Yea all powered up and working independently. As in the first I knew about it was missing planner saying gps2 error… The hex was in flight at the time but I landed it. The m+ was working fine and could be accessed by its WiFi hotspot.
I spent hours diagnosing the problem, changed and reset the protocalls but could never get it to reconnect to the cube.

As for wiring, it is currently connected to gps2 but only on the 5v and ground wires to power the m+ as its then running a dedicated lora radio module to communicate to the rs+ ground station.
All other wires are cut, but when it was wired in, it was via 5v and ground as mentioned plus rx/tx crossed over to tx/rx on the m+
As I said it worked originally for about 3 or 4 flights before it failed.

As for now, I have the Gremsy on telem 2 with its dedicated cable and sik radio on telem 1. I have ensured that again the wires are 5v and ground matched and tx/rx crossed to rx/tx it does have the other 2 wires still connected that I believe are flow control but I was going to remove them next time I worked on it as don’t believe they are needed. (don’t know if they can cause problems or not)

I can try and do photos tomorrow if I get time.

Did you test them one-by-one or all-together?
Can you verify if they were drawing too much current from Cube?
https://docs.cubepilot.org/user-guides/autopilot/the-cube-module-overview#summary

Serial 1 (TELEM 1) has a private 1.5A current limit, intended for powering a low power. This output is separately EMI filtered and draws directly from the USB / Brick inputs. Peak power draw on this port should not exceed 1.5A, which should be sufficient for a 20dBm transmitter of reasonable efficiency.

All other peripherals share a 1A current limit and a single power switch. Peak power draw on this port should not exceed 1.5A. Each group is individually switched under software control.

So I have attached an image of the serial port wiring.
In that image, the emlid m+ is on gps 2 but only the 5v and gnd are connected to provide power, the M+ is rated at 200mA.
Telem 1 is the sik radio that can be seen to the left of the f/c and you can see the corresponding connections on the Telem 1 cable. I believe that is rated at 100mA. That cable has had the 5v and gnd swapped to make it work. The pin outs on the Telem 1 port are 5v tx rx with the sik being 5v rx tx. So should be correct.
On Telem 2 is the serial cable for the Gremsy gimbal and only relies on tx and rx as the gimbal is externally powered. Then there is the can port for the GPS.

Lets just focus on sik radio first, because I have its hardware and it should be the easiest one to setup.

Some of the sik has different connector with Cube. Have you modified it? Can you confirm whether their tx and rx are not swapped?

Can you disconnect all other devices, leaving only sik connected? Reset all parameter just in case you have any changes on telem1 params.

If you have another carrier board, try to switch to it to verify if problem is from carrier board.

I have used the telem 1 cable that was provided with the cube. The only modification required was to swap 5v and gnd.
I have tested the other connections and can confirm tx from cube is connected to rx on sik and the same for the rx on cube to tx on sik.

I have flashed a new build onto the cube and the only parameters changed on telem 1 was to set baud rate to match the radio settings and to try both mavlink and mavlink2 protocol. Both failed.

I will try with everything else removed and see if I get anywhere. Unfortunately I don’t have another f/c to work with but I am in contact with the supplier I purchased this one from and will see if I can arrange a replacement if this fails

Can you confirm your wires are connected in this way?


You may also try to swap rx and tx

No, the Sik radio connections are incorrect in your diagram. On my radio the connections (left to right) are GND, RTS, CTS, TX, RX, 5v.

The order in your diagram would be wrong for my radio regarding the 5v and GND.

The way I have it connected is as follows.

Cube GND RTS CTS RX TX 5V
,.,.,.,.,.,…|.,…X,…X…,.|…,.|…,|
Sik…GND RTS CTS TX RX 5V

I have removed the RTS AND CTS cables and as seen in the photos have only the can gps and telem1 connected and powered on. The radio is powered and connected to its companion as shown by the green light.

mission planner still cannot connect and no data light is flashing on the radio to show it is getting any data from the cube.

I have my Sik radio with 4 pins. So you are correct in this case.

When the telemetry is powered. Does it show up in COM port? What baud rate did you use for connection?

Do you mean on mission planner?
If so, yes it’s detected on com port 4.
Baud rate I can’t recall off the top of my head, I’m not home at the moment. But I can confirm it is set the same on both mission planner and in the serial port settings on the cube.
I have run the Sik tuning process and both radios are communicating in Mission planner and are updated to v2.0.

Just seems that there is no mavlink communication.

Yes. In Mission Planner.
Sik radio should be supporting baud rate up to 57600.

You may also need to raise your question on ardupilot forum

just in case you may have miss any setup on the sik radio

Just thought I would drop in and update.
I decided to wipe the firmware and install a different version (plane) and then went back to v4.0.6 copter

After that I concentrated on only activating one serial port at a time and have now managed to get the Gremsy t3v3 working on Telem1, Sik radio on Telem2 but im still battling with the s.port not working. Almost certainly that is an issue else ware with my setup or wiring, so im not too worried.

Glad to say, it looks like the hardware is good, must have been a bug somewhere with firmware and scripts I had been running.

Check the inverter cable for yapoo telemetry. My cable had ground in wrong place. Also remember that only one serial can be set to Serial_Option 10 if you have two serials set to Options 10 it will not work. Check my topic:

Could you provide working settings (in Arducopter) of Cube Orange for Gremsy T3v3 ?

I’m working at the moment but I will link to the settings I used from gremsy.

These instructions are from gremsy and relate to using telem2/serial2.

Connect the Gimbal’s COM2 port to one of the autopilot’s Serial/Telemetry ports like Telem2 as shown above.

Connect with a ground station and set the following parameters:

MNT_TYPE to “4” for “SToRM32 MavLink”

SERIAL2_BAUD to “115” for 115200 bps. “SERIAL2” can be replaced with another serial port (i.e. SERIAL1) depending upon the physical connection

SERIAL2_PROTOCOL to 2 for “MAVLink2”

SR2_EXTRA1 to 10

SR2_POSITION to 10

The gimbal’s maximum angles can be set using these parameters:

MNT_ANGMIN_ROL to -3000 to allow leaning left up to 30deg

MNT_ANGMAX_ROL to 3000 to allow leaning right up to 30deg

MNT_ANGMIN_TIL to -9000 to allow pointing 90deg down

MNT_ANGMAX_TIL to 3000 to allow pointing 30deg up

MNT_ANGMIN_PAN to -18000 to allow turning around to the left

MNT_ANGMAX_PAN to 18000 to allow turning around to the right
To control the gimbal’s lean angles from a transmitter set:

MNT_RC_IN_TILT to 6 to control the gimbal’s tilt (aka pitch angle) with the transmitter’s Ch6 tuning knob

MNT_RC_IN_ROLL to some input channel number to control the gimbal’s roll angle

MNT_RC_IN_PAN to some input channel number to control the gimbals’ heading
For reference, Gremsy’s setup instructions can be found here.