Electronics Lab

Under/Over Voltage and Current Protection Switch

This simple project allows users to design an under-voltage, over-voltage, under-current, and over-current protection switch. It is a highly useful system for safeguarding electrical loads against abnormal power or current conditions.



This simple project allows users to design an under-voltage, over-voltage, under-current, and over-current protection switch. It is a highly useful system for safeguarding electrical loads against abnormal power or current conditions.

The project features a relay with optocoupler input, a current-sensing circuit based on the INA195 amplifier, a 10mΩ shunt resistor, and a voltage divider network for voltage feedback. It is primarily designed for low-voltage and low-current applications up to 4A, but the relay can handle loads up to 5 A at supply voltages up to 48 V.

The system can be easily controlled using an Arduino or other microcontroller. Voltage and current feedback signals are fed into the microcontroller’s ADC pins for measurement, while the relay can be switched using a 5 V control signal from the processor.

Over/Under Current Switch

The INA195 current-sense amplifier measures the voltage across the shunt resistor and provides an output voltage proportional to the load current. This output can be read by the microcontroller’s ADC to implement over-current or under-current protection logic.

The INA195 has a fixed gain of 100 V/V, providing an output of approximately 1 V per ampere of load current. For safety and relay handling limits, the recommended maximum current is below 5A. The system is designed for load voltages up to 48 V, ensuring that the ADC feedback voltage remains below 5 V.

Over/Under Voltage Switch

A resistor divider network, formed by R5 = 10 kΩ and R10 = 1 kΩ, is used to scale down the load voltage for ADC measurement. This feedback allows the controller to detect both over-voltage and under-voltage conditions. At 48 V input, the divider provides approximately 4.364 V, and at 5 V input, about 0.455V.

Note: These resistor values can be modified to suit different voltage ranges as required by the application.

Features

  • Supply 12V DC Relay and Current Sensor INA195
  • Relay Trigger Input 5V 20mA
  • Current Sensor Output 1V/A (5V at 5Amps)
  • Load Up to 5Amps, Load Supply Up to 48V DC
  • Load Power Supply Feedback 4.364 @ 48V, 0.455 @ 5V Supply
  • 4 x 4 mm PCB Mounting Holes
  • PCB Dimensions 35.56 x 35.40 mm

Arduino Control

Sample Arduino code is provided to test the project. The code implements an over-current latch protection function, which can be easily modified for different threshold levels.

// ===== Overcurrent Latching Switch =====
// Relay ON at power-up
// Turns OFF (latches) when analog voltage exceeds 2.8V
// Stays OFF until reset

const int relayPin = 4;            // Relay output pin
const int currentSensorPin = A0;   // Analog input pin
const float tripVoltage = 2.8;     // Trip voltage (Volts)

bool relayLatchedOff = false;      // Latch state flag

void setup() {
  pinMode(relayPin, OUTPUT);
  digitalWrite(relayPin, HIGH);    // Relay ON at power-up
  Serial.begin(9600);
  Serial.println("Overcurrent Latch Protection Active...");
}

void loop() {
  int adcValue = analogRead(currentSensorPin);
  float voltage = (adcValue * 5.0) / 1023.0; // Assuming 5V reference

  Serial.print("Voltage: ");
  Serial.print(voltage, 3);
  Serial.print(" V | Relay: ");
  Serial.println(digitalRead(relayPin) ? "ON" : "OFF");

  // --- Overcurrent check ---
  if (!relayLatchedOff && voltage >= tripVoltage) {
    relayLatchedOff = true;       // Set latch
    digitalWrite(relayPin, LOW);  // Turn OFF relay
    Serial.println("⚠️ Overcurrent detected — relay latched OFF!");
  }

  // Once latched, relay stays off until reset
  delay(100); // Small delay for stable reading
}

Operating Logic Example


Connections

  • CN1: Pin 1 = VCC/12V DC, Pin 2 = Optocoupler Anode +5V, Pin 3 = Optocoupler Cathode GND, Pin 4 = Bus Voltage Feedback, Pin 5 = Current Sensor Output, Pin 6 = GND
  • CN2: Pin 1 = +Load Connection, Pin 2 = GND
  • CN3: Pin 1 = +Load Supply Input, Pin 2 GND
  • D1: Relay LED

Schematic

Parts List

NO.QNTY.REF.DESC.MANUFACTURERSUPPLIERSUPPLIER PART NO
11CN16 PIN MALE HEADER PITCH 2.54MMWURTHDIGIKEY732-5319-ND
22CN2,CN32 PIN SCREW TERMINAL PITCH 5.08MMPHOENIXDIGIKEY277-1247-ND
31C1100nF/50V CERAMIC SMD SIZE 0805YAGEO/MURATADIGIKEY
41C210uF/25V CERAMIC SMD SIZE 0805YAGEO/MURATADIGIKEY
53C3,C6,R9DNP
62C4,C510nF/50V CERAMIC SMD SIZE 0805YAGEO/MURATADIGIKEY
71D1LED RED SMD SIZE 0805OSRAMDIGIKEY475-1278-1-ND
81D21N4007 SMDDIODE INCORPORATIONDIGIKEYS1MBDITR-ND
91Q1BC847AL SOT23NEXPERIADIGIKEY1727-2924-2-ND
101RL1Relay SUGER CUBE 12VTEDIGIKEYPB2029-ND
112R1,R32.2K 5% SMD SIZE 0805YAGEO/MURATADIGIKEY
121R2470E 5% SMD SIZE 0805YAGEO/MURATADIGIKEY
131R44.7K 5% SMD SIZE 0805YAGEO/MURATADIGIKEY
141R510K 5% SMD SIZE 0805YAGEO/MURATADIGIKEY
153R6,R7,R11100E 5% SMD SIZE 0805YAGEO/MURATADIGIKEY
161R80.01E/2W 1% SMD SIZE 2512BOURNS INCDIGIKEYCRF2512-FZ-R010ELFCT-ND
171R101K 5% SMD SIZE 0805YAGEO/MURATADIGIKEY
181U1PC817 DIP4 PINSHARPDIGIKEYPC817X2NSZ9F-ND
191U2INA195 SOT23-5TIDIGIKEY296-26067-1-ND

Connections

Gerber View

Photos

INA195 Datasheet

Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments

Related Content