Introduction: Ultrasonic Sensor on Robot Vacuum Cleaner

Hi,

we have the Dirt Devil Robot Vacuum Cleaner for about 3 years now and it still does the job. It is the M611 type, which is a tiny bit "dumb": no scanning of the area or some memory of where not to vacuum, but with the ability to return to its charging station after the battery runs out. Being a 'dumb' robot was never a problem; it runs so many times through our living room, in the end all is cleaned. Or the next day. However my wife put a carpet under the table and now the little robot gets stuck all the time. The carpet simply is not high enough to activate the bumper.

So I figured that if it had eyes instead of a bumper, it would detect the carpet and turn, just as it does when it hits a wall or chair.

In this instructable I will show you how to do this, maybe it will encourage you to find applications for all the arduino stuff that is out there :-)

Supplies

Dirt Devil M611 robot vacuum cleaner. Or probably any other cheap model.

WEMOS D1 R3 board

HC-SR04 ultrasonic sensor

Some wires.

Step 1: The Wemos D1 R3 and the HC-SR04 Sensor

Getting the Wemos to work:

I downloaded the IDE here: https://www.arduino.cc/en/software

I used the Mac OS version and needed the CH341 driver because my 'arduino' is a 'Chinese clone'.
(WEMOS D1 R3)

Attach the sensor

After you get the Wemos to work I attached the sensor to it. Look at the wiring diagram how to wire it.
I got the knowledge from several pages like this: http://www.esp8266learning.com/

Start coding

Attached you find the code I used. I am still trying to get this visible in this page...

I the code you can see that after objects get too near the sensor, an output pin is raised for about 5 seconds. This is too much, as can be seen in the little demonstration film I made.

Step 2: Opening the Robot Vacuum Cleaner

I found this video how to open the Dirt Devil: https://www.youtube.com/watch?v=WPxgKm6VYMw

The picture attached shows the internals of the robot.

Step 3: Looking at Options to Override the Bumper System of the Robot

I found out that the bumper of the robot is not a switch but some kind of optocoupler sensor.

When I pressed it, I searched for one of the connections to go 'high'. This is where I attached the output of the Wemos! This is the green wire in the picture.

Step 4: Looking for Power for the Wemos...

On the robot's main board I found an 7805 chip, this is a DC converter chip that converts up to 15 or so volts to a steady 5 volt.

On several data sheets I learned that it is safe to apply 5volts to the Wemos power socket, so I soldered the power plug on the output leg of the 7805.

Step 5: Putting It All Together

... and test run it :-)

As can be seen in the video the bumper-time of 5 seconds is way too long, so I need to change the code a bit and calibrate the optimal time.

Next steps is to build the sensor into the robot, maybe in the -now- useless bumper of on top of it. I haven't figured out where to put the Wemos board yet.

Cheers

Frank