Skip to main content

Case 4: Wave Power Generation


Introduction

Speak, clap, or make sounds toward the micro:bit V2 board — the louder the sound, the faster the 360° building-block servo drives the cam, the more vigorously the "buoy" oscillates up and down, simulating stronger waves and higher power generation. The quieter the sound, the gentler the oscillation. In complete silence, the servo stops, simulating a calm sea. The sound represents the "power of the waves."


Learning Objectives

  1. Learn about the principle of wave power generation — converting the oscillating kinetic energy of waves into electrical energy.
  2. Explore the types and potential of ocean energy — tidal, wave, thermal gradient, ocean current, and salinity gradient energy.
  3. Understand the relationship between humans and the ocean — the ocean is not only a source of food and shipping routes, but also a vast treasure trove of future clean energy.

Required Materials

ItemImageQuantity
micro:bit V21
Jacdac Expansion Board1
Jacdac 10cm Connector Cable1
Jacdac Servo Module1
360° Building-Block Servo1
USB Cable1

Sensor Principle

This case uses the built-in microphone of the micro:bit V2 as the sensor. It captures ambient sound levels (0–255) in real time and maps them to the servo rotation speed.

Assembly Steps


Model Principle

360° Building-Block Servo and Cam — Simulating Wave Motion

The 360° building-block servo rotates continuously, and the cam on the output shaft periodically lifts and lowers the "buoy" (follower), causing it to oscillate up and down — simulating how a buoy rises and falls on the sea surface under wave action. Each full rotation of the servo completes one "rise → fall" wave cycle for the buoy. The shape of the cam determines the wave "morphology" — a smoothly curved cam produces gentle swells, while a sharply profiled cam produces steep wave crests.

In real-world wave power devices, the oscillating motion of the buoy is converted directly into electrical energy through hydraulic systems or linear generators — each breath of the ocean delivers clean electricity to the grid.

Wave Power Generation — The Ocean's Breath

The basic principle of wave power generation is three-stage energy conversion:

Wave kinetic / potential energy (oscillation)
↓ Stage 1
Device motion (buoy oscillation, OWC water column vibration, pendulum swing)
↓ Stage 2
Rotational mechanical energy (turbine / hydraulic motor)
↓ Stage 3
Electrical energy (generator electromagnetic induction)

Three mainstream wave power technologies:

Technology TypePrincipleCharacteristics
Oscillating Water Column (OWC)Waves cause water column inside a chamber to oscillate vertically, compressing air to drive a turbineRotating parts don't contact seawater; good corrosion resistance; easy maintenance
Pendulum DeviceWaves push a pendulum to swing back/forth or up/down, generating power via hydraulicsHigh conversion efficiency; well-suited to waves' low-frequency, high-thrust characteristics
Overtopping ReservoirWaves are funneled by a tapered channel and overflow into an elevated reservoir; the water level difference drives a turbineNo moving parts; good reliability; requires specific coastal topography

Connection Diagram

As shown below, insert the micro:bit V2 board into the Jacdac expansion board, and connect the servo module to the Jacdac expansion board's edge connector.

Connection Diagram


Programming Software

Microsoft MakeCode


MakeCode Programming

Step 1: Adding the Jacdac Extension

  1. Go to Microsoft MakeCode and click "New Project".

    New Project

  2. Enter a project name in the pop-up window and click "Create".

    Create Project

  3. Click "Extensions" in the code drawer.

    Extensions

  4. In the pop-up interface, type "Jacdac" and click the search icon, then select the Jacdac software library as shown.

    Search Jacdac


Step 2: Connecting the Hardware

  1. Use a USB cable to connect the micro:bit V2 board to the computer.

    Note: If this is the first time running a Jacdac program on the micro:bit V2, please pre-load a blank Jacdac program onto the board first. Otherwise, skip this step.

    Connect micro:bit

  2. Connect the sensor. MakeCode will automatically detect and simulate it in the simulator area, where sensor status is displayed in real time.

    Sensor Simulation

  3. Click "ADD BLOCKS" to add the sensor extension module.

    Note: When connecting a new sensor, repeat the "click 'ADD BLOCKS'" workflow once.

    ADD BLOCKS


Write the Program as Shown

Program Screenshot


https://makecode.microbit.org/_HHgJmiT3XXFr

You can also download the program directly from the webpage below. Once downloaded, you can start running the program.


Result

When you speak loudly or clap toward the micro:bit V2 board, the 360° building-block servo rotates at high speed driving the cam, and the buoy oscillates vigorously — simulating "stormy seas, full-load power generation." When you speak softly, the oscillation is gentle — "light breeze, gentle waves." In complete silence, the servo stops and the buoy remains still — "sea as smooth as a mirror." Sound level controls wave intensity in real time.


Think

  1. The cam was used in the rice pounding machine case, and it is also used in the wave power station — the same mechanism simulates pounding grain in one case and wave oscillation in another. What other natural phenomena or production actions can you think of that could be simulated with a cam?
  2. One of the greatest challenges facing wave power generation is "typhoons" — monster waves can destroy power generation devices. If you were an engineer, how would you design the system to withstand extreme weather?

Program Logic

Trigger ConditionActionSource
Sound level detected360° building-block servo rotates at a speed mapped from the sound value, driving the cam to move the buoy up and downmicro:bit Sound Sensor

Knowledge Extension: Blue Energy — The Ocean, Humanity's Untapped Super Battery

I. The Ocean Never Rests — Why Ocean Energy Is So Alluring

Approximately 71% of the Earth's surface is covered by oceans. The solar energy absorbed by the ocean each day is equivalent to the heat released by burning approximately 250 billion barrels of oil — about 2,400 times the 2024 global daily petroleum consumption. More importantly, ocean energy has advantages that land-based renewables lack:

Comparison DimensionSolarWindOcean Energy
IntermittencyZero at nightFluctuates unpredictablyTides are regular; waves are persistent
PredictabilityAffected by cloud coverDifficult to forecast preciselyTides can be accurately forecast years in advance
Space footprintOccupies large land areasOccupies large land areasOn/under the sea surface; does not compete for land
Energy density~0.2 kW/m²~0.5 kW/m²Seawater is 832× denser than air; large power even at low speeds

Global theoretical ocean energy reserves are estimated at 10¹⁰–10¹¹ kW (10–100 billion kW), roughly 10–100 times the current total global installed electricity capacity. Yet as of end-2024, actual operational ocean energy capacity worldwide is only about 513 MW (0.513 GW) — less than one millionth of the theoretical potential.


II. The Ocean Energy Family — Five "Blue Energies"

Energy TypeEnergy SourceTechnology MaturityGlobal Theoretical ReserveChina's Resource-Rich Regions
TidalLunar & solar gravity causing sea level rise/fall✅ Commercialized (La Rance 240 MW, Sihwa 254 MW)~10⁹ kW rangeZhejiang, Fujian
WaveWind blowing over sea surface forming waves🔧 Full-scale prototype sea trials~10⁹ kW rangeZhejiang, Fujian, Guangdong, Taiwan
OTEC (Thermal Gradient)Temperature difference between surface & deep water (~20°C)🔬 Scale-model testing~10¹⁰ kW rangeSouth China Sea (99% of China's resource)
Ocean Current / Tidal StreamEarth's rotation, temperature gradients, gravity driving seawater flow🔧 Full-scale prototype testing~10⁸ kW rangeZhoushan Islands
Salinity GradientOsmotic pressure from salinity difference between fresh & salt water🧪 Laboratory validation~10⁹ kW rangeMajor river estuaries

III. Wave Power — Capturing Every Breath of the Ocean

Waves are the result of interaction between wind and seawater. Wind blowing over the sea surface transfers part of its kinetic energy to the water, forming waves. Waves can travel thousands of kilometers without significant attenuation — a swell formed in the central Pacific can travel all the way to coastlines tens of thousands of kilometers away.

Wave Power Key FactsData
Global theoretical wave energy reserve~2×10⁹ kW (2 billion kW)
China's coastal annual average wave power~1.3×10⁷ kW (13 million kW)
Typhoon wave power densityUp to several thousand kW per meter of wave front
2024 European cumulative wave energy capacity~13.5 MW (only 830 kW operational)
Global ocean energy new installations (2024)Only 1.6 MW

Wave power is still at the full-scale prototype sea-trial stage — meaning there is not yet a single truly commercial wave power station anywhere in the world. An energy treasure trove of trillion-ton scale awaits the keys to be forged by engineers. And your servo-cam model is the first step in exploring this treasure.


IV. Humans and the Ocean — From Fear to Reverence to Symbiosis

EraHuman-Ocean RelationshipTypical Events
Ancient timesFear & MysterySea gods, dragon kings, sea monsters in mythology
Age of Sail (15th–17th c.)Conquest & ExplorationColumbus crossing the Atlantic, Magellan's circumnavigation, Maritime Silk Road
Industrial Age (19th–20th c.)Exploitation & PollutionOverfishing, offshore oil extraction, plastic pollution (~8 million tons enter the ocean annually)
Contemporary (21st c.)Awakening & CoexistenceMarine protected areas, carbon-sink fisheries, ocean ranching, clean ocean energy development

Today, humanity stands at a new starting point. The ocean is no longer an object to be "conquered," nor an inexhaustible "free dumping ground" — it is a vast ecological and energy partner with whom we must live in symbiosis:

DimensionWhat the Ocean Gives HumanityWhat Humanity Returns to the Ocean
Food~3 billion people rely on seafood as their primary protein sourceSustainable fisheries, combatting illegal fishing, establishing marine protected areas
ClimateOceans absorb ~25% of CO₂ emissions and 90% of excess heatReducing carbon emissions, controlling ocean acidification
EnergyTidal, wave, thermal gradient, ocean current, salinity gradient — five "blue energies"Developing clean ocean energy technology without harming marine ecosystems
Transport~90% of global cargo travels by seaLow-sulfur fuels, reducing ship noise to protect whales
MedicineMarine organisms are a key source of new drug discovery (anti-cancer, antiviral, etc.)Protecting marine biodiversity, avoiding over-harvesting

Reflection: In your servo-cam model, every rise and fall of the "buoy" simulates a breath of the ocean. The tides and waves of Earth have existed for billions of years — long before humans appeared, long before fossil fuels formed. Learning to harvest energy from the ocean's breath is learning to live in harmony with the planet's most ancient force. The future blue energy era awaits your creation.