INA210 Current Sensing

I just realized that my math around INA210 current sensing is wrong. I have dimensioned based on 15A design which is the average I expect from all 4 channels driving a single motor. Basically the input current. But, output current on a phase will be based on PWM. And if you use 50% duty you need 30A to achieve 15A etc. Simply said I have dimensioned the current sensor for a much, much lower current than I actually need to measure. I should probably switch to INA214 (100x) or even INA213(50x).

Max pulse drain on IRF7862 is 170A, but I need to calculate a decent range and dimension this accordingly.

This does however not expect why IN210 does not work as I tested on very low currents, but getting math correct is a step in the correct direction.

Power MOSFET’s

I have collected a few power MOSFET samples that I will be testing in due time. It exist other MOSFET’s, but these are selected due to a combination of package, cost and performance that make them interesting.

IRFS3107 various packages and is rated 75V @ 160A. It is actually rated 195-230A, but looking at the numbers you see that it is limited to 160A continuously at 100 degC. Pulses can be up to 900A and internal resistance is ca 3mOhm. Price is ca 0.8 USD each. I bought 50x at ca 0.4 USD each that arrived in a plastic bag, so I might have yet another factory reject set. These are interesting because they are quite small PCB mounted.

IRFH5300 is the one I plan to replace IRF7862 with as it has the same size and only 1.4 mOhm internal resistance allowing 32A. I will use this on rev 1.1 of MC4X15A. The primary object is to be able to reach 10-20A without heat-sink, but I will see where I get. This is a 30V limited MOSFET costing ca 0.9 USD.

IRF4368 has a TO-247 package allowing a different heat-sink to be used. It is rated at 75V @ 195A, with a pulse peak of 1280A. Internal resistance is 1.85mOhm making it a very interesting candidate for a larger driver. Again price is ca 0.9 USD.

IRFS7530 is D2PAK with 7 legs and rated at 60V with 240A. Pulses to 1450A and 1.4 mOhm internal resistance. This should be known to many as it also is used in the Vedder ESC design. The cost is ca 2.5 USD each.

I need to get my MC4X15A working properly before I continue With larger designs and as mentioned I already have sufficient juice on this for quite large motors. What I actually lack is working current sensors and a solution to support 48-60ich Volt.

5A reached on Motor Driver

Not so much to write home about, but adding the heat sink back on I turned it up to 5A on a single channel – no heat noticed. My new loads do their job consuming some 100W, but my 5A PSU reached it’s limit. This was 20% duty cycle, so actual phase current was 25A. I tried a 2nd channel, but I struggle to find HEXFET’s that work so I am looking forward to get a proper batch in a few weeks time.

This leaves the challenge of the current sensor. I will try a few more of the INA210 and see if I get anything out of them. I will also remove the low pass filter I added after the amplifier to test. One of the challenges with INA210 is that this limits the driver to 26V,  At 30V the MOSFET’s become the limit, so this is basically a 24V design.

As for the MOSFET’s. These are rated 30V @ 17A and seems to cost ca 0.8 USD each. At that price I can as well change to the ones that is rated 30A. They cost a little more, but will use up ca half the heat dissipation.

3A – no heat sink

I have removed the heat-sink on the pcture above and is testing on the one good channel I had left. Just using my fingers on the MOSFET’s I get to 3A without heat-sink. This is very promissing and indicate that I have suffered a bit bad numbers from bad MOSFET’s.

Bad IRF7862 MOSFET Lot

Update : 13 of 50 MOSFET’s might be ok after testing!

I purchased 50 x IRF7862 MOSFET’s from Asia through AliExpress and while I usually am happy with what I buy here it happens that I get screwed by non-honest sellers. What some of them do is to pick rejected chips from the factory and sell them. These MOSFET’s arrived in a plastic bag, not in original packing so I should have rejected them due to that alone, but I was obviously not on my watch back in 2016.

These was for my motor driver and are supposed to have 3.3mOhm internal resistance as well as a very fast switch time. I was therefore a bit surprised that they generated so much heat as they did and that so many of them was destroyed so fast. After I destroyed my test channel yesterday I soldered on a new one and realized it was non-working as well. I tested the lot manually and had to reject 6 of them. Soldering on 2 new ones I still discovered that they did not work. Scoping the gate I even see they distort the gate signal, so 2 new ones and gate signals are ok, but output (no load) is crap.

This lot was bought back in November 2016 and costed 16.45 USD (0,329 USD each). Well, this is what you must expect from time to time buying samples from AliExpress. I believe this is the 2nd time I had bad luck like this. The alternative to buy all components from distributors would be far to expensive for a hobbyist scheme.

What I will do next is to test manually and see if I can find a few that hold ca spec. This is easy as you just use the PSU, connect on each end with 10V over the MOSFET, put the current limit to < 1A and bring the gate to 10V. This will bring the PSU down so I will not get 3.3mOhm as Voltage will be to low, but it will indicate if they work at all.

I must admit I thought these MOSFET’s snapped a bit fast, so I had actually planned to replace them With IRFH5300, but I need a New PCB layout for these. IRFH5300 is rated to 30A. I don’t expect to get 30A out of this design, but they have a much lover resistance and I should get 15A out with far less heat. Luckily the IRFH5300 was from a profiled seller and arrived in original package.

Returning to IRF7862 – what I will buy 20x from different sellers and pick a profiled seller this time. I also see that price range is huge + a good indication that something is wrong is if you don’t receive chips in original package – these came in a plastic bag! Prices range from 0.28 each to 0.90 each. I picked IRF7862 due to it’s low cost, but if I have to pay 0.90 each I can as well use IRFE5300.

Motor Controller Testing

This picture show my latest test upset. I am still only testing a single PWM channel on MC4X15A, but it has caused a few Challenges.

I finally got hold of 100W resistors that can sustain heavier load and using a 4 Ohm 100W I can continue my testing without being concerned about the load melting the solder tin as my previous one did. I expect the load to heat up as I am throwing out 40-100W on it. I did however not expect the MOSFET’s to heat up this fast.

I tested with 28V for a while getting a nice 1.2A out which is OK since I had low PWM duty. I connected a DC motor with the 2 Ohm load in series and it instantly span up in 80ich Watt and maxed out the PSU on 3A. I assume I broke the MOSFET at this point due to spikes as I was running without capacitance/protection on the PSU feed.

Gate drivers and MCU are ok, so I assume the supercap/diodes did it’s job and protected the MCU, but I fear I might have 8 x broken MOSFET’s – well, will find out tomorrow! My own fault for attaching a motor without adding the capacitor/diodes on the PSU.

New SWD Connector

One of the generic changes I have considered for some time is to replace my 2×5 pin SWD connector with a 1×5 pin Micro JST connector. These connectors use 1.27 pitch and you get plenty of ready made cables. Firstly I only use 1×5 pin anyway and usually find other solutions for debug UART. But, most important is that connecting the adaptor directly to the board is not always convenient in tight places. A JST connector with a cable will fit more smoothly and allow me more freedom.

 

The picture don’t really show how small these connectors are, but you find plenty of them searching for “micro jst”. I plan to modify the existing adaptor and use this cable between the adaptor and the PCB Board so that I don’t need to adapt it directly.

Pin layout is still the same except for the New 3.3V:

  • 3.3V (new on 6-pin)
  • NRST
  • SWDIO
  • GND
  • SWCLK
  • BOOT

I assume I have to make it 6-pin and add 3.3V as I want Reset and Boot jumpers/switches on the next adapter board. Basically I don’t really need to do anything as I can use this directly as a drop in replacement on the existing Connectors (1×5-pin).

Also, I often have lack of connector space on my designs, so I am tempted to use these several places where the connector size is an issue!

CAN-USB Adapters

I am adding 2 CAN/USB Adaptors. The upper one is not galvanic isolated while the lower one is 2cm longer and uses ADM3053 which also makes the board ca 5-8.- USD more expensive. The MCU is STM32F105RB and the USB is full host or Device capable. The SN65HVD233 based one have a few Control functions ADM3053 does not have, but the Boards are basically identical.

ADM3053 Error

I just realized that ADM3053 is NOT a 3.3V device. It says 5V or 3.3V on VIO, but VCC requires 5V. The schematics I have used is also wrong as it does not feed power to VIO at all. The example on the datasheet is very misleading in this case. Looking at ADM2583 that I uses for RS485 this is all sorted – it actually IS a 3.3V device. This is a bit annoying because it means I need to maintain both 3.3V and 5V since 3.3V is needed elsewhere.

 

CAN/RS485-Wifi Adapter

I have mentioned that I need a dual CAN to Wifi Adapter as well as a dual RS485 to Wifi adapter, so I decided to make one that can serve both needs. This uses ESP32 to get Wifi, USB and Bluetooth and a STM32F405RG to get dual CAN as well as dual 10Mbps RS485 – all galvanic isolated.

The CAN Adapter is for professional usage, while the RS485 is partly as an adapter to my PLC system as well as a Wifi adapter to my DPS5005 & DPS5020 based PSU’s.

Layout on this was a bit tricky due to the size of the 9-pin D-Sub connectors and I am not done, but the current draft look very promising. Hopefully I will have this in rev 1.0 around October. Size is 100 x 70mm.

I actually started end partly developed a different adapter last time I needed CAN. I never finished that design, but much of the design is tested, verified and reused here. The only missing part is wired Ethernet.