All posts by Gigi Castro

The End

This is my final post about my progress with my projector robot. The semester has officially come to a close. I made impressive progress with my project considering my lack of experience in programming and that I completed this mainly on my own with slight guidance from Mr. Bahn. So in the final days, I made a 3D print piece to fit around the wheels to build the base upon however the first time it did not fit. So I re-measured and sent out another model, I am still waiting for it to be printed. Rather than make a custom 3D model to attach the distance sensor and the servo together I decided to wrap it together with string however I did discover that it would more likely be efficient with wire that has insulation around it. Sadly as I tested out that version, the servo no longer spins, after some testing I believe it is a hardware problem. Also I’ve decided to name my projector robot, his name is Dio short for Dionysus, the god of theater. I figured it would be a good fit because the main function of this project is the ability for it to play content such as movies.

Below is a link to the google site that I created that summarizes my journey in creating Dio:

Getting Into the Final Stages

Dec. 2 – Dec.19

So I have a knock command that works! I figured that instead of trying to use the more elaborate source code that I didn’t quite understand, I could just use a simple code intended for one knock. More simplistic and more realistic for a beginner.

I reformed my code with the help of Mr.Bahn, so now it runs smoother and runs more effectively for what I need it to do. Now my focus is directed towards the physical aspect of this project. I have been developing pieces that will fit around the main parts of the wheels to attach the rest of the main frame on. I have created pieces for both the front and back wheels and am waiting for them to be printed. Over the next couple of weeks I plan on soldering my circuit, finish building the frame and get it to function so that it is mobile. I also might switch out the servo because once it is first turned on it glitches for about 30 seconds then starts to run normally, sometimes it will glitch again it varies.

More Difficult Than Intended

Nov. 14 – Nov. 25

The source code that I plan on using for the knock command is a code intended for a gumball machine that dispenses candy when the correct knock is heard. The code is definitely to a higher caliber than I am used to so it took a bit for me to read through to kind of start to get the jist of what I was looking at. After taking some time to digest the code, I began to start tweaking with it and playing around with it. However, I still didn’t fully comprehend how it worked so I figured it may be easier to start with a simpler code. So I found a code that would just serial print “Knock!” when the mic picked up the knock. After experimenting with the variables I have a better understanding of how the other code and how it functions. Sadly, I’m not sure if I will have enough time to work on the knock command because the semester is coming to an end soon and I still have to build the framing and solder all the components and what not.

Even More Progress!

Oct. 31 – Nov. 13

I switched to another motor driver, the current one should be more suitable to my project’s needs. Which does mean that I had to rewrite my code to suit the new motor driver. I finished writing the code to make the motor move left, right, right back, and left back. After testing it and fixing a couple of things I have started to integrate it into the master code. There was a slight glitch that was conflicting with the servo and the motor driver that was resolved by rearranging some of the pins. Other than that, my car is fully functional and every aspect is working well. Next I plan on adding a clap command to turn on and off the roam mode.

Below is a video of the car cycling through all the functions:


Oct. 18 – 30

I decided to go with the idea of attaching a distance sensor to a servo and have it spin 20 – 160 degrees. Within the certain degrees it will determine how the robot will react. For example between 20 and 69 degrees, if there is an object sensed and it is greater than 10 cm away but less than 59 cm away it will turn left. If there is an object less than 10 cm sensed it will start going backwards towards the right. After some testing I plan on integrating it into my master code to see how it interacts with the car. Below is what the servo looks like as it is scanning its surroundings:

Two Steps Forward and One Step Back

Oct. 4 – Oct. 17

I learned how an ultrasonic distance sensor works. I’ve written code for forward, backward, and stop. However, as I was testing the circuit one day and connected the power supply to the circuit I fried my Arduino because the voltage was set to 16 volts. There was a wire that I misplaced that connected the power supply to the Arduino and thus dooming my circuit. So I had to change out my Arduino, also I swapped out the H-bridge for a single motor driver, and then changed to a dual motor driver. With figuring out what all was damaged I had to alter my code slightly and rewire some parts of my circuit for the new motor driver. On the upside, the current motor driver will be able to handle the power (forward, back) and the steering (left, right) at the same time as opposed to having two separate motor drivers.

Once I got back on track to where I was before frying my circuit I had to figure out how I want this robot to be able to turn left or right. Originally the idea was to have three distance sensors each facing in one direction and when one sensed an object it would tell the motor to move accordingly. However, there could be a different way to go about this. I could have a motion detection sensor and when it senses an object at a certain degree it will tell the robot to move left or right.

The Beginning

Sept. 16 – Oct. 3

After some thought and research I have decided to build a projector robot. My vision for this robot is heavily influenced by Tipron, a projector robot that was created around 2016. It will follow you around and display the news, the weather, or twitter and you can teach it to know certain points in your home to go to and so on. My robot will be able to track an object, avoid obstacles, move the projected image up and down, and hopefully be able to follow clap commands.

To start I had to take control of the car and be able to control the direction and steering. It took a bit of time for me to get right onto track because I didn’t know exactly where to start, but once I got going it was pretty smooth sailing. The main hindrance in getting the motor to work came down to one faulty wire, once I changed that out I got the motors working. Then I wired the steering on the open side of the H-bridge and took control of that also, then slowed down the speed of the car. My next task is to either figure out how to use an ultrasonic distance sensor to make it do what I want and figure out the base of the robot, that will hold the projector.  

Recap of Introduction Projects

For my first project I was assigned to build a traffic light, a relatively simple project but complex for someone who knows nothing about how to code. My struggles were mainly software related as I had to learn the fundamentals about coding and the language. After I made a functioning traffic light that cycled through green, yellow, and red, I then had to install a pedestrian button that would interrupt the cycle and turn the lights to red. It took a bit of time for me to fully comprehend what all had to fully go into programming the button to change the cycle. 

Once I figured it out and made a functional traffic light with a pedestrian button I was then tasked to construct a motorized pinwheel. Which was also a relatively simple project, I didn’t face many problems completing this project it was pretty straight forward. After I understood how to spin a motor going one direction, I then had to make a motor that could spin both forwards and backwards and change the speed. This project is where I spent most of days doing. Initially the problem was with the H-bridge (a component that enables the user to hold large circuit within one component). So I had to switch it with another H-bridge, then the button that changed the direction of the motor was not working and, after some testing I realized the problem relied within the hardware and upon more investigation found out that one of the pins on the second H-bridge was not working so the rest of the circuit was not getting the information the button was being pressed. The thankfully, the H-bridge has two sides that are separate from each other, meaning that I was able to switch all the wires on the broken side and move them to a side where it was working. After I made that change my circuit worked and the motor was changing directions. 

After completing that circuit, I then made a project that was much simpler than the previous. I made a simple Servo circuit, which pretty much just made a motor spin at specific degrees. Then made it turn similar to a windshield wiper which ranged from 20 degrees to 160 degrees (because motors can’t really spin all the way to 0 and 180 otherwise they spaz out).