# Circuit breaker using microcontroller project

1. Aug 5, 2017

### TheRedDevil18

So I am trying to make a circuit breaker using a microcontroller. I managed to get as far as this

So I have the CT with a peak detector running to the adc. I then calculate the rms by dividing by root 2, which I then compare with a reference in this case 10A and it trips via the mosfet/relay. So, I tested it and it works fine with overloading above 10A.

I was wondering how to deal with short circuits and inrush currents ?, should I have a delay before tripping to allow for inrush current ?

I also tested a short circuit and found that it tripped in 25 ms, how would I know if that is enough to damage the transformer ?, would I have to calculate how hot the winding's get ?

2. Aug 5, 2017

### jim hardy

Yes.

Look up a circuit breaker catalog. Breakers have 'time to trip' curves depending on the type load they are designed to protect.
Wires and motors don't need the fast protection that semiconductors do.

You need to grasp the concept of I2t , a measure of the let-through energy.

This is a not bad place to start: http://m.littelfuse.com/~/media/automotive/catalogs/littelfuse_fuseology.pdf

3. Aug 6, 2017

### NTL2009

I'd want to design this with as much fail-safe as I could. Consider making the relay normally open, so that the controller needs to actively keep it energized. And consider using pulses from the controller, so that if it got hung up, in either the high or low state, it would cut power.

4. Aug 7, 2017

### donpacino

To add to what jim said...
there are many types of breakers that work for different applications. There is no one breaker to rule them all.
Some will allow for inrush current, others will not.

That's pretty much it. If you can estimate the temperature coefficients around the winding you can get an idea of the heat rise based on the amount of energy discharged.

5. Aug 8, 2017

### ElectricRay

Since youre using a uController maybe youre able to detect 2nd harmonics, if you could detect this u know it is inrush current as inrush currents generate a lot of 2nd harmonics.

6. Aug 8, 2017

### cnh1995

Did you increase the current (in steps) from 0 to 10A and the CB tripped as soon as the current exceeded 10A?

The capacitor gets charged to the peak voltage detected by CT secondary and holds that voltage because it can't discharge through the diode.
Suppose you have 2A current and the capacitor charges up to the corresponding peak value. If the current now drops to 1A, the capacitor will still hold the voltage corresponding to 2A and will show only that value. This means, instead of showing the true value of current at a particular instant, the program will display the value of the maximum current flowed till that instant.

This won't be a problem if you don't want to display the value of the current and just want to trip the CB. If you want to auto-reclose the breaker (which is often (but not always) done in CBs) after it trips, this won't work.
Plus, no matter how much delay you add in your program, the breaker will trip if inrush current flows.

Last edited: Aug 8, 2017
7. Aug 8, 2017

### jim hardy

I tested a lot of circuit breakers. A nominal half cycle was fastest i could find.
Part of that is arc suppression, if there's significant current the arc doesn't extinguish until sinewave zero crossing.
Part is time for the mechanical parts to move. Their inertia does some averaging for you, mechanical analog computing if you will. One even had a flywheel to give inrush tolerance.

So your decision to trip is based on an instantaneous measurement
not on a true RMS calculation which involves an integration over time ?

http://www.analog.com/en/analog-dialogue/raqs/raq-issue-54.html
this ic may be no longer available but the datasheet is informative as a tutorial.

Nice catch @cnh1995 !

8. Sep 8, 2017

### TheRedDevil18

If I am to use true rms, then would I have to sample the whole waveform of one cycle ?, that would then increase the time that the circuit breaker can act

I actually did try increasing and decreasing the current and the current did decrease. I also wondering why, but im guessing maybe it discharged through the ADC resistance ?

9. Sep 8, 2017

### cnh1995

It is possible, but the time constant would be very high compared to the time period of the input voltage. So if you decreased the current from 5A to say 3A, the capacitor will first slowly discharge and after some time, it will have the voltage corresponding to 3A, provided that you didn't further decrease the current meanwhile.