PComp Final First Steps

Big steps forward and backward. 

I landed on my final PCOMP project which will record the acceleration of a surfboard on a wave. I will then take this data and produce a physical model of the largest waves the rider surfed in that session. Currently, I have the code for the accelerometer working along with the ability to run the entire board off battery power. 

 

I can’t for some reason get my SD card reader up and running. I have tried multiple SD card libraries and readers to no avail. Once I get this up and running I will be able to test the system before taking it out in the water. 


Arduino w/ sd chip

 

Arduino w/ sd chip

 

SD Chip

 

Pcomp Project 3 Idea


Lockbox mystery

Lockbox mystery

This device encourages the user to attempt to flip a kill switch to see the inside of a mystery box. If the switch is successfully flipped, the locking mechanism will release. However, the block will dropdown. 

Version two would be unless the kill switch is activated, saltwater is dripped into a plant, eventually killing it. Questioning whether the viewer will risk discomfort and possible failure to save the plant.

Surfboard sketch
I believe that the data will be wave-shaped while the rider is on the wave. A rapid acceleration followed by a gradual slow down until followed by a sudden drop-off. I then want to take this data and print them, presenting a graphical representation of the waves caught. 

Pressure Sensors

This week’s labs had us build circuits that are activated by some sort of analog input.  I enjoy working with pressure sensors, so I decided to stick with them.

The first lab had me running a servo motor. The wiring and code seemed straightforward, and I was confident that I would get it up and running quickly. Unforchentely, I ran into a problem that I couldn’t explain. The servo wouldn’t turn on. I started my troubleshooting by mapping out the pressure sensor to make sure I was getting a reading. The pressure sensor was working correctly. I checked power to the servo next. I had power. Usually, my problem comes from my code, so I checked and re-checked it. Everything looked to be in order, so I decided to tear apart the circuit and rebuild it. After the rebuild, the servo was still not working. At this point, I needed a break. The next day a few of my classmates troubleshot the circuit with me. Eventually, someone mentioned that the servo might be broken. Quickly we switched it out, and everything worked perfectly. I tried two other servos, and they also worked. Lesson learned. 

Top down sketch of a breadboard layout. A pressure sensor is running a servo.

 

Video: Servo

The second lab was to run tones through a speaker and control them with sensors. 

Again, I couldn’t get the final device to activate. Power was running to my sensors and the speaker, but no sound was coming out. I thought back to my last lab and tested to see if my speaker was functioning and that my solder was good. Everything checked out. Something had to be wrong with my code. Eventually, I noticed that I had not mapped the sensor range correctly. After correcting for the proper mapping, the speaker worked! A much quicker fix then the servo lab. 

Example 1: Two pressure sensors running a speaker. 

Top down sketch of a breadboard layout. Two pressure sensors running a speaker.

Video: Two pressure sensors running a speaker

Video: “pitches.h” library example

Example 2: Three pressure sensors running a speaker.

Top down sketch of a breadboard layout. Three pressure sensors running a speaker.

Video: Three pressure sensors running a speaker

To wrap up this week my partner Stephanie Chen and I started to design our first project. We decided to make a padlock using four buttons. We started researching how to make this happen and developed a basic circuit sketch. We hope to get the circuit running, then change out the controls and build nice housing. 

Top down sketch of a breadboard , four switches, 2 LEDS.