From IoT Vision To Reality
Deepak Puri, Technologist & philanthropist
Practical Lessons From Building An IoT Proof-of-Concept
What looks simple from 20,000 feet becomes complex as you get closer to the ground. Here are details on the approach we used, components we used and the lessons we learnt while recently developing an IoT proof-of-concept.
Objective
Our client’s request was simple –  Let’s reduce the downtime of power generators by monitoring when they start to produce a particular high frequency noise indicating a potential problem, and send an engineer to service the generator. Sounds simple, doesn’t it ? Converting vision into reality, however, is a little bit more involved !
Needs Analysis
We first analyzed the operating environment of the generators to measure ambient noise, the sound the generators made when operating normally and the noises they made when needing servicing. After reviewing the physical layout of the building and potential signal interference sources, we determined that WiFi connectivity would adequate. We chose SMS based alerts (rather than a mobile app) to inform the service engineers that a generator needed attention as they were typically on the move and used both smart and ‘feature’ phones.
The proof-of-concept (PoC) was designed around this parameters. A sensor with high fidelity microphone was placed close to a generator and transmitted sounds being made via WiFi to the cloud for analysis. An SMS alert would be sent to the service engineer when the sound pattern indicating an impending breakdown was detected.
Technologies used
Particle.io – The Photon is a development kit for creating Wi-Fi connected products based on Broadcom’s WICED architecture, combining a powerful STM32 ARM Cortex M3 microcontroller and a Broadcom Wi-Fi chip.
Twilio – Platform to programmatically send SMS alerts.
Adafruit – This fully assembled and tested board comes with a 20-20KHz electret microphone and a Maxim MAX4466 for amplification.
Note : The different generators produced slightly different sounds so we selected a microphone that could be adjusted. We chose the Electret microphone after also evaluating sound sensors because :
1. It could better translate the audio input into frequencies to be analyzed.
2. The amplifier had better power supply noise rejection.
3. Included a built-in potentiometer that could be set to adjust the gain.
Proof-of-Concept buildout
We first created a Particle.io account to access their development tools.
Next we programmed how the sensor would communicate to the cloud using the the command line interface (CLI) and the Particle.io account dashboard.
We then connected the Photon board to the local WiFi Network using a Particle mobile app, available for iOS in the App Store and Android in Google Play.
( We found the Particle.io documentation to be very helpful ).
We next ‘bread-boarded’ the Photon, microphone and LED circuit, including soldering the header pins onto the microphone breakout.
Programming the Photon to respond to a ‘sound event’ from the microphone took some effort. This was a trial and error process and we ended up having to modify the code samples available from Particle.io and Arduino. More details on the solution we developed are available at SkilledAnalysts.com.
We developed a Particle Photon Webhook so that when a ‘sound event’ ( noise in the desired frequency range was detected ), it would trigger the Particle.io platform to send an alert through Twilio. We used the Twilio API to send an SMS alert to the service engineer about a generator needing attention.
Note : Although there are multiple service engineers responsible for maintaining the generators, we decided to simplify the PoC design by just sending an alert to one phone number. As the solution is productized, adding logic to select which service engineer to notify could be added.
Lessons learnt during the PoC
1. Sample IoT code available online is a good starting point, but will have to be customized for each project.
2. Using existing IoT platforms (Particle.io) and notification solutions (Twillio) will expedite the project, but getting familiar with new APIs will require some learning and experimentation.
3. We needed to experiment with the microphones to tune out ambient noise to avoid False-Positives. We added logic to make sure that the sounds indicating an upcoming breakdown were customized for different types of generators and were sustained for a period of time in order to avoid erroneously alerting the support engineer.
Summary
Here are some suggestions, as you start converting your IoT dreams into reality.
1. Where possible use existing platforms and APIs rather than develop new code to speed up your proof-of-concept.
2. Make sure that your business needs are being accurately represented and addressed in the proof-of-concept. In this example for instance, avoiding ‘false positive’ signals was essential to avoid exasperating the service engineer with false service alerts.
3. Keep your proof-of-concept simple to begin with. Once you’re comfortable that the approach will address your business needs, you can refine it further to make it more rugged and scalable. Here by design we chose to alert just one service engineer.
4. Get professional help to supplement your in-house skills ( such as Skilled Analysts ) to expedite your IoT proof-of concepts.
Resources :
Supplier Links
Photon Kit Reprogrammable Wi-Fi development kit for IoT prototyping.
Adafruit Electret Microphone Amplifier with Adjustable Gain.
Kalevel® 120pcs Multicolored 40pin Male to Female, 40pin Male to Male. 40pin Female to Female Breadboard Jumper Wires Ribbon Cables Kit
Power Shield MCP73871 battery management controller to provide power.
Twilio Phone Number to send SMS from (cost per month) Â + Charges / SMS
Skilled Analysts is a San Francisco based consulting firm that helps clients convert their IoT vision into reality by quickly building proof-of-concepts using industry leading sensors, IoT platforms and connectivity.