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

    Thanks Groper, how is the over current measuring method done by your equipment? I am never too old to learn. Thanks for your input. Bert
     
  2. groper
    Joined: Jun 2011
    Posts: 2,483
    Likes: 144, Points: 73, Legacy Rep: 693
    Location: australia

    groper Senior Member

    I do not engineer the VSDs for the manufacturer - im just an electrician who has to fix them in the field when they break down... in order to have a pretty good idea of exactly what is happening in the onboard electronics, one would need to be pretty darn good at reverse engineering the design as the manufacturer will not even show a schematic of the PCB`s in their equipment.

    however, from looking at it, i would say that that the large inductor/choke coil/reactor is there to physically limit the current. This is not a PCB mounted inductor - its huge and is remotely mounted to the chassis, i would say it is probably larger than the motor... The measurement of the current is not so important if it is physically limited by a magnetic field no? And remembering the relationship with magnetic field, current and frequency, you will get a greater damping effect at slow motor speeds compared with high speeds - im sure you will agree that the slow motor speed is more of a problem as the current peaks would be much greater with little back EMF from the motor itself. So with this in place, the onboard electronics can use a much more simple method of measuring the current via a basic ammeter with appropriate current per time curve limit before it trips. It seems to work quite well, as i see very few (cant think of any) brushless DC compressor burnouts - its always the controller which fails, usually due to environmental conditions, such as wildlife, corrosion etc

    I also play with small model electric motors for people traction purposes so i would like to add another comment about this whole idea. The small ESC`s that are used with these motors have an inbuilt overcurrent protection mechanism and it works. However it is often the case that the motors burnout - ive killed plenty myself - so why? Well it is not an overcurrent problem, it is an overheating problem. These small motors have a very small mass and they have an enormous power output for their size. The windings are very small diameter, thin filaments, tightly packed around the stator. They cannot handle the heat when used as traction motor for heavy people and continuous load duty, i would burn brand new motors out within 20mins everytime. I found a solution to this by re winding the motors. Using a much heavier guage wire - which cannot be wound via a robot in a factory, it must be hand wound, you can increase the weight of copper on each stator, and the large diameter of wire allows for air circulation between the windings. You can also change the speed of the motor by adjusting the number of turns if your gearing/propeller is not ideal. I have never had a motor burnout since just running off the cheap little ESC`s...
     
  3. BertKu
    Joined: May 2009
    Posts: 2,521
    Likes: 47, Points: 58, Legacy Rep: 223
    Location: South Africa Little Brak River

    BertKu Senior Member

    Thank you groper for your input. The problem is never one only problem. The ESC manufacturer protect their ESC for over current and I agree with EK, normally most of us are using a smaller motor with a larger ESC. Thus if you have the time and read all of the posts, you will understand that we try to make our own protection interdependently of the over current protection from the ESC. The manufacturer protect their own interest, by not getting hundreds of ESC's back, because of warranty claims. They could not give a hood, if the motor burns out, when a motor stalls and draws incredible high currents. Your point of using a coil is not a solution, because the DC resistance of a coil is also low. No don't worry, we will get at the end for a solution which works at the currents we like to switch the motor off. Thanks Groper.
     
  4. groper
    Joined: Jun 2011
    Posts: 2,483
    Likes: 144, Points: 73, Legacy Rep: 693
    Location: australia

    groper Senior Member

    The coil does not see DC , it would nt have a purpose if that were the case, the commutated signal to the motor is effectively an AC signal of varying frequency depending of the motor rpm

    They are otherwise known as line reactors and have a number of applications but the main function is essentially a current limiting device and are frequently used in commercial applications where a variable frequency drive is controlling a motor including PWM drives. Like I said, I see them in most inverter air conditioners running brushless dc compressor motors...
     
  5. BertKu
    Joined: May 2009
    Posts: 2,521
    Likes: 47, Points: 58, Legacy Rep: 223
    Location: South Africa Little Brak River

    BertKu Senior Member

    Thanks Groper. Indeed they are acting as a current limiter. provided there is a frequency feeding them. As soon a brushless motor stops, the internal resistance of those motors we are talking about in our thread, is so low that a normal fuse will be too slow to avoid any damage to the motor. A coil will not help, as there will be no frequency, (the motor stopped) thus only the DC resistance will be applicable and that will not help to reduce the high current. I suspect that they work with rectified AC and therefore, there will be always an inductance in a coil, but not for our 12/24 Volt DC application. The coil will not produce any inductance, but only very low DC resistance. Bert
     
  6. groper
    Joined: Jun 2011
    Posts: 2,483
    Likes: 144, Points: 73, Legacy Rep: 693
    Location: australia

    groper Senior Member

    For you bert- http://www.mtecorp.com/dc-link-chokes/

    The inductors I am referring to in my air conditioner inverter drives seem to be a dc link choke as In the link above. Same thing, limits rates of change / spikes in current and voltage. Line reactors are also used on the load side of VFD for low inductance motors. Whilst the motor may be stopped, the vfd / esc should still be commutating a rotating magnetic field to the motor to get it moving again. The pulses of dc still have to build the magnetic field in an inductor and receive the back emf when the field collapses again between pulses from the esc / vfd...
     
  7. BertKu
    Joined: May 2009
    Posts: 2,521
    Likes: 47, Points: 58, Legacy Rep: 223
    Location: South Africa Little Brak River

    BertKu Senior Member

    Hi Groper, yes very nice choke's. They are used to suppress spikes and interference's to the battery and mains. Very useful when one needs to protect the power source like batteries and power supplies. Bert
     
  8. groper
    Joined: Jun 2011
    Posts: 2,483
    Likes: 144, Points: 73, Legacy Rep: 693
    Location: australia

    groper Senior Member

    Sorry getting a bit side tracked from your thread here, but its always nice to learn something :D

    I found a block schematic of the inverter variable speed drive in 1 series of air conditioners that use BLDC motor compressors. The "reactor" as they describe it, is the L1R located after the diode bridge DB1 on the positive DC line. Are you suggesting that its only function is to improve power quality and offers nothing in the way of physical current limiting to the subsequent transistor module and motor? I was under the impression that it did have some purpose, other than voltage spike /transient filtering, in the way of physical current limiting because of the way they choose to call it a reactor rather than a choke...? Either way - you mentioned you were having trouble with spikes in your design so thats why i suggested incorporating a reactor/inductor into the design which may help you reduce the spikes and prevent the nuisance tripping. You can find these reactors in any newish air con thats been dumped at the refuse tip / recylers - i have a dozen or so sitting in my graveyard right now...

    Also -as to your previous question - you can see that they measure current using the CT on the AC line prior to the diode bridge...


    [​IMG]
     
  9. BertKu
    Joined: May 2009
    Posts: 2,521
    Likes: 47, Points: 58, Legacy Rep: 223
    Location: South Africa Little Brak River

    BertKu Senior Member

    Thank you groper interesting circuit. I have solved my problem in a different way with a 100 uF Tantalum Capacitor, a normal electrolytic capacitor was not as effective on the input of the AD converter measuring the current.

    Indeed you may be right that it maybe has to do with limiting the current. They may use a type core with a large gap, to limit the magnetic flux and thereby reducing the maximum current. But that is to the input of the transistor module. You may have noticed that the input is a only a plus and a minus, while the three leads to the actual motor is 3 phase. There is no further circuit which measure the over current from the CT (current transformer) Like I also have previous mentioned that I also was considering a small choke, but our application is slightly different. In our case a tantalum solved our problem. In your application, if your motor stalls the current may be limited by your L1R, but the unit stays on while we want to switch our unit off. Unfortunately your circuit does not show values and also the microprocessor is nowhere to be seen. It is therefore difficult for me to comment with certainty that it is really only for current or for spike filtering purpose. I think the L5 is also for filtering purposes. But interesting circuit. Thanks. Bert
     
  10. 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 and EK, I have been battling for quite some days en weeks now,the good news is that I have been able to solve the sensitivity to the ADC the input. With a 100 uF tantalum capacitor from the 100 Ohm to ground. Electrolytic capacitors did not work that well, but I am happy with the tantalum. Time delay is not a problem for the speed. i.e. 100 Ohm x 0.7 x 100 uF = 7 milliseconds. The bad news is that I cannot find my box with all kind of values of tantalum capacitors, I used those for the last time some 40 years ago. Will make a plan to get other values and test the circuit out, should the 100 uF be too much. So far I am very happy with stalling and high currents. I am not happy with the differentiation between average currents and peak currents and the 10 bit to 8 bit transfer. Will make a plan. Also the bad news is, that because of the stalling, the motor got so badly damaged, I need to open it up and see how I can repair it.

    Why is it that normally, if one plans to do something, that it always take longer than anticipated. We will get it right, even if it becomes a Christmas present. (grin) Bert
     
  11. BertKu
    Joined: May 2009
    Posts: 2,521
    Likes: 47, Points: 58, Legacy Rep: 223
    Location: South Africa Little Brak River

    BertKu Senior Member

    Somebody asked me to post the final working software for the brushless motor controller which one can make himself. Here it is.
    include "P18F2431.INC"
    list P=18F2431

    ; file name 80Amp-Pic18.asm
    ; Date 28/2/2015 modified on 31/8, 2/9 and 12/11 for small calculation errors
    ; Author Bert Kuijpers and Microchip,converted to PIC18 by Bert Kuijpers. Added;
    ; overcurrent and overheating protocol to stop the motor. modified on 29/8/2015 for
    ; left justified and deductions for 80 mV in a 8 bit form after justifications.
    ; company none, private

    ; This programmed chip cuts off at 80 Ampere and 8o degrees Celcius
    ; shunt resistor must be 1 milliOhm i.e. 80 milliVolt and 4K7 thermistor

    ; This controller uses the 3 bit sensor B port inputs 1,2,3 pin 22,23,24
    ; This controller uses 0 bit B port for direction.pin 21
    ; The Analogue to Digital converter is 1st bit port A,AN0. pin 2
    ; The overcurrent sensing and shutdown 2nd bit port A,AN1. pin 3
    ; The temperature sensing and shutdown 3rd bit port A,AN2. pin 4
    ; The driver to the motor coil drivers are from port C. pin 11,12,13,14,15,16

    CBLOCK 0x20

    ADC ; PWM threshold is ADC result
    LastSensor ; last read motor sensor data
    DriveWord ; six bit motor drive data

    ENDC

    #define OffMask B'11101010'
    #define DrivePort PORTC
    #define DrivePortTris TRISC
    #define SensorMask B'00001110'
    #define SensorPort PORTB
    #define DirectionBit PORTB,0
    #define LED1 PORTA,4
    #define LED2 PORTB,5
    #define LED3 PORTB,4
    #define BUZZER PORTA,3

    TEMP1 equ 40h
    TEMP2A equ 41h
    TEMP2B equ 42h
    TEMP3 equ 43h
    TEMP4 equ 44h
    cnt equ 45h
    cnt1 equ 46h
    ; ------------------------------------------------------------------------------
    org 0x000 ; startup vector
    nop ; required for ADC operation
    clrf PCLATH ; ensure page bits are cleared
    goto Initialize ; go to beginning of program
    org 0x008 ; interrupt vector location
    retfie ; return from interrupt
    org 0x018 ; interrupt vector location
    retfie
    Initialize
    clrf DrivePort ; all drivers off
    banksel TRISA
    clrf DrivePortTris ; set motor drivers as outputs
    movlw B'00000111' ; A/D on RA0, RA1, RA2
    movwf TRISA
    movlw b'00001111' ; motorsensors on RB,<2:0>
    movwf TRISB
    bcf LED2 ; ensure overheating is reset
    bcf LED3 ; ensure overcurrent is reset
    bcf BUZZER ; ensure buzzer is switched off
    movlw B'11000000'
    movwf T0CON ; timer0 = on ; timer0 = 8bit 1;2
    clrf TEMP1
    clrf TEMP2
    clrf TEMP3
    clrf TEMP4
    clrf LastSensor ; initialize last sensor reading
    call Commutate ; determine present motor position
    clrf ADC ; start speed control threshold at zero until first ADC
    bsf LED1 ; display program running
    call SetAN0
    Loop
    call ReadADC ; get the speed control from the ADC
    incfsz ADC,w ; if ADC is 0xFF we're at full speed - skip timer add
    goto PWM
    movf DriveWord,w ; force on condition
    goto Drive ; continue
    PWM
    movf ADC,w ; restore ADC reading
    addwf TMR0L,w ; add it o current timer0 (Lower 8 bits)
    movf DriveWord,w ; restore commutation drive data
    btfss STATUS,C ; test if ADC + Timer0 resulted in carry
    andlw OffMask ; no carry - suppress high drivers
    Drive
    movwf DrivePort ; enable motor drivers
    call Commutate ; test for commutation change
    goto Loop
    ReadADC
    movlw B'00010000'
    movwf ADCON1
    ReadNext
    btfsc ADCON0,DONE
    bra ReadNext
    movf ADRESH,w ; get ADC result
    movwf ADC, ; save result in speed control threshold
    movwf TEMP1
    movlw B'00010001'
    movwf ADCON1
    movf ADRESH,w ; get ADC result
    movwf TEMP2A
    rlncf TEMP2A
    rlncf TEMP2A
    movf ADRESL,w
    movwf TEMP2B
    rrncf TEMP2B
    rrncf TEMP2B
    rrncf TEMP2B
    rrncf TEMP2B
    movf TEMP2B,w
    addwf TEMP2A
    movlw B'00010010'
    movwf ADCON1
    movf ADRESH,w ; get ADC result
    movwf TEMP3
    movlw B'00010011'
    movwf ADCON1
    movf ADRESH,w ; get ADC result
    movwf TEMP4
    bcf STATUS,0
    movf TEMP2A,w
    addlw B'11011011' ; add 36 steps (Hex 0x24) to the steps >>>>>>>>>>>
    btfsc STATUS,0 ; if borrow bit is set > stop motor
    goto overcrntloop
    bcf STATUS,0
    movf TEMP3,w
    addlw B'00110011' ; if borrow bit is set > stop motor 80 degrees, 4Volt
    btfsc STATUS,0 ; if nil, do another loop
    goto overhtngloop
    bcf STATUS,0
    bsf ADCON0,GO ; restart ADC
    return
    Commutate
    movlw SensorMask ; retain only the sensor bits
    andwf SensorPort,w ; get sensor data
    xorwf LastSensor, w ; test if motion sensed
    btfsc STATUS,2 ; zero if no change
    return
    xorwf LastSensor,f ; replace last sensor data with current
    btfss DirectionBit ; test direction bit
    goto FwdCom ; bit is zero > forward commutation N >reverse
    movlw HIGH RevTable ; get MS byte of table
    movwf PCLATH ; Prepare for computed GOTO
    movlw LOW RevTable ; get LS byte of table
    goto Com2
    FwdCom ; forward commutation
    movlw HIGH FwdTable ; get MS byte of table
    movwf PCLATH ; Prepare for computed GOTO
    movlw LOW FwdTable ; Get LS byte of table
    Com2
    addwf LastSensor,w ; add sensor offset
    btfsc STATUS,C ; page change in table ?
    incf PCLATH,f ; yes - adjust MS byte
    call GetDrive ; get drive word from table
    movwf DriveWord ; save as current drive word
    return

    overcrntloop
    clrf DrivePort ; set motor drivers off
    bsf LED2 ; put blue LED on
    bsf BUZZER ; switch tweeter on
    movlw 0xFF
    movwf cnt
    movwf cnt1
    loop2
    decfsz cnt
    goto loop2
    decfsz cnt1
    goto loop2
    bcf LED2
    movlw 0xFF
    movwf cnt
    movwf cnt1
    loop3
    decfsz cnt
    goto loop3
    decfsz cnt1
    goto loop3
    goto overcrntloop

    overhtngloop
    clrf DrivePort ; set motor drivers off
    bsf LED2 ; put Red LED on
    bsf BUZZER ; switch tweeter on
    movlw 0xFF
    movwf cnt
    movwf cnt1
    loop4
    decfsz cnt
    goto loop4
    decfsz cnt1
    goto loop4
    bcf LED3
    movlw 0xFF
    movwf cnt
    movwf cnt1
    loop5
    decfsz cnt
    goto loop5
    decfsz cnt1
    goto loop5
    goto overhtngloop

    SetAN0
    movlw B'00010000'
    movwf ADCON1
    movlw B'00101001' ;left justified, 8 TAD, FOSC/8
    movwf ADCON2
    movlw B'00000000'
    movwf ADCON3
    movlw B'00000000'
    movwf ADCHS
    movlw B'00000111'
    movwf ANSEL0 ; ensure AN0,1,2 ADC input is analogue
    movlw B'00010101'
    movwf ADCON0
    bsf ADCON0,GO ; start ADC
    return

    GetDrive
    movwf PCL

    FwdTable
    retlw B'00000000' ; invalid
    retlw B'00010010' ; phase 6
    retlw B'00001001' ; phase 4
    retlw B'00011000' ; phase 5
    retlw B'00100100' ; phase 2
    retlw B'00000110' ; phase 1
    retlw B'00100001' ; phase 3
    retlw B'00000000' ; invalid

    RevTable
    retlw B'00000000' ; invalid
    retlw B'00100001' ; phase /3
    retlw B'00000110' ; phase /1
    retlw B'00100100' ; phase /2
    retlw B'00011000' ; phase /5
    retlw B'00001001' ; phase /4
    retlw B'00010010' ; phase /6
    retlw B'00000000' ; invalid
    END
     
    Last edited: Nov 13, 2015
  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 Porta, EK,

    At last I have been able to solve THE current measuring in 10 bit and then manipulating it to a 10 bit steps in a 8 bit register. What it means is that with 40 milliOhm shunt resistor and just over 122 mA steps, a difference of 4,8828 milliVolt is created. That should be good enough for you Porta

    I am now also modifying my own 80 Ampere ESC unit, as it was a little rough to measure in 20 Ampere steps. ( I use 1 milliOhm shunt resistance steps x 8 bit (19.53 milliVoltr per step) = 19.53 Ampere. For you EK it means steps of 2 Ampere. ( 12 Volt , 2,5 milliOhm shunt and 10 bit) If you prefer to measure in 1 Ampere stages, we have to go to a 5 milliOhm shunt. However I personally think that 2 Ampere steps is good enough for just stalling purposes.

    Now we can move forward. I may also use the PIC18F2431 for your board, 4 advantages.

    a) I can on the ICD3 development platform see what is going on
    b) I can measure the "Mains" voltage in 4 Voltage levels.
    c) We have more pins for LED's etc.
    d) The speed will be 20 Mhz for you Porta instead of 4 Mhz.

    Disadvantages, I have to make new pc boards and the unit will be slightly longer.

    I hope you both can accept a little joke and have a good sense of humor.
    "I never said in my previous thread, in which year you will get your Christmas present" !!!!. I had a good laugh and will truly do my best to solve all your problems, whatever time it takes.
    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

    Well, EK and Porta, slowly it has become a soap opera. Last week Thursday. my horse (I do horse riding, but not showjumping anymore) injured his leg. I had to go every morning, afternoon and evening to the stable to attend to my horse. Today the Vet came out and has done X-rays. (I better don't worry what that is going to cots) I had to make special horse shoes to allow to heal its foot. My groom is able to put those special shoe pads on twice per day and it will free my precious time. In anyway I will be driving to Cape Town on coming Thursday and while ,I am there, I will get some tantalum capacitors, 3,3 uF and 4,7 uF to avoid an unwanted time delay. With the 100 uF tantalum it will be at 10 KHz and 16KHz an unacceptable delay of 7 mSecond and will be overlapping with the pulses we are measuring. Sorry for the additional delay. Bert
     
  14. BertKu
    Joined: May 2009
    Posts: 2,521
    Likes: 47, Points: 58, Legacy Rep: 223
    Location: South Africa Little Brak River

    BertKu Senior Member

    Morning EK and Porta,

    The good news is that I have been able to get the tantalum capacitors and at the same time I got more blank pc boards and the photocopying lacquer to make more pc boards. The bad news is that I got stuck in the pas at 1600 meter with an overheated engine. After one hour delay, I was able to get the engine going again and was basically free running with only the ignition on (otherwise my power steering and brakes would fail) switch the engine on, drive up a hill, switch engine off and free running down again, I did this for more than 40 km. As a result I have to spent some time on the design fault I have in my Mitsubishi Colt 2.8 Liter. They have the air conditioning radiator in front of the main radiator. If the aircon is not switched on, ( i only figured this now out after 238.000 km with this car, lots of cost from garages without much luck that the repair costs had warranted the money spent and 3 other times stuck in the mountains, as I normally have the aircon on) apparently the aircon radiator is blocking the airflow to the main radiator and then the engine start pumping all water out via the overflow container. If the aircon is running the thermostat of the electric aircon ventilator will kick in and will cool both radiators. Lucky I did not blow a gasket, as I was in time.
    Well it has become quite a long story, but lets hope we will get both your units for you both right at the end. Bert
     
    Last edited: Nov 23, 2015

  15. 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 EK,
    While I was in Cape Town, I bought also 6 x 0.1 Ohm 10 watt resistors. I am now able to test your system with a combination of the 2 x 0.33 Ohm 10 watt resistors I still had here and the 0.1 Ohm.
    The combination gives me the following test currents
    0.1 Ohm x 5 in serial at 12 Volt= 24 Ampere
    0.33 Ohm + 0.1 Ohm in serial at 12 Volt =27.9 Ampere
    0.1 Ohm x 4 in serial at 12 Volt=30 Ampere
    2 x 0.33 parallel + 2 x 0.1 Ohm in serial at 12 Volt=32.87 Ampere
    1 x 0,33 Ohm at 12 Volt=36.36 Ampere
    2 x 0.33 parallel + 0.1 Ohm in serial at 12 Volt= 45.26 Ampere
    2 x 033 parallel = o.165 Ohm at 12 Volt = 72. 7 Ampere
    EK, If there are any other currents you like me to test with, please let me know. For personal reasons I will have to be back in Cape Town again and will be driving on Thursday to be back on Saturday. This time I take our KIA Sportage. Can’t take the risk to be stranded in the mountains again.

    Bert
     
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.