Intro
The cheaper models of iRobot Roomba -I have model 620- doesn't come with a scheduler. So you have to manually reach down and push the clean-button for it to start clean your house.
Roomba provides an infrared remote control to start up the cleaner. That is what we going to mimic here.
I have summarized 2 articles that I've found from the internet according this remote. The other is Virtual Wall with 12F683 and the other is "Tiny Remote" for Roomba, which uses other PIC and doesn't have source code written in C. Links to both you can find at the bottom of this article.
Roombas IR-remote works on 38Khz carrier and the bits for 1 and 0 are following:
The code consist of 8 bits and for CLEAN it is following: 10001000
For more codes refer to "Tiny Remote" site.
The software
When powering up the circuit, the program sends "CLEAN"-command 5 times, with 32ms delay between commands and then falls asleep. I did some experiment with different scenarios, anything from having it send the code once and looping it for infinite time. When sending once, Roomba didn't always react to the command. And to send it longer period, it became confused and sometimes stopped and started again the cleaning cycle. Also the delay between the code had some strange behaviors, so putting up 8 bits times 4ms = 32ms, did the thing. With another words the code and delay between them are equal length. Whole 5 times cycle takes therefore 5x32ms + 4x32ms (last delay doesn't count) = 288ms.
The code is pretty forward and easy to follow. Here is flow chart to explain how it works:
Intro
The cheaper models of iRobot Roomba -I have model 620- doesn't come with a scheduler. So you have to manually reach down and push the clean-button for it to start clean your house.
Roomba provides an infrared remote control to start up the cleaner. That is what we going to mimic here.
I have summarized 2 articles that I've found from the internet according this remote. The other is Virtual Wall with 12F683 and the other is "Tiny Remote" for Roomba, which uses other PIC and doesn't have source code written in C. Links to both you can find at the bottom of this article.
Roombas IR-remote works on 38Khz carrier and the bits for 1 and 0 are following:
The code consist of 8 bits and for CLEAN it is following: 10001000
For more codes refer to "Tiny Remote" site.
The software
When powering up the circuit, the program sends "CLEAN"-command 5 times, with 32ms delay between commands and then falls asleep. I did some experiment with different scenarios, anything from having it send the code once and looping it for infinite time. When sending once, Roomba didn't always react to the command. And to send it longer period, it became confused and sometimes stopped and started again the cleaning cycle. Also the delay between the code had some strange behaviors, so putting up 8 bits times 4ms = 32ms, did the thing. With another words the code and delay between them are equal length. Whole 5 times cycle takes therefore 5x32ms + 4x32ms (last delay doesn't count) = 288ms.
The code is pretty forward and easy to follow. Here is flow chart to explain how it works:
And the code itself:
To edit the code and compile, you need MPLAB X IDE v2.25 and MPLAB® XC8 Compiler v1.33B (Links at the bottom of this article.). For those who doesn't need to edit the source code, here is ready compiled HEX-file for flashing: Roomba_clean.HEX And for flashing the PIC, there are many hardwares to choose from. One of the cheapest and probably most popular is the K150 USB PIC Programmer, which you can purchase for example from Ebay. The hardware
Parts list:
|
Bonus: Tellstick
The R3 might be needed to drain the wall charger capacitors out. Otherwise it can take few minutes before the circuit powers off and you can start it again. (In case Roomba won't start and you like to repeat the command.)
Tellsdus Live! event handler. In swedish, but pretty straightforward. |
Thats it!
Please feel free to comment and even link/show your own project in case this was any help at all!
P.S För svenska besökare kan jag även tänka mig att sälja färdigflashad PIC för en billig peng.
References / Thanks to:
http://www.enide.net/webcms/?page=tiny-remote
http://misc.ws/2014/08/09/diy-virtual-wall-for-roomba-part-two/
http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en010115
http://www.microchip.com/pagehandler/en-us/family/mplabx/
http://www.microchip.com/pagehandler/en-us/devtools/mplabxc/home.html