Building an ESC - Page 1
Forum section: electronics / beginners

author: ziggyfish
author_rank: Regular Contributor
timestamp: August 19, 2014, 01:37:44 am
content: I am working on a project where I need some ESC (electronic speed controllers)s. The project is a quad copter with 4 three-phase brushless motors.The brains of the thing will behttps://www.olimex.com/Products/SOM/A20/, the reason for picking this board is for a lot of reasons, but namely I am have a degree with an AI major and would like to play with the algorithms I learned (such as multi-agent systems, neual networks, etc). I also want to learn as much as I can about electronics with this project. So as such I would like to build my own board which will have 4 ESCs as well as sensors (MPU9250, MS5611-01BA03 and Venus838FLPx, all of which use SPI).I have two options on controlling the speed via the CPU, I can either use a DAC, or PWM. After watching one of the best explanations of what PWM on actually is on YouTubeand considering all of my components will be using SPI. I plan on using a DAC to control speed (and its relatively cheaper than going with a PWM, because I would need 4 microcontrollers to maintain the PWM signal just for the motors). This also makes my circuit considerably simpler and modular as well.So the next thing I need to do is convert that analog DC to three-phase AC to turn the motors. And this is where I am a bit stuck, the ON SEMICONDUCTOR STK5F1U3E2D-E does what I want (I think anyway), however its $95.So my question is this, how do I convert DC into three-phase AC, which can support 50A without spending $95?

author: ziggyfish
author_rank: Regular Contributor
timestamp: August 19, 2014, 02:43:35 am
content: And just to add a little more information, I am thinking about usinghttp://www.farnell.com/datasheets/1487306.pdfas my DAC.ThanksBrendan

author: ziggyfish
author_rank: Regular Contributor
timestamp: August 19, 2014, 03:59:38 am
content: Thanks for your reply,The goal is to build my own ESCs (to understand how they work internally). I am not sure why you say I still need to use PWM at some point, so will look into that. From what I understand the reason most ESCs use PWM is to convert a digital RC signal from the receiver into an analog signal or am I missing something here? Because my main board will handle the communication (will be via WIFI or some other means), I assume using a DAC would be a better choice, as I would get a better response time (8?s vs 125?s based on a 8khz PWM).If I wanted a quick an easy way to build a quad copter I would just go out an buy one pre made, but then what's the point of the project? The idea of building my own ESCs is to learn the electronics part of software development which I have done for 10+ years.ThanksBrendan

author: David Hess
author_rank: Super Contributor
timestamp: August 19, 2014, 04:53:51 am
content: The motors will have such slow response compared to the electronics that the different between using a DAC and PWM for the control signal to the brushless motor driver is insignificant.As far as the brushless motor driver itself, 50 amps is not trivial and is going to require a discrete output stage.How were you planning on commutating the motors? Do they have hall effect sensor outputs built in?I would either use one of the various dedicated 3 phase brushless motor controller ASICs designed to operate with discrete output stages (something like an Allegro A4915) or program my own using the right microcontroller to do the same thing. With a microcontroller, control signals and feedback could be via SPI or some other serial link which has the advantage that noise from the motor controller can be isolated with optical coupling.The motor winding are driven with a PWM signal to raise efficiency in the driver while producing a proportional output. This is especially important in high power designs where the waste heat from a linear output stage can be considerable.

author: ziggyfish
author_rank: Regular Contributor
timestamp: August 19, 2014, 11:11:20 am
content: Quote from: David Hess on August 19, 2014, 04:53:51 amI know 50 amps isn't trivial, that's the next step, after I workout getting the motors to work. I have a few ideas of how to do it.I was hoping on using the DAC as a threshold voltage to a circuit that would produce the 3 waves needed to turn the motors.Quote from: David Hess on August 19, 2014, 04:53:51 amI will look into that A4915, however I see its a DC 3 phase brushless motor controller. The motors I want to use are AC, so there could be a problem with that. I was looking at a circuit called a 3 phase inverter (I noticed that the $95 IC uses a version of the same circuit), which looks like it can do what I want and it allows me to control it with my DAC. But I am not 100% sure on that yet. I've attached a diagram, so you can see how I see it working. The boxes named "Magically create sine waves" is what I am trying to solve.Quote from: David Hess on August 19, 2014, 04:53:51 amFrom what I understand real ESCs use fairly big caps to smooth out the PWM signal, which means it ends up being the same signal as the one generated from my DAC without the need for the caps.I will also look into linear output stages.

author: macboy
author_rank: Super Contributor
timestamp: August 19, 2014, 01:27:19 pm
content: Quote from: ziggyfish on August 19, 2014, 11:11:20 amI'm afraid that you don't understand at all.With brushed motors, ESCs use PWM to control the speed. The motor speed is controlled by the PWM duty cycle. More on-time = faster. Why PWM and not some analog DAC? Because PWM results in driving the motor alternately full-on and full-off, which results in very low losses in the components (MOSFETs) controlling the current to the motor. If you drive the motor with an analog signal (such as buffered/amplified output from a DAC) then you will have very high losses and a lot of heat in generated. It is not practical with these big motors.Brushless motors are completely different. Controlling them isn't so simple as applying power, as it is with brushed motors. I can almost guarantee that you will not be successful in designing your own high power brushless speed controller.Your best bet is to use four commercially available brushless ESCs. Then to control them, you will need to send the ESC a standard RC servo control signal, which itself is just a simple PWM signal. You need to generate a pulse with an on-time of 1.0 ms (full 'left') to 2.0 ms (full 'right'), repeating at roughly 50 to 100 Hz (the rate doesn't matter, just pulse width). It is relatively simple to generate that type of signal from any microcontroller.

author: Richard Crowley
author_rank: Super Contributor
timestamp: August 19, 2014, 01:38:31 pm
content: Yes, listen to macboy, he speaks the truth. You did not mention what the application is, but all those PWM and brushless, high-current motor controllers have been developed for the quad-copter application where weight and efficiency are extraordinarily important. Using analog techniques, especially at high current is no longer practical no matter what the application is. This is the 21st century and the digital age didn't happen by accident.

author: nowlan
author_rank: Frequent Contributor
timestamp: August 19, 2014, 02:02:01 pm
content: I know little about ESC in general, but freescale has some 3phase chips, and app notes to look at.edit:MotorhomeHowever, im not sure building esc is what you wanted. Just control, in which case it offload the trouble to commercial/hobby esc, and build brain box like other drones.

author: ziggyfish
author_rank: Regular Contributor
timestamp: August 20, 2014, 10:21:46 am
content: nowlan, thanks for the link and I will read through it. The reason I want to build own ESC is to learn and understand about electronics. I could easily just go out and buy 4 ESCs and connect them up and get the whole thing running within hours, but I won't learn anything from it. The programming side of this project for me will be very easy. However to chalange myself I want to build an ESC.macboy, you are right, I thought maybe I would loose torque which is why I was trying to get a sine wave (i.e going positive and negative), but on second thought it may not matter.Quote from: macboy on August 19, 2014, 01:27:19 pmBut what I don't understand is this if I increase the duty cycle to 100%, then there is no 3 phases created. All 3 inputs into the motor will be on all the time, which won't turn the motor. So can you maybe explain how that works?

author: KIKi
author_rank: Newbie
timestamp: August 20, 2014, 11:42:12 am
content: It doesn't work. Actually you can't use 100% PWM because there won't be any "electronic" commutation necessary for proper work of a brushless DC motor. Sorry if I'm wrong

author: ziggyfish
author_rank: Regular Contributor
timestamp: August 20, 2014, 12:21:44 pm
content: Quote from: KIKi on August 20, 2014, 11:42:12 amBTW its a brushlessACmotor, not DC. Something like,http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=16234(its not the one I will end up using, but it will be the same type of motor).ThanksBrendan

author: Precipice
author_rank: Frequent Contributor
timestamp: August 20, 2014, 12:30:25 pm
content: That's a sensorless motor, and quite a high power one.Looking at this from the outside, you need to read a lot of app notes and reference designs - I think Microchip had a bunch of good ones. Search for sensorless BLDC. At the moment, you're asking questions that mean you're a long way from starting, let alone finishing, this.I'll agree with the people suggesting you try something easier first - perhaps a driver for a smaller BLDC motor with hall effect sensors. There's still _plenty_ of meat on that project, and you'll be blowing up cheaper transistors, and probably less often. Most of the lessons you learn from doing a with-sensor motor will translate straight into doing the rather harder sensorless one.Also - "The programming side of this project for me will be very easy." - you may well look back on this with amusement, when you're finished.

author: KIKi
author_rank: Newbie
timestamp: August 20, 2014, 12:58:03 pm
content: Quote from: ziggyfish on August 20, 2014, 12:21:44 pmThere is no "pure" DC brushless motor. In order to get any electric motor spinning it's necessary to have some kind of a variable electromagnetic field. In DC motors it's done with usage of brushes (commutator) that reverse current. Brushless motor in sequential order turns OFF and ON different windings (phases) on the stator and as a result we have variable field (that is why every DC brushless motor is AC).EDIT:Examples from Atmel:AVR430: ATAVRMC300 Hardware User GuideAVR430: ATAVRMC300 Hardware User Guide - schematicHope it will help!

author: ziggyfish
author_rank: Regular Contributor
timestamp: August 20, 2014, 01:27:34 pm
content: Quote from: Precipice on August 20, 2014, 12:30:25 pmYeah I agree, going with something simpler would help with understanding electronics, and would also learn about controlling DC motors as well. So good idea.I estimate the project taking about 6-12 months to complete, so I know it won't be built tomorrow. The A20 comes tomorrow (FYI, I am really excited about). And there is a lot to do in that area, such as I need to rebuild the kernel so it uses the latest kernel, find or develop a few drivers for the other sensors, find a good solution to get camera to stream to something like an ipad or iphone (hoping to control it through an app I develop), so there is still a lot of stuff to do on this project before I get to the motors. But I am just trying to get enough information about the motors first, so that I can workout what components I need in order to get the whole thing working.I did some searching just then, and I did find an 40A ESC schematic. It uses the ATMEGA8-16AU, as the micro-controller, and three IR2101 (http://www.irf.com/product-info/datasheets/data/ir2101.pdf), to control the 3 phase inverter circuit. Will see if I can find the link again, if someone wants it.Quote from: Precipice on August 20, 2014, 12:30:25 pmI have previously built operating systems (from bootloader to GUI), Linux drivers, Windows drivers, and technical business applications. So yeah, the programming side will be fun.

author: macboy
author_rank: Super Contributor
timestamp: August 20, 2014, 04:41:52 pm
content: Quote from: ziggyfish on August 20, 2014, 10:21:46 amYou need to read. A lot.Right now you are at the point in the learning curve that you don't even realize how little you know. You don't know enough to even begin to ask the right questions. After a day or two of studying brushless motors, you will begin to understand how little you know today, and how much you still have to learn before you can come back here and start asking pointed questions.

author: zapta
author_rank: Super Contributor
timestamp: August 20, 2014, 05:41:51 pm
content: Quote from: macboy on August 19, 2014, 01:27:19 pmCan you explain to the uninitiated how brushless ESC work? What kind of signal do they deliver to the motor, is it just a multi phase on/off that is phase sync'ed with the rotation? Do they sense the state of the motor in some way to sync the phase? How?Edit: apparently there are open source brushless ESC'shttps://www.google.com/search?q=open+source+brushless+esc

author: Kremmen
author_rank: Super Contributor
timestamp: August 20, 2014, 06:43:09 pm
content: BLDCs and their cousins PMSMs (Permanent Magnet Synchronous Motors) are both what the latter name says - synchronous AC motors.In order to drive one successfully you must generate a rotating magnetic field in the stator which then reacts with the rotor field to induce torque in the the motor shaft. Once the shaft starts turning the rotor field orientation naturally starts to spin and the stator field must align with the rotation in such a manner as to maintain the desired torque.In practice the stator field is generated in a 3 phase field coil array driven by 3 half bridges from a DC bus. To get the phasing right one either reads a set of (hall) sensors indicating rotor position or, in the sensorless case one measures the back emf induced into the momentarily undriven stator coil (at least 1 one the coils will always be undriven).The minimum requirement in order to achieve commutation is to correctly identify the rotor field orientation to the nearest 60 degree sector. This is easiest accomplished with the sensor feedback doing just that. After that some kind of pwm scheme for coil current control will let you control torque, at least approximately.A more advanced control scheme calls for properly orienting the stator field by what is called Field Oriented Control or vector control. The story is far too long to meaningfully explain here, but the idea is to compute from the 3 phase currents first the so called alpha and beta components by applying a Clarke transformation and then finally the stator direct and transverse field components using a Park transformation. Note that these are calculated in the rotating reference frame of the rotor making the calculation non-trivial.Now to control the motor torque a suitable control scheme, such as classical PID, is applied to the d and q components. The controller has a setpoint value for d (this is 0 as a rule) and for q, the latter corresponding to the useful torque. The d and q controllers compute command variables for the direct and quadrature current components which by inverse Park are transformed to alpha and beta commands and finally by inverse Clarke to the individual instantaneous phase currents.The above calculations are done in hard real time as is obvious so there is a notable performance requirement. FPGAs are the tool of choice, or something like TI's TMS320 family of signal processors.The above is the hard part. The actual speed control is business as usual and accomplished by nested control loops - outer speed loop and inner torque loop.

author: ziggyfish
author_rank: Regular Contributor
timestamp: August 21, 2014, 03:36:05 am
content: Quote from: macboy on August 20, 2014, 04:41:52 pmThat's why I asked here, because I was stuck on something. Now I have some reading to do and I will figure the answer out myself (which is really all I want anyway), and will ask more questions after. That's how programmers work. It sounds like Kremmen knows a lot, so I will read up more on the terms he uses and ask a more directed question.This week I have already learned about op amps, and 3 phase inverter circuits. So next will be what a classical PID, Clarke transformations, and a few other terms he uses.

author: Kremmen
author_rank: Super Contributor
timestamp: August 21, 2014, 05:52:27 am
content: OK, if you really want an in depth presentation into the art of sensorless motor control then i repeat the recommendation i have made earlier on this forum: read and understand James Mevey's master thesis on the subject; freely available athttp://krex.k-state.edu/dspace/handle/2097/1507.The ingress of the document reads as follows:Abstract:Working with the subject of sensorless motor control requires an understanding of several topical areas; this report presents an understanding that was gained during this research work. The fundamentals of electric motors (particularly brushless motors) are developed from first principles and the basic models are discussed. The theory of sinusoidal synchronous motors is reviewed (phasor analysis of the single phase equivalent circuit). The concept of a complex space vector is introduced and developed using a working knowledge of the sinusoidal synchronous motor. This leads to the presentation of the space vector model of the permanent magnet synchronous motor, in both the stationary and rotor reference frames. An overview of the operation of three-phase voltage source inverters is given, followed by an explanation of space vector modulation and its relationship to regular sinusoidal pulse width modulation. Torque control of the permanent magnet synchronous machine is reviewed in several reference frames and then rotor-flux-field-oriented-control is explained. Finally, some schemes for sensorless operation are discussed.

author: ziggyfish
author_rank: Regular Contributor
timestamp: August 30, 2014, 08:05:19 am
content: So I have my 3 phase signal working the way I want it to. The next step is to scale up to 50A. The voltage output is at the correct.The input signal is generated by the main board power supply (which is max 3A) throw a micro controller and other components. So my next question is how to I get the power from the battery (which doesn't have such limit) to power the motor.ThanksBrendan

author: netdudeuk
author_rank: Frequent Contributor
timestamp: August 30, 2014, 08:56:37 am
content: You could get the SimonK source code for some ideas.

author: rob77
author_rank: Super Contributor
timestamp: August 30, 2014, 11:28:39 am
content: Quote from: ziggyfish on August 30, 2014, 08:05:19 amsimply buy a ready to go ESC for brushless motors. designing a 50Amp 3 phase bridge is far away from "having fun"... and actually it's nearly impossible for a newbie - you will burn more parts and equipment than the cost of the ESCanother point is the commutation of a BLDC motor - either you need hall sensors to know the rotor field's position or you need to go for a solution without hall sensors - monitoring the induced voltage on the "3rd" wire to get some feedback indicating the field's position. it's really not easy to drive a BLDC.definitely nothing for newbies to design a BLDC ESC... trust meanother point is the cost - building a 50Amp ESC will be MUCH MORE EXPENSIVE than buying one

author: ziggyfish
author_rank: Regular Contributor
timestamp: August 30, 2014, 01:26:34 pm
content: Quote from: rob77 on August 30, 2014, 11:28:39 amIt depends on what you call fun. Over the past 2 months I have had so much fun learning about how electronics work, and how sub-circuits work. I also have been successful in building a circuit that can read the 3rd wire and power a small BLDC motor (I am a fast learner).However I want to scale it up to the 50A. I know I can use a bunch of IRF7832s in parallel to support the 50A current however this can only be DC (from what I understand anyway). I wanted to know if there is another way which would allow true AC. An Op Amp does exactly what I am after, however the max amps is about 1A. Which means I would need a lot of them in parallel, which is not practical. Hence why I am asking this question.

author: rob77
author_rank: Super Contributor
timestamp: August 30, 2014, 08:42:19 pm
content: Quote from: ziggyfish on August 30, 2014, 01:26:34 pmwhat you mean by true AC and how does an op-amp fit the picture ? what you need is a 3 phase bridge and feed it with 3 phase signal (you can PWM the 3 phases to simulate "true" AC) generated by a micro-controller or FPGA or a dedicated BLDC controller chip.

author: ziggyfish
author_rank: Regular Contributor
timestamp: August 30, 2014, 11:44:19 pm
content: Quote from: rob77 on August 30, 2014, 08:42:19 pmBy true AC, I mean both positive and negative voltages. I have now been successful in creating a 3 phase inverter circuit and I can used IRF7832s in parallel to handle the 50 amps. However I would like to experiment with a circuit I created using op amps (it works in a simulator), which gives me perfect sine waves phase shifted 120 deg apart, but because op amps can't handle more than 1 A, it won't work without additional components (which BTW is what I am asking for).how does op amps fit the picture? Because no current flows in or out of its inputs, there is a separation between the low current part of the circuit (powered by the A20) and the high (powered by the battery). Not only that op amps can also handle true AC which transistors can't.But anyway, it looks like I need to ask on a different forum, because there seems to be a bad culture on this forum. A culture where you only get a responses like "actually it's nearly impossible for a newbie" and no actual answers which I can research further on to find the right solution. In programmers land, most forums never give you "your not good enough" answers (I actually don't know any that do).

author: rob77
author_rank: Super Contributor
timestamp: August 31, 2014, 08:40:37 am
content: Quote from: ziggyfish on August 30, 2014, 11:44:19 pmdon't expect different answers on a different forumwhy ? you will realize it later on when you'll read your post few years laterif i understand you correctly.... then you wish to create some kind of 3 phase sinewave VCO out of opamps and drive the BLDC with that signal ? that won't work - you have to drive the BLDC according to the position of the rotor's magnetic field (therefore the hall sensors required or the other method - measuring the induced voltage on the wire which is not driven in that very moment).another point is the current bigger than 1A - have you ever heard about amplifiers ? op-amp + external output stage stage will do the trick (like many of the audio amplifiers with op-amp input stage). but anyways ... driving any kind of motor drawing 50A in peaks with a sine-wave coming out of a B class amplifier.... good luck with thatprobably you're confusing the BLDC with a 3-phase asynchronous motor (the squirrel cage one) - the variable frequency 3 phase sine-wave would be able to drive that squirell-cage motor but not a BLDC.

author: ziggyfish
author_rank: Regular Contributor
timestamp: August 31, 2014, 02:01:00 pm
content: Quote from: rob77 on August 31, 2014, 08:40:37 amI look back at some of the stuff I did when I was first learning to code. So yeah, I will look back at this thread, and think maybe that rob77 was right. But for the time being, I like to do things my way.Quote from: rob77 on August 31, 2014, 08:40:37 amThere is actually a book that has an example of a 3 phase wave generator using op amps (from memory the book dates back to 1970s). If I am good enough I should be able to take the induced voltage on the wires and integrate it into the sinewave generator. In theory it this should be possible (changing the capacitance of the oscillators, changes the frequency of the wave) but want to play around with it, and will have some fun as well.Quote from: rob77 on August 31, 2014, 08:40:37 amThose were the words I was looking for. Now I can do some research on the different classes of amplifiers and find the best way to handle the 50A draw.Quote from: rob77 on August 31, 2014, 08:40:37 amI have seen people use 3-phase AC with BLDC. Your meant to get better torque from the motor and its meant to be more efficient. Also bigger ESC's (300A, and no, I don't need want to handle that much power) tend to always use AC, so I know its possible.Anyway thanks for your responses.

author: David Hess
author_rank: Super Contributor
timestamp: August 31, 2014, 04:09:33 pm
content: Quote from: ziggyfish on August 31, 2014, 02:01:00 pmThe usual solution is Class-D which just brings you back to PWM. The power efficiency of Class-D and other switched output designs is difficult to ignore when it directly contributes to high power density.Linear drive is certainly feasible but you will end up with something rack sized and heavy that will heat your whole room.

author: ziggyfish
author_rank: Regular Contributor
timestamp: September 01, 2014, 03:34:08 am
content: Quote from: David Hess on August 31, 2014, 04:09:33 pmYeah, some of the bigger ESCs do take up quite a lot of space, some are A5 size and the heat sinks on them are massive. Hopefully I can fit my design on a 5300 X 4050 mill board (same size as the A20 board).Anyway doing some research this morning, I have found a good way to do it in theory. Will buy the components in a few weeks, and start playing around with it.Thanks for all your help. When I get this thing going I will post the final schematic (got to include other things on the board as well, so don't expect it soon).

author: morpheus
author_rank: Newbie
timestamp: September 01, 2014, 03:19:51 pm
content: I'm working on sam me thing now, and I actually got spinning rc motor so far. I used 3x 4606 MOSFETs, and simple MCU to drive them. Just square waves. Check YouTube about how bldc motors works, that helped me a lot. Along with reverse engineering chinese ESC from ali. Next step for me is implementing induction feedback.

author: ziggyfish
author_rank: Regular Contributor
timestamp: September 02, 2014, 12:01:19 am
content: Quote from: morpheus on September 01, 2014, 03:19:51 pmI've been looking on Google for ESC schematics and there are quite a few out there (seen one for a 60A ESC).What I am now researching on, is what transistor to use. What I am confused about is the Power Dissipation figure they give you. Like for example the 4606 has a Power Dissipation of 2W. Does that mean that if Vds is 30 and Id is 6, that the heat generated by it will only be 2W?

author: David Hess
author_rank: Super Contributor
timestamp: September 02, 2014, 12:34:10 am
content: Quote from: ziggyfish on September 02, 2014, 12:01:19 amAbsolutely not. The rated power dissipation of 2 watts means it can sustain 2 watts of continuous loss with some recommended printed circuit board pattern at 25C without melting. That could be 2 volts Vds at 1 amp or 4 Vds at 0.5 amps or 4 Vds at 4 amps with a 12.5% duty cycle or something else.At maximum continuous rated Ids with full enhancement, power dissipation will be something like 1 watt = 6^2 A * 0.030 Ohms but the rated pulsed drain current is 5 times higher.

author: ziggyfish
author_rank: Regular Contributor
timestamp: September 02, 2014, 01:11:41 am
content: Quote from: David Hess on September 02, 2014, 12:34:10 amThat makes perfect sense then. Thanks for that info.ThanksBrendan

author: Bukurat
author_rank: Regular Contributor
timestamp: September 02, 2014, 02:00:31 am
content: Quote from: ziggyfish on September 02, 2014, 12:01:19 amWhen quantifying anything you should include the unit of measure, Vds is 30 and Id is 6 could mean anything.Looking at the data sheet for the AO4046 N Channel..The maximums are Vds 30V, Vgs 20V, Id 6A@25C ambient temperature or 5A@70C ambient, Idm 30A, Pd 2W, Tj -55 to 150CThese are maximum ratings for each of Voltage, Current, Power Dissipation and Junction Temperature for this mosfet and you can't exceed any one of these.Further down the data sheet are the parameters you need.Look at Rds(on) - this will give you the Static Drain-Source on resistance, Typically 25milliohm. If we look at the maximums - If we push 6A through a 25millohm resistor ohms law give us a dissipation of 150mW, well within the 2W maximum.The 150mW will raise the junction temperature, to find out how much at the thermal characteristics. The thermal resistance Junction to Ambient is typically 74C/W, Max 90C/W - this means the junction will increase in temperature by between 74C and 90C for every Watt dissipated.The 150mW will raise the junction by a max of 13.5C. Assuming 25C ambient, the junction is at 38.5C so it is well within the rating.You should redo the thermal calculations when you know where and how this will be mounted.That should point you in the general direction.

author: David Hess
author_rank: Super Contributor
timestamp: September 02, 2014, 03:18:43 am
content: Quote from: Bukurat on September 02, 2014, 02:00:31 amP=I^2R6 amps through 0.025 ohms is 0.15 volts. 0.15 volts times 6 amps is 0.9 watts.It is still comfortably within the maximum power ratings.

author: Bukurat
author_rank: Regular Contributor
timestamp: September 02, 2014, 03:47:39 am
content: Quote from: David Hess on September 02, 2014, 03:18:43 amThat's what happens when I try and do things my head

author: ziggyfish
author_rank: Regular Contributor
timestamp: September 02, 2014, 05:21:54 am
content: Quote from: David Hess on September 02, 2014, 03:18:43 amSorry, you confused the hell out of me, until I Googled the actual formula:V = I * RP = I * VTherefore P = I * I * R = I^2 * RSo to confirm my understanding of it. If I pick a transistor that has 0.0021ohm Rds(on) and I have a 50A load. The power loss would be:V = 50A * 0.0021ohm = 0.105VBecause there is a diode in a transistor, I have to add 0.7V which gives me a total of 0.805V. So:P = 50A * 0.805V = 40.25W of powerUsing a RthJC of 2.0 C/W. The heat generated by the transistor is Max 2 C/W * 40.25 W = 80.5C (or Typical 1.4 C/W *40.25W = 56.35) above Ambient. Given that the current temp in Brisbane is 29C, the actual temp will be 80.5 + 29 = 109.5C Max (85.35 Typical). And if the Max temp for the MOSFET is 150C, I am well within the specification.And to get the thing to turn on (Vgs = 1.2V), I need a min D and S of 0.805V, and 1.2V on G.Have I understood all of this correctly?

author: Bukurat
author_rank: Regular Contributor
timestamp: September 02, 2014, 09:01:32 am
content: Quote from: ziggyfish on September 02, 2014, 05:21:54 amYou have an unwanted 0.7V there. The diode in the MOSFET is reverse biased in normal operation and doesn't count in these calculations.You may need more than 1.2V Vgs to saturate the MOSFET you select. Check the curves on the data sheet.

author: hans
author_rank: Super Contributor
timestamp: September 02, 2014, 09:10:37 am
content: Quote from: ziggyfish on September 02, 2014, 05:21:54 amTechnically not power, but that's nitpicking I don't want to go in to.QuoteThe diode is probably reverse biased, so I don't see how adding 0.7V would help.Moreover, getting a diode drop of 0.7V at 50A is averygood diode.You need to multiply 50A x 0.105V = 5.25W loss.QuoteRthJC = thermal resistance Junction-Case. That is not ambient.You need the RthJA figure, which is the total "series" thermal resistance from junction to a typical use-case of free-standing TO-220 for example. That is usually in the order of 60 C/W.As a general rule of thumb, assume you can dissipate 1-2W in side a single TO-220 with no heatsink, but at 2W it'sreally reallyhot.If you install a heatsink, you will modify the RthJA figure and can't use it anymore. In that case you need to calculate your own, which is the sum of your heatsink, plus any mounting material (like heating compound or isolation pads), plus the Junction-Case specification.So a heatsink of 10C/W with perfect contact will have a RthJA of 10+2=12C/W.In addition when calculating , I would assume that ambient remains constant and work towards the die temperature. For example:Tj = Ta + (RthJC + RthHeatsink) * P = 29 + (2 + 10) * 5.25 = 83.5CQuoteThe gate voltage is measured against the source voltage voltage.For a low-side driver the gate is tied to ground. 1.2V (compared to the gate.. so compared to GND) the MOSFET will open very slightly (note: the Rds on is huge and you will blow the arse out of the MOSFET with any significant current).For a high-side driver N-channel mosfets are usually a bit of a pain, because you need to drive a voltage above the supply voltage (e.g. VCC is 12V, you would need 13.2V for the threshold voltage). A P-channel MOSFET or MOSFET driver are quite useful for that, but you may need to take into consideration if there are any duty cycle limitations.VDS is a maximum voltage the MOSFET can withstand when it's OFF. If you exceed it, you will kill the MOSFET. The diode that is drawn is more of an "artifact" during the production processes than actually desired, and you need to remember that it's there (i.e. it is not a bi-directional switch) but I personally would not intend on using it.

author: David Hess
author_rank: Super Contributor
timestamp: September 02, 2014, 10:26:47 am
content: Quote from: ziggyfish on September 02, 2014, 05:21:54 amPower MOSFETs usually have an anti-parallel diode so it will be reverse biased and not in series with the drain to source path. Bipolar transistors do not have a diode voltage drop either between their collector and emitter. IGBTs do though.QuoteAn enhancement mode power MOSFET typically requires somewhere between 5 and 10 volts between the gate and source to fully turn on.

author: ziggyfish
author_rank: Regular Contributor
timestamp: September 02, 2014, 01:17:53 pm
content: Quote from: hans on September 02, 2014, 09:10:37 amYeah I know, however my head was hurting at that stage in the day.QuoteYeah, I was watchingand he says to add 0.7 (starts from 12:00 ).QuoteI thought that was the case, it just didn't look right. Because if you take RthJC at 2 C/W then the temp only increases by 10.5C, which just doesn't seem right at all.QuoteSurface mounted ambient is rated at 26 C/W (there is no stat for non surface mounted). So temp would be 136.5 + 29 = crazy hot. So yeah I assumed that I will need a heatsink, hence why I am worrying about this now so I don't destroy any transistors. I also have to take into account that this thing will be powering propellers which are really just massive fans, and the device will also be moving around as well. So temp will be more like 5.25W * 1.4C/W = 7.35C + heat sink. Which isn't to bad.QuoteThat clears up a fair bit in terms of MOSFET.Now I know enough about transistors and power dissipation, I just need to pick one that meet my specs, then start building the thing and testing it. That's where the fun will hopefully start.ThanksBrendan

author: David Hess
author_rank: Super Contributor
timestamp: September 02, 2014, 07:44:19 pm
content: Quote from: ziggyfish on September 02, 2014, 01:17:53 pmBased on drawer filled with blown transistors and pieces of transistors and my experience with learning how to design high power switching regulators, I recommend picking up a good face shield as well. A hockey mask might intimidate the design into working or at least not exploding. A catcher's mask has a certain amount of style but I would wear eye protection under it:https://www.youtube.com/watch?feature=player_detailpage&v=0ds0wYpc1eM#t=132Are you going to start a power transistor failure mode pool? My vote is disappearance.

author: diyaudio
author_rank: Frequent Contributor
timestamp: September 02, 2014, 08:45:46 pm
content: Quote from: David Hess on September 02, 2014, 07:44:19 pm

author: Kremmen
author_rank: Super Contributor
timestamp: September 03, 2014, 04:56:03 am
content: Quote from: ziggyfish on August 30, 2014, 01:26:34 pmRolling the discussion back a bit. By your own words you are a raw rookie (see above & nothing wrong in that). As others have already pointed out, in your project this (50A) is the point where a) it gets tricky and b) far more than elementary knowledge is required. Fast learning is good, but it won't replace experience. You are trying to build a (relatively) high current PWM driven polyphase modulator - in the entire recorded history no rookie has ever accomplished this. You might be the first one but what are the chances of that...?Please don't take offense because this is not meant as such. But frankly, you need to aim lower initially. You do have a steep and high learning curve ahead and need to recognize that your confidence springs from ignorance. You know - fools go gladly where angels fear to tread.Suggestions:- make an acquantance with the concept called 'hard switching'. This will reveal to you that there are loss mechanisms not computable just by looking at things like Rdson.- once there, get to know the MOSFET gate and the parasitic elements distorting the ideal behavior. While there, study the evolution of gate charge / voltage in time during a switching event and how the parasitics impact that. That will give you tools to make intelligent device choices and guides you towards the next step.- study how gate drivers handle the parasitics to control switching losses and spurious oscillations in specific application cases. Some heavy IGBT drivers can be unbelievably complicated for no obvious reason unless you understand - really understand - the above. Luckily 50A is easily doable with a regular MOSFET but not just like that. A good circuit won't happen by accident.

author: ziggyfish
author_rank: Regular Contributor
timestamp: September 03, 2014, 11:21:32 am
content: Quote from: Kremmen on September 03, 2014, 04:56:03 amI know people with PHDs in software engineering, who can't code to save their lives. And I know people who have never studied at a university that are programming for Google and some have even started multi million dollar companies.Heck even I was programming professionally before I even finished my first year of my IT degree. Just thinking about my first programming job brings back scary memories, I was given a week to learn a 100,000 line codebase (the code was so unreliable that in the end we had to start the code from scratch and in the end we ended up with about 1,000,000 lines for the finished product) before the developer I was hired to assist decided not to turn up to work again and it took the company 6 months to realise that he wasn't coming back, and on top of that the project was 7 years late when I started (had managers, CEO and CIO breathing down my neck to get it finished). And on top of that there was other projects that just had to be completed before we could complete that project and I also had to preform maintenance on the existing system that implemented in a proprietary language that was no longer supported (and hadn't been supported for 10 years) and the system was built before I was born. And of course the proprietary language wasn't a C, Pascal or even a FORTRAN derivative. Then once I finished those projects, I was given another system to maintain, that to make a change, the change had to be done on 5 servers (dev, uat1, uat2, prod1, and prod2), with no source control. Each change was usually 6 files + 6 db stored procedures. And of course they would always tell you on a friday morning, that they wanted it done before 12pm that day.So yeah theory isn't everything, its how you use your knowledge and knowing where to find the information that counts. These days, with the internet, you can find information very easily. And if you are stuck on a problem there are many forums out there to give you a hand.I could easily download a schematic of an ESC online somewhere and be done with this (http://static.rcgroups.net/forums/attachments/2/2/4/4/4/6/a2494477-97-SuperSimple%2050amp.jpgas an example, and isn't that difficult to understand either). However I am not going to have as much fun as doing one myself. Its always fun to come up with your own design and put your own twist on it.Quote from: Kremmen on September 03, 2014, 04:56:03 amNone taken.

author: Kremmen
author_rank: Super Contributor
timestamp: September 05, 2014, 04:57:08 am
content: Years ago i was employed in one of the leading power electronics corps (ABB) designing control systems for all kinds of industrial heavy hardware - paper machines, coaters, continuous casting units, steel mills etc etc. A lot of that was programming various kinds of embedded and regular processing systems, but we also designed all of our own hardware, computers included. In that job i was in a good position to realize how big the difference between nice, deterministically behaving soft/firmware and the fickle, recalcitrant hi speed hi power hardware. Things that seemed to work nicely just failed spectacularly and unreasonably a moment later. People here make much of a TO220 MOSFET blowing up but just wait until you see a 3 kiloamp 2 kilovolt Semikron buck thyristor explode at full power load. That goes beyond nuisance because the shrapnel qualifies as weapon grade. Or see what happens when you stare at the commutator of a 300 kW DC motor when it overspeeds and flashes over. The mini lightning is an unforgettable sight&sound (provided you see or hear anything again, that is).The point, if there is one, is that you _will_ see spectacular failures once you start the power part in practice. It is just not possible to theorize about the design and then spring a perfect one out from your pen. The number of uncomputable variables is just too large, starting from the parasitics of the physical layout and going from there. But don't let that stop you. The world is full of functioning designs so it is entirely doable, you just need to accept that there is a lifecycle that includes exploratory designing and prototyping before the final design.

author: ConKbot
author_rank: Super Contributor
timestamp: September 05, 2014, 06:23:40 am
content: I wouldnt be so quick to dismiss those schematics. Youre going to end up with your 3 phase bridge, mosfet drivers, and something to control it, and a divider for sensorless feedback no matter what youre doing. The bugger is laying out the board so that parasitics dont kill you, and the code to the micro. Have it hang, or miscalculate your dead time and youre blowing up fets. Too much gate resistance and youre overheating and blowing up fets. Too little gate resistance with poor routing and youre overheating and blowing up FETsSo get to it and start blowing up some FETsDo you have a scope though? It would be rather difficult to diagnose and figure out exactly why youre blowing up FETs if you dont have one.When you find a limitation to that board that you cant fiddle with or tweak, then you move onto making your own since you know why you need, and what makes up a better one.

author: ziggyfish
author_rank: Regular Contributor
timestamp: September 05, 2014, 09:27:18 am
content: Quote from: Kremmen on September 05, 2014, 04:57:08 amYeah, I know that story too well. I once managed to break the homepage of NineMSN, and the update we did passed through 4 QA teams. The page would work for us, but failed outside of our network, in the end it was one of the sysadmins that forgot to configure the system correctly.I now work as a freelancer developing in house systems. I built a online ad tracking system which sounds easy but trust me it wasn't. Getting the data into the system was the easy part. But because the client wanted to report on everything down to the millisecond, with 20 data points selectable from the front end. getting the data out of the system was the challenge. Try doing a group by on a db table that had 10 billion rows in it with more coming each second. It can take hours to complete, and adding indexes just slowed down the inserts. And on top of that, lookups of ids in that table had to be really fast. We were exceeding the limits of the database engines itself. We ended up using a multi-stage storage no-sql solution. The system broke because of to many users. We tested it with 20,000 users per second without a problem. When I looked at the logs the system (running on a 20 node cluster) was receiving 100,000 connections per second.One of the projects I would like to try when I get some free time, is building a 100 node cluster out of A20s. Just to see if it would work.

author: ziggyfish
author_rank: Regular Contributor
timestamp: September 05, 2014, 09:34:32 am
content: QuoteThis is why I was am trying to find a solution that doesn't require a micro controller. I know how CPUs can stop working for no reason at all. Using PWM just seems like a hack to me, and hacks are never good. I was looking for an elegant solution.QuoteYes I do.QuoteAgreed.

author: retrolefty
author_rank: Super Contributor
timestamp: September 05, 2014, 10:51:13 am
content: QuoteDo you seriously believe that?

author: rob77
author_rank: Super Contributor
timestamp: September 05, 2014, 11:09:56 am
content: Quote from: ziggyfish on September 05, 2014, 09:34:32 am1. everything has a reasonand actually i know what will be the reason of your project's fail( no offense, just let's be realistic )2. PWM is the elegant solution.3. howgh.

author: ziggyfish
author_rank: Regular Contributor
timestamp: September 05, 2014, 12:06:21 pm
content: Quote from: retrolefty on September 05, 2014, 10:51:13 amJust kidding, although some software have mind of their own. I've had software crash and after a simple reboot everything works again, and never see the problem again. I know in theory its the programmers fault but sometimes you have to question whether the CPU is faulty.

author: ziggyfish
author_rank: Regular Contributor
timestamp: September 05, 2014, 12:44:18 pm
content: Quote from: rob77 on September 05, 2014, 11:09:56 amMy solution works in a simulator, so I know I am on the right track with my design. I just need to buy the components now, and test everything in real life. I will need to rework some of the solution due to the real world not being perfect.QuoteJust think about it, all I want to do is convert a DC signal to a 3 phase output. The PWM solution requires a microcontroller, a 15557 line program, 3 ICs and 12 transistors. Not only that most ESCs also use PWM to communicate to the microcontroller, thus adding more complexity to the main CPU, and requires a specific programmer device to get configure correctly. To me that's not an elegant solution.My solution only requires 4 ICs and output transistors which give me use of all 3 wires and everything is managed by the circuit, so the main CPU can just set and forget.

author: David Hess
author_rank: Super Contributor
timestamp: September 05, 2014, 12:49:20 pm
content: Quote from: ConKbot on September 05, 2014, 06:23:40 amOr too much reverse transfer coupling for the gate drive. Or too much source inductance for the dI/dT.QuoteAnd some high voltage differential probes or maybe an oscilloscope which has isolated channels. The probes could be more expensive than the oscilloscope.QuoteThe layout problems become extreme when you have to simultaneously minimize inductance because of high dI/dT , minimize capacitance because of dV/dT, prevent ground loops, and spread power dissipation out with multiple devices.

author: David Hess
author_rank: Super Contributor
timestamp: September 05, 2014, 12:56:53 pm
content: Quote from: ziggyfish on September 05, 2014, 12:44:18 pmI have this vision of Neo saying, "Transistors. Lots of power transistors."Pulse width modulation is trivial in the analog domain, requires fewer transistors to handle the power required, and minimizes obscure issues like secondary breakdown limits which are often nebulous.

author: Precipice
author_rank: Frequent Contributor
timestamp: September 05, 2014, 01:00:36 pm
content: Quote from: ziggyfish on September 05, 2014, 12:44:18 pmYep. Everyone else who's ever built a BLDC controller is a simpleton. How could we have missed such an excellent solution?More seriously, it sounds like time for you to start building stuff. Good luck! (Hint: I expect your solution to become more complex, and converge towards others, explodey lesson by lesson. Although there's the happy phase of 'it'won't start' first, followed by 'it won't stop speeding up'.)A genuine hint, though, is to build yourself a test jig, with a DC motor and various resistors (or a proper load) to put loads on your motor. To start with, it's enough to couple the shafts with heatshrink, but eventually you'll want a proper coupler. (Unless you drive the DC motor, though, you'll not be able to simulate most realistic stuck starting modes, but it'll do for the first 80% of development)Good luck, adventure awaits!Quote from: ziggyfish on September 05, 2014, 12:44:18 pmYouareaware that a stopped BLDC motor winding is just an inductor? The current will rise to destructive levels long before the motor starts to turn far enough to use the next phase.And boom, you're down some transistors, or a winding.

author: Kremmen
author_rank: Super Contributor
timestamp: September 05, 2014, 01:01:59 pm
content: Quote from: ziggyfish on September 05, 2014, 12:44:18 pmConfidence is OK and desirable but then there is overconfidence and cocksureness. You figure out the rest.

author: ziggyfish
author_rank: Regular Contributor
timestamp: September 05, 2014, 01:26:42 pm
content: To all, thanks for all your help, and suggestions. Although the solution I have isn't based on PWM, you have given me more information than you think (for example calculating thermal heat, how a BLDC motor works).I will start ordering the parts required next month and will post the final schematic when I have it tested.Thanks for all of your help.

author: Precipice
author_rank: Frequent Contributor
timestamp: September 05, 2014, 01:30:15 pm
content: Quote from: David Hess on September 05, 2014, 12:56:53 pmI'm waiting for 'my transistors blew up, where can I get bigger / better MOSFETs?'or'My breadboard has just evaporated'...Still, building motor controllers from scratch is good and educational, it's hard to think of anything else so simple sounding that covers such a wide proportion of this fascinating game. From device physics through hard realtime software, just to do what some crappy brushes and copper segments do in a DC motor

author: David Hess
author_rank: Super Contributor
timestamp: September 05, 2014, 05:18:09 pm
content: Quote from: Precipice on September 05, 2014, 01:30:15 pmI have to add "long sleeve shirt" to my eye protection and face mask recommendation.Also:13) The use of sand bags in engine test facilities is encouraged. Note that this means bags filled with sand, not straw. While straw does make the bags easier to handle, the Borsk Test Facility has found them less effective in stopping flying objects.http://www.srogers.com/comedy/aircraft_design.asp

author: max_torque
author_rank: Super Contributor
timestamp: September 06, 2014, 12:12:53 pm
content: Anyone who thinks that the "clever" or "difficult" bit of 3phase BLDC motor control is generating the 120deg phase shifted fundamental PWM signals is in for quite a steep learning curve........ ;-)

author: ziggyfish
author_rank: Regular Contributor
timestamp: September 09, 2014, 08:05:51 am
content: Quote from: max_torque on September 06, 2014, 12:12:53 pm

author: aqibi2000
author_rank: Regular Contributor
timestamp: May 14, 2015, 09:21:40 am
content: Genuinely loved this conversation.

author: Mechatrommer
author_rank: Super Contributor
timestamp: May 14, 2015, 02:11:19 pm
content: sensorless 60A ESC for 3 wires brushless motor... fwiw..http://www.ebay.com.my/itm/Mystery-Fire-Dragon-60A-Brushless-ESC-RC-Speed-Controller-/261815005989?pt=LH_DefaultDomain_77&hash=item3cf563f325