MAKE_AT_HOME_WAVE_SMALL.jpg
logo_YT.png

Safe Current Appliance Guard

Safe Current Appliance Guard is useful to protect your electrical / electronics equipment / appliance / gadget from over current flow through them.  The circuit can display current flow value and guard both AC and DC appliances, when the current flow them exceeds more than trip value set by you.

SafeCurrentGuard_THUMBNAIL_WIX.jpg

ATTINY84 is used for the project, which is the heart of the circuit to read the current value and trip the relay in case the current flow is more than trip value, for more than one second, which is set by the user.  The ADC system of the ATTINY84, continuously reads the voltage (or signal) generated by ACS 712 (hall effect) current sensor.  Then the ADC value is multiplied with ACS_MF, and displays as READ CURRENT on the OLED.

Before reading AC or DC current flow, the RELAY is switched ON through a transistor.  Then, the ADC value is read 25 times continuously with one milli-second interval and records the peak ADC value (out of 25 samples), so that peak value of at least one full wave can be read for 50 Hz or 60Hz AC current.  If the peak values, thus read, is exceeding more than three times consecutively (approximately 1.3 seconds),  then the ATTINY84 switches off the relay (through transistor).

The full circuit diagram is available below:

SafeCurrentGuard-CIRCUIT.png

INITIAL SETUP:

Once the circuit is ready on general purpose (vero board is preferred) PCB, connect DC power supply (9V battery), then connect AVR programmer to ISP port of ATTINY84 and write/burn SafeCurrentGuard.HEX file to the micro controller.  The program displays the title of the project, then displays the READ CURRENT and TRIP CURRENT values on the OLED. 

 

To set TRIP value, press SW_UP or SW_DN button.  Then the OLED displays the existing Trip value.  Now, you may press SW_UP or SW_DN button to increase or decrease the Trip value respectively.  If, no input is found from the SW_UP or SW_DN buttons for more than 5 seconds, then the displayed value (new value) is saved to EEPROM and the Trip value is available after switch off the circuit also.

To calibrate the READ CURRENT value, connect an DC Ammeter or multi-meter, in current mode (10A or more), in series as shown here. Now, Restart the circuit and observe the difference in READ CURRENT value and multi-meter value in amperes.  If, the value is different, then note down the percentage of error.  Now, press SW_RST to restart the circuit.  While displaying the Title of the project on OLED, press and hold SW_UP or SW_DN button until the current multiplication factor is displayed on the OLED screen.  Now, adjust the displayed value to suit the error percentage noted earlier.  Increase the multiplication value, if the READ CURRENT is low and vice-versa.  The value will be saved to EEPROM, once no button is pressed for more than 5 seconds.  Now, compare the READ CURRENT w.r.t. to multi-meter value and adjust the multiplication factor, till the READ CURRENT matches to the multi-meter value.  Once calibrated, remove the multi-meter and reset the circuit as shown above.

SafeCurrentGuard-CALIBRATE.png

Now, your circuit is ready to use.  If, you have no need to change the values, i.e., once calibrated and trip current value is set, then the OLED, SW_UP and SW_DN buttons may be permanently disconnected (or removed).

WORKING:

Once calibrated and set the trip current value, then connect the actual load, in series as shown in the circuit.  Then, power-on the circuit, using any conventional 12VDC power supply (using transformer) or 12VDC SMPS.  The Title is displayed on OLED, then Relay is set to ON mode and continuously displays the current flow through the load, which is indicated by slow blinking of LED2 .  If, at any time, the current flowing through the load exceeds the set trip value for more than one second, then the relay is set to OFF mode, the trp message is displayed and the LED2 blinks quickly.

You may press SW_RST to restart / reset the circuit.  The LED1 indicates the presence of DC power supply.  The LED3 is complementary (opposite state) to relay status.  You may use this output to generate alarm using piezo-buzzer etc.

Use shorting jumper in J1 mode, if the relay is operating on 5V and the input DC power supply may be 8VDC to 12VDC.  Set in J2 mode, if the relay selected is operating on 12V and input DC power supply should be 12VDC. 

 

The current sensor ACS-712 is normally available in 5A or 20A or 30A capacities.  Select the capacity/module as per the load requirement.  The thick line shown in the circuit should carry the flowing current through the load.  

SafeCurrentGuard-POWER SUPPLY.png

The multiplication factor depends on the capacity of ACS-712, which can be adjusted using the SW_UP and SW_DN as explained in calibration method.​  The theoretical value of multiplication factor for 5A module is 264, for 20A module is 488 and for 30A module is 740.

click the link / attachment to download the file and rename as SafeCurrentGuard.HEX , then upload to ATTINY84 using any suitable AVR programmer.

For source code (in C-language), (SafeCurrentGuard.C) please send message through contact formThe code will be sent to your e-mail.

SMT_CONTACT_LOGO.jpg