The Alpha Geek – Geeking Out

Project #16: Sound – Frequency and Pitch – Mk03

——

#donluc #sound #synthesizer #programming #arduino #fritzing #electronics #microcontrollers #consultant #vlog

——

Frequency and Pitch

——

Frequency and Pitch

——

Frequency and Pitch

——

Frequency and Pitch

Frequency is how often something happens. Since sound is vibrations, we use frequency to describe how often something is vibrating. Frequency is measured in Hertz (Hz), which is simply how often per second. So, something oscillating at 1 Hz is vibrating once every second. A complete vibration is called a cycle, measured at one full peak and trough of a wave. In the early days of electronic music, the terms cycles per second (cps) was used instead of Hz.

The above picture is a sine wave, the purest representation of a single frequency or vibration. The time it takes for the wave to complete one cycle is the wave’s frequency. More vibrations per second produce higher sounding frequencies and fewer vibrations per second produce lower sounding frequencies. Tuning instruments, science experiments, testing audio equipment, testing your hearing what’s the highest frequency you can hear? Humans perceive frequency of sound waves as pitch. Each musical note corresponds to a particular frequency which can be measured in hertz. An infant’s ear is able to perceive frequencies ranging from 20 Hz to 20,000 Hz. The average adult human can hear sounds between 20 Hz and 16,000 Hz.

Tone

The Arduino is a single-oscillator digital synthesizer. Generates a square wave tone() of the specified frequency on a pin. The pin can be connected to a other speaker. Only one tone can be generated at a time. If the tone is playing on the same pin, the call will set its frequency. the Arduino pin on which to generate the tone. The frequency of the tone in hertz. The duration of the tone in milliseconds. By passing voltage through a potentiometer and into an analog input on your board, it is possible to measure the amount of resistance produced by a potentiometer as an frequency.

DL2010Mk02

1 x Arduino Pro Mini 328 – 5V/16MHz
1 x 1K Potentiometer
1 x Knob
1 x Audio Jack 3.5mm
1 x SparkFun Audio Jack Breakout
1 x Hamburger Mini Speaker
5 x Jumper Wires 3in M/M
2 x Jumper Wires 6in M/M
1 x Full-Size Breadboard
1 x SparkFun Cerberus USB Cable
1 x SparkFun FTDI Basic Breakout – 5V

Arduino Pro Mini 328 – 5V/16MHz

SPK – Digital 6
CAP – Analog A0
VIN – +5V
GND – GND

DL2010Mk02p.ino

// ***** Don Luc Electronics © *****
// Software Version Information
// Project #16: Sound - Frequency and Pitch - Mk03
// 10-02
// DL2010Mk02p.ino 16-03
// 1 x Arduino Pro Mini 328 - 5V/16MHz
// 1 x 1K Potentiometer
// 1 x Knob
// 1 x Audio Jack 3.5mm
// 1 x SparkFun Audio Jack Breakout
// 1 x Hamburger Mini Speaker
// 5 x Jumper Wires 3in M/M
// 2 x Jumper Wires 6in M/M
// 1 x Full-Size Breadboard
// 1 x SparkFun Cerberus USB Cable
// 1 x SparkFun FTDI Basic Breakout - 5V

// Include the Library Code

// Mini Speaker
int SPK = 6;
// Frequency
int iCap = A0;
int iFreg = 0;

// Software Version Information
String sver = "16-03";

void loop() {

  // Frequency
  iFreg = analogRead(iCap);
  iFreg = map(iFreg, 0, 1023, 31, 4978);
  
  // Mini Speaker  
  tone(SPK, iFreg, 20);
    
  // Delay the actual frequency of updates reads for stability
  delay(1);
  
}

setup.ino

// Setup
void setup() {

  // Setup
  
}

Technology Experience

  • Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi,Espressif, etc…)
  • Robotics
  • Research & Development (R & D)
  • Desktop Applications (Windows, OSX, Linux, Multi-OS, Multi-Tier, etc…)
  • Mobile Applications (Android, iOS, Blackberry, Windows Mobile, Windows CE, etc…)
  • Web Applications (LAMP, Scripting, Java, ASP, ASP.NET, RoR, Wakanda, etc…)
  • Social Media Programming & Integration (Facebook, Twitter, YouTube, Pinterest, etc…)
  • Content Management Systems (WordPress, Drupal, Joomla, Moodle, etc…)
  • Bulletin Boards (phpBB, SMF, Vanilla, jobberBase, etc…)
  • eCommerce (WooCommerce, OSCommerce, ZenCart, PayPal Shopping Cart, etc…)

Instructor

  • Arduino
  • Raspberry Pi
  • Espressif
  • Robotics
  • DOS, Windows, OSX, Linux, iOS, Android, Multi-OS
  • Linux-Apache-PHP-MySQL

Follow Us

J. Luc Paquin – Curriculum Vitae
https://www.donluc.com/DLHackster/LucPaquinCVEngMk2020a.pdf

Web: https://www.donluc.com/
Web: http://www.jlpconsultants.com/
Web: https://www.donluc.com/DLHackster/
Web: https://www.hackster.io/neosteam-labs
Facebook: https://www.facebook.com/neosteam.labs.9/
YouTube: https://www.youtube.com/channel/UC5eRjrGn1CqkkGfZy0jxEdA
Twitter: https://twitter.com/labs_steam
Pinterest: https://www.pinterest.com/NeoSteamLabs/
Instagram: https://www.instagram.com/luc.paquin/

Don Luc

Leave a Reply

Your email address will not be published. Required fields are marked *

Categories
Archives