Alexa and Particle Photon (Soil Moisture)

File_003

Quick Description:

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.

Reflection:

This project gave me the opportunity to learn some basic hardware skills like soldering and working with circuits to make sure they didn’t short-circuit. The project  also involved a lot of work entailing both C++ and javascript. I really liked working on this project as it exposed me to a bit more advanced code and taught me skills that I really wouldn’t have considered until  I was doing this hands on. I think that Bluestamp and working on my project specifically has really confirmed my thoughts of pursuing a career in software engineering. Hackathons and other coding meetups were always basic code or solving problems on a team but by doing this project by myself with the help of instructors has really let me see if it was something that I would want to pursue.

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.

Final Milestone:

My final steps for the project entailed transferring the Particle Photon and the sensor to a PCB. I then soldered the parts down to the board. The final project works exactly the same as milestone #2 except we have updated the javascript file so that Alexa can now give us percent values of the moisture that the sensor is exposed to and then repeat the key phrase that tells us whether we need to water the plant or don’t have to. At the moment the javascript code enables Alexa to respond with only certain percentage values for the ranges of voltage values that we get from the sensor. Even after Bluestamp I will finish creating an algorithm that will give percentage values of soil moisture depending on the voltage values given from the sensor and sent to the Particle Cloud API. All code as of now for this portion of the project can be found on my github link: https://github.com/viktheman/AlexaSoilMoisture. The step-by-step instructions to do all the parts of this project can be found on my hackster.io link: https://www.hackster.io/vikrantman/alexa-and-soil-moisture-a-particle-photon-sensor-7f6146.

 

Vik M – Milestone #2

Milestone 2:

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.

 

Vik M – Milestone #1

Milestone 1:

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

 

Vik M – Starter Project

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.

Leave a Comment

Start typing and press Enter to search

Bluestamp Engineering