Sample message provided by the web application’s dashboard
For the ELC (a radio controlled aviation club) I’ve recently built a “permission to fly” dashboard/web application. Since the model airport we’re flying at is military training ground, it’s necessary to check at a special phone number if there are activities planned for that day. In order to prevent duplicate calls to that phone number, we built this “permission to fly” system. This is how it works:
The idea is relatively simple: a user calls to the responsible Defense department to check if flying is permitted at the time. He/she hangs up and sends a text message to a special phone number. The text is received by an Arduino Mega with GSM shield (located at the model airport, powered by a solar panel) which makes a call to the web application providing a phone number, check value (to make sure the request is legitimate) and the texts message (‘approved’ or ‘forbidden’).
The web application first matches the check value against an internal calculated value based on a secret key, the data sent and a time stamp. If this is correct (meaning the secret key was correct, the data is not tampered with and the request is not too old – in order to prevent replay actions) the web application will check the database for a user attached to this phone number. If found, it will update the status in the database, changing a webpage and returning the status to the Arduino Mega through a JSON message specifying the current updated status.
Arduino Mega with GSM shield
The Arduino Mega has 3 LEDs attached to it; green (which means flying is permitted), red (flying forbidden) or blue (no status yet). Based on the response given by the web application the LEDs will blink in the corresponding color.
Another boundary for flying is sunset/sunrise: flying is only allowed between sunrise and sunset. The on-site system retrieves the sunset and sunrise times, so it can power down it’s GSM shield at sunset and power it up at sunrise. This is done to save energy. The web application retrieves the sunset/sunrise times from this API, based on the coordinates of the airport.
Currently the dashboard is only showing the current status, but in the near future it will be used to show the sunset/sunrise times to the visitors so they know if its still worth the drive to go flying. Other considered functionality is to display live sensor data from the field, for example wind speed and direction, temperature and maybe even live streams. More ideas? Let me know.
Contact me if you would like to know more about the Arduino software/hardware and I’ll pass the questions on to the right person!