กลับไปหน้ารวมไฟล์
ultrasonic-theremin-830063-en.md

Summary

Just a simple Theremin (first project post!) using a distance sensor and a buzzer. To make it, simply connect an ultrasonic distance sensor (I used the SR04, because it came with the starter kit I got) and a passive buzzer (not an active, passives are much better) to your board. In the picture I used a prototype shield, but that is not necessary.

Wiring

Distance:

  • GND to GND
  • VCC to +5V
  • Echo to PWM12
  • Trig to PWM11

Buzzer:

EXPANDED TECHNICAL DETAILS

Non-Contact Musical Synthesis

Inspired by the classic electronic instrument, this Theremin uses sound waves to generate music based on hand position.

  • Proximity Detection: Uses an HC-SR04 Ultrasonic sensor. The Arduino calculates the distance from the hand to the sensor in real-time.
  • Pitch Mapping: The distance value (e.g., 5cm to 50cm) is mapped to a frequency range (e.g., 100Hz to 2000Hz).

Sound Generation

  • Tone Function: The Arduino uses the tone() function to output a square wave to a speaker.
  • Interactivity: By moving one hand near the sensor, the user can play melodies like a futuristic instrument. Advanced versions use a second sensor for volume control, creating a fully non-contact 2-axis expressive musical interface.

ข้อมูล Frontmatter ดั้งเดิม

title: "Ultrasonic Theremin"
description: "A Theremin utilizing a passive buzzer using tone(); and the SR04 ultrasonic distance sensor"
author: "squrril"
category: "Audio & Sound"
tags:
  - "audio"
  - "music"
  - "toys"
views: 11473
likes: 7
price: 1499
difficulty: "Easy"
components:
  - "1x Buzzer"
  - "1x Ultrasonic Sensor - HC-SR04 (Generic)"
  - "1x Arduino Mega 2560"
tools: []
apps:
  - "1x TinkerCAD - Free!"
downloadableFiles:
  - "https://projects.arduinocontent.cc/0b6f9488-6d13-4ca9-bfda-1efc1a74432f.ino"
documentationLinks: []
passwordHash: "54cb79d3ca1bdcb559d0c3d20dd79861e1ac658df1458bfaf9e23d9dc5c48bed"
encryptedPayload: "U2FsdGVkX1+2czPbABJ0cV7GF2Zp8LNID6Nx3uB4FV/CEbZA9DrX5hxFoFSu0/vs5iaEY/lOVuCh/bYxTGIRcva6sxfvd7LV3q8fbo96eaU="
seoDescription: "Build an Ultrasonic Theremin with Arduino using SR04 ultrasonic distance sensor and passive buzzer. Control sound with tone(); function."
videoLinks: []
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/ultrasonic-theremin-830063_cover.jpg"
lang: "en"