Floor Cleaning Robot

There are three main areas of focus for the Floor Cleaning Robot: the electrical component, the hardware component, and the coding aspect of the project. The robot as a whole is powered by the battery pack, operated by the Arduino, and uses an ultrasonic sensor to avoid obstacles.

Engineer

Laila Walker

Area of Interest

Civil Engineering

School

El Cerrito High School

Grade

Incoming Senior

First Milestone

wiring-l298n-motor-driver-module-with-dc-tt-motors-and-arduino-uno
img_7119

I reached my first milestone once on July 9th when I finished assembling the electrical components of the robot. First, I connected the L298N motor driver’s motor output pins to the two DC motors using wires, and a screwdriver to secure the two parts together. Secondly, I used six jumper cables to connect the motor driver’s speed control pins and direction control pins to their respective ports on the Arduino. Finally, I built a circuit between the Arduino and the ultrasonic sensor using a breadboard and four wires. This created a chain-like connection between all of the parts. 

First Milestone Video

Milestone 1

Second Milestone

img_7206-2
img_7328

I reached my second milestone on July 15th when I rewired my robot to include the battery pack. I made connections between wired on the battery pack and the voltage and ground pins on the motor driver. This allowed the motor driver to turn on, thus allowing the robot to move. I then rearranged the parts on the robot to include the battery pack on the underbelly, and the rest of the parts were mounted on the top of the newly assembled robot chassis. At this point, the robot was mobile, but reliant on the Arduino cord plugged into my computer, so it could only roll around on the space on my desk. 

Second Milestone Video

Milestone 2

Third Milestone

img_7446
screen-shot-2020-08-05-at-5.55.02-pm
screen-shot-2020-08-05-at-5.55.12-pm

I reached my third milestone on July 30th once I attached the broom to the front of my robot using zip ties. I wrote code that would make the robot function like a Roomba, spiraling around the room until it reached the center, and then turning off. My code uses the ultrasonic sensor to determine the distance between itself and the walls, and after every 3 turns it would cover a smaller area of the floor insuring that it cleans everything. In the loop, at the beginning of each turn, the robot will measure the distance between itself and the wall. If the robot is half way away from wall Y, it will turn right, and calculate the distance between itself and wall X. If it determines that it’s in the middle of the room in terms of the X and Y axis, the robot will turn off. The code can be seen above.

Skills Learned

screen-shot-2020-08-05-at-6.23.19-pm
screen-shot-2020-08-06-at-8.22.36-am
screen-shot-2020-08-06-at-8.22.44-am

On July 15th I programmed my ultrasonic sensor to work in collaboration with my DC motors. In my code I used the feedback from the ultrasonic sensor to determine the distance between the sensor and an obstacle, and used that to determine how fast the motors would spin on my robot. It would speed up if it were far away from an obstacle, and slow down if it got close to an obstacle. I had never done this before, and learned how to make two separate components collaborate within the same program.

img_7316
img_7317

On July 20th, one of the wires on my DC motor came loose. Rather than replacing it, I learned how to solder the wire back onto the pin. I set up my helping hands, plugged in my soldering iron, plugged loose wires into my perf board and began to practice soldering before attempting it on an important part. With safety googles on I used the iron to heat up the connection site, and soldered the wires to the perf board. I went ahead and soldered the wire back onto my DC motor when I was comfortable with soldering, and it was fully functional once more.

img_7704

On August 10, I wanted to make a modification for my base project, adding a Gmail tab on my smart mirror. In order to do so, I would have to write code that would support a Gmail API within my program.

Starting from scratch, I learned how to access APIs and the variables within them that I needed. I learned how to create frames on Tkinter, my GUI toolkit of choice, and alter them to my liking. It was an educational and creative journey.

Smart Mirror

The smart mirror is composed of a monitor, a Raspberry Pi, and a two way mirror with a frame. The Raspberry Pi displays the date, time, weather, and latest news on the monitor, and has a mirrored film in front of it so it acts as a phone and a mirror simultaneously. 

First Milestone

img_7552

I reached my first milestone on August 4th once I formatted my microSD card with the NOOBS image. I put the formatted microSD card into the SD card slot on my Raspberry pi, and using an HDMI cable, I connected my Raspberry Pi to my monitor and set it up. I then configured the Raspberry Pi to my preferences, and it was good to go.

First Milestone Video

Milestone 1

Second Milestone

img_7613

I reached my second milestone on August 6th once I altered the code in the smart mirror repository to use a different weather API, as the original API had been deleted. I accessed the information in the weather API by converting it to a JSon object, making it easier to access its information. My weather tab was finally accurate and functional.

Once I had done that I changed the appearance of the news tab at the bottom of the smart mirror. If the article were too long, I would have the text wrap under each line and indent to the left. With a complete background, I had finished the base project for my smart mirror.

Second Milestone Video

Milestone 2

Third Milestone

img_7710

I reached my third milestone on August 14 once I finished writing code that would display my most recent emails on my smart mirror. I used code provided by the Google Developers website, and worked that into my own code. I had to change the way it was accessed and formatted, but once that was out of the way I began working on the display.

I formatted the emails to appear on my smart mirror with the sender first, the subject second, and a snipped of that email third. I changed the size of the text as I saw fit, and tucked it onto the left side of my mirror. It shows my emails while leaving room for me to see myself in the smart mirror.

Demo Night Video

Demo Night Video

Start typing and press Enter to search

Bluestamp Engineering