How to make an over-current fuse/switch to avoid damage to a brushless motor

Discussion in 'OnBoard Electronics & Controls' started by BertKu, Aug 15, 2015.

  1. BertKu
    Joined: May 2009
    Posts: 2,521
    Likes: 47, Points: 58, Legacy Rep: 223
    Location: South Africa Little Brak River

    BertKu Senior Member

    Good morning Porta,

    It would be beneficiary for you, if I explain step by step what I will be doing in the Microcontroller. Should you ever change the motor for another motor, you know then what changes to make. Either in the software or shunt resistor or either both.

    1) The Microprocessor starts up and the various registers get configured and other registers are being reset (bcf = clear file). Then I go through a 1 second phase/loop and start the Voltage doubler. This in turn switches the 110 Ampere MOSfet IRFP064N on. You ask the question probably why a 110 Ampere? Well I have bought a few hundred of them. I could have used a P type smaller MOSfet and skip the Voltage doubler to give a positive 12 Volt on top of the 24 Volt for the gate voltage of the MOSfet. But with a 200 watt MOSfet, I probably don’t bother about a heatsink. (2 Ampere x 2 Ampere x 0.008 Ohm = 32 milliWatt only and at 20 Ampere = 20 x 20 x 0.008 = 3.2 watt).

    2) We assume that the motor has a chance to start up and that the current is already reduced during the 1 Second Phase.

    3) I now start the ADC (Analogue to Digital converter and measure the current flow through the shunt resistors)

    4) But because of the problem by measuring very low voltage from zero, I have a 2 or 1 % resistor of 470 Ohm and another 4700 Ohm in serial to the plus 5 Volt of the Microprocessor. The middle point is connected via a 470 Ohm to the ADC. (Please note: the 470 Ohm (lower resistor)must be to the shunt resistor and the higher 2400 or 4700 Ohm to the plus 5 Volt. Accidental I swapped the two values in the drawing in thread No 27). The input current is only Micro-Amperes, thus it is not affecting the accuracy. However, we have lifted the measuring point by 1/10, (470/4700) thus the measured current level is 9.1% lower. i.e. at 1.7 Ampere and 40 Milli-Ohm shunt = 68 Milli-Volt and thus minus 9.1% = 61.81 MilliVolt at the input of the ADC. By a stalling motor the current is 3.7 Ampere i.e 134.53 Milli Volt.

    5) A 10 bit ADC is divided in 1024 steps by a 5 Volt reference Voltage = 5/1024 = 4,8828 Milli-Volt. Per step and 61.81 Milli-Volt = 12 steps (nearly 13)and 148 – 9.1% = 134.53 Milli-Volt = 27 steps (nearly 28).

    6) This expressed in binary 512-256-128-64-32-16-8-4-2-1 = 10 bit.

    7) 12 steps = “0000001100” and 27 steps = “0000011011”.

    8) Now we do left justification to a 8 bit Micro register and we losing at the left 2 zeros.

    9) 12 steps = “00001100” and 27 steps = “00011011” and 3 ampere = 120-10.9 = 109.1 Milli-Volt = 22 steps = “00010110”

    10) At that 1 Sec. point I say, if your motor is stalled or has weed on the propeller, the current is higher than 1.7 Ampere, probably higher than 3 Ampere. If it is running properly less than 1.7 Ampere.

    11) At this point I have to make a decision, what do I like to know, is the motor running or is the motor laboured or is the motor stalled.

    12) I deduct thus 3 Ampere from the reading i.e. I deduct “00010110” from the reading. If it is positive, the motor is stalling or heavy laboured. If it is negative, the motor is running fine or only a little laboured. If positive, I go to a dead-end loop, switch the MOSfet off and start the buzzer and it stay in that loop, until the system is switched off, the problem fixed and start the processor from the beginning again.

    13) If negative, I go to the next loop and start measuring again, but deduct 1.8 Ampere = 72 Milli-Volt – 9.1% = 65.45 mV = 13 steps = “0000010001” = in 8 bit after justification = “00010001” . If negative, the motor is running beautiful and I just carry-on looping until the reading becomes positive, i.e. it start being laboured and go to the next phase/loop and start warning. In the warning loop, I start deducting a higher current and if too high, I cut the system off in the end-loop.

    Trust that this will do the job for you.
    Bert

    p.s. The oven packed up and my brake-lining warning light has come on in my Colt. I first have to solve those problems and also my UV unit, before I carry-on with your and ElectroKayak modules. His module is different in view that if his motor stalls and draw a few hundred ampere, his motor will burn out, because 200 – 300 Ampere or even more x 24 Volt = 7 KiloWatt energy minimum what has to be taken care off. Which in your case is only 3.7 x 24 = 88 watts and it will take longer to do a damage.
    I assume you both don’t mind.
     
    Last edited: Sep 1, 2015
  2. BertKu
    Joined: May 2009
    Posts: 2,521
    Likes: 47, Points: 58, Legacy Rep: 223
    Location: South Africa Little Brak River

    BertKu Senior Member

    Hi Porta,

    I did some tests with a 12 Volt motor, which stalls at 3.66 Ampere and running 1.6 Ampere, but that is free running, no load. I fixed my problems, don't have to go through a divorce as the kitchen oven is fixed and also my Colt. At least I am able to tow the boat to the lake again, when the weather has cleared up.

    Please verify whether those currents you have mentioned are for 24 Volt or 12 Volt.

    I will make you 2 boards , one for the 24 Volt with a flashing LED when over current took place, will components, as the proposed buzzer is a disaster, bad quality and too soft, The one for 24 Volt, 1.7 Ampere will have a p type MOSfet and the one for a higher current will be with a 110 Ampere Mosfet without heatsink. Now the bad news, I have only 1 x PIC12F675 for the 2 boards. I suggest that you swap the IC or have another PIC12 programmed by somebody, in the town where you live. There must be a hobbyist you could ask.

    The second one will also have a flashing LED, as like I have mentioned, the quality of those buzzers I had lying around, are of a bad quality.

    As soon the PIC12 program is 100%, ( I am still testing), we can talk about the absolute final currents and how we are getting it too you.
    Bert.
     

    Attached Files:

  3. portacruise
    Joined: Jun 2009
    Posts: 1,476
    Likes: 178, Points: 63, Legacy Rep: 218
    Location: USA

    portacruise Senior Member

    Hi, Bert.

    "Please verify whether those currents you have mentioned are for 24 Volt or 12 Volt."

    PC: They are for 24 volt.

    "I have only 1 x PIC12F675 for the 2 boards."

    PC: I would be more likely to use with the 1.7 amp 24 v motor so the programming would be for that one.



    "12) I deduct thus 3 Ampere from the reading i.e. I deduct “00010110” from the reading. If it is positive, the motor is stalling or heavy laboured. If it is negative, the motor is running fine or only a little laboured. If positive, I go to a dead-end loop, switch the MOSfet off and start the buzzer and it stay in that loop, until the system is switched off, the problem fixed and start the processor from the beginning again.

    13) If negative, I go to the next loop and start measuring again, but deduct 1.8 Ampere = 72 Milli-Volt – 9.1% = 65.45 mV = 13 steps = “0000010001” = in 8 bit after justification = “00010001” . If negative, the motor is running beautiful and I just carry-on looping until the reading becomes positive, i.e. it start being laboured and go to the next phase/loop and start warning. In the warning loop, I start deducting a higher current and if too high, I cut the system off in the end-loop."

    PC: One thing that would be hard to program would be to account for the drop in voltage (and current) as the battery is used. The battery I am using starts at 24v (1.7 amps to motor propulsion) maximum with surface charge (6? Li- ion cells) and drops gradually down to 19v (1.1 amps to motor propulsion) under use, with the greatest percentage of power delivery between 21v and 19.8v. So will the subtracted values for stall (3 amps) and labored (1.8 amps) stay constant as the stall/labored values drop by estimated 30%? Even using an rpm monitor as EK proposed might not work unless it continuously adjusts to fiddling with his speed control , if I am thinking correctly...

    PC
     
  4. BertKu
    Joined: May 2009
    Posts: 2,521
    Likes: 47, Points: 58, Legacy Rep: 223
    Location: South Africa Little Brak River

    BertKu Senior Member

    I think, it should work. 0-1.8 Ampere = motor running fine.
    1.8 Ampere to 2,5 Ampere = motor being labored , current over the 2,5 Ampere, motor heavy labored or stalling.

    We may have play with the above currents levels, but I think it should be possible because the micro works on 5 Volt and it gets its voltage from the 15 to 30 Volt range. Thus if we can peg the 3 ranges, it should be fine.

    What do you think. Are the 3 ranges overlapping when the Voltage drops? , if so then............

    ...........Maybe as an alternative, we could measure the input voltage and if lower then 20 Volt : jump to second routine, which has different 3 levels of subtraction. I at this point I only see solutions to whatever problem we will encounter. But that is me. I like solutions for problems, maybe you have a different proposal? If it is necessary, we scrutinize 3 routines.
    Bert
     
  5. BertKu
    Joined: May 2009
    Posts: 2,521
    Likes: 47, Points: 58, Legacy Rep: 223
    Location: South Africa Little Brak River

    BertKu Senior Member

    O.K. you get in anyway one complete one for 24 Volt without voltage doubler and with. The one without has a lower current P type Mosfet. The 2 different programs are for you to keep en should you ever bump into a Microchip Fundy, He most likely will gladly help you. Otherwise get one and post it to me, I will return it to you programmed.

    I will do so.

    Bert
     
  6. BertKu
    Joined: May 2009
    Posts: 2,521
    Likes: 47, Points: 58, Legacy Rep: 223
    Location: South Africa Little Brak River

    BertKu Senior Member

    Porta, I checked, if we drop one LED from the 3 with the PIC12F675, we can do the measuring of 2 supply Voltages. i.e. one green LED for system = on. One red LED for stalling and one blue LED for laboring. If we drop the green LED output and make it the second ADC reading, you must tell me what the Voltage levels has to be.
    From 18 to 21 Volt and from 21 Volt to 24 + Volt with the estimated currents for as per example a) running clear, < 1.8 Ampere b) slightly laboring < 2.25 Ampere c) > 2.25 motor is stalling or badly laboring.

    This applies to the 24 Volt , 1.7 Ampere motor.

    For the 14 Ampere motor we may have to use a different modus operandi i.e. different uP or different MOSfet or P type MOSfet with a small heatsink. Lets first get the small motor going.
    Bert
     
  7. ElectricKayak
    Joined: Mar 2015
    Posts: 78
    Likes: 0, Points: 0, Legacy Rep: 10
    Location: Canada

    ElectricKayak Junior Member

    Hi Bert,

    I just returned from a very nice camping trip where I accomplished nothing at all...but I see you have been very busy...so our combined productivity remains at an acceptable level! :)

    Some embedded comments and then general thoughts below.

    I have some questions/comments.

    For me a good, versatile and very useful system would be able to:
    1) Protect the ESC from overload damage
    2) Protect the motor from overload damage
    3) Allow Operator to set any legal power and shutdown if anomaly occurs
    4) Work properly given typical battery characteristics (ie droop etc)

    The closer we can get to this ideal solution the better.

    Is #1 theoretically possible with your design? I'm not sure if it can react fast enough or if it is even possible when measuring on the battery side?

    For #2, if it is possible to protect the ESC then that would protect the motor also. If not, then I think you are proposing to check every 64us for anything over 70 amp and shutdown if detected. Correct? This is fine assuming startup is viable and speed changes don't trigger a shutdown. My question would be why 64 uS? Can it be done faster? In general shutting down faster is better so I would make it as fast as possible.

    #3 is an refinement but an important one. Shutting down only at maximum motor current will protect the motor but in practice once the operator sets the speed then any significant current increase means something bad has happened. The set point is a dynamic variable with each trip but the shutdown relationship to the set point is fairly constant (also if this works well I would use it on all three of my different kayaks...same motor...different loads). For example, perhaps one could maintain a moving average of the last N samples and shutdown if the present reading exceeded it by X amount (25%?).

    To illustrate, sometimes I may cruise at 4 amps and if it suddenly goes to 5 amps I know something bad is happening and should shut down. I don't want to wait for it to hit 70 amps before shutting down. I don't even want to wait for it to hit 25 amps before shutting down. But another trip I may run at 20 amps so I can't have it shut down at 5 amps or it would be useless. And neither do I want it to shutdown at 70 since if it hits 25 amps I already know something bad is happening and should shut down.

    Battery issues of #4 would be addressed by #3 if implemented as above. I suspect the long term usefulness of the system would be enhanced if one could avoid hard coded values for battery issues and make it "self learning" based on actual usage.
     
  8. BertKu
    Joined: May 2009
    Posts: 2,521
    Likes: 47, Points: 58, Legacy Rep: 223
    Location: South Africa Little Brak River

    BertKu Senior Member

     
    Last edited: Sep 7, 2015
  9. portacruise
    Joined: Jun 2009
    Posts: 1,476
    Likes: 178, Points: 63, Legacy Rep: 218
    Location: USA

    portacruise Senior Member

    A conventional fuse may not be fast enough for ESC motors. Scroll down to trip curves on this link:

    http://www.automationdirect.com/static/specs/efuset.pdf

    Reset time is probably the most important factor for the type of waters I travel. Avoiding a tree branch to the head while moving in river rapids, means getting power back up quickly. In practice monitoring the amps works well enough for such a low power system and I've never had an issue in over 20 years for emergency situations.... Others using my boats even on simple remote flatwater wouldn't know about that though.

    EK, what about going to a lower voltage battery to limit the destructive potential current? That is if it will allow your 200 watts and works with your motor/ESC/prop, etc.

    PC
     
  10. ElectricKayak
    Joined: Mar 2015
    Posts: 78
    Likes: 0, Points: 0, Legacy Rep: 10
    Location: Canada

    ElectricKayak Junior Member

    FWIW, those graphs seem fairly conservative to me. I base that on tests I did years ago on simple glass fast blo fuses. With 10x overload I was consistently seeing trip times under 1msec.

    Regardless these fuses won't protect an ESC. They are orders of magnitude too slow for that.

    How suitable they are for motors is debatable I suppose. In most cases they get the job done. Even for mine...based on the fact I've accidentally stalled mine in the shop and survived with nothing more than a blown fuse.

    For me, the value of a micro-controller active fuse is the potentially for a sophisticated fuse that does much more than a regular mechanical fuse. But even a simple design at least can be made to blow significantly faster limiting the total energy impulse into the motor. This reduces damage potential for the entire drivetrain. Especially important on these hobby motors with flimsy bearings, marginal shafts and high power potential. Not to mention propellers, propeller shafts, motor mounts etc. And the things they hit...

    PC: A lower operating voltage is a good idea. I'm currently running a 12v system partly to minimize potential damage. I have been considering going to a 24v system if using Bert's design (one of the many reasons I'm interested in what he is doing). The destructive power would be 4x worse but if Bert's design is 10x faster than my existing fuse then I'll still be twice better off than I am now. And I believe his design can easily be 100x faster so the potential improvements are significant.
     
  11. ElectricKayak
    Joined: Mar 2015
    Posts: 78
    Likes: 0, Points: 0, Legacy Rep: 10
    Location: Canada

    ElectricKayak Junior Member

    Thanks for the replies Bert, we keep it simple then.

    I will use it on all my three kayak systems. I never use the full power of the motor/controller as I have no operational need to ever exceed 25 amps. So I'd like to use the lowest set point above 25 amps you think is practical.

    Since you design has only one trip speed I think it needs to be set based on the worst case of a true stall which can be hundreds of amps. So ideally yes I would like it to be under 10 uSecs if practical.

    Also reset time around a second is not a problem for me. I see no downside of it being faster.
     
  12. BertKu
    Joined: May 2009
    Posts: 2,521
    Likes: 47, Points: 58, Legacy Rep: 223
    Location: South Africa Little Brak River

    BertKu Senior Member

    Hi EK, Pleased to see you grasping all the problems of your type of controller. It works on back EMF, very complex , very tricky, very clever, while I build mine on sensors. Very accurate, not easy to build sensors into the motor, very simple, easier to measure other parameters. smaller Microprocessor etc.

    I your case and mine case, your PWM pulses are very short and with the high 24 Volt, gives a high current of 60 to 70 Ampere, but the time is so short of the pulse, which lets you believe that the current is 4 Ampere. In real term it is an average. Now you hit a branch, the average current goes up, because your motor slows down in speed and the Xl , your inductance resistance changes, but not your normal Ohmic resistance, that stays the same, except if the temperature shoots up, it increases slightly. Your working Voltage divided by the MilliOhm resistance will give your your stalling current. 24 Volt? 8 milliOhmm ? = 3000 Ampere. Thank you very much. Not that your battery or wiring will cope with the high currents, but we just blow it out of proportion to make you aware of it. Now it comes. In my case I can measure the speed, pulse length and AVERAGE current and COULD, if I really want, calculate all the time whether I have a branch hitting the propeller or not. But I need a faster processor and a more complex processor, more components, more space and I don't feel like to do that. If I hit now something what is out of the ordinarily. Now I sense maximum current allowed + maybe 5 % more and hit within microseconds the alarm bell and stop the current flow. What I can do for you and for Porta, is to make space for a push button connection, whereby you can reset the new unit close to you and not at the battery or main switch or controller or motor. Your ESC and Motor can handle stalling currents for microseconds, but not easy for milliseconds. But you are right, the mechanical components will not cope with the stresses of a stall at high, long currents. I also don't thinks so.
    Porta is also right, go for 12 Volt. You are indeed better off. The unit needs for 24 Volt only a zenerdiode extra, thus I make space for it, but put a wire between the two connection, which you can remove and put a 10 or 12 Volt zener diode in it. This will keep the voltage on top of your 24 Volt to maximum 12 Volt for your positive gate voltage above the 24 Volt, because I have only 110 Ampere N type MOSfets.

    Now I really have to do some more work . Enjoy the summer there. Bert
     
  13. BertKu
    Joined: May 2009
    Posts: 2,521
    Likes: 47, Points: 58, Legacy Rep: 223
    Location: South Africa Little Brak River

    BertKu Senior Member

    I agree with you. Attached the pcb layout for your latest proposed layout. i.e. I start the processor, measure the battery voltage. greater than 22 Volt, I jump to loop stalling and heavy laboring sensing, then to loop over current sensing and then to normal sensing and back to battery voltage sensing and stalling sensing and carry on circling until a problem crops up. If the battery voltage drops to below 22 Volt, I go to another series of loops, and deduct different values from the lower current reading. If we communicate longer it looks like that it becomes a nice sophisticated little gadget for you. But you are clever, you work with simple brushed motors. Enjoy the heat. Bert
     

    Attached Files:

  14. BertKu
    Joined: May 2009
    Posts: 2,521
    Likes: 47, Points: 58, Legacy Rep: 223
    Location: South Africa Little Brak River

    BertKu Senior Member

    Hi EK,

    1) On your question whether the 10 mOhm resistors can handle the 20 Ampere. Yes. there are 3 parallel and each can handle 0.7 watt. i.e. 2.1 watt all together. If you feel 3 is not enough safety factor, we place 4 parallel i.e. 2.8 watt.
    Your current is 20 Ampere, dissipation 20 x 20 x 10 mOhm/3 = 1.33 watt All together, that should be fine, just using 3 parallel with another 3 in series.

    2) I am using the PIC12F675 with the internal oscillator and that reduces the speed to 2 - 4 uSec ADSC time. However I have 3 output pins. I could use a 8 Mhz crystal, and then the speed will be < 1 uSec for the ADC, but I don't have 3 output pins no longer. Only 1 and I need that to open/close the Mosfet. Also I need 2 pins for the Voltage doubler, except if I use/find a P MOSfet in my workroom. In that case I will have a fast ADC and speed and also 2 output pins, one for on/off MOSfet and one for flashing RED 10 mm high super bright LED, when stalling.
    Soon I will publish the flow diagram for both of you and then you can assist me to make something what is very useful for both of you. It is otherwise not fair, for to me to spent all the time and cost for something you say: rubbish, it does not work.

    3) I have now repaired the UV developer. I had to buy different chokes and bulbs/globes and it is now a matter of getting the exposure time correct. After the flow diagrams, we can then proceed with the final boards.

    Bert
     

  15. ElectricKayak
    Joined: Mar 2015
    Posts: 78
    Likes: 0, Points: 0, Legacy Rep: 10
    Location: Canada

    ElectricKayak Junior Member

    My question was whether they could handle the 70 amp trip point you were recommending! :)

    I'm not concerned with a 20 amp trip point. However given your design I would like to be able to operate up to at least 25 amps to cover all my kayak scenarios. Given that, I don't think 3 in parallel will have enough safety factor. 4 in parallel seems OK and could trip at 31 amps (ADC count = 4). One group would minimize power loss so I would use that unless you see a need to put two groups in series.


    What would be the total trip time? I think most likely 2-4uSec ADSC is OK. It doesn't appear to be worth the effort to try and go faster.
     
Loading...
Forum posts represent the experience, opinion, and view of individual users. Boat Design Net does not necessarily endorse nor share the view of each individual post.
When making potentially dangerous or financial decisions, always employ and consult appropriate professionals. Your circumstances or experience may be different.