<<<<Previous Blog Next Blog>>>>
Audio & Visual Cue System for Anosmia (Smell Disorder) and Smart WheelChair - Ft. Amazon's Alexa
Week 4: July 24 - 30
The Smart Wheelchair has the following three sections: temperature monitoring, fall & collision detection, and home appliance control. These will be covered in a four-part blog series, the last part being the integration part. This blog is about the 'temperature monitoring' section of the Smart Wheelchair. For the collection of this project's blogs published so far, visit this link and for the detailed plan of the Smart WheelChair visit this link
Smart WheelChair [Part 1 of 4]
Temperature Monitoring | Fall & Collision Detection | Home Appliance Control | Integration
Introduction
The 'temperature monitoring' section of the smart wheelchair allows a person to get updates on the real-time temperature of surrounding in smartphone/ browser. Though we will be able to get the real-time temperature from Google and available virtual assistants like Alexa, Siri etc., this will differ from these by the fact that this will have a monitoring feature and will provide the accurate temperature of the surrounding. A brief flow of temperature data is given as follows: Temperature sensor (TMP36) --> Arduino MKR1000 --> Thinger.io --> Graph showing temperature over time.
List of Hardware and Software involved
We are utilizing the TMP36 temperature sensor provided in the Arduino MKR1000 IoT Bundle to measure the temperature. Also, we will need the Arduino MKR1000 board to collect and transmit temperature reading to the Internet (Thinger.io). You can either use Proto shield to have a permanent soldered circuit or use breadboard and jumper wires for a reconfigurable circuit. If you want to know what is more in the Arduino MKR1000 IoT Bundle / the official sponsored kit, visit the official kit section of this blog - Cue System for Anosmia and Smart WheelChair #2 - Official Kit and Amazon Echo Dot Unboxing. You will need Arduino IDE (preferably the latest version) with Arduino MKR1000 library installed (For Steps - https://www.arduino.cc/en/Guide/MKR1000 ) to upload the temperature monitoring code into the Arduino MKR1000 board. Additionally, you will need to be a user in Thinger.io to create your own IoT temperature monitoring system.
Below is the list of hardware and software involved in making an 'IoT temperature measurement and monitoring' system. Click on the names in order to be directed to the site where you can buy or access the resource.
Hardware
Software
- Arduino IDE
- Thinger.io (Website)
Circuit Connection
There are a lot of resources available regarding the temperature sensor circuit connection with Arduino. But some are actually causing the temperature sensor to heat up which could eventually damage the sensor. So make sure you connect as mentioned here. The heating of the sensor issue will arise when you follow articles which show +VS to be connected to GND of Arduino and GND to 3.3V of Arduino. The TMP 36 temperature sensor's datasheet is available here. The pin diagram is snipped from the datasheet and given below.
Thinger.io
Thinger.io is an IoT Platform and it provides free of cost (but with limitations) features to add your Arduino MKR1000, receive and plot the temperature data in a Graph and have a dedicated URL to visualize the Graph in any internet enabled device. For this IoT temperature monitoring system, the free of cost version is sufficient. For getting started with Thinger.io visit Thinger.io Arduino Documentation - Open Source Internet of Things.
Steps to connect Arduino MKR1000 with thinger.io
For the steps for connecting Arduino MKR1000 with thinger.io for reading temperature data visit my blog - Steps for connecting Arduino MKR1000 with thinger.io for reading temperature data.
Code
The code for the 'IoT temperature measurement and monitoring' section of the smart wheelchair is provided below. For GitHub page for the same code, Click here. I have added comments for a better understanding of the code. You will need to add the 'WiFi101' and 'Thinger.io' using the library manager in your Arduino IDE (Preferably the latest version, I used V1.8.5).
/* This is the code for the IoT Temperature measurement and monitoring section of the Smart WheelChair deisgned for the Element14 Community's 'Design for a Cause' * design challenge, sponsored by Arduino. * * Author : Dixon Selvan * Date : July 28, 2018 * Project: Cue system for Anosmia and Smart WheelChair * Website: * * Hardware components Required * ---------------------------- * 1. Arduino MKR1000 board * 2. TMP36 temperature sensor * 3. Few Jumper wires * * Connections * ----------- * Arduino MKR1000 | TMP36 Temperature Sensor * --------------------------------------------- * 3.3V | +Vs * Gnd | Gnd * A1 | Vout * * Blog Link - https://www.element14.com/community/community/design-challenges/designforacause/blog/2018/07/28/cue-system-for-anosmia-and-smart-wheelchair-4-iot-temperature-monitoring-diy * * Design Challenge Page - * https://www.element14.com/community/community/design-challenges/designforacause/blog * * Connecting Arduino MKR1000 with thinger.io, getting started guide - http://docs.thinger.io/arduino/ */ /*Disabling the secure TLS/SSL connection*/ #define _DISABLE_TLS_ #include <WiFi101.h> #include <ThingerWifi101.h> /*Declaring Variables*/ int tempSensor = A1; float sensorVoltage = 0.0; float tempinC = 0.0; float tempinF = 0.0; /*Create an account in thinger.io and replace username below with that username. Create a new device and replace deviceId, deviceCredential below with the one you had created.*/ ThingerWifi101 thing("username", "deviceId", "deviceCredential"); void setup() { /*Replace the below accrodingly with your WiFi SSID and password*/ thing.add_wifi("your_wifi_ssid", "your_wifi_ssid_password"); pinMode(tempSensor, INPUT); /*The analog read temperature data (converted to Celsius) is passed as an output resource to thinger.io*/ thing["Temperature"] >> [](pson& out){ out = temperatureInC(); }; } void loop() { thing.handle(); } float temperatureInC(){ /*Reading analog voltage from the temperature sensor and converting it to Celsius*/ sensorVoltage = analogRead(tempSensor); sensorVoltage = (sensorVoltage * 3.3)/ 1024.0; tempinC = (sensorVoltage - 0.5) * 100.0; delay(100); return tempinC; }
Outcome
Now that we have built our own IoT temperature monitoring system, it is time to enjoy our fruits of labor. Below are the video and images showing the final outcome.
The x-axis is time and Y-axis is the temperature in degrees Celsius
There is a step at the last in the blog Steps for connecting Arduino MKR1000 with thinger.io for reading temperature data which is also given below. After doing so, we will have a dedicated URL which will also provide the same temperature time-series plot. This URL will be embedded into a mobile app. So as a smart feature of the wheelchair, the person in it can get updates on the temperature in a mobile app.
Mobile App
I have designed a small mobile app to obtain the temperature as a time-series plot from thinger.io IoT platform. The app uses web view with the URL configured as obtained from the above steps. An animated view of the mobile app is provided below.
Have you got any suggestion or comment? Let me know in the comments section below.
Progress made so far,
|||||||||||||||||||| 20 %
Top Comments