STM32F105 Limitation

Bummer – just received my USB/CAN adapter PCB’s and realized that they are wasted. Soldered one up, but as I intended to activate USB I realized 2 things: (1) HSI can only be clocked up to 36Mhz and (2) USB will only work with HSE (External Crystal).

I have these small Murrata ceramic Crystals that take no space, so not sure why I did not just added them. I obviously need to order new PCB’s, but I have other dev cards I can use for USB testing. This error could have been avoided if I had checked with CubeMX first.

The New SWD port with micro JST works fine. I am just using a cable to the old adapter.

60V/50A BLDC Stick

This is a mock up of routing 50A out from a small PCB with 2 layers. I use 3mm wire as “high side” shunt on bottom to get to the right where I can connect 3-Phase. This leaves MOSFET’s and current shunt’s on top. I also get heat-sink if needed on top covering both MOSFET and Shunt’s. I should not need heat-sink up to 25A, but I will need a small heat sink to get rid of ca 8W in total over MOSFET’s and Shunt’s at 50A. I might very well have to limit this to 40A.

I will need between 90-20mm to 100 to 25mm to route this BLDC controller, but this is a 60V 50A design delivering up to 3000W.

MOSFET’s are 1.9mOhm so 50 will dissipate 4.75W in total in DC mode, but since this is a 3-phase we will in average have 16.7A per MOSFET which is 0,5W. This should actually be within what we can dissipate without heat-sink and these MOSFET’s have 400A pulse drain and 160A limit, so I could be getting anything between 30A to 100A++ out of this design. 100A/3 over 1.9mOhm is in theory 2W – which is doable – not sure. At this point I just need to test and see where the weakest link is. 3mm wire is sufficient for 50A, but I will need to increase this for 100A.

How do I test a 50A to 100A controller? First challenge is actually to buy a motor that will cost me ca 200.- USD. The second is to build a PSU. My largest PSU is 50V/20A, but I can test 60V and Max A independent using a 12V LIPO for the later.

I better get a fire distinguisher prepared before I test this.

Another Win on this design is that the left side with MCU, DRV8301 and Communication easily can be separated out as the controller board for even larger Motor Controllers. And no worries – I am still keen on making a sized Down Controller for 15A and 2-3A.

 

AliExpress

I have always liked shopping at AliExpress because I get samples at 1x cost. If I buy from a distributor I end up paying 2-3x. The exception was IRF7862 that cost more for fakes than originals from Arrow for some reason. I actually realized that Arrow have very decent pricing on MOSFET’s, so might have gone a bit mad yesterday.

AliExpress did not like my chips and the pictures I sent them either. Sadly I waited to long after the first batch, but well – you win 50, loose 1 – A waste majority of sellers on AliExpress are honest and without their help to keep my cost down this blog would not have existed!

BLDC Stick 60V/50-160A

Looking for Power MOSFET’s I found (and bought) some Toshiba ones in SOP-8 format supporting 60V and 160A with 1.9mOhm RDS. This makes me believe I can make a very, small motor stick that can support 50A or higher with a little heat-sink and 30A without a heat-sink. Power dissipation is 4.75W at 50A, and this will be split over 3 sets of MOSFET’s on a 3-Phase.

This mock-up illustrates what I am thinking. A narrow stick < 10cm long and < 30mm wide supporting a 3KW BLDC motor. With Power MOSFET’s that actually are rated much higher and peaks up in 400A it comes down to 2 questions (1) can I get that currents off and (2) can I get rid of the heat?

  1. Communication Connector for CAN and RS485.
  2. Tranceivers.
  3. MCU
  4. Gate Driver DRV8301
  5. MOSFET Array
  6. 3 phase U,V,W
  7. Power input

I am back to using a single, very small board. But, I must admit that this option fascinates me. I have already bought the MOSFET’s so I can as well try making the stick. This would actually be an awesome motor controller.

TI Motor Controller

I bought this kit consisting of a C28027F launchpad and a booster for DRV8301 with 10A MOSFET’s some time ago. Costed me a fortune in P&P and Tax. I have never done anything With it, but as Code Composer now is free I thought I should give it a try since I plan using DRV8301.

This is a complete Motor Controller  with motor driver software, so basically you just need to write a few lines of code and off you go – in theory 🙂 I am not so familiar with TI processors as I am with STM32, so will be interesting.

TMS320F28027F have 64Kb Flash,16K ROM, 12KB RAM. 32 bit core, a single UART and SPI. Running at 60Mhz it should be comparable with the low end Arm M3. What makes this so interesting is that it comes in LQFP48 and TSSOP32 packages with Motor driver algorithm in ROM. This is a very dedicated Motor Control MCU.

100A Controller Mechanical Draft

This is a mechanical mock-up made in PowerPoint just to illustrate some ideas. I move MCU and Gate Driver Logic (DRV8301) to a separate controller board that can be reused. This will require a clever interface between controller and driver, but be generic for 60V designs of some size. On this we can add bread-board friendly pin connectors, USB and debug facilities. It is often preferable to play around with a controller on a bread-board without driver due to the effects.

  1. Separate Controller board with MCU and DRV8301.
  2. Com connectors to left. Not sure if I want this on Driver or Controller.
  3. Driver board at bottom with only power electronics like MOSFET’s and special wiring to deal with currents etc.
  4. Heat-sink or metal frame acting as heat-sink.
  5. MOSFET’s with back down to heat-sink. Use isolation and screw holes that push the MOSFET to the heat-sink.
  6. Thick 3-phase and power cables.
  7. 2-3mm air wire for currents and shunts.
  8. Capacitor laid down on back.

I am sceptical to a few things here, but it will be fun to play around With DRV8301 anyway, so why not. And the way things have been going with MC4X24V15A and some 70 wasted MOSFET’s  (bad batch) I think it will be good to have a dev concept. I can always route specialized PCB’s later.

Monster ESC 120V -500A

This ESC support 120V and 500A which basically is a 60KW Motor Driver costing ca 500.- USD. I see motors delivering 80KW for 1000.- USD. You can probably find larger than this as well. Some of the ESC’s even have water cooled heat sink to get size down. 100 x 200 x 30mm seems to be a common size area for these monster controllers. Boat versions with water cooling can be smaller.

I would like to dissect some of these, but I think I have given the answer to how this can be achieved in my last article. The main challenge here is however the cost of those motors. I can build a controller, but a motor costing 1000.- USD is out of my reach.

I would also add that for a boat or car you can just stop, but for an airplane or drone of some size you would need backup redundancy for failure situations.

MOSFET Calculations

One of my main concerns about IRF7862 is that I target 15A while 17A is their range at 25 Degrees. Pulse drain is 170A and using PWM we need to take a bit care because 15A on 50% PWM duty is actually 30A in PWM peak currents. If you manage 15A with 10% PWM duty you would actually be up in 150A in PWM peak currents.

15A continuous is much nicer on the MOSFET than 15A in PWM because as we switch on/off we also loose energy. IRF7862 is very fast with 19ns rise time and 11ns fall time, it is actually one of the faster MOSFET’s I have seen.

You also need to realize that current limiters measure current per phase. A = V/R. And with R=1Ohm I basically run 24A in pulses. The current measured on the PSU is an average based on pulse width. The way you measure current also means you need to apply a pulse before you can measure, so you will always be behind the 1st pulse.

In a proper BLDC design you trip using an analogue detector that is much, much faster than any MCU. But, in SW we implement this as “damage current”. For MC4X24V15A I planned a 100A damage current on the phases, 15A damage limit in average all phases together. Actual current limit for user should be dynamic below 15A.

I am very happy with IRF7862 and what I have seen. I have after all been testing a dodgy batch where a majority did not even work. But, this math would be easier if I used MOSFET’s with 2X this capacity. So I am considering using IRFH5300. This would be a “32A design” limited to 15A to avoid the MOSFET’s from becoming the weakest link.

Moving on to a 100A design that is in many ways easier because we need more space and special wiring for 100A. With 100A I can forget about classic PCB wiring and we need thick cobber wires to support the PCB. I have 3 candidates for MOSFET’s. It is some insane designs around, but we can’t focus on small size alone here + we need to focus on current paths and heat dissipation under load. You also need to read and design with worst case scenarios. Some simple math:

MOSFET RDS mOhm 10A Effect 15A Effect 50A Effect 100A Effect
IRF7862 3.3 0.33 W 0.74 W
IRFH5300 1.4 0.14 W 0.32 W 3.5 W
IRFS3107 3 0.3 W 0.68 W 7.5 W 30 W
IRFP4368 1.85 0.19 W 0.41 W 4.6 W 18.5 W
IRFS7530-7P 1.4 0.14W 0.32 W 3.5 W 14 W

These numbers indicate what you can expect as heating effect on the MOSFET at different currents. These numbers are based on RDS and very ideal. They do not take into account loss as we switch. A fast MOSFET will loose less than a slow MOSFET since the MOSFET is less efficient as it switch.

Looking at 10A we can state that any of the MOSFET should manage as we are in 0.33W at max. But, at 15A we see 0.75W on IRF7862 while IRFH5300 still would be at 0.32W. Looking at 100A we can see that 2 of the MOSFET’s are ca 50% below the 3rd. So using IRFS3107 here would require a lot more heat-sink than for IRFS7530-7P.

IRFS3107-7P is however not as obvious as you think as this package is down at the PCB. IRFP4368 is a TO-247AC Package enabling us to keep some distance to the PCB and the rest of the electronics to make it easier to deal with heat. But, I will test both.

Using the table above you can also see why the VESC (Benjamin Vedder’s BLDC) using IRFS7530-7P can manage 50A without heat-sink, but only can manage a few sec with 240A. 240A would actually be 80W compared to 3.5W at 50A. 14 or 18W is possible to get rid off, but it is actually far more than you think it is. So how can we achieve even higher currents?

Some of the small ESC designs achieve 30A or more by using 2-3 MOSFET’s in parallel. And if you look at the numbers you see that 50A is 3.5W while 100A is 14W, so if we used 4 x MOSFET’s we should achieve 200A and still be at 3.5W per MOSFET. That would be a monster with up to 24 MOSFET’s, but we should in theory be delivering 12KW without needing heat-sinks.

MC3P60V100A will consist of two modules, one controller and one driver. The purpose is to reuse the same controller on various driver designs and MOSFET’s to experiment. I can always make them one board later for project optimization. Testing of this will be a challenge, but let’s worry about larger drivers and higher currents later.

Thank you for Reading! 

Motor Controllers

Just a list of my designs targeting motors with new names so I can keep them apart.

Name Voltage Ampere Driver Type
MC2P12V1A 12V 1A DC Motor controller.
MC3P28V2A 28V 2-2.5A 3-Phase micro controller.
MC3X60V3ACAN 60V 2.5-3.5A New 3-Phase, 2-Phase or 3x Solenoid driver. Previously called MC3X3ACAN.
MC4X24V15A 24V 15A (21A) Stepper, 3-Phase, 2x 2-Phase or Solenoid Driver. This was previously called MC4X15A.
MC3P60V100A 60V 100A New 60V 100A Monster 3-phase design.
MC3S12V1A 12V 1A 3 x 5.wire Stepper Controller
MC8X2P12V1A 12V 1A 8x DC Motor Controller (Raspberry PI Hat)

RS485 is the default interface, if I use something else I will add a post-fix. I will adapt as we go, the only purpose is to avoid using “3 sentences” to explain what controller I write about.