Inspiration
In many experiments and processes maintaining certain condition is very much important. Any changes in the conditions can cause undesired result. For example a cell culturing incubator where temperature, humidity needs to be controlled and a safety system is also needed to warn if the condition changes. Also when data needs to be collected by the scientists then they use extra instruments to record the data. When scientist carry out an experimentation they use a lot of sensors and equipment. Now assembling all these sensors individually and taking data from there is a hassle. So we though of making this project. A Multiple Parameter Detection System which will be a device that will be able to record data using various sensors and also be able to record the data. This also come with an amazing virtual assistant amazon-Alexa. Users can ask questions like what is the temperature, humidity levels, light intensity level and amazon Alexa will answer them by saying what is the current parameter value for example temperature level. This product will also make production cost less as one would only need to make one of this device instead of making various sensors separately. Due to these usefulness and benefits we are creating this device.
What it does
MPDS can measure temperature, humidity, air pressure, light intensity of the surrounding. It compares the temperature value with the pre set higher and lower threshold values. If the value is higher than or lower than the threshold values then the buzzer starts ringing thus alarming people that something is wrong. It does this for humidity also. MPDS measures the light intensity and checks if it is the value is below a threshold. If that happens then the system turns on the artificial lights. This features is useful in places where lights are needed when its night time, for example in a place where plants are grown, artificial light maybe needed. The system also records the data and saves them in a file. The system also has a small display with it and it displays the temperature and humidity data. Amazon Alexa can access the data and tell the user about the data statistics. For example if someone ask what is the temperature or is the the temperature within range, then Alexa will answer by saying the temperature and if its in the correct range or not.
How we built it
To built the whole system we first needed to use Arduino microcontroller Board and sensors. By using the documentation manual for the sensors by the manufacturers helped up connect the sensors with the Arduino board and record data. We also needed to download the libraries in Arduino IDE for the sensors to work. The Arduino code work by first taking the data from the sensor into the Arduino board
temperature = dht.readTemperature();
then it checks the data with the threshold values
if (temperature>60) {
analogWrite(BuzzerPin, 128);
} else if (temperature<10) {
analogWrite(BuzzerPin, 128);
} else {
analogWrite(BuzzerPin, 0);
}
Depending on the values the system decides whether to turn the buzzer on or off. After that the system prints the data so that it can be recorded.
' Serial.print(" Current temperature is "); Serial.print(temperature);'
The system does this for the other parameters also. After that we used python to extract the data from the Arduino and save it. As Arduino does not have a file system available to its native environment, that is why we needed to used python and establish a serial connection with the Arduino and then coded a program that collects the data and saves it into an array.
We then coded a program for Amazon Alexa using the amazon IDE that interprets the data and then outputs the parameter value (e.g. Temperature or humidity %) when asked by a user using voice command. Through a event of classes alexa is able to take a range of utterances to comprehend user's intent, using this intent the appropriate class that handle the intent is executed and alexa is then able to say information about the temperature, humidity, light intensity. For example, if someone asks "What is the humidity" then alexa will answer by saying " The temperature is 26 degree Celsius and is within the range". Users can ask alexa about the humidity, temperature, light intensity.
Challenges we ran into
We ran into a fair amount of challenges for the whole thing to work. The first problem we encountered was sending the data from Arduino to amazon alexa. We could send the data using a wifi module that connects with the arduino, but in this case we did not have that wifi module. So we needed to find an alternative way to do so. We decided to use python and gather the data from the Arduino and then send the data to amazon alexa. We first needed to established a serial connection with the Arduino. We needed to install pyserial package for this. We used this code to set up the serial connection
ser = serial.Serial('COM4', 9600)
After the we had the data, we were able to store the data in a list and also send the data to amazon alexa.
The another challenge we has was: The amazon IDE was finicky in that it demanded a level of precision when it wasn't necessary and made it tedious to work with. For example, when defining a class, after the suite of code, the amazon IDE requested there be an indentation afterwards. It made us question if there was something wrong with our code. We spent a fair amount of time trying to figure out the issue only to discover this detail. On top of that, the most painful experience was in the lack of debugging tools.
Accomplishments that we're proud of
Overall we are really proud for what we have accomplished so far. We were able to program the Arduino so that it was able to operate all the sensors and gather the data and also ring the buzzer when the values are out of range and turn on the light when light intensity is low. That itself is a very useful device. Then we were able to save the data by using python and then send the data to amazon Alexa. And we are specially proud as we got amazon Alexa to read the data and tell it to the user when the user asks a question like " What is the temperature ?". We think this is a really good user interface as users will be able to easily access the data.
What we learned
We learned quite a lot of things from this project. We learned a lot about the amazon IDE and amazon Alexa. We got to know about how a virtual assistant works and we got ideas about how we could use these to develop them further. We also learned how to establish serial connection with an Arduino by using python and then get the data and save them. We also learned a lot of thing about classes as we had to work with a lot of them in this project.
What's next for Multiple Parameter Detection System (MPDS)
The future plan that we have for Multiple Parameter Detection System (MPDS) are as follows: -We would first want to use a Wi-Fi module with the Arduino so that the data can be sent more efficiently to amazon Alexa. -We would develop a phone app also so that users are able to change the threshold values using their phone app and also get notifications on their phone app when any condition is out of range. -We will also use Google cloud services so that the data is being saved on the cloud server.
Log in or sign up for Devpost to join the conversation.