Alexa and Particle Photon (Soil Moisture)
My name is Vikrant M and I am a rising senior at Mission San Jose High School. My project entailed communicating between a soil moisture sensor, Particle Photon, and Amazon Alexa. The soil moisture sensor sends the Photon microcontroller the voltage values (which are proportional to the amount of moisture in the soil for the plant. We used C++ on the Particle Cloud API to get the values and transfer that to the Alexa side of the operation and send email reminders to IFTTT about when to water the plants. The Cloud API communicates with AWS Lambda code (we used java script for the Lambda end). The values would then be transferred into a phrase that Alexa would respond with when prompted about whether or not the plant needed to be watered. This project was made to let homeowners easily find out if they need to water plants in the house. Many people have small gardens in their house or complex and having an email reminder once in a while and being able to ask Alexa when they are doing other things can make their lives much easier. The code for this project can be found in the github link showed in the final milestone explanation and a step-by-step link replication of the first project can be found in the milestone 1 explanation.
Credits for the original project are given to https://www.hackster.io/krvarma/particle-alexa-5bc196?ref=search&ref_id=home%20automation&offset=4.
Final Bill of Materials: Can be found by clicking here.
This is milestone #2 in my project. At this point I am able to successfully communicate my data from the soil moisture sensor to Amazon Alexa. Similarly to my earlier project, we are communicating between the moisture sensor to the photon which sends the data to the cloud API. This data then goes to Alexa and vice versa. Once again we have the sample utterances and intent schema which are the phrases that we used to communicate with Alexa. Now I will give a demo of what the project looks like. The sensor is sending data values according to the amount of water in the soil to both IFTTT and Alexa. This way I get both an email reminder and am able to ask Alexa whether I need to water the plant or not. I have it set up so that three different phrases are repeated based off the values received. If we are given below a certain amount it tells us to water the plants, above certain amount and we know that there is too much water or enough water. I want to be able to use an algorithm to measure and estimate how long the water can last before it needs to be watered again and have Alexa tell us that.
My first milestone for my project was getting Alexa to work with particle for some simple tasks. I used a DHT22 temperature and humidity sensor, a green and red LED, resistors, and had the Particle Photon on my breadboard. This link goes into the very specifics on how to replicate the project up to this part: https://www.hackster.io/vikrantman/alexa-with-a-dht22-sensor-a-particle-photon-project-b04b6e?ref=user&ref_id=90186&offset=0 . This portion of my project mainly had me working with cloud APIs. I had to convey information from both the Particle Photon cloud and the cloud server for Alexa (AWS Lambda). On Lambda I created sample utterances, which were the phrases that i would say to Alex to get back responses about the temperature, or humidity, and mostly used node.js to code. On the Particle Build end, I used C++ on their cloud API to tell Particle what functions to do on the breadboard. An easy way to envision the whole process is by imagining it as a “U” shape. The Photon communicates with the Particle Cloud API which then goes to AWS Lambda which then goes to Amazon Alexa and vice versa. Information only travels through this part and doesn’t jump from step to step. This portion of the project helped me get the basis of how to do the project down
Starter Project: TV-B-Gone Remote
For my starter project, I built the TV-B-Gone Remote, which is a small, portable remote that has the capability to turn off TVs. This project was powered by 2 AA batteries, and includes infrared LEDs, resistors, capacitors, transistors, and a micro-controller. The 2 AA batteries conducted power through the resistors to the pre-programmed microcontroller. The microcontroller stores the IR codes needed to turn of the TVs. The codes are then sent to the IR LEDs and are transmitted to a TV to turn it off. The microcontroller itself does not have enough power to transmit to the LEDs, so we have transistors that amplify the power of the microcontroller. This project really taught me that soldering should be very precise, otherwise the circuit will not work like it should.