The system was developed pn python 2.7, implements OpenGL , pygame , MatplotLib and Drawnow
Firstly, the program reads 20 values from the sensor in order to calibrate it.
The data sent by the sensor (Arduino / Xbee), make up an array of 15 values for different sensed magnitudes, in order, these are:
- Temperature (In Fahrenheit degrees)
- Presure (Raw pressure, its converted to Pa)
- Altitue (Absolute OSL , with calibration we get height)
- Pitch, Roll, Yaw (Absolute magnitudes, its converted to degrees over calibration position)
- Heading Filtered
- Kalman Pitch, Kalman Roll; Get after apply kalman filter.
- Acceleration (X, Y ,Z), Got from Accelerometer
- Gyro (X, Y , Z), Got from Gyroscope.
Feel free to ignore some magnitudes and use only those that are useful for your purposes< you only need to comment the lines on Arduino code and in python code; also change the size of array to receive.
Once the sensor was calibrated, it start to receive the meseaurements, at a 19200 baud rate; (Also can be modified, in orden to ajust to your needs, but once again remeber to change this value in arduino code)
A few moments after, the MatplotLib window come up, and shows the plot of data (We only take Temp, pressure, Altitude and height)
And the 3D model of Cansat.
We use the values of Pithc, roll and yaw to emulate the movement of the satellite; Axis were changed from original ones; because of the position of sensor into the CanSat.
Arduino Script take libraries from Korneliusz Jarzębski repositories, just added to libraries dir to facilitate integration.
On ground, Xbee is connected to a Arduino UNO to provide Serial comunication with the Laptop USB port. a Xbee Shield can be utilized, but due to the ease of getting an Arduino UNO, it was implemented with this.
The on telemetry system on satellite is conformed by an Arduino nano, GY-80 Sensor and a Xbee S2C pro RF Module working at 900 MHz.
Arduino code reads values from sensor via I2C, then send it to XBee Module connected.
Xbee Module send data via RF to Xbee module in ground. (I strongly recommend research about Xbee protocol, configuration ,operation frequency, antenna gain and path losses effects because it define the maximun length of your communications system).
Our configuration could reach a maximum distance of 600 m with LOS. At this distance any object in the path can cause loss of communication.
Open and compile S2.ino file with Arduino IDE, then upload it to Arduino NANO that will be placed inside satellite. Check wiring to sensors and Xbee.... (To be completed)
-
Clone this repo to your local dir, use
git clone https://github.com/AldaCL/CanSat.git
in terminal to clone via https (if you preffer, use ssh key and change the link.) -
To get an isolated enviroment (And don't broke your python libraries system or generate conflicts with versions), I strongly recommend use venv to install dependencies and libraries, just follow:
- Python 2.7 is nedeed, so check that you're using the correct pip in the case you have 2 versions of python (can be
pip
,pip2
orpip3
it depends on your python installation). I'll asume thatpip
corresponds to your pip version for python 2.7 pip install virtualenv
python -m virtualenv cansatVenv
source cansatVenv/bin/activate
pip install -r requeriments.txt
, Could be possble that you need to run this commands as SU.- To got out of virtual enviroment just run
deactivate
, and to get in again runsource cansatVenv/bin/activate
- Python 2.7 is nedeed, so check that you're using the correct pip in the case you have 2 versions of python (can be
-
Now you can open ultramasterv2.py file, and edit file 13/14 to define the serial port in your system on which Arduino UNO is mounted. dev/ttyACM0 for example
-
Run
python ultramsterv2.py
and see the magic. 🚀
- Telemetry implementation
- BMP280 Sensor test for temperature, pressure and humidity
- 3D model optimization
- Mount circuits on PCB
- Landing system