dirty_d's 100V 75A brushed motor controller schematic

thats probably what happened, i thought about it but i didnt think there was enough inductance to raise the ground high enough for anything bad to happen. the software is still pretty crude im gonna add some additional code to make sure the throttle can only change so fast in a given period of time. 0-100% in 0.5 seconds ould make the current limiting code much much faster than the throttle can change and it wouldnt feel like too much of a delay to a human. i still havent done any real PID control for the current limiting, the way i have it now is pretty slow, i was relying on the fact that you cant physicaly move the throttle faster than the current limiting code can compensate. im gonna try to get this right today.
 
ok, i changed the throttle sampling code to put a limit on how fast the throttle can change with repect to time, i made it so it ramps down 3 times faster than it ramps up, its about 150A/sec up and 450A/sec down, the throttle signal is translated to a desired current based on the current limit, so if the throttle is 0-5V and the current limit is 75A, 2.5V translates to 37.5A. the response is super smooth with no vibrations or audible hum and its really easy to keep the current draw constant now. some of the problems i was having before were due to a 32 bit math bug in the version of avr-gcc i was using, i wasted hours and hours from this being confused and gettign no work done. i downgraded to a older version and its working correctly now. i think im going to also add a second current limit for the battery current as well. all i have to do is take the motor current and multiply by the duty cycle and that will give a pretty good indication of the battery side current, so like if the motor current is 75A and the duty cycle is 25%, then the battery current is about 75 * 0.25 = 18.75A. i can just check that each current isnt over their respectful limits and lower the throttle if either one is.
 
gahhh, i just cant stop screwing stuff up, i wasnt paying attention and i was taking the avr out of the dip socket without first unplugging the controler from the battery, the leades must have connected in some way to turn on the ir2011 on fully, it blew the fuse and destroyed all 4 mosfets and the tip122 as well as the ir2011, i replaced what i could and it works now, i only have 2 fets on there now because i only had 3 left. other than that mishap its working pretty perfectly now. the only thing im worried about is the current sense resistors, together they are rated for 6W, at 75A they will have to dissipate about 5.6W, the derating starts at 70C ambient temperature, i dont think its going to get 70C inside the controller so i guess it can dissipate 5.6W all day. i need to figure out how to make a case for it too, i was thinking of having an aluminum top that will screw to the top of the heatsink, and the bottom and sides being made of plexiglass.
 
i tried it with my nicd pack in series with my sla pack for a voltage of 84V, 96V fuly charged. i set the current limit to 45A and got it up to 38mph, its not geared correctly for this voltage so i could get the bike going faster than this once i get a larger rear sprocket, i only did it once because i only have 2 fets in there instead of the normal 4. the heatsink was almost too hot too keep my finger on when i was done.
 
Sounds like you're having a party, dirtyd!

Your current limit was at 45 amps, but did you actually pull that much current though only one FET? And if so, for how long? I know the TO-220 package can take up to 75A continous, but have never tried this limit...

Also, I was wondering if your micro has a PWM hardware module, or are you are using software to implement dead time and such?
 
yea one fet took 45A, but its really spread out over two since theres the main fet and the freewheeling fet, it was probably about 2 minutes total. yea the mcu im using has hardware PWM, i have it set for 20khz in phase correct mode, theres a 16 bit counter that counts up to TOP incrementing each core clock cycle, when it reaches TOP it starts counting down and goes back up when it reaches BOTTOM, there are two compare registers, when the counter equals the compare register, the output of the PWM pin changes, i have it set so that one pin is set low on compare match when upcounting, and set high on compare match when downcounting, the other pin is the opposite with the compare register 10 higher than the other, so i have 10 clocks of deadtime, you change TOP to give you the frequency you need, my clock is 8Mhz, and i made TOP = 200, each period the counter has to count up to 200 and back down to 0, so the output frequency is 8000000 / 400 = 20000hz, the deadtime is 1.0 / 8000000 * (10.0 / 2) = 625ns.

i took the irfb4310s out of my old controler and put it in the new one, so i have 4 again, ill try harder not to do something stupid and destroy them again :D. i wanna see how fast this bike will go at 75A. im gonna be careful though because this motor is only rated at 32A.

the only reason im using the 4310s instead of 4110s is because i already had some 4310s that i bought when i repaired my old controller, if i were to make a new one id use 4110s for sure, theyre about the same price.
 
dirty_d said:
gahhh, i just cant stop screwing stuff up, i wasnt paying attention and i was taking the avr out of the dip socket without first unplugging the controler from the battery, the leades must have connected in some way to turn on the ir2011 on fully, it blew the fuse and destroyed all 4 mosfets and the tip122 as well as the ir2011, i replaced what i could and it works now, i only have 2 fets on there now because i only had 3 left. other than that mishap its working pretty perfectly now. the only thing im worried about is the current sense resistors, together they are rated for 6W, at 75A they will have to dissipate about 5.6W, the derating starts at 70C ambient temperature, i dont think its going to get 70C inside the controller so i guess it can dissipate 5.6W all day. i need to figure out how to make a case for it too, i was thinking of having an aluminum top that will screw to the top of the heatsink, and the bottom and sides being made of plexiglass.


I just realized something, you schematic has no resistors that define the default state of the power FETs. So when the main microprocessor was pulled, static or cross coupling or something likely turned both FETs on at once. I'd recommend a 10-100k pull down on the logic lines going to the FET driver, and 1-10k from the Gate to Source of each transistor bank. This is also something that could happen when power is applied to the controller, but the microprocessor hasn't setup it's pins yet.

Marty
 
oops, my commutator exploded. that also caused one of my big current carrying traces to blow in half, i fixed that and the controller still works, but the motor has been obliterated. i think i was up to about 45mph when it blew, i had only been on the throttle for like 30 seconds.
 

Attachments

  • 100_0127.jpg
    467.1 KB · Views: 1,228
hmm, i think when the trace vaporized it also damaged the ir2011, i get very wierd behavior when testing it now on my other bike, it will work for a second at full throttle then stop working for about 5 seconds then turn on again, the high side capacitor is getting drained down to 0V in 1 second and then even with the throttle off, it takes 5 seconds to charge back up to 8V. at first i thought the cap or diode was damaged so i replaced both but it still did the same thing, i think the ir2011 is screwed up and is draining the cap when it shouldnt be. its wierd though if i just use half throttle the high side cap stays charged, but if i back off the throttle at all the cap goes right down to 0V and takes 5 seconds to get to about 8V and it starts working again. i know its not the mcu, i tested that its working fine. the trace blew up right next to the ir2011 so i guess it just messed it up and its acting wacky.

i dont think im going to buy another brushed motor, ill probably get one of those 130kV 6500W outrunners and start working on a brushless controller, ive learned a lot from making this one and ill be able to avoid some of the mistakes i made on this one, one of the big things is trying to run 75A on circuit board traces, i thought the solder over the trace would be ok, but its not, im starting to think what really happened was that the trace got so hot that the solder melted right next to the ir2011 and bridged across or something and turned the mosfets full on and that caused the commutator segment to vaporize and then the weakened trace vaporized. for the next one i think im going to use some copper bars with holes drilled in them and mount the fets into those, they would be off the pcb and have the drivers nearby with the gate resistors connecting the gate to the pcb. the copper wouldnt have to be big, 0.125"X0.125" would be fine, thats 0.5 milliohms per foot. i guess you could also use bare 10 gauge wire, it would just be a little harder to drill the holes.
 
jeremy is after something similar, over on knuckles' bafang motor/infineon controller thread. i think he wants to push the new controller into delivering 300A through some seperate bus bars for the multiples of fets and letting the controller drive them all, and he showed a picture of a new 18 fet controller PCB from keiwyn.

it would be swell if we could create a tutorial on controllers, integrating all the stuff on the efficiency thread and here and in the other controller threads, i have learned a bunch following you guys.

next is 48V high current chargers, DIY, too.
 
swbluto said:
Okay, just found this thread. Now... the question is, where's the schematic?
Maybe you could something usefull here instead, it's dirty_d's brushless controller.
high power/high speed BLDC controller build

As I recall, he ended up jumping on his protoype and cutting open his foot after loosing patience with a bug that caused his FETs to blow [once again].

It's not a brushed design, but the important electrical design points are the same.
 
Back
Top