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.
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 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)
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.
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.