I am a newbie to this technology. I will plan to characterize the atmosphere by putting meteorology sensors to Arducopter like pressure, altitude, temperature, relative humidity, wind speed, and solar radiation. My question is as below.
How to connect all these sensors to Ardupilot?
How to record all these parameters every 5 seconds like in the data logger where the data in the format of csv or txt?
Your advice and solution by showing the link of references, coding, hardware, etc. are highly appreciated.
Ii also highly recommended to do that separate. You can use the position information of the flightcontroler through mavelink to connect your sensor readings. Raspberry pi is perfect for that.
I also use such a setup with heated rotorblades against icing if it gets humid and cold.
Thank you for the kind response. It means, we can use Arduino for data logger? How to connect between Ardupilot and Arduino?
As I newbie, I still learn how to connect multiple sensors to Ardupilot. Later, the data from mission planning can be saved in the SD card or Laptop. Your idea to solve this problem practically is highly appreciated.
Thank you for the good ideas. This is Ardupilot will be connected to Raspberry Pi? Do have any links or document for the connection? Your idea to solve this problem practically is highly appreciated.
Thank you for the suggestion. My plan is to enhance Ardupilot for atmospheric sensing. What is scripting? It is listing programs or additional devices to be connected to Ardupilot? Your idea to solve this problem practically is highly appreciated.
Scripting is lua code that can run in parallel to the main flight code that can do more or less anything in a safe sandbox where a code crash will not result in a vehicle crash. (you can still crash a vehicle from scripting if you set params or do other odd stuff)
Just need analogue support and you can log more or less anything you could connect to a Arduino, you can also trivially sync with flight information such as position and altitude.
Thank you, Peter. Great and very helpful. Let me learn first the idea. If you have other ideas that can be easily implemented is welcome. Have a wonderful day ahead.
There are multiple options if you go for the raspberry pi solution.
You can connect the pixhawk through serial, and could just exchange a NMEA string (GPS), depending on your needs this could be enough, or you get the full mavlink (the craft attitude could be interesting for the radiance sensor, even with a cosine receptor, this will likely influence your reading). Add your sensors to the raspberry pi (trough i2c, serial, analog) then make a simple python script that writes all your sensor reading in a file every x seconds. should take a student around 2-3 days to make it work reliably with some error handling.
Thank you so much for the great idea. Now, I can confirm that using Raspberry Pi to embed the meteorological sensors is more feasible and it would be connected to Ardupilot. Can BME280 sensors connected directly to board of Ardupilot? Or, still use Raspberry Pi? Thank you for your time.
Hey,
both is possible.
But for connecting the sensors to ardupilot you need to write your own driver.
To connect it to raspberry pi there are already solutions out there.
Its posible to connect all sensors to ardupilot and its maybe more “nice” and “clean” to do that, but it is a lot more efford. having all sensors connected to the raspberry pi and only one serial connection to ardupilot is a lot more flexible.
As suggested by Amilcar Lucas, this is confirmed I will use Raspberry Pi Zero. I just found the connection between Ardupilot and RPI at https://ardupilot.org/dev/docs/raspberry-pi-via-mavlink.html. My question, is the battery between RPI and Ardupilot should be separated?