Robotic Vacuum Cleaner Using Atmel Mega32

Introduction

As our final project, we decided to design and build a robot capable of vacuuming the floor of a room or area without any human interaction other than just starting the unit. We realized the need for a cheap and convenient product that can be easily used to vacuum a room on its own, saving a person valuable time.
Robotic Vacuum Cleaner Using Atmel Mega32

The robotic vacuum is mainly built from a circular piece of foam board, as shown in Figure 1. The robotic vacuum uses a rotating brush underneath the unit to vacuum a carpet as it passes over it, as shown in Figure 2. Two stepper motors, aligned across the center axis of the robot, are used to accurately drive the robotic vacuum around a room. Because the body of the robot is circular and the steppers are placed along the center axis, the robot can spin in place in any direction. One free-spinning chair wheel is located at the rear of the robot to keep it balanced.

The robot is programmed to sense the direction of a collision with an obstacle using an onboard accelerometer. If the robotic vacuum hits an object head-on, it backs up and changes direction. If an obstacle is hit at an off-angle, the robotic vacuum turns away from the direction of the impact. The robotic vacuums movement is based upon a random walk around a room, which theoretically will cover the entire area of a room given enough time. The robot is programmed to drive straight until an obstacle is hit. At that point, it will turn and continue driving straight until another obstacle is hit, and so on.

High Level Design

  • Rationale and sources of the project idea

Our project was inspired by an existing robotic vacuum cleaner, the Roomba. Current robotic vacuum cleaners on the market, produced by iRobot and Electrolux, can cost up to $1700. The idea of a designing and building a device that can perform the same functions as the existing market brands on a budget of $50 was a challenge that we wanted to take on.
We had an idea of the supplies and equipment available to us and realized that our robot could be built using an accelerometer, several motors and a microcontroller, among various other pieces of equipment. We considered obstacle avoidance, but realized that IR sensors would be too expensive to implement and would not be necessary. A slight collision with an obstacle could be detected by our accelerometer, and the appropriate response could be programmed with our microcontroller.
Because we are using stepper motors for our bot, it is theoretically possible to determine the distance traveled by each wheel and perform room size calculations, which could have been inputted to an algorithm to better cover the room. However, we discovered a torque problem when we realized that the wheels sometimes slip on the carpet surface, and other times do not move at all. Because of the torque inconsistencies, proper distance determination would not have been possible, so our only option for covering an entire room was to use a random walk in which the robotic vacuum collides with an obstacle and heads off in a different direction until the room is vacuumed.
Initially, this bot was designed with only a carpet-sweeping function in mind. A carpet sweeper, which picks up trash as it is swept across the floor, is not a motorized device. If the carpet sweeper did not satisfactorily pick up trash off the floor, we would motorize it to spin using a DC motor. After some testing, we decided to motorize the sweeper for other reasons.

  • Logical structure

A block diagram for the entire system is shown in figure 3, followed by the descriptions of the components.

Robotic Vacuum Cleaner Using Atmel Mega32

The 9V battery clip can hold one 9V battery. The clip contains a 3V output, which is connected to the accelerometer’s Vcc connection. The Mega32 MCU is directly connected to the battery on the battery clip.

The signal from the accelerometer is inputted into the MCU’s analog to digital converter. The x-axis output is sent into port A0, and the y-axis output is sent into port A1 on the Mega32. After several calculations are made, the MCU sends the appropriate commands to the stepper motors and DC motor.

The stepper motors and DC motor are connected to a 9.7V 3200mAh battery pack due to the current demands of the motors. The stepper motors are used to drive the robotic vacuum, so wheels are attached to the axels. The DC motor controls the spinning carpet sweeper brush.

  • Hardware tradeoffs

The initial design of the robotic vacuum included two DC motors as the driving motors. However, their implementation would have been more difficult than using the stepper motors because of the requirement of additional hardware like an H-bridge for each motor to allow forward and reverse motion. DC motors are also imprecise, and it would have been very hard to determine how fast or far each wheel had turned without the use of Hall-effect sensors. Because stepper motors can be very precisely controlled, and spun backwards and forwards without the need for any circuitry other than a ULN2003 Darlington array chip, it was decided that stepper motors were ideal for this project.
We were caught off guard by the lack of torque produced by the stepper motors. As soon as we switched from a 7V power supply to a 9V battery, the drop in torque was noticed immediately. The two stepper motors no longer had the capacity to move the weight of the robotic vacuum, so another hardware tradeoff that was made was the procurement of higher-capacity batteries. Two 9.7V 1600mAh radio-controlled car battery packs were used in parallel to provide the 3200mAh of current to the robotic vacuums motors.
Because the carpet sweeper brush is attached directly to a DC motor, a system was necessary to control the speed of the brush so that it does not overheat the motor and surrounding systems, and so that the shaft of the sweeper brush does not violently separate from the shaft of the motor. A pulse-width modulation system was developed to limit the speed of the DC motor, and is explained in the Software Design section.

  • Relationship of the design to available IEEE, ISO, ANSI, DIN, and other standards

Every device used in the development of our robot will have already passed IEEE compliance standards, so we do not need to worry about any such technical issues. No other standards apply to this project.

  • Existing patents, copyrights, and trademarks which are relevant.

Our product, if placed on the market, would be in direct competition with similar vacuum cleaners produced by iRobot, Karcher, and Electrolux among a variety of other brands. All the products are similar in size, shape and function. However, the algorithm used by our vacuum cleaner to vacuum a room is unique to our bot. The Roomba, iRobots vacuum, for example, follows a snail-shell pattern outwards from its current position and uses a type of sonar until it finds a wall to follow, after which it bounces off of obstacles in a similar manner as our robot. The Electrolux brand uses a type of radar to map a room and avoids colliding with obstacles altogether.
Our robotic vacuum is initially placed in part of a room, and just moves straight until an obstacle is detected, at which point it either turns left or right and continues on its way. No patent, copyright, or trademark issues should be relevant to our bot because our algorithm and equipment are unique, to the best of our knowledge.

Parts List:

Item Description Cost
Chair Wheels Salvaged
Foam board Salvaged
Carpet Sweeper Salvaged
MMA6261 XY-axis, 1.5g Acceleration Sensor Sampled
9 volt battery clip with 3 and 5 volt regulators Sampled
9 volt batteries (x4)

$8

Custom PC Board

$5

Mega32 MCU

$8

SMT-57 7V Stepper Motor (x2)

$4

9V DC Motor Salvaged
4N35 Opto-isolator Sampled
BUZ71A Transistor package Sampled
ULN2003 High Current Darlington Array Sampled
9.7V 1600 mAh battery pack

$10

40TR12B transducers (not used for project)

$12

Total

$47

For more detail: Robotic Vacuum Cleaner Using Atmel Mega32


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top