Data from Arduino Board trough APM Telemetry

Hello

this is my first post here, and i have to solve already a big issue.
I’m student of aerospace engineering in Aachen/Germany.
We got a student project with a Quadcopter.
The drone is controlled by a APM 2.5 and carries a Arduino Developer Board.
We used to put some sensors on it, like temperature, pressure, moisture etc.
and transmit the data to the ground station with a XBee.
Now we want to get rid of the XBee transmitter and connect the Arduino Board
to the APM to send the measurement data down with the APM Telemetry.
My question for you is;
What kind of signal do i need from the Arduino Board?
How can i passthrough the data to the telemetry?
And how can i show the result in the Missionplanner Groundstation?
In general, how is it made working?
If not possible, is it possible to send the data through
(a second) telemetry transmitter instead of the XBee?

best regards
Tobias

1 Like

Hi Tobias,

You can send extra data over MAVLink telemetry. What you are doing is not full companion computer but it’s a bit similar. You have a small companion computer that collects data from external sources and you want to transmit that data down to GCS.

There is a bit similar query in here too. I have posted some links to MAVLink documents on it too.
http://discuss.ardupilot.org/t/using-avr-as-companion-to-apm/8735

Showing this extra data on Mission Planner will be different issue. As Mission Planner does not understand your extra data so it will not process that data too. You can always make Mission Planner to be aware of data by editing MP sources and compile it by your self.

Data that is not known by MP can be passed to another Serial port so you can also have external computer to receive this data.

If you do that, remember to publish your source code for the public.

Hello jpkh,

thank you very much for your info.
i will read it closely

Can you tell me how that is done?:
“Data that is not known by MP can be passed to another Serial port”

I usually have the telemetry module at a single com port.
Do you mean to use another pc receiving from the same transmitter?
Or two receiver for two different com ports on one pc?

best regards
thank you again for your help
Tobias

Tobias,

You can have for example another ftdi/serial cable connected on another usb on your main gcs computer. Then on MP you can define forwarding serial port. All MAVLink messages that MP does not use on know, it will forward to your second serial port.

Then on second port you can have for example Arduino mega with LCD display that shows extra values. This is one way…

Another is to connect another computer that receives all data and processes that…

Third way is to have vietual serial port and you make your own extra GCS software for your private sensors and connect this software your newly created virtual comport where MP then forwards extra data.

This way you dont need to modify MP at all as everything is there already and you just create your own way to display parameters from your companion system.

Overall there are many ways to do it. Which one is best to your need really depends on you and your team hardware/programming skills.

-jani

Hello jani,

thank you for your tipps.
I decided to use a 3DR Telemetry module instead of our former solution, with a XBee.
I figured out the wright connectors and tried to collect some data today.
Unfortunately, the received data was a mess. It should send the measured values as numbers and letters visible in the serial communication stream. But there are just a lot of jjjjjjjjjjj and iiiiiiiiiii…
and the GroundStation program (selfmade with LabView)doesnt know what to with it.
Do you have an idea what is going wrong here?
I tried to switch different Baud rates, but with no success. Just other letters or numbers.
Does it have to be a specific code of data, that the transmitter knows what is ment?
I thought its just a transmitter for serial data, no matter what they say…

bets regards
Tobias

Tobias, yes that is normal as it’s MAVLink protocol feed. You cannot send plain text over telemetry, you need to make a board that talks and understands MAVLink and injects new MAVLink packets to autopilot. AP then takes that data and re-packets it for transmission to the GCS.

For your LabView, you need to make it aware of MAVLink protocol and extract wanted parameters from the datafeed.

Best way is to google a bit around MAVLink and LabView but here are few starter points for you:

Hello jani,

Success!! :smiley:

I replaced successfully the barely working XBee transmitter with a 3DR Telemetry Module.
The problem was the wright Baud rate. I tried it first with 9600, but then i found out the modules are working with 57600.
I changed the rate in the reading part, but not in the arduino firmware. So it was sent with 9600 and tried to receive with 57600.
Now after changing EVERYTHING, even the Com port, to 57600, they speak literally the same language
and i can send, receive and interpret our measurement data :slight_smile:

The most important big advantage of the 3DR Modules is the much higher range. I can walk around the campus with a strong connection, while the XBee barely reaches across the room…
Unfortunately i cant use the 915MHz modules as well, because its forbidden frequency in germany.
So the APM-telemetry will now be send by a OSD with the camera stream…

Thank you again for your help.
best regards
Tobias

1 Like

Great. Happy to hear that you got them working. For frequency issue, you could use 868 or 433mhz.

Especially 868mhz is made for EU users. Take a look at:
http://store.jdrones.com theres short and long range telemetry sets for 868mhz (also 433 and 915)

Yeah reason we created those SiK/3DR modems long ago was that we wanted to replace xbees as they just werent good enough for our use.

hello Astro Tobi,
currenty my final project is about quadcopter collision avoidance using sharp ir sensor, and im still confuse about the schematic. would you mind to share the schematic ? it will help me a lot for my final project.

Best Regards,
Thaariq Basyaarah

Why don’t you just open a new thread? This one is 6 years old, the OP has never been active after this and the thread is not even related to your problem.
The docs do not mention sharp ir sensors:

https://ardupilot.org/copter/docs/common-rangefinder-landingpage.html