This project is one of the finalists in United States Parachute Association (USPA) Skydiving Technology Advancement Roundup (STAR) competition. It is an improvement to Skydive Auto Reminder - Going Pi-less (Julie) which is an improvement to Skydive Auto Reminder - Meow Call (Consuela).
IntroductionHave you ever missed a flight? Sucks, doesn't it? It sucks even more when it is a fun flight that you get to jump out of above the fluffy clouds. To add insult to injury, you lose your lift ticket which is a big deal in the skydiving community (we use the number of equivalent lift tickets to indicate how much other things are worth; a yardstick for the layman).
The plane we jump out of cost more than $1.3M USD so it is unrealistic to expect it to wait on us. We have to be at the loading area ready to jump by 5 minutes call. Manifest staff make courtesy calls every 5 minutes but they may get too busy with other office duties. My solution will make automated calls over PA system or for more personable experience it can be a reminder inside the office so staff can make the calls over PA system.
Meet JoeWez (named after Joseph G. Wezensky), the most efficient iteration of Skydive Auto Reminder. JoeWez is just a WeMos D1 Mini Wi-Fi development board with some optional components.
Product Evolution For My BirdsLet's say you need to calculate your wing loading. You could use a computer, but that would be a lot more machine power than you need to make a simple calculation. You could also use a smartphone which is not as powerful as a computer, but still too expensive for the task.
Engineers constantly try to optimize a product by building it to perform just the task it was designed for, and that's the essence of this project. If Consuela is like using a computer and Julie is like using a smartphone, JoeWez would be like using a calculator for the wing loading calculation analogy. They all perform the same task, but JoeWez is the least expensive to build and operate.
Product Evolution For My NERDsIf you recall, we started with a Raspberry Pi that scrapes a page then sends the information to Sony Spresense to make the load announcement. In the following project we got rid of the Single Board Computer and replaced it with WeMos D1 Mini. Still not satisfied, I set out to use just WeMos D1 Mini with an external Micro SD card to save the audio files. This project shows how we achieved then exceeded this goal.
Studying The PageBefore we get into the code, we need to understand how the web browser (which JoeWez doesn't have) acquires data to display on the screen. We know it's not a simple HTTP GET request because Consuela had to use Selenium to obtain load clock data.
Please note the page you're interested in might look a lot different. However, finding the solution should be a similar approach to the following:
Open the Drop Zone (DZ) page and click Ctrl+Shift+I. Click on the Network tab then filter by clicking on XHR then press F5.
We're only interested in the first three lines starting with "?EIO=3" ("&t=....." can be removed). The first call is to get SID to be used in subsequent calls. The second call is HTTP POST to subscribe to announcements. The last call is to receive the data.
PlatformIOLearning PlatformIO has been on my radar for a while; all the geeks I know use PlatformIO.
Same code will work for Arduino IDE, just rename the file to.ino instead of.cpp and install libraries manually. We've used ArduinoJson in previous projects so will talk about the other two libraries. The first library we're going to use is WiFiManager. We need that to avoid hard coding SSID and password, and to make JoeWez mobile so we can use it on any 2.4 GHz Wi-Fi. The real star of this show is ESP8266Audio which, as the name suggests, enables WeMos D1 Mini to play audio without any additional board.
Google TranslateThis is another optimization of the project. While waiting for my micro SD card reader board to arrive, I came across Text-to-Speech engine of Google Translate. It does not need HTTPS which makes it usable by ESP8266Audio. Furthermore, it does not need any API key, and since I'm already online to get load data I might as well use it. We no longer need to create special mp3 files like we did for Consuela and Julie.
We're using a speaker with amplifier to make load announcements louder, but it is not really essential. We could just use WeMos D1 Mini by itself. We only added 2N2222 transistor to allow reprogramming since the audio out is the same pin as Rx. We then added a small resistor to limit the current to the base of the transistor and a capacitor to smooth out the speaker's DC supply.
I did say "Julie is here to stay" at the conclusion of the previous iteration of this project, but the reality is; there is always more to learn. As we learn more we can make improvements. Just like Julie, JoeWez can be powered up / shutdown at any time. No Operating System booting means faster to get online and safer to get off fast. If you recall at the end of Consuela's project, the DZ decided to change page layout. When we scrape data from the web, changing the page layout often requires rewriting the code to get the data. However, HTTP calls are less likely to change which means better code longevity.
DemoOnce code has been uploaded and components have been soldered, we can power JoeWez. The first thing we need to do is connect to a Wi-Fi using WiFiManager. JoeWez will now make the load calls.
Comments