Current Sensor Concerns

Current sensors are a challenge due to noise as you need to grab PWM signals. I am doing 2 things here:

  1. I am grabbing both current sensing and ground from the same place. directly on each side of the shunt. The EDA I use will try to include this in a ground plane, so I have to make sure it stay as a separate signals to avoid all kind of funny ground signal noise.
  2. I am adding a spare – not stuffed – capacitor on the back side for the signal that need to pass the lower PWM. I am not sure I need this, but I had the space and it gives me an option to move the filter cap to after the PWM passing to see if it makes a difference.

Current sensors are very exposed for noise and this is one place where I seriously could have needed 6 layers to shield these signals better. As this signals arrive on DRV8301 they will be amplified and used for trip alarms. On the output to the MCU we add a 2nd filter to work on noise.

If we short-cut a phase I also need to cut the motor fast – very fast. I can’t stop the first PWM as we need that to detect that a phase is shorted, so how many PWM output’s can we survive with Rt and Rs being our only resistance (2.9mOhm all together)?

Answer : I don’t know! If you do that math with 60V you will realize that a shorted pulse is an insane 20.690 Ampere. Assuming you have 10% PWM duty that is still some 2000Ampere that instantly will fry a MOSFET and Shunt, so to have any chance we will need to react on the 1st PWM and have cut the MOSFET’s on the 2nd. What will help us here is that the PSU that feed us have a limitation and analogue trip. The worst scenario is actually if we are connected to a battery because some batteries will actually support these insane pulses.

Back to the filter – this is why you might not want a hardware filter at all because it delays this signal. If you filter in SW you can still respond to a single, insane pulse, but that short-cut is also almost 21V over the shunt so I am happy DRV8301 is in the front-line here.

DRV8301 do actually have an analogue/logic trip, meaning that if we short-cut we also cut PWM signals based on a different response speed than we can achieve in SW. But, what about the 3rd phase?

This is one of many reasons I would like a current sensor on the 3rd phase. The other reason is that it gives me a capability to measure signal error on current sensing. I also have ca 15 x 5mm space between 60V and GND so I could add sensor logic here and if I move the PCB 1mm up I should also have extra space to route that sensor pass the 60V connector – some of the reference diagrams for DRV8301 show a discrete 3rd current sensor, so will look into that. I will add the 3rd if I can, but focus on this experiment is size and components on top layers only.

60V/50A BLDC PCB Routing

One of the main concern if you want to get 50A out is the current path and making sure it support 50A. The line in red show an actual example path that will have to support this. The entire driver area is only 40mm x 25mm.

60V in using top PCB lane down, over high side MOSFET, out through wire and back in through next channel and out through low side MOSFET and current shunt to GND. The weak link here is that I need 1mm x 4mm lanes to support 50A, so if I cover the lanes with solder tin it should be doable. If not I will start getting into problems around 10+ Ampere.

Looking at this design I can instantly see that I need a few more mm to create a solder lane on 60V and GND. But, after this mod I should actually stand a chance on currents.

Looking at signals I am not sure if I want to create interface between MCU and Gate Driver, or between Gate Driver and MOSFET. Assuming I do the last I will need the following:

  • 8-60V
  • 6 x PWM Signals
  • 3 x PWM out signals
  • 6 x current sense signals.
  • In addition I should get 1.3 x temperature sensors for the MOSFET’s.

This pic show the actual routing of the driver. Notice the hole pads on the MOSFET’s, the short, effective lanes, but also the 4 tracks at bottom. The bottom tracks are current sensors and I grab both GND and Sensor at the same spot. This is quite important because you will get into funny ground signals if you grabbed ground from somewhere else – more convenient. I really should have had more layers to protect these signals from noise, but we will test. Looking at the PCB I realize I have the Space to move the GND hole to bottom just to make sure that 60V and GND wires are far apart to create less noise. But, I also like the idea of having them far away from current sensor tracks. This pic does not show the ground plane.

As for effect I calculate 4.75W for 50A and 1.9mOhm. As this is split on 3 transistors I actually hope to get away without heat-sinks. The same goes for the Shunt. 0.001R will be 2.5W, but again as this is 3-phase it should be split by 3. As mentioned the MOSFET’s support 160A, but I stand no chanse of supporting that. This will regardless be interesting to test, but I have a bit of work left before I get there. This controller might be my x-mas fun.

 

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.