Introduction: SLAM Based Autonomous Vacuum Cleaner
In this instructable I will guide you, as accurate as possible, through the steps I have followed to build my own autonomous vacuum cleaner.
Step 1: Design the Vacuuming Component
The first step was to build the vacuuming component. I have tried different shapes and sizes of dust bins and hoses as you can see in the pictures. In the end it turned out that the best shape for it was to mimic an actual vacuum cleaner. Thus, the final version consists of a narrow hose right at the top of the dust bin that gets wider to the bottom so that the vacuuming width increases to 20cm.
As for the vacuum pump, I have reused the 12V motor and its pump out of a 12V car vacuum cleaner.
Step 2: Robot Design
Before jumping straight to crafting the robot I decided it is better to make a CAD design first (I have used SketchUp in case you were wondering). Usually it is better to do so as there are many problems that might arise. Even though you don't have the required skills you should definitely do some hand sketches ahead of starting to cut your material.
For this specific robot I have attached the Corel DRAW files that I have sent to the CNC machine to get my 2mm transparent plexiglass cut to pieces.
I have also attached the 3D version of my robot in case you want to reuse any parts.
Step 3: Frame Assembly
Once I got my plexiglass cut I continued with assembling all the parts together. As I already had a 3D drawing it was way easier for me to glue together the pieces. I have used some paper tape to hold the pieces in place while I was gluing.
The place where I had my material cut have also provided me some water based glue with which I could glue the transparent plastic so that it won't get white (as it happens when using super glue).
Be prepared with some patience and tools to adjust the frame or components as you might encounter some minor issues. I'm not a product engineer, so there are a few minor engineering problems that tools can fix.
Step 4: Electronic Circuit
As there are a lot of components to be controller and some of them need specific circuits there was the need to build an intermediate board. This board makes the connection between most of the hardware components of the robot and the main controller board.
There is an easy relay + transistor circuit built for controlling the vacuum pump (simple switch on/off control).
It also contains the circuit needed to turn the motors in both directions. For the H-bridge I have used the L298N IC and some refurbished diodes, capacitors and resistors. I strongly suggest reusing components from an old PC motherboard, PC power supply or any other hardware components you have lying around your house.
Step 5: Xilinux on Zybo
Zybo Zynq 7000 is a nice and powerful developing board due to it's combination of FPGA with ARM Cortex A9. However, writing all the software on FPGA component might not be so easy to do. Because of that, I said I should take advantage of the ARM present on-board and install a Linux distribution on it.
After doing some research on the internet I have found out that the fastest way to run a Linux distribution on this specific board is to install Xilinux by Xillybus. You can find more about this distribution by following this link: Xilinux.
The installation went smooth for me and I encountered no problems during the installation steps described in this PDF: Getting started with Xillinux for Zynq-7000 EPP.
Step 6: Control Software
In the first place I wanted to implement all of the robots' controlling software on the Linux OS running on the Zybo. However, after installing the Xilinux distribution, I have found out that it is quite hard to route the on-board ADC component so that I could read the analog sensors on Zybo directly. After spending quite a few days on trying to do that I decided to give up and go for something easier.
Fortunately, I had a ChipKit WF32 laying around my room that I could use. I am using the Arduino IDE to write the code for it as it supports other microcontrollers besides Atmel ones.
All the code I have written so far can be found on my Github profile by following the next link: Wilkie - WF32.
Step 7: Tips
Here are some suggestions I have to make so that implementation and testing won't give you headaches.
* Use some toggle switches on your logic/vacuum pump for safety reasons;
* Add a pull-up resistor to the data pins from the magnetic encoders as suggested in the datasheet;
* Use safety equipment when working with dangerous tools (drilling machine, saw, etc.);
* ..to be continued..
Step 8: Further Considerations
There are quite a lot of things left to do for this project such as:
* Odometry is not accurate because of wheels slipping and small encoder errors accumulate in time. Given so, the ir sensors will be integrated in this equation and a SLAM algorithm will be implemented;
* I2C communication between WF32 and Zybo Zynq 7000 so that I could use the processing power of Zybo;
* Bluetooth control app of the robot;
* 2D mapping of the room by using the data gathered from encoders and proximity sensors mounted on top.