Team 7

Wave Properties Calculator

Build an app that calculates wavelength, frequency, wave speed, and demonstrates the wave equation. Includes modes for sound waves and light waves.

🎯 Learning Goals

  • Master the universal wave equation (v = fλ)
  • Understand differences between Sound and Light waves
  • Perform temperature-based speed of sound adjustments
  • Implement scientific notation for extreme values (light speed)

🌎 Why This Matters

Waves are how we communicate. Your Wi-Fi, mobile network, radio, and even the colors you see are all waves. Understanding wave properties is the first step toward understanding modern telecommunications and quantum physics.

📖Understanding Waves

Theory Masterclass
"

A wave is a disturbance that transfers energy from one place to another without transferring matter. Types: • Transverse waves: particles vibrate perpendicular to wave direction (light, water waves) • Longitudinal waves: particles vibrate parallel to wave direction (sound) Key Properties: Wavelength (λ): Distance between two consecutive crests (or compressions). Unit: meters Frequency (f): Number of complete waves per second. Unit: Hertz (Hz) Time Period (T): Time for one complete wave. T = 1/f Amplitude (A): Maximum displacement from rest position Wave Speed (v): How fast the wave travels The Wave Equation: v = f × λ Speed = Frequency × Wavelength Sound Waves: Speed of sound in air ≈ 343 m/s (at 20°C) Speed increases with temperature: v = 331 + 0.6T (T in °C) Audible range: 20 Hz to 20,000 Hz Below 20 Hz = infrasound, Above 20,000 Hz = ultrasound Light Waves: Speed of light: c = 3 × 10⁸ m/s Visible light wavelengths: 400nm (violet) to 700nm (red) c = f × λ (for electromagnetic waves)

Mathematical Foundation

fxWave Equation: v = f × λ
fxPeriod: T = 1/f
fxSound speed: v = 331 + 0.6T (°C)
fxSpeed of light: c = 3 × 10⁸ m/s
fxEnergy: E = h × f (for photons)

🎨Part A — Designer View (UI Design)

Open MIT App Inventor → Switch to Designer view. Follow each step below to build the interface.

1

1. Screen Basics

• In the **Properties** panel (right) for **Screen1**. • Set **Title** to "Wave Calculator". • Set **AlignHorizontal** to Center. • Set **BackgroundColor** to dark blue.

2

2. Input Fields

• Drag 2 **TextBoxes** renamed: 'FreqTxt' and 'WaveLenTxt'. • Set each to **NumbersOnly**. • Give hints: "Frequency (Hz)" and "Wavelength (m)".

3

3. Action Button

• Drag a **Button** renamed 'CalcVBtn'. • Set text to "CALCULATE VELOCITY". • Change **BackgroundColor** to Cyan.

4

4. Result Display

• Drag a **Label** renamed 'ResultLbl'. • Set **TextColor** to Yellow and **FontSize** to 22.

🧩Part B — Blocks View (Logic & Calculation)

Switch to Blocks view. Now add the logic that makes your app actually work.

1

1. Switch to Blocks

• Find the **Blocks** button at the top right of the screen and click it.

2

2. The Wave Formula

• Velocity (v) = Frequency (f) * Wavelength (λ). • Click **CalcVBtn** (Gold). Drag 'when CalcVBtn.Click' into the workspace. • Click **ResultLbl**. Drag the green 'set ResultLbl.Text to' and snap it inside. • Go to the **Math** drawer (Blue). Drag out the '*' (multiplication) block.

3

3. Snapping the Math

• Snap [FreqTxt.Text] into the first slot of the '*' block. • Snap [WaveLenTxt.Text] into the second slot. • These blocks are found by clicking on the names of your TextBoxes on the left.

4

4. Adding Units (m/s)

• Go to the **Text** drawer (Bright Pink). Drag a 'join' block. • Snap your math result in first, and a text block with " m/s" in second.

🧪Testing Your App

  • Sound at 440 Hz, 20°C → v=343 m/s, λ≈0.78 m
  • Visible light: 550nm → green, f≈5.45×10¹⁴ Hz
  • Red light: 700nm → f≈4.29×10¹⁴ Hz
  • Sound at 0°C → v=331 m/s
  • 20000 Hz at 20°C → λ≈1.7cm (smallest audible wavelength)

🚀Bonus Challenges

Extra credit — impress your instructor

  • Draw a sine wave on Canvas with correct wavelength and amplitude
  • Add Doppler Effect calculator: f' = f(v±v_observer)/(v∓v_source)
  • Create a 'frequency to musical note' converter
  • Add interference: resultant = 2A×cos(Δφ/2)