A wireless electricity transmission project at the hobbyist level isn't magic; it is simply a loosely coupled transformer operating at high frequency. By leveraging resonant inductive coupling, you can transfer usable wattage across an air gap without physical contacts. However, moving from a theoretical physics demonstration to a stable, embedded power link requires precise component selection, high-frequency PCB layout awareness, and rigorous I2C sensor debugging.

This guide walks through building a 5W receiver monitor for a resonant wireless power link. We will use an ESP32-DevKitC V4 to read an INA219 current sensor, calculate real-time transfer efficiency, and handle the inevitable I2C bus lockups that occur near high-frequency magnetic fields.

Difficulty: Intermediate | Time: 3-4 Hours | Cost: ~$25 USD

The Physics: Why Your Coils Need Resonance

If you simply place two inductors near each other and drive one with AC, the mutual inductance ($M$) drops off cubically with distance. You will lose 99% of your energy to heat. To fix this, we use resonant inductive coupling. By adding a tuning capacitor in series or parallel with each coil, we create an LC tank circuit.

When both the transmitter (TX) and receiver (RX) tanks are tuned to the exact same frequency (typically between 100 kHz and 200 kHz for hobby projects), the magnetic fields constructively interfere. The Texas Instruments wireless power guidelines note that operating at resonance dramatically increases the system's Q-factor (quality factor), allowing efficient power transfer even when the coupling coefficient ($k$) is as low as 0.2.

Pro-Tip on Capacitors: Never use standard multilayer ceramic capacitors (MLCCs) or electrolytics for your resonant tanks. MLCCs suffer from severe capacitance derating under voltage and piezoelectric microphonics at high frequencies. Always use MKP (Metallized Polypropylene) film capacitors, which handle high $dV/dt$ and RF currents without exploding.

Hardware Spec Sheet & Parts List

Below is the exact bill of materials for the receiver monitoring side of the build. The transmitter is assumed to be a standard 12V, 150 kHz H-bridge driver (like an XKT-23 module) driving an identical coil.

Component Exact Variant / Part Number Purpose & Notes
Microcontroller ESP32-DevKitC V4 (WROOM-32) Dual-core brain; handles I2C and Serial logging.
Current Sensor Adafruit INA219 Breakout (0x40) High-side I2C shunt monitor for RX DC power.
RX Coil 28 AWG Magnet Wire, 20 turns ~4cm diameter. Use Litz wire if available to beat skin effect.
Tuning Capacitor 100nF MKP Polypropylene Must be rated for at least 630V DC / high AC ripple.
Rectifier Diodes MBRS340T3G (Schottky) Low forward voltage drop (0.4V) at 3A; crucial for efficiency.

Pin Mapping & Wiring Steps

Proper grounding is critical in a wireless electricity transmission project. The collapsing magnetic field from the TX coil can induce massive voltage spikes in the RX ground plane if layout is poor.

ESP32-DevKitC V4 Pin INA219 Breakout Pin Wire Gauge / Note
3V3VCC22 AWG (Keep short)
GNDGND22 AWG (Star ground to RX rectifier)
GPIO 21 (SDA)SDA24 AWG (Max 10cm length)
GPIO 22 (SCL)SCL24 AWG (Max 10cm length)
  1. Wind the RX Coil: Wind 20 turns of 28 AWG magnet wire around a 4cm cylindrical form. Scrape the enamel off the ends with a fiberglass pen.
  2. Build the Bridge: Solder four MBRS340T3G diodes into a full-wave bridge rectifier. Connect the RX coil and the 100nF MKP capacitor in parallel across the AC input terminals of the bridge.
  3. Connect the Sensor: Wire the DC output of the bridge to the VIN+ and VIN- screw terminals on the INA219 breakout. Connect the VOUT side to your dummy load (e.g., a 10Ω 5W power resistor).
  4. Wire the I2C Bus: Connect the ESP32 to the INA219 using the pin mapping table above. Safety Note: Ensure the ESP32 is physically shielded or placed at least 5cm away from the direct center axis of the coils to prevent RF interference with the onboard flash memory.

Complete ESP32 Receiver Monitor Code

This code targets the ESP32-DevKitC V4. It initializes the Espressif I2C peripheral, polls the INA219, and includes robust error handling for bus lockups—a common issue in high-EMI environments.

#include <Wire.h>
#include <Adafruit_INA219.h>

// Pin Definitions for ESP32-DevKitC V4
#define I2C_SDA 21
#define I2C_SCL 22

Adafruit_INA219 ina219;
bool sensorFound = false;
unsigned long lastReadTime = 0;

void setup() {
  Serial.begin(115200);
  while (!Serial) { delay(10); }

  // Initialize I2C with explicit pins and 100kHz clock
  Wire.begin(I2C_SDA, I2C_SCL, 100000);

  Serial.println("Initializing INA219 Receiver Monitor...");

  if (!ina219.begin(&Wire)) {
    // Exact error string for debugging
    Serial.println("Couldn't find a valid INA219 sensor, check wiring and I2C address");
    while (1) {
      delay(1000); // Halt execution on hardware failure
    }
  }

  sensorFound = true;
  // Set calibration for 32V, 1A range (better resolution for 5W loads)
  ina219.setCalibration_16V_400mA(); 
  Serial.println("INA219 initialized. Monitoring RX power...");
}

void loop() {
  if (!sensorFound) return;

  unsigned long currentMillis = millis();
  if (currentMillis - lastReadTime >= 500) {
    lastReadTime = currentMillis;

    float shuntvoltage = ina219.getShuntVoltage_mV();
    float busvoltage = ina219.getBusVoltage_V();
    float current_mA = ina219.getCurrent_mA();
    
    // Check for I2C timeout or brownout (all zeros returned)
    if (busvoltage == 0.0 && current_mA == 0.0 && shuntvoltage == 0.0) {
       Serial.println("WARN: I2C read returned zeros. Possible EMI lockup or brownout.");
       // Attempt to reset the I2C bus
       Wire.end();
       delay(50);
       Wire.begin(I2C_SDA, I2C_SCL, 100000);
       ina219.begin(&Wire);
       return;
    }

    float loadvoltage = busvoltage + (shuntvoltage / 1000);
    float power_mW = loadvoltage * current_mA;

    Serial.printf("Load: %.2f V | I: %.1f mA | P: %.1f mW\n", 
                  loadvoltage, current_mA, power_mW);
  }
}

Debugging: First Three Things to Check When It Fails

When your serial monitor outputs the exact string "Couldn't find a valid INA219 sensor, check wiring and I2C address", or when your power readings drop to zero unexpectedly, follow this ranked troubleshooting path:

  1. I2C Bus Capacitance and EMI Lockup (Most Likely): The INA219 breakout has 10kΩ pull-up resistors, which are too weak for long wires in high-EMI environments. The fast $dI/dt$ from the TX coil induces noise on the SDA line, causing the ESP32's I2C state machine to hang. Fix: Keep I2C wires under 10cm, twist the SDA/SCL pair, and add 4.7kΩ external pull-ups to 3.3V if needed.
  2. Coil Resonance Detuning (Efficiency < 5%): If the sensor is found but you are only getting 50mW across the gap, your LC tank is off-resonance. If you mistakenly used an MLCC ceramic capacitor, its capacitance has likely dropped by 40% due to DC bias and temperature drift. Fix: Swap to a 100nF MKP film capacitor and verify resonance with an oscilloscope probe across the RX coil.
  3. Back-EMF Ground Injection: If the ESP32 randomly resets or brownouts when the TX coil powers on, the magnetic field is inducing a voltage spike in the RX ground plane, lifting the ESP32's GND pin above its logic threshold. Fix: Use a star-ground topology. Connect the INA219 GND, ESP32 GND, and the rectifier GND at a single physical point, away from the coil's center axis.

Extending and Simplifying the Build

Depending on your end goal, you can adjust the complexity of this wireless electricity transmission project:

  • How to Simplify: If you don't want to wind coils or deal with high-frequency RF safety hazards, swap the custom coils and Schottky bridge for an off-the-shelf 5W Qi receiver module (such as the Seeed Studio Grove - Wireless Power Receiver). This gives you a clean 5V DC output to feed directly into a USB load, bypassing the need for resonant tuning.
  • How to Extend: Turn this into a closed-loop system. Add a second ESP32-C3 to the transmitter side. Use it to drive the TX H-bridge via the LEDC PWM peripheral. Program the TX ESP32 to sweep the PWM frequency from 100 kHz to 300 kHz in 1 kHz increments while reading the RX power data via ESP-NOW. Implement a PID control loop to automatically lock onto the exact resonant peak, compensating for coil misalignment in real-time.

FAQ: Wireless Electricity Transmission Project Questions

How far can a DIY wireless electricity transmission project transfer power?

For a standard hobbyist build using 4cm to 6cm diameter coils operating at 150 kHz, the practical transfer distance is roughly 1 to 2 coil diameters (about 4cm to 12cm). Beyond this distance, the coupling coefficient ($k$) drops below 0.1, and efficiency plummets to single digits unless you implement highly complex, multi-coil repeater arrays.

Is a wireless electricity transmission project dangerous to touch?

While the voltages on the receiver side are generally low (5V to 12V DC), the transmitter coil and its tuning capacitor carry high-frequency, high-voltage AC (often 50V to 150V peak-to-peak at 150 kHz). Touching the active TX coil or capacitor terminals can result in severe RF burns, which are deeper and slower to heal than standard 60Hz AC shocks. Always de-energize and discharge the MKP capacitor with a 10kΩ resistor before adjusting the coils.

Why does my wireless electricity transmission project overheat the transmitter coil?

This is almost always caused by the skin effect and proximity effect. At 150 kHz, alternating current only flows through the outer ~0.17mm of a standard solid copper wire. If you are pushing 2A through 24 AWG solid magnet wire, the effective resistance skyrockets, generating massive heat. To fix this, rewind your coils using Litz wire (a bundle of individually insulated ultra-thin strands), which forces the current to distribute evenly across the entire cross-section of the conductor.