Introduction: Sweepy: the Set It & Forget It Studio Cleaner
By: Evan Guan, Terence Lo and Wilson Yang
Introduction & Motivation
Sweepy the studio cleaner was designed in response to the chaotic conditions of architecture studio left behind by barbaric students. Tired of how messy studio is during reviews? Well say no more. With Sweepy, all you have to do is set it and forget it. Studio will be brand spanking new faster than it takes for you to complete that one project model.
Sweepy is self-aware and will move around sweeping away all the trash and scraps to your heart’s desire thanks to two ultrasonic sensors that tells it to turn upon approaching a wall. Need Sweepy to work harder? No problem, just yell at it. Sweepy is constantly listening to its environment thanks to a sound sensor. Reaching a certain noise threshold will cause Sweepy to enter an enraged mode, sweeping and moving faster for a brief period.
A studio without Sweepy is one that is messy.
Parts, Materials & Tools
Most parts on this list can be found in the ELEGOO UNO R3 Project Starter Kit. Other parts can be purchased from Creatron Inc. or other electronic stores.
Components
x1 ELEGOO UNO R3 Controller Board
x1 Prototype Expansion Module
x1 Ultrasonic Sensor (HC-SR04)
x1 Sound Sensor Module (KY-038)
x2 DC N20 Motors (ROBOT-011394)
x1 Micro Servo Motor 9G (SG90)
x1 LCD Module (1602A)
x1 9V Battery
x2 60x8mm Rubber Wheels (UWHLL-601421)
x1 Free Castor Wheel (64mm height)
x1 Sweeping Brush (12mm handle height)
x2 NPN Transistors (PN2222)
x3 Resistors (220Ω)
x2 Diodes (1N4007)
x1 Potentiometer (10K)
x15 Breadboard Jumper Wires
x26 Female-to-Male Dupont Wires
Materials
x1 3mm Plywood Sheet (Laser Bed Size 18" x 32")
x6 M3 Screws (YSCRE-300016)
x4 M3 Nuts (YSNUT-300000)
x6 M2.5 Screws (YSCRE-251404)
x6 M2.5 Nuts (YSNUT-250004)
Tools
Screwdriver set
Hot glue gun
Equipment
Computer
3D Printer
Laser Cutter
Software
Arduino IDE
Step 1: Understanding the Logic
Circuit
The ELEGOO UNO R3 Controller Board will serve as the “brain” of the robot in which the code will be uploaded onto and processed. Attach the Prototype Expansion Board and mini breadboard onto the top of it. To communicate with the sensors and actuators, the components will be connected via the breadboard and wires.
Included above is a diagram of the circuitry required to make Sweepy happy. Pay special attention to the input and output of the wires. It helps to follow along a wire by looking at its colour. A wrong connection may cause Sweepy to function incorrectly or in the worse case, damage your electronics by short circuiting.
Programming
Attached below is the code required to run Sweepy. Open the file in Arduino IDE and upload it onto the ELEGOO UNO R3 Controller Board. To do this, you must connect the controller board with your computer via the USB cable. Ensure the correct port is selected by going into Tools and Port in the dropdown menu. Be sure to upload the code before building Sweepy to avoid having to plug in the USB cable while in the 3D printed housing.
It is not recommended to change the variables in the code unless you have experience or know what you are doing.
Attachments
Step 2: Gathering All Parts, Materials & Tools
To begin the project, gather all parts, materials and tools outlined in the list above. As previously mentioned, most parts in the list can be found in the ELEGOO UNO R3 Starter Kit as well as in Creatron Inc. or other electronic stores.
It is highly recommended to begin 3D printing as early as possible as the process may take several hours to complete. The recommended settings are: 0.16mm layer height, 20% infill and 1.2mm wall thickness with brims and supports. The 3D print file is attached below.
Laser cutting may also take up a good amount of time so make sure to start early. The laser cut file also contains a layer for etching a guide that ensures the right component is mounted in the right place. Make sure to double check what is being cut and what is being etched, changing the power and speed settings appropriately. The laser cutting file is also attached below.
While we used plywood for our robot, feel free to use any material you like such as acrylic, so long as the thickness is about 3mm.
Step 3: Securing the Base Plate
Apply glue around the perimeter of the base plate and attach it to the bottom of the 3D printed housing. Align the two parts as carefully as you can while also ensuring the laser cut etching guide is facing upwards.
Step 4: Mounting Base Plate Components
Once the base plate is adequately secured, we can begin connecting the first round of electronic components. This includes the DC motors with wheels, servo motor, LCD screen and battery pack. A laser cut etching guide has been included in the base plate to ensure proper placement of components for your convenience. To make circuitry easier, the components should be secured with their appropriate wires already plugged in.
The wheels should slide into the two slots on either side with the DC motor facing inward. Secure this with the included white clamps using two screws and nuts for each (M2.5).
The servo motor should also be secured using the same screws and nuts (M2.5) while ensuring the white gear extruding out from the bottom is on the front side of the robot. This will power the brush sweeping motion.
The LCD screen should slide into the front pocket of the housing with the pins facing downward. Secure this with some dabs of hot glue on each corner.
Lastly, the battery pack should slide into the back pocket of the housing with the on-off switch facing outwards into the hole cutout. This enables the robot to be turned on and off.
Step 5: Securing the Support Plate
Next up, it's time to secure the "brain" of Sweepy. Using four screws and nuts (M3), mount the UNO R3 Controller Board and Prototype Expansion Module on the top of the support plate. This would act as the second floor of the housing. Prior to this, the Arduino IDE code should already be uploaded onto the board and ready to go.
Slide the support plate into the housing from the top until it rests on three ledges integrated in the 3D print housing to ensure the correct height. Secure this plate with two screws (M3) through the holes on either ends.
Thread the wires from the components on the base plate up and through the holes of the support plate. The LCD screen and servo motor wires should thread through the front hole while the DC motor wires should thread through the side holes. The battery pack wires can go through either hole as desired.
Step 6: Mounting Final Electronic Components
Using hot glue, attach the two ultrasonic sensors to the front of the housing with the trigger and echo modules extending out of the holes or "eyes". The pins on one sensor should be facing upward and the other facing downward as indicated by the hole on the support plate. This is to ensure the echo and trigger modules are symmetrical in the housing when sending and receiving signals.
Lastly, dab hot glue on the back of the sound sensor and attach it to the slot on the inner side of the housing. The top of the microphone should sit flush with the top of the housing edge so the cap of Sweepy can be put on. The microphone would align with the hole on the cap as you will see later on.
Step 7: Wires, Wires & More Wires
The next step is arguably the most difficult but most important part of making sure Sweepy is well and happy: the circuitry. Using the Fritzing diagram at the top of this Instructables as a guideline, connect all the wires from the components onto the Prototype Expansion Module.
Ensure the switch on the battery pack is off before plugging the power cable into the board. Because the code should already be uploaded on the board, Sweepy would not be able to contain its excitement for cleaning and begin working the second it receives power, even while you are still working on the wires.
Pay special attention to the inputs and outputs of the every wire. It helps to use the colour of the wire to follow it along its path.
Step 8: Adding the Moving Parts
Now it's time for Sweepy's rear wheel and sweeping brush.
The rear wheel should be a castor wheel that can swivel freely around. It should be approximately 6.4 cm in height from top to bottom but the tolerance can be generous depending on how much downward force you want the brush to exert. Attach this under the support plate through the hole in the base plate.
The sweeping brush is also generous in tolerance but the handle should sit approximately 1.2 cm off the ground. The handle should also be approximately 10 cm long to prevent it from hitting the housing while it sweeps back and fourth. Secure this to the white lever attachment included with the servo motor with glue.
Step 9: Capping It All Off
To complete your very own Sweepy, you need to make its cap. Glue the cap rim under the capping plate with hole on it. Ensure the hole is aligned with the sound sensor microphone. Finally, glue the cap onto the top of Sweepy, aligning the front edges with the front of the housing.
Switch the power on from the back and watch Sweepy pursue its dreams of making studio a cleaner place for everyone.
Step 10: Results & Reflection
Despite extensive design planning, mistakes happen but it's okay: it's all part of the learning process. And for us, things were no different.
One of our biggest challenges was designing Sweepy's housing to enclose all necessary components. This meant meticulously measuring the dimensions of all components, planning for wire paths, ensuring structural integrity, etc. We ended up 3D printing and laser cutting two iterations of Sweepy's housing, the second being the final version based on what we have learned from the first iteration.
One major obstacle we faced is the limited capabilities of the ultrasonic sensor: it was not covering a large enough area and Sweepy would occasionally hit a wall when approaching at an angle. This was solved by the inclusion of a second ultrasonic sensor to effectively increase the area of effect.
We also initially opted for a servo motor to control turning but it was not as effective and structurally sound as we hoped for. As a result, we replaced the rear wheel with a free castor wheel and pushed the responsibility of turning to the two driver wheels through differential turning (one wheel would move slower than the other to simulate turning). While this meant making major changes to the code, it effectively simplified our overall design, taking less one servo motor out of the equation.
Future Iterations
There is always room for improvement. In the future, one design change for our project is the consideration of Sweepy maintenance and accessibility of its internals. We had experienced multiple issues including motor failures and discharged batteries which required us to take apart Sweepy just to switch out the components which was very unintuitive. In the future, we would design a housing with operable openings that will allow access to its components such as the battery.
We are also considering the use of a pressure sensor at the front to detect when Sweepy bumps into a surface as we found the ultrasonic sensor to be unreliable at times, particularly when approaching at a steep angle. By having a mechanical sensor, Sweepy would be more consistent in deciding when and when not to turn.
While Sweepy works well within small rooms, it may be less effective in larger spaces. This is because Sweepy is only programmed to turn whenever it detects a surface in front of it but will otherwise continue in a straight line until the earth is destroyed. In the future, it may be worth pre-programming a set cleaning pathway for Sweepy so it stays within a boundary instead of wandering off forever.
References & Credits
This project was created as part of the Physical Computing course (ARC385) at the Daniels Faculty of Architecture, Landscape and Design undergrad program at UofT.
Team Members
- Evan Guan
- Terence Lo
- Wilson Yang
Inspired by
- Roomba Robot Vacuum Cleaner
- Wipy: The Overly Motivated Whiteboard Cleaner
- The messy conditions of studio space
2 Comments
3 years ago
very funny!
Ive got a dead robot cleaner fried mother board, im thinking I could use your code to give it new life
3 years ago
Really well documented! Thanks for sharing :)