Devices & Components
Arduino Uno Rev3
Resistor 1k ohm
Power Relay, SPDT
SparkFun Low Current Sensor Breakout - ACS712
Jumper wires (generic)
Solderless Breadboard Half Size
General Purpose Transistor NPN
Hardware & Tools
Soldering iron (generic)
Mastech MS8217 Autorange Digital Multimeter
Solder Wire, Lead Free
Project description
Code
Arduino Circuit Breaker
arduino
Copy the code given below
1//Programme : Arduino Circuit Breaker 2//Wisit for more projects : http://www.setnfix.com 3//E-mails : bmiakbasnayaka@gmail.com 4 5 6 7int Crnt = A0; 8float voltage; 9int anval; 10int relay = 12; 11float amps; 12 13void setup() { 14 // put your setup code here, to run once: 15 Serial.begin(9600); 16 pinMode(Crnt,INPUT); 17pinMode(relay,OUTPUT); 18digitalWrite(relay,HIGH); 19} 20 21void loop() { 22 // put your main code here, to run repeatedly: 23anval = analogRead(Crnt); 24voltage = (anval/1024.0)*5000; 25 26 27 amps=((voltage-2490)/66); 28 Serial.print("amps : "); 29 Serial.println(amps); 30 delay(150); 31if (amps < 0){amps =amps*-1;} 32 33 if (amps >.8){// When hold the motor, it takes a current more than 800mA. 34 digitalWrite(relay,LOW);delay(1000);} 35 36}
Arduino Circuit Breaker
arduino
Copy the code given below
1//Programme : Arduino Circuit Breaker 2//Wisit for more projects : http://www.setnfix.com 3//E-mails : bmiakbasnayaka@gmail.com 4 5 6 7int Crnt = A0; 8float voltage; 9int anval; 10int relay = 12; 11float amps; 12 13void setup() { 14 // put your setup code here, to run once: 15 Serial.begin(9600); 16 pinMode(Crnt,INPUT); 17pinMode(relay,OUTPUT); 18digitalWrite(relay,HIGH); 19} 20 21void loop() { 22 // put your main code here, to run repeatedly: 23anval = analogRead(Crnt); 24voltage = (anval/1024.0)*5000; 25 26 27 amps=((voltage-2490)/66); 28 Serial.print("amps : "); 29 Serial.println(amps); 30 delay(150); 31if (amps < 0){amps =amps*-1;} 32 33 if (amps >.8){// When hold the motor, it takes a current more than 800mA. 34 digitalWrite(relay,LOW);delay(1000);} 35 36}
Downloadable files
Circuit Breaker Diagram
Circuit Breaker Diagram

Comments
Only logged in users can leave comments