• EUR€
  • £GBP
  • $USD

ESP8266 Project: Add Email Notification to an Irobot Roomba 650 with a Wemos D1 mini

DFRobot May 09 2018 311

In this video we are going to upgrade an Irobot Roomba 650 vacuum cleaning robot in order to be able to send Email Notifications! The cost of this modifications is less than $10 and it won't take us more than 10 minutes. Let's get started!

Dear friends, welcome to another video. This Nick from educ8s.tv and today we are going to modify this Roomba robotic vacuum cleaner with less than $10 and we are going to add email notifications to it, a feature only available to the most expensive models. Without any further delay, let’s get started. A few weeks ago, we learned how to easily send emails from our Arduino projects, using an ESP8266 chip. Today we are going to see a useful use of this functionality. I own a i robot Roomba 650 vacuum cleaner for about a year now. It is the most basic version of the robot and lacks some of the features of the more advanced models. One useful feature that my robot is lacking is the notifications feature that only the Wi Fi enabled models offer.

I usually program the robot to vacuum the house when I am away of it. So it would be nice to have a report if everything went OK with the cleaning before I get back. Sometimes the robot gets stuck under furniture or a forgotten cable makes it stop cleaning. The modifications we are going to make today will enable the Roomba to send us an email with a report about the cleaning of the house. Check this out- the Roomba just finished cleaning the house and arrives at the changing dock. At the same time an email arrives in my inbox. It informs me that everything went ok and tells me the time that the robot spent vacuuming the house. Great isn’t it? Let’s now see how this modification works. I have attached a small magnet on the front of the robot. At the charging dock, I have attached a Hall Effect sensor which is connected to a Wemos D1 mini board which is inside this small box. The Hall Effect sensor detects the magnetic field of a magnet. I have prepared a tutorial on the Hall Effect sensor. You can watch it by clicking on the card here. If the robot is closed, the Hall Effect sensor will detect the magnet on the Roomba. If the robot is away, cleaning there will be no magnetic field close to Hall Effect sensor, so the program will know the robot is away.

That’s the basic idea behind this project. Without modifying the hardware of the Roomba at all, we add functionality to it. Let’s now see how to build this project. The parts needed in order to build this project are these
A Wemos D1 mini 
A Hall Effect Sensor
A magnet
 An LED
Some wires
The cost of the project is around 7. You can find links for all the parts I use in the description of the video.

I have also designed and 3D printed a small enclosure for this project. You can find the files for this enclosure on Thingiverse.com.You can download the files and print them on your 3D printer, or if you don’t own a 3D printer, you can click on this button and have a 3rd party service print the files for you. I designed the enclosure using Fusion 360 software, great and easy software. Are you interested in a quick tutorial on how I designed this enclosure with Fusion 360? Please vote in the card here. If here is enough interest; I will publish a Fusion 360 Tutorial soon. Now let’s make this project. We shoulder the middle pin of the Hall Effect sensor to the 3.3 V output of the Wemos D1mini board. The pin with the sign in soldered to GND.The last pin, the signal pin is soldered to digital Pin 5.Next we solder the long leg of the LED to digital Pin3.

The other leg is soldered to GND.Thats it. It’s that easy. Then we have to glue the top case of the enclosure and test that everything works as expected. When the magnet is close the sensor, the LED flashes slowly, which means that the Roomba is at the home base. If I remove the magnet, the LED lights up, this means that the Roomba is away. If I place the magnet close to the sensor again, the LED starts blinking again. It works fine. Note the Hall Effect sensor is sensitive to a specific pole of the magnet. If we place the other pole of the magnet it won’t work. Now I attach a magnet to the Roomba and the Hall Effect sensor to the dock. The distance with the magnet must be about 1cm or less. The hardware is ready. Let’s test it. I press the clean button on the Roomba and as you can see, the LED lights up. When the Roomba returns, the Led starts to blink slowly and I receive an email. Let’s now take a look at the software. The code of the project consists of two parts- the Arduino code and the server code. We are not sending the email directly from the board to the email address, but I used another solution which in my opinion is much easier to implement. The email is sent from a remote web server after a request from the board. This way the Arduino code is extremely easy. The PHP code on the server which sends the email is also extremely easy.

Of course you must have a web server available if you are going to use this solution. Since 2006, I used blue host.com as my hosting provider and I host all my websites here. So, since I had a web server available, this solution was the easiest for me to implement. It took me less than an hour to make this project work. If you don’t have a web server available, with around 4 per month, you can have your own blue host account. You can find a link in the description of the video. Of course you can use any other host you like, I use blue host for over 10 years that’s why I recommend it. All we have to do is to create a new PHP script with this code which I name it send_email.php and upload it to the server. I create it under my educ8s.tv website folder so in order to run it all we have to do is to enter this address followed by one variable www.educ8s.tv send email php?seconds=658.The PHP script will take the variable it will make some calculations and will send an email. If the time in seconds is less than 10800 which is 3 hours, it sends an Ok email. Else the Roomba hasn’t returned to the base for over 3 hours so it sends an error. Can you now understand what the Arduiono has to do? It only has to create this web address with the number of the seconds that the Roomba was away of the dock. The PHP script will automatically get the data and send them with an email. That’s exactly what we are going to do in the Arduino code. We first connect to the Wi Fi network and then we check if the Roomba is at home by checking the state of the Hall Effect Sensor. If the Roomba is at the home base, we blink the Led slowly and we check the state of the Hall Effect sensor every second.

If the Roomba leaves the home base, we turn on the LED and we count the seconds that the Roomba is away. When the Roomba returns to the home base, send a Get request to the educ8s.tv link file with the seconds that the Roomba was away. That’s it. The PHP script will take the data and it will send the email. It’s that easy. As always you can find the code of the project both the PHP and the Arduino code in the description. For obvious reasons I have removed the send _email.php file from my web server, so the project won’t send you an email if you run it as it is. You have to enter your server address in the Arduino code and have the send_email.php file. As you can see with the tools we now have we can build many interesting projects. With minimal cost we have great boards to work with. This project is a demonstration of what these boards are capable of. The project can be modified and become an Alarm system for a door or a window. The possibilities are endless. I would love to hear your opinion about this project. Is there any improvement that we can make to this project? Please post your comments in the comment section below. Thanks. In this channel I post videos about DIY projects every Saturday. I love making things and I believe that anyone can make things, anyone can become a maker. That’s why I created this channel in order to share my knowledge with the community and learn from the community. I hope you enjoyed it.

This video is made by educ8s.tv, click here to see the original youtube video.