PComp Lab 4///Midterm Progress

I look forward to going over this lab in class because I could not get the DC motor to work. Sunday night, I followed the diagram wiring closely. But my setup did not work.

Image in Lab: Using a Transistor to Control High Current Loads with an Arduino
My attempt at wiring for using a transistor, potentiometer, and DC Motor.

The next day, I tried the Lab: DC Motor Control Using an H-Bridge. I followed the diagram again, and I thought the motor moved briefly for one point.

Then, my professor, Jeff, came by and showed me how to properly connect the H-Bridge to the breadboard. He showed me how to solder again, and I took a crack at soldering. It wasn’t the best solder job ever, but the pins stuck to the H-Bridge well.

Alas, the motor for this lab did not work for me either. I would like to try later to fix this lab, but I spent a lot of time this week working on our Physical Computing midterm.


On the midterm, I made a lot of progress!

Since Runqi and I have pivoted to having “ghosts” that sneeze/spray at people, I started with trying to figure out how to get a servo to spray a bottle.

At first, I tried tying a ribbon to the spray bottle trigger and then tying the other end to the servo. Unfortunately, I overestimated my proficiency with knots and the ribbon broke when trying to pull the trigger. So, I tried using wire as that was sturdier.

I had to hold the servo and bottle from falling, but the code loop of 180 degrees to 0 degrees did work in pulling the trigger eventually. However, I needed a design that would hold the servo and bottle in place all on its own. Fortunately, I did find that with some good Googling.

According to this hackaday.io post, user peterquinn needed an automatic sprayer to stop his elderly cat from treating the house like its litter box (I hope you were successful, peter).

Inspired by this design, I worked to attach a micro servo with ziptie to the bottle and tie some string around the trigger of the spray. Unfortunately, the string was too weak and broke when pulling the trigger. Therefore, I wrapped electrical wire around the spray trigger and voila!

First attempt with wire. Failure.
Success!

After some further building and figuring out the best way to attach the wires and servo, I now have three functional automatic sprayers with the press of some buttons.

The next step is to turn these sprayers into ghosts and the code into a guessing game. We want to make a game where the user picks the right ghost each time (maybe receiving a treat) and getting a ghoulish trick with anything wrong guess.


Comments

Leave a comment