[PHY] A4: Tone Lab and Back to Basics

Instructions

Make the speaker work with the Arduino and produce a tone.

Brainstorming

Before heading into this lab I knew I wanted to incorporate it into my fabrication assignment, which is to make an enclosure and have some electronics in it. First I had to complete the lab and understand how FSRs interacted with the speaker.

Process

I connected everything based on this image:

Breadboard view of an Arduino Nano connected to two force sensing resistors (FSRs) and a speaker.

Right off the bat I had some problems. First, I had a vague understanding of what I am doing. Second, the Force Sensing Resistors (FSR) gave me crazy values like -151 and 2566. Finally, no tone was being produced even though I copied the code from the lab. I wasn’t sure what was wrong, but I knew that something was. So I tested.

  1. Speaker on its own worked, so it wasn’t the speaker.
  2. FSRs worked, but produced odd values.
  3. When put together (with the code pulled from the lab) they didn’t produce a tone.
  4. By using a multimeter I realized that my FSRs weren’t receiving any power.

I connected the wires from 3.3V pin on the analog side of the nano and the ground pin to their appropriate destinations and my FSRs were finally receiving power.

The next problem I encountered was a coding one and for this one I needed Tom’s help. I booked office hours, recommend this to everyone btw, and got answers to my questions. It was with Tom’s help that I was able to comfortably draw the schematic above. Schematics are important and recognizing that is game changing.

The next step

Now that I had completed the lab, I wanted to proceed a little into fabrication. I want to stick the nano into a coffee can from Trader Joe’s and make it play the Nokia tune with a push of a button. I got the Nokia tune to play with the help of targate, but I still need to figure out the code for buttonState, so that I can use a button to play the tune.

Nokia tune

Conclusion

I can feel my confidence slowly growing in terms of knowing some of the pins and connecting everything faster than before. I have a lot to learn more, a colossal amount.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s