Project, Home Automation

Man vs Roomba: Building a Virtual Wall

A few months ago, I finally bit the bullet and bought a 600 series Roomba. I delayed it for so long, because they just seemed a little expensive and I had heard about people having issues with them getting stuck and how you need to skim each room prior to use to ensure they don't suck up something they shouldn't  (such as power cords).

Those issues just seemed like more than I wanted to deal with at the price these were selling at, especially since we just bought a nice Shark vacuum cleaner a few years ago that does a great job. The only problem with the Shark is that it requires me to operate it :-).

When the Roomba hit Amazon's Treasure Truck for less than $200 (not much less, mind you), I figured I'd give it a try. I read a bunch of reviews on it to level set expectations ahead of time, so that I wasn't setting myself up for a huge disappointment, and I'm glad I did.

The most honest review I found was a lady who mentioned people expecting these to replace regular vacuums and being disappointed when they came home and the laundry wasn't done, dishes were still dirty, and there were still crumbs or pet hair left on the floor.

She said it's good enough to keep your floors pretty well maintained, but that you should still anticipate having to use a regular vacuum periodically for a deeper, more thorough clean.

Fair enough.

After weeks of using it, I agreed with that review. There were still specks of dirt here and there, but the main thing we noticed is that we had far fewer "tumbleweeds" from our dog rolling around, which was a huge win for us!

My biggest complaint, aside from occasionally having to reseat the battery to get a better charge, is that it does get stuck under a number of things.

I came home one day to it being stuck under our dresser, and when I pulled it out, I saw a number of battle wounds on top of it from where it tried to wiggle itself free:

After that, I took to the internet to find a solution.

3D-Printed Solutions

I found the standoffs (or "bumpers") that you see in the picture above on Thingiverse, printed them with a flexible TPU filament for a bit of a softer feel, and attached them with double-sided tape. The author mentioned how he glued his on, but I wasn't ready to commit to gluing, as I wasn't sure they would solve my problems yet.

The tape didn't hold, of course, so I placed the Roomba next to objects where it had been getting stuck to sort of "size it up" to ensure the standoffs would be tall enough to prevent it from getting stuck under those objects.

I realized it would solve a number of my problems, but not all. It was enough of a win to commit to gluing them on, however, so I attached them with a little Gorilla Super Glue.

The remaining issues I had were the Roomba getting stuck under my living room furniture in multiple places. I tried printing a different set of bumpers from Thingiverse, but these would pretty much render the standoffs useless (which were glued on), so I tried gluing these new ones on top of the other standoffs.

This was a bit of a monstrosity, and the first time the Roomba tried to go under my sofa, they were knocked off, so it was back to the drawing board.

Building The Wall

I remembered reading in the instruction manual something about virtual barriers (which were not included with the one I purchased), so I jumped online to see what those would cost.

If I bought them from Amazon, they would run about $45 apiece, which was way more than I wanted to spend on a solution I wasn't sure was going to work.

After some thought, I figured I could maybe just buy one to see how well it worked, and then pick up another one or two if it worked out.

After even more thought, I realized how ridiculous it was going to be to spend $90+ just to keep my Roomba from getting stuck under a couple of items, so - staying true to my nature - I searched online to see if anyone had found a way to build these themselves.

And the internet did not let me down.

Turns out, these barriers just use an IR LED bulb and emit a certain signal (or command), which the Roomba interprets as a "no zone".

On top of that, Roland Reimer was kind enough to share a circuit diagram on Thingiverse that uses a 9V battery and a DC jack for flexibility, along with an enclosure design for an Arduino Pro Mini.

The code for it is dead simple, too (you can find this in my GitHub repo, as well):

#include <IRremoteESP8266.h>
#include <IRsend.h>

const uint16_t irLedPin = 4;  // ESP8266 GPIO pin to use. Recommended: 4 (D2).

IRsend irsend(irLedPin);  // Set the GPIO to be used to sending the message.

void setup()
{
  irsend.begin();
  irsend.enableIROut(38); // Set the frequency to 38 kHz
}

void loop()
{
  irsend.mark(1000);
  irsend.space(1000);
}

This is for an ESP8266 board, but the code is essentially the same for a non-ESP8266 board.

I chose to use a WiFi-enabled board for my approach, because, originally, I wanted to be able to mount this enclosure or leave it sitting out, listen for a 'running' or 'start' event from the Roomba, and then send a signal to the virtual walls to turn on. When the Roomba returns home and docks, then, it would send another signal to the virtual walls to turn off (i.e. stop sending a signal through the IR LED).

In the cases where I could plug this in, that wouldn't be much of an issue, but there's one place where I wanted to put one of these that would have to run on a battery, and it just seemed like I'd be chewing through batteries with a WiFi chip, so I think a non-WiFi enabled approach is maybe a better way to go.

The downside to the non-WiFi approach is that I will have to set the virtual walls out and turn them on every time I want the Roomba to run, which makes it more difficult to run the Roomba on a schedule (which is what I was hoping to do).

Wrapping Up

If you watched the video at the start of this post, then you'll know that I haven't actually moved forward with Roland's design from Thingiverse quite yet, and I'm still just in the prototype/breadboarding phase of this project until I put some more thought into different ways I can automate this setup without too much battery consumption or manual intervention on my part.

I still think that if you're going to use virtual walls, then you should consider building one yourself (if you're into that sort of thing, of course). Even if you don't have all of the parts you need, its far cheaper to build your own than it is to buy a virtual barrier from iRobot. Sure, you can probably find cheap knockoffs, but those are usually a gamble as to how well they work and how long they're going to last.

For me, it is far more rewarding to build my own solutions tailored to my environment or needs than it is to just buy ready-made solutions, but you do you.


(Header image by Attentie Attentie on Unsplash)

Author image

About Tony Thorsen

Father of two, husband of one, Maker of many things. Tinkerer, dreamer, pixel nudger.