Lesson 1 - How is a cubesat? Setup and first code
Welcome to Lesson One of the Space Ops Cubesat EDU program.
This first lesson outlines what satellites are and why they are critical for humanity. Then we get into setting up the electronics to build up a mini satellite.
A satellite can be described as a mass which orbits around another mass. The Moon is the most well known of satellites. In modern times, humans create artificial satellites filled with electronics to perform tasks. These tasks may be to relay information from the ground to far distances over the horizon, take pictures of the planet at high to low resolutions for many reasons such as weather and asset tracking. One of the more famous satellites would be the International Space Station which hosts a crew of 6 astronauts and has done so continuously for over a decade. The greatest micro gravity laboratory in our human history.
But every human made satellite has fundamental needs to full fill their purpose; Position, orientation, communication, power and payload.
In our lessons, we will be combining low cost electronics from the Arduino platform and full fill the needs of our tiny satellite called the cubesat.
Hardware needs, Software needs and Setting up
We have a large list of sensing and components listed below but it’s up to you what you would like to have and so if you’re on a budget, you can customise what you would like to develop.
Arduino Seeedstudio Lotus - This is a great platform to reduce the amount of soldering required. Perfect for someone looking to build quickly. But the option to use the headers are still available and do other things on top.
Space Ops Cubesat Test Frame - A simple laser cut frame designed by us that can help keep all the items. https://spaceops.com.au/products/cubesat-wooden-test-frame
Temperature & Humidity Sensor - Measure the temperature and moisture levels in the environment.
Air Quality Sensor - Measure the CO2 in an environment.
6-Axis Accelerometer and Gyroscope - Measure the state of the satellite
3-Axis Digital Compass - Measure orientation
Loudness Sensor - Detection of audio
Sunlight Sensor - Direction of the sun or strength of the UV light
Speaker - Outputs audio
Buzzer - Outputs a buzzing sound
RGB LED Stick - Outputs a rainbow of colours with 10 RGB SMD lights.
4 wire connecting wires - To connect the Grove sensors to the Lotus board.
Space Ops Code Repository - We will be using Github to host and manage our code repository. Here the fundamental code and any changes will be kept in the link below. https://github.com/spaceopsaus/what-is-a-cubesat
Arduino - The home to open source microcontroller activity. Download the Arduino IDE. https://www.arduino.cc/en/Main/Software
Seeedstudio Lotus Drivers - Drivers are a need for most new hardware when working on Windows. This board is no exception. http://wiki.seeedstudio.com/Seeed_Arduino_Boards/ . We will run through the process further down the page.
Start downloading and install. Download the Arduino IDE for your relevant computer Operating System: Windows or Mac or Linux.
Download the Seeedstudio Lotus Drivers and install. Follow the instructions as provided by the SeeedStudio Wiki.
Windows - http://wiki.seeedstudio.com/Seeed_Arduino_Boards/
Mac - http://wiki.seeedstudio.com/Driver_for_Seeeduino/#installing-drivers-for-the-seeeduino-with-mac-os
Download our code from Github. https://github.com/spaceopsaus/what-is-a-cubesat . On the page, there is a drop down button “Clone or download” which will reveal a ‘Download ZIP’ button. Click on this button to download the entire code repository.
Assuming you have the Arduino IDE, installed the drivers and have our code repository locally on your computer, It’s time to boot up Arduino and setup Arduino to recognise the Lotus Board. The Instructions for that can also be found on the Seeeduino page under the section for Arduino setup. http://wiki.seeedstudio.com/Seeed_Arduino_Boards/#step-2-setting-your-arduino-ide
Time to play
With setup out of the way, it’s now time to play around with the sensors and code.
We’ve done our best to make this step as straight forward as possible. We’ll start by going into the Individual Sensors folder and go through each sensor.
When you go into each sensor folder, there will be one .ino file. This is the primary file for Arduino. You may also find .h and .cpp files. These are called header files and are just as important as these provide functionality for the code found inside the .ino file.
If the .ino file has a tiny icon that looks like the Arduino icon, then go ahead and double click on it. If it doesn’t, then you will need to use Arduino’s menu to open the file. From the top left click on ‘File’ then select ‘Open’ and browse for the repository directory and chose your .ino file.
We’ll start with the trusty humidity and temperature sensor.
This can tell you the temperature and humidity of the air. Looking at the code, there are comments indicated by the double forward slash. These tells us a bit more about the code.
If you would like to know more of the anatomy of Arduino’s code structure, you can find more from the link https://www.arduino.cc/en/tutorial/sketch
We will start by looking for a variable to define our Pin. In this example it’s pin 2. This means we should connect the temperature sensor to D2 on the Seeeduino Lotus board.
With our selection of sensors and displays, they will only have three types connections, digital (D), analog (A) and wire (I2C). These symbols are marked on the Lotus board itself.
Once done, lets connect via usb the Lotus board to our computer. Let’s check that we have selected the correct Board, and the Port in the top menu under ’Tools’.
When correct, lets start the upload by pressing the ‘right arrow’ icon near the top left.
The lower black console area will begin to scroll text and display if the program has completed or not. If completed, start the serial monitor. An icon on the top right which looks like a search icon or eyeglass will display the Serial Monitor. Here, the temperature reading and humidity reading will be displayed and also continuously updated.
The next step is to now start testing out some of the other sensors by loading the .ino file, having a short read of the comments, identify which port to connect the sensor to, upload the code and review the sensor readings.
The key take away is to appreciate that some sensors provide an input of information to the micro controller such as temperature sensors. But some sensors will output information either with visuals or audio. This type of sensing and response is typical of any electronic device and a fundamental principle of human centred design and robotic design.