Detecting motor overcurrent to stop motor

Hi

I am looking a way that I can detect the overcurrent of a 12v brushed DC motor to stop it if it jams.

The motor is controlled by 2 relays and the relays are driven by a Arduino Uno via a ULN2004.

Can I have additional circuitry to detect the overcurrent and send that to the Uno to switch of the outputs to the relays.

That is very doable. Roughly, either a current sensor, or a voltage drop arrangement. Use that signal to control a mosfet that controls the relay.

You first need a method to measure the motor current. A low value resistor in series with a motor power lead is a popular starting place.

You need to consider the mechanical arrangement, what the expected load is and how you control the motor.
Imagine you start the motor by applying full voltage via a relay.
The motor is initially stationary so you will see the stall current. You need to allow the back emf to build up as the motor turns.
Similarly you may need to account for the behaviour of the load on the motor.

You can monitor the current as described in some detail here

So your "detector" will need to make those corrections in software.

The bulk of what I have seen in motor protection is thermal based protection. This works because a motor can survive being overloaded for a period of time. A fuse will protect it from a major fault. This should help explain it:

1 Like

You might consider this:

1 Like

IF you are still going ahead with this project, then you need to include "time" in your calculations. An overcurrent detection must also include the amount of time that is taking place. An over current just a bit over your limit might cause a fault in 1/2 a second. But a 2X overcurrent should be limited to, perhaps, 1/10 of a second.

I had looked at the acs712. I need to control 4 motors and detect when any of them jam.

The current controller has set on fire and a new one is £1300 so I'm not getting one of them.

So you use 4 ACS712s.
Is there a problem?

Got some ACS712 20A boards for testing and can read the current in both directions of the motor. The motor running is 3-4 amps, when the motor jams it goes up to 15 amps. The turn on current of the motor is never higher than 7 amps.

I have 2 relays to power the motor so what would be the best way to shutdown the relays if the current reading is 10 amps.

If your Arduino is turning on the relays, then tell the Arduino to turn off the relays.

How often are you reading it? You may not be catching the peak.

So you may want to set this higher.

Taking 150 samples every 50ms

Then what do you do with these 150 samples.

In a loop that that executes in >450ms?

void setup() {
  Serial.begin(9600);  //Start Serial Monitor to display current read value on Serial monitor
}
void loop() {
  unsigned int x = 0;
  float AcsValue = 0.0, Samples = 0.0, AvgAcs = 0.0, AcsValueF = 0.0;
  for (int x = 0; x < 150; x++) {  //Get 150 samples
    AcsValue = analogRead(A0);     //Read current sensor values
    Samples = Samples + AcsValue;  //Add samples together
    delay(3);                      // let ADC settle before next sample 3ms
    }
    AvgAcs = Samples / 150.0;      //Taking Average of Samples
    //((AvgAcs * (5.0 / 1024.0)) is converitng the read voltage in 0-5 volts
    //2.5 is offset(I assumed that arduino is working on 5v so the viout at no current comes
    //out to be 2.5 which is out offset. If your arduino is working on different voltage than
    //you must change the offset according to the input voltage)
    //0.100v(100mV) is rise in output voltage when 1A current flows at input
    AcsValueF = (2.5 - (AvgAcs * (5.0 / 1024.0))) / 0.100;
    Serial.print(AcsValueF);  //Print the read current on Serial monitordelay(50);
  }

As pointed out, you are not measuring the current fast enough. You need to read out the current at 1kHz or greater rate, and you can't do that and print out the values at this ridiculously low serial Baud rate. Use 250000 or 500000 instead.

Serial.begin(9600); 

The startup current is very close to the stall current during the first few milliseconds.

#include "ACS712.h"

int led = 13;

//  ACS712 20A uses 100 mV per A

ACS712 ACS(A0, 5.0, 1023, 100);

void setup() {
  pinMode(led, OUTPUT);

  ACS.autoMidPoint();
  //  Serial.println(ACS.getMidPoint());
}


void loop() {
  int mA = ACS.mA_DC() / 1000;

  if (mA >= 12 || mA <= -12) {
    digitalWrite(led, HIGH);
  } else {
    digitalWrite(led, LOW);

    delay(100);
  }
}

I have got the board to turn on the led if the current goes higher than 12mA or less than -12mA.

Now to try and incorperate this into the code to control the relays

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.