Menu
Microbots
0
  • Learn
  • Shop
    • Maker-Modules
    • Maker-Packs
    • Tools & Gears
    • Robots & Displays
    • All Products
  • Community
    • Education
    • Software
  • About
    • Our Story
    • Reach Out
    • FAQs
  • English
  • Your Cart is Empty
Microbots
  • Learn
  • Shop
    • Maker-Modules
    • Maker-Packs
    • Tools & Gears
    • Robots & Displays
    • All Products
  • Community
    • Education
    • Software
  • About
    • Our Story
    • Reach Out
    • FAQs
  • Language

  • 0 0

CoilPad - Creating a Magnetic Sensor

CoilPad is a flexible, ultra-thin PCB coil that can be adapted for various applications, including metal detection. By pairing CoilPad with a capacitor, you can create an LC oscillator that responds to the presence of metal objects. Additionally, two CoilPad can be used as a poor transformer, enough to wirelessly transmit data or even wirelessly power an LED! 

How It Works

When a capacitor is placed in parallel with CoilPad, it forms an LC circuit (inductor-capacitor circuit). When driven at its resonant frequency, this circuit oscillates. If a metal object comes near, it disturbs the field, altering the circuit’s frequency. This change can be detected, allowing CoilPad to function as a simple metal detector.

Setting Up the LC Oscillator for Metal Detection

To turn CoilPad into a metal detector, you need:

  • CoilPad (acts as the inductor)
  • A capacitor (to form the LC circuit)
  • A DriveCell to drive the coil
  • A microcontroller (such as CodeCell or an ESP32) to read the frequency changes

Circuit Setup:

  1. Connect a capacitor in parallel with CoilPad to create an LC resonant circuit.
  2. Use a microcontroller to generate a square wave at the circuit’s resonant frequency.
  3. Measure frequency shifts using a microcontroller’s input pin or frequency counter.
  4. Detect metal – When metal is placed near the coil, it alters the inductance, shifting the frequency.

Example Code

#define COIL_PIN 2
void setup() {
  pinMode(COIL_PIN, INPUT);
  Serial.begin(115200);
}
void loop() {
  int freq = pulseIn(COIL_PIN, HIGH);
  Serial.println(freq);
  delay(100);
}

This code reads the frequency and prints it to the serial monitor, allowing you to observe frequency changes when metal is nearby.

Using Two CoilPad for Wireless Transfer

CoilPad can also be used for wireless transfer by pairing two CoilPads tuned to the same resonant frequency.

How It Works:

  1. One CoilPad acts as a transmitter – driven at its resonant frequency.
  2. A second CoilPad + Capacitor – picks up the oscillating magnetic field.

Circuit Setup:

  • Transmitter: Connect a CoilPad to a DriveCell and a microcontroller to generate a PWM signal at the resonant frequency.
  • Receiver: Attach a second CoilPad with a capacitor in parallel and an LED in parallel. The value of the capacitor  will depend on the resonant frequency you use and can be calculated using this equation:

Where L is the inductance of the CoilPad which is 30.7uH 

Example DriveCell Transmitter Code:

#define COILPAD_PIN1 2
#define COILPAD_PIN2 3

void setup() {
  pinMode(COILPAD_PIN1, OUTPUT);
  pinMode(COILPAD_PIN2, OUTPUT);
}

void loop() {
  digitalWrite(COILPAD_PIN1, HIGH);
  digitalWrite(COILPAD_PIN2, LOW);
  delayMicroseconds(5); // 100kHz Resonant Frequency - Adjust delay for desired resonant frequency
  
  digitalWrite(COILPAD_PIN1, LOW);
  digitalWrite(COILPAD_PIN2, HIGH);
  delayMicroseconds(5);
}

When the receiver CoilPad is placed nearby, the LED should glow, demonstrating wireless transfer.

Beyond power transfer, you can also use CoilPad to transmit data by modulating the signal frequency on the transmitter side and detecting changes on the receiver side. How cool is that!

Conclusion

With these techniques, you can start using CoilPad to sense metal or even as a wireless antenna. 

Ready to start experimenting? Grab a CoilPad today and bring motion to your next project!

  • Share:


Also in CoilPad

CoilPad - Creating a Micro-Heater
CoilPad - Creating a Micro-Heater

Read More

CoilPad - Creating Vibration
CoilPad - Creating Vibration

Read More

Understanding CoilPad
Understanding CoilPad

Read More

Follow

Github

  • About
  • Software
  • Education
  • Contact
  • FAQs
  • Terms
  • Refund Policy
  • Privacy Policy

Join our Community ~ Be the first to know about new products and get exciting deals!

© 2025 Microbots.