Ping Organ using an Arduino
I was trying to think of a quick toy I could build for my kids. I came up with this idea of an ultrasonic range finder, an Arduino, and a speaker. Basically the Arduino plays a tone out of the speaker based on the distance from the range finder. The result works pretty well and can be built in minutes. You can play this from anything from your entire body, to just your feet.
Step 1: Parts
2. Range Sensor (I used a Parallax Ping))) that I picked up a Defcon a couple of years ago, anything like this would work as well http://www.sparkfun.com/products/639)
3. A small speaker (I pulled mine out of an toy moose that sang Blue Christmas)
Ultrasonic range finders basically work by sending out an ultrasonic signal and then they sense how long it takes to come back. Think sonar for a submarine.
Step 2: Schematic
The Schematic is pretty simple. Speaker to Arduino pin 11 and ground. Ultrasonic range finder to power, ground, and Arduino pin 7
Step 3: The Code
JLCPCB – Prototype 10 PCBs for $2 + 2 days Lead Time
China’s Largest PCB Prototype Enterprise, 300,000+ Customers & 10,000+ Online Orders Per Day
Inside a huge PCB factory: https://www.youtube.com/watch?v=_XCznQFV-Mw