Hello Fellow Yuneec Pilot!
Join our free Yuneec community and remove this annoying banner!
Sign up

St16 v1.

as the PWM has always been used to control the tilt on the gimbal.
They are capable to init in the steady grip, but the tilt doesn't work. An 8N1 sequence can be represented as a PWM...
 
They are capable to init in the steady grip, but the tilt doesn't work. An 8N1 sequence can be represented as a PWM...
Interesting. Would it be then so, that if the CGO3+ gets the specific init pulse, it responds to PWM. And if no such pulse is got, it reverts to serial communication over one wire? That could explain my pretty weird findings when I was probing it with a high speed scope and a logic analyzer almost two years ago.
 
The camera has one more hidden sequence to be a "pointing device". Implement all possible in your project and we can discuss how to be the best for initialization.
 
  • Like
Reactions: Pöllö
The colours are from gimbal and mine. Use the pin names...

115200 8N1 or check it. This all was in the middle of the third wave the last December. I hope all my ideas were shared somewhere, but if something is missing, I'll try to reconstruct it.
 

Attachments

  • DSC_0231.JPG
    DSC_0231.JPG
    914.7 KB · Views: 10
This is my very ugly way of creating the init pulse, which after I drive the tilt axis with raw PWM from the drone. But I am definitely interested about those other modes and proper serial communication too. I'm going to take a look at my old code, try to remember what I did, push the latest firmware src to the git and get back to this hacking! ;)

C++:
/* Send the initialization pulse for the CGO3+. The bootloader accepts FW only after this is done. */
for (int i = 0; i<300; i++)
{
gpio_set(GPIOA, GPIO2);
delay_us(640);
gpio_clear(GPIOA, GPIO2);
delay_us(19000);
}
 
Colors are from gimbal and mine. Use the pin names...
Wow, thanks! ;-)

That explains, so the PWM pin is indeed used as a serial RX if the CGO3+ is not commanded to the PWM mode. I was thinking that it is always PWM in, and there is only one pin, labeled in TX in your drawing, for serial communication. I was expecting it to be some half-duplex one-wire serial or something weird. But apparently the role of that PWM/RX pin changes depending on this init pulse and the interface is indeed normal serial with proper RX/TX lines, if that pulse is not given. ;)
 
Hi,

That looks interesting! Could you tell me a bit more about that camera<- ->drone communication? I tried once to figure that protocol out while I was developing/modifying the bootloader for the Thunderbird/PX4 to start up the gimbal, but could not figure it out. At first the CGO3+ expects a certain PWM sequence, which after it goes to some weird one wire communication which is used for some purposes and firmware transfers.

Br,

TR


From I saw when I was messing with it, if the CGO3+ gets a specific PWM/PPM type signal on start up then it will be in PWM/PPM mode to communicate with the steady grip or maybe the Q500, tilt control only. But if you give it a certain set of serial initialization commands during startup then it will be in serial control mode, expecting MAVLINK like commands (if I recall it didn't seem to match mavlink v1 or v2 exactly, but was close) and you can control both tilt and pan.

This post has my ESP32 Arduino code to convert the SR24 receiver output into an SBUS serial output and a 2nd serial output to the CGO3+. I never tested it in the air, but that serial init seemed to work and I was able to control both pan and tilt on the ground not attached to yuneec drone.

EDIT: That code referenced isnt the SBUS + CGO3+ version. It is 2 servo outputs (for driving small speed controllers on a RC car) and the CGO3+ output. I have the Sbus and CGO3+ output version somewhere, but the point is that the CGO3+ init and serial messaging works.

Dylan
 
Last edited:
  • Like
Reactions: Pöllö
I was not aware at all that CGO3+ has two different possibilities to control the gimbal. This initial sequence at the UART of the gibal and all this stuff looks intresting. I will check if I can record somthing with the Raspberry Pi tool that I have currently under development.
#
By the way, the MAV-link like messages are recorded as sensor files in the flight logs. The sensor files are only there if a CGO3 camera was attached. In the past I tried to read somthing in it but without success. Q500log2kml is able to extract the messages but what it means, I don't know. Format see chapter 2.3.2 of the manual.
I found something in the ST60 software, the disassembled flightmode app, regarding MAV link messages but this was not very helpfull. Maybe this is a very old format.


br HE
 
  • Like
Reactions: Pöllö
...devices: 01 - copter, 02 - gimbal, 03 - camera, 04 - ST16, 05, 06 are present too, but I have no idea what they should be.

Any suggestion, speculation and so on?
 
I agree RealSense could be one, and another may be the video feed from the CGO-ET. That camera has two WiFi links.
 
The Realsense module?
Probably yes. When I did this, the RS was detached. Exactly the RS is present in the 2.4 ZigBee downstream, but a secondary link is possible too. Do the rest till 04, after that I'll take a look for 5 and 6 again.

Did you do the CRC? If you have any questions, drop them in the private thread, where you was invited. I probably restore in my mind almost all. When I did this, the interest in future development was only mine. :(

Now, I see, Helmut is up too. ;)
 
Probably yes. When I did this, the RS was detached. Exactly the RS is present in the 2.4 ZigBee downstream, but a secondary link is possible too. Do the rest till 04, after that I'll take a look for 5 and 6 again.

Did you do the CRC? If you have any questions, drop them in the private thread, where you was invited. I probably restore in my mind almost all. When I did this, the interest in future development was only mine. :(

Now, I see, Helmut is up too. ;)
Hi, thanks. I think I'll implement the camera control to the firmware completely at some point soon instead of bare pwm drive and I am also figuring out what else we could do next thanks to your awesome work! ;) I've been out of this development for half an year, I got the FW to (at least based on my testings) rather stable state (0 issues in manual flight, missions and corner cases i.e. behavior with no gps etc.), and left waiting for test flight input from others, either to fix something, or concluding that it's safe to wrap it up, release the sources for the latest version to public and move forward in development. ;)

Did you take a look at this yet? Typhoon H 480 PX4 v1.10 (Stability issues ;-)
It's a fully functional port of the open source PX4 autopilot for the Typhoon, done by me and Helmut.

Br,

Toni
 
Last edited:
Did you take a look at this yet? Typhoon H 480 PX4 v1.10 (Stability issues ;-)
It's a fully functional port of the open source PX4 autopilot for the Typhoon, done by me and Helmut.
Still not, but as I see, I should. Soon I'll ask for instructions and precompiled binary, but not right now. My today's focus is an infrared camera implementation.
 
Still not, but as I see, I should. Soon I'll ask for instructions and precompiled binary, but not right now. My today's focus is an infrared camera implementation.
Good good ;) By CRC, are you talking about the CRC16 for telemetry packet from drone to ST16? That's done already, I'll post them here if you need, I think the source in the repo does not have that yet.
 
CRC16 from the copter to the gimbal. I know all checksums, just asking if you need some pointing related to the CGO3+.
 
are you talking about the CRC16 for telemetry packet from drone to ST16?
There is 8...

Sync Ln ???? Seq PAN Dest Src Rad Time Latitude Longitude Altitude Vx Vy Vz Sat Vbat Cb Roll Pitch Yaw M6 IMU B/C f/m vt Err GPS fsk CRC8

5555 30 8841 84 9616 46F1 8AC5 08 A603 6045181A AAFB230E 01000000 FCFF 0100 0900 0B 6C 00 A4FF F5FF 6F5D FF 61 55 10 05 00 2D E5 5C
 

New Posts

Members online

Forum statistics

Threads
20,973
Messages
241,797
Members
27,359
Latest member
tmsmindspace