Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

ESP8266-Controlled Wireless EV Charging System with RFID Authentication

View and Edit Project In Cirkit DesignerImage of ESP8266-Controlled Wireless EV Charging System with RFID Authentication

Circuit Documentation

Summary

The circuit in question appears to be a wireless charging system with a microcontroller-based control unit. The system includes a power supply, a bridge rectifier for AC to DC conversion, a voltage regulator, a charging module, and a battery. It also features a MOSFET for controlling the charging process, an OLED display for user interface, and an RFID reader for authentication or control purposes. The microcontroller used is an ESP8266 NodeMCU, which manages the charging logic, display output, and RFID communication.

Component List

Mosfet

Copper Coil

AC Supply

ESP8266 NodeMCU

Electrolytic Capacitor

Bridge Rectifier

LM317 Voltage Regulator

TP4056

3.7v Battery

Resistor

LED: Two Pin (red)

OLED Display 128x32

RFID-RC522

Wiring Details

Mosfet

Copper Coil (Wireless Charging Coil)

AC Supply

ESP8266 NodeMCU

Electrolytic Capacitor

Bridge Rectifier

LM317 Voltage Regulator

TP4056

3.7v Battery

Resistor

LED: Two Pin (red)

OLED Display 128x32

RFID-RC522

Documented Code

ESP8266 NodeMCU Code (sketch.ino)

#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>

// Define display dimensions
#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 32
#define OLED_RESET -1

Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);

const int mosfetPin = 5;  // GPIO5
const int ledPin = 16;    // GPIO16

void setup() {
  Serial.begin(115200);  // Start serial communication

  if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) {
    Serial.println(F("SSD1306 allocation failed"));
    for(;;);  // Infinite loop to halt if display allocation fails
  }
  display.display();
  delay(2000);

  pinMode(mosfetPin, OUTPUT);  // Set MOSFET control pin as output
  pinMode(ledPin, OUTPUT);     // Set LED pin as output

  digitalWrite(mosfetPin, LOW);  // Start with MOSFET off
  digitalWrite(ledPin, LOW);     // Start with LED off

  display.clearDisplay();
  display.setTextSize(1);
  display.setTextColor(SSD1306_WHITE);
  display.setCursor(0,0);
  display.print("EV Wireless Charging");
}

void loop() {
  float batteryVoltage = readBatteryVoltage();  // Function to read battery voltage

  display.clearDisplay();
  display.setCursor(0,10);
  display.print("Voltage: ");
  display.print(batteryVoltage);
  display.print(" V");

  // Charging control logic
  if (batteryVoltage < 3.7) {  // If battery voltage is low
    digitalWrite(mosfetPin, HIGH);  // Turn on MOSFET to start charging
    digitalWrite(ledPin, HIGH);     // Turn on LED to indicate charging
    display.setCursor(0,20);
    display.print("Charging...");
  } else {
    digitalWrite(mosfetPin, LOW);   // Turn off MOSFET to stop charging
    digitalWrite(ledPin, LOW);      // Turn off LED
    display.setCursor(0,20);
    display.print("Charged!    ");
  }

  delay(1000);  // Delay for a second before next reading
}

float readBatteryVoltage() {
  int analogValue = analogRead(A0);  // Use A0 for analog input on ESP8266
  float voltage = (analogValue / 1023.0) * 3.3;  // Convert to voltage (assuming 3.3V reference)
  return voltage;
}

RFID-RC522 Code (sketch.ino)

#include <SPI.h>
#include <MFRC522.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>

#define RST_PIN 5   // RST pin for RC522
#define SS_PIN 4    //