Team 9

Electric Field Mapper

Build an app that calculates the electric force between charges (Coulomb's Law), the electric field strength at a point, and the electric potential.

🎯 Learning Goals

  • Master Coulomb's Law and inverse-square relationships
  • Understand Electric Field (E) and Potential (V) differences
  • Work with very large (k) and very small (q) numbers
  • Implement repulsive vs attractive force logic

🌎 Why This Matters

Electrostatics is how your touchscreen works, how laser printers print, and how the atoms in your body stay together. It is the force that governs the internal world of technology and matter.

📖Understanding Electrostatics

Theory Masterclass
"

Electrostatics is the study of electric charges at rest. Key Concepts: Electric Charge (q): Property of matter that causes it to experience a force in an electromagnetic field. Measured in Coulombs (C). - Protons have positive charge (+1.6 × 10⁻¹⁹ C) - Electrons have negative charge (-1.6 × 10⁻¹⁹ C) Coulomb's Law: The force between two point charges is directly proportional to the product of the charges and inversely proportional to the square of the distance between them. F = k × (q₁ × q₂) / r² k (Coulomb's constant) ≈ 8.99 × 10⁹ N·m²/C² Electric Field (E): The region around a charged particle where a force would be exerted on other charges. E = k × q / r² (field due to a single charge q at distance r) Electric Potential (V): The work done per unit charge in bringing a positive test charge from infinity to a point. V = k × q / r

Mathematical Foundation

fxF = k × (q₁ × q₂) / r²
fxE = k × q / r²
fxV = k × q / r
fxk ≈ 8.99 × 10⁹ N·m²/C²
fx1 μC = 10⁻⁶ C (Microcoulomb)

🎨Part A — Designer View (UI Design)

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

1

Setup and Constants

Title: "Electric Field Mapper" Add a special Label at the top showing the value of k: "k = 8.99 × 10⁹"

2

Coulomb's Law Calculator

VerticalArrangement: "Coulomb's Force" - TextBox: "Charge q₁ (μC)" - TextBox: "Charge q₂ (μC)" - TextBox: "Distance r (m)" - Button: "Calculate Force" - ResultLabel: "F = — N"

3

Electric Field & Potential Calculator

VerticalArrangement: "Field & Potential" - TextBox: "Source Charge q (μC)" - TextBox: "Distance r (m)" - Button: "Calculate E & V" - ResultLabel: "E = — N/C, V = — V"

4

Add unit helpers

Since charges are usually small, add a note: "Note: Enter charge in micro-Coulombs (μC). The app converts it to Coulombs by multiplying by 10⁻⁶."

🧩Part B — Blocks View (Logic & Calculation)

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

1

Force Calculation Logic

When CalculateForce.Click: 1. q1 = TextBoxQ1.Text × 0.000001 2. q2 = TextBoxQ2.Text × 0.000001 3. r = TextBoxR.Text 4. k = 8990000000 5. Force = (k × abs(q1 × q2)) / (r × r) 6. Display result. 7. If (q1 × q2) > 0 → "Attractive" else "Repulsive"

2

Field and Potential Logic

When CalculateEV.Click: 1. q = TextBoxQ.Text × 0.000001 2. r = TextBoxR.Text 3. k = 8990000000 4. E = (k × abs(q)) / (r × r) 5. V = (k × q) / r 6. Display results. (V can be positive or negative, E is always positive magnitude)

3

Scientific Notation Helper

Because the numbers are huge (k) or tiny (q), use a procedure to format results into scientific notation (e.g., 2.5 × 10⁴).

🧪Testing Your App

  • q1=1μC, q2=1μC, r=1m → F ≈ 0.00899 N
  • Try negative charges: Force magnitude stays same, but it should be noted as 'Attractive'.
  • Check distance = 0: Show an error (cannot divide by zero).

🚀Bonus Challenges

Extra credit — impress your instructor

  • Add a Canvas that draws the charges and vectors showing force direction.
  • Add multiple charges and calculate net force at a point.
  • Create a 'Potential Map' where tapping a Canvas shows the potential at that spot.