RoadTest: Infineon / Arduino IoT Bundle
Evaluation Type: Independent Products
Did you receive all parts the manufacturer stated would be included in the package?: True
What other parts do you consider comparable to this product?: Raspberry Pi, Beaglebone Black, Intel Galileo/ Edison
What were the biggest problems encountered?: null
My proposed application was an attempt at trying to combine all the aspects of an IoT product into one compact module that was easy to test and prototype. The most compact, title that I can give it is, " IoT based Temperature Monitoring, Control and Logging System". The idea is pretty basic, yet very relevant and even more effective. The title is pretty self explanatory, it senses the ambient temperature of the environment, logs in the value, sends this data to the cloud, in this case a spreadsheet on Google Drive; compares it to a threshold, switches a fan on or off, and changes the colour of an RGB Lamp depending upon the sensor values.
Element14 and Infineon Technologies were kind enough to provide me with the hardware and resources needed to complete this idea, and so I set to work.
Firstly, I'll run through the hardware that was provided along with the pros and cons of each one:
Arduino Yun :
The Arduino Yun is an IoT centric controller board to develop embedded system applications that extend to a variety of domains thanks to internet connectivity. It stands in the market alongside embedded heavyweights like the Raspberry Pi and Intel Galileo. Based on the spine of an Arduino Leonardo, it is a entry level platform for makers and hobbyists. It employs an AVR Atmega32u4 microcontroller to do the more demanding sensing and actuating while an Atheros AR9331 processor running a Linux distribution called OpenWRT-Yun micromanages the background processes and tasks.
Infineon DC Motor Shield : The Infineon DC Motor Shield is an application specific shield for most Arduino boards which can be used to control high power DC motors or even stepper or servo motors. It packs 2 PN Half bridges which are able to swallow any amount of current that your motor might pull. Direct control from an Arduino board means that using this shield opens up a breadth of applications in power electronics as well. Pros :
Infineon RGB LED Lighting Shield : The Infineon RGB LED Lighting Shield is a programmable LED controller based on Infineon's own XMC 1202 Microcontroller. It is basically a processor dedicated to lighting up a cluster of RGB LEDs. Having coded a game using an LED array as a screen using just an Atmega32, I can justify to why something like this is necessary to avoid horrible, horrible lag. The onboard processor takes care of the lighting, and hence display, leaving the Arduino free to run other processes. Pros :
*UPDATE! : Extremely sorry for the delay in posting, the last couple of weeks, I've been ricocheting off my house and hospital! Hope that it's fine!
I'll now go through my endeavours in a slightly more technical vein.
On unboxing the Yun, the Motor Shield and the RGB LED Shield, I first went through the standard phase of testing the shields. The Motor Shield in itself was pretty simple, and after hooking up a power supply to the Vsup and 5 volts to the designated input pins, I was greeted with a satisfying beep. the Motor Shield was alive and well!
Testing the RGB LED Shield was a much more complicated, as it entailed soldering on the connectors and burning a sample code into it. So I decided to test it as and when the time came to use it.
Then came the Big Daddy of them all, the Arduino Yun. Setting up the Yun was cakewalk compared to setting up something like the RPi which requires at least an intermediate level of familiarity with installing an OS and setting it up. I just booted it up, accessed its personal network and configured it to sync with my home network. Done!
The Yun also came with a neat function of wireless programming on the fly, but in a city where your ISP is as predictable as a cornered cat, it's not a luxury that I had.
I also used some household electronic items like a temperature sensor, a motor and some fan blades.
The temperature sensor was a garden variety LM35, and it was pretty much enough for my test. In a couple of minutes with the soldering gun, my sensor was ready to be used.
I have had a rather unsightly power supply sitting at home for years, so I figured that powering the fan might be a fitting role for it to play. After sticking my fingers together countless times, my actuator module was done as well.
Now I noticed that the Yun's Ethernet Port and vertical USB Port don't make stacking shields on it an easy job. So I decided to go off the beaten track and make the Motor Shield a standalone model. Reverse soldering the pins was a bit of a pain, but worth it in the end. I also noticed that the Inhibit pins needed 5V each to set it to enable working of each terminal. So I utilized the extra pin outs to make a tiny power rail so that I didn't have to make a mess on the Yun side.
On the Yun, I used an Analog Input to read the value of the temperature sensor, and two digital outputs to control the motor.
On the software side, I intended to control the motor in real time as well as send the temperature value to the internet and append it to a spreadsheet in Google Drive.
I achieved that using an online service called Temboo. It's a really useful tool to have if you aren't really interested in hardcore software stuff like writing APIs. It has predefined templates to use for the required occasion, which in my case was appending sensor values to a Google Spreadsheet.
Soon after my code was compiled and debugged, and I uploaded it to the Yun and crossed my fingers. I opened my drive to said spreadsheet and lo and behold!
As I had built in the threshold values to activate the fan as well, the fan was switched on whenever the value exceeded the threshold.
Once this was done, I moved on to my Achilles Heel, the RGB LED Shield. I soldered this shield the proper way around, and mounted it on top of my Arduino Uno for testing.
The sample code provided in the documentation seemed to go down well with it, because it did give the indicated voltage difference between Red,Green and Blue channels, but I couldn't for the life of me, find a common anode RGB LED rail. So I had to satisfy myself with voltmeter readings for the RGB Shield.
Along with these steps, I also tinkered about on the Yun from time to time in order to find better ways of implementing my idea. I tried SSHing into it via PuTTY, but that wasn't my type. So I ended up SSHing via Git Bash, which doesn't need that much of initial setup.
In this project, the biggest challenges, in my opinion were as follows;
- Setting up the interfaces between the Google Spreadsheet API and the Yun.
- At times, the Yun's IP suddenly disappeared from the Arduino IDE Ports, and I needed to uninstall and reinstall Bonjour Browser for it to work again.
- The lack of a GUI on the Yun made it really difficult to operate on it for somebody with minimal experience in command line environments, it also makes resetting and reconfiguring it a pain.
But overall, it was an awesome experience, the Yun, albeit with a few chinks, is really a Knight in Shining Armour to the Damsel in Distress that is IoT!