PLC Assembled – 1st test

Been a lot of motor controllers lately so I finally decided to assemble part of my PLC system. What you see here is the motherboard with a simple RS-X module connected. Not all components are assembled yet, but processor is alive. This board have 3 x fully galvanic isolated RS485 circuits and a 2 x 10Mbps backbone. It was selected because it’s a good, simple starting point for SW development.

The STM32F405RG is excellent for Plain. With it’s 1Mb Flash and 196Kb SRAM it is an excellent test bench. I need to make a similar module for CAN, but that can wait.

I must admit it is a bit of nostalgia to work with something that looks like one of the computers I assembled in the 80ts.

I only ordered one module because I want to play with the mechanical design a bit before I start adding modules. I notice far more issues with a physical module than with a 3D module.

The MCU is currently ticking on 8Mhz using the internal RC, so it will be interesting to see if I got this right and are able to tick the MCU at 168Mhz with 3 x 180Mhz DC/DC converters on the same module.

60V Limitation

Investigating the issue one option is that what snapped the TSP54060’s is that my PCB tracks are to close for 60V. You need close to 3000V per cm to create an arch and that is 30V per 0.1mm. I can’t see a weak point, but those pins are 0.2mm apart. A bit of extra solder tin on them is all that is needed and 35V is suddenly dangerous. Again I can’t really see anything, but I realized that a MSOP might be to small to actually support 60V safely.

I will try a different circuit, but I will also knock up a few test circuits with different DC/DC designs to see if I can find a stable 60V design. In the meanwhile I will test on 24 and 12 V because I also want to test he actual motor driver. I also realize that as DRV8313 also have 0.2 mm between pins and I actually limited that to 0.15mm as I widened the tracks – I might have a second 60V issue here. Now 60V was never a main objective on this small controller and I am not sure this is the problem, but standards indicate that I need more distance.

TPS54060 breaks at 35V

I received the MC3X60 Motor controller PCB’s yesterday and as always it is awesome to see how small my designs are. As this is the first time I use TSP54x60 I instantly assembled this to test and was pleased to see 3.4V out.

This circuit worked well giving 3.4V out with input from 12 to 30V, but TPS54060 snaps as I try 35V input.

I received MC3X60V yesterday and was very pleased to see the DC/DC actually working. I had to adapt values to E24/E48 series – R7 became 240K, R6 became 75K, R4 became 33K, but it gave 3.4V out which is fine. I can adjust it back with a E48 combination of R4/R5 later, but the requirement is actually 3-3.6V. As I turned up the Lab PSU Input it works perfect up to 30V input, but snaps as I try 35V. Exact same behavior on two different TSP54060 chips so far. 

This was a bit disappointing because it should not have snapped before I reach 65V, but I will test with TPS54160 and TPS54260 as well. I will also solder up a 2nd circuit. I also detected that the circuit behaved strange if I did not have a 1000uF capacitor over the 60 attached. I have double checked the circuit and components – it is only the TPS54060 that snaps.

My first thought is that I have gone wrong by leaving pin 3 and pin 6 floating. Pin 6 can be left floating it states, while pin6 is an output signal.

Regardless – I also have TSP54160 and TPS54260 chips to test + I only planned to develop with 12V anyway, so I can continue on two paths here (1) testing 60V PSU and (2) testing the rest of the motor Controller.

Don’t worry, I will get to the bottom of it. But, as usual I am my own enemy and don’t make breakout boards I can test new circuits With easily. It is straight on a dense, small design. I am a bit spoiled as I get things working most of the times 🙁

X-Mas Tree Decorations – Part 1

Every year around christmas I tell myself that next year I will have electronic christmas decorations, and as next year arrive it’s forgotten until it’s to late. A combination of STM32F030 and ULN2003 is excellent for a very small x-mas tree PCB with blinking LEDS and home made tree lights. In fact I have done this circuit before as a PWM driver with a single ULN2003, so what I will do is to make multiple PCB’s with LED strings connected through a RS-X (12V + RS485). These can then be wired in the x-mas tree and controlled by RS485 connection and 12V LED driver.

STM32F030F4 is excellent for this purpose, it cost 0.4 USD from AliExpress and all I need are sufficient to cover 20-40 of these. A 5A LED Driver should be more than sufficient. We make a harness with connectors up the tree where each decoration connect to this is a star network.

Application can be constant or random patterns as a start to make it simple. In fact I could make a small ESP32 control system with RS485 at bottom so I get the entire c-mas tree on Wifi or bluetooth. This could be a lot of fun.

The cost of this will be 2-4.- USD per PCB, around 10.- for the control system and a bit for the wiring. I probably end up spending around 100.- USD for a very attractive x-mas tree light system.

I can probably use up to 200mA per ULN2003 and a quick calc is that a single LED uses around 5mA, so in short – I will run out of space and LED’s before I run out of power. But, we should limit each decoration to ca 250mA max – I will probably need far less.

MC4X60V goes 50A

I decided to remove some of the PCB lanes and replace them with high current wires to support 50A currents. I had to extend the board ca 1.5mm at right, but to compensate I also remove the connectors because I need high current support all the way. I like having connectors for <10A solutions and playing in the lab, so will see what I can do. This will also free up 2-3mm that I desperately need at left.

At the end it simply made no sense to continue with 15A limit as I realized I would be using the same components and same space for a 50A design. And yes – this is a 50A design. The power wires are 3mm in diameter that actually is something like 64A while the 2mm wire for each channel is ca 41A. But, in addition to this you also have heat-sink at bottom as I connect the PCB itself to the heat-sink. I am confident that I will get sufficient out of this board.

New MC4X60A – First Glance

Always funny to share 3D models. This shows the right side of the new 60V Universal Motor Controller. I have spaced out the MOSFET channels and moved all components top-side as well as added 2 temperature sensors, a new 60V DC/DC, capacitors on board and enabled JST channel connectors. I have routed 1 channel, but need to route the 3 remaining (copy) and then comes the big question.

To support more than 15A I need to lay down solder tin on the paths up from the power connector and I also need a wire from the between MOSFET’s to right side of the shunt. I will in reality need 2x3mm holes for that wire and I need to find those 6 mm. If I push those capacitors further to left I will have no room for MCU or I will need to exceed 100mm. One alternative is to push the right power lane to bottom that is ground plane anyway.

I am very happy with MC4X as is, so I am looking forward to this modified board that deal with the remaining issues. It will still be work in progress for a week or so, but I think we might be assembling this during x-mas.

So will this be a 1KW, a 3KW or even a 6KW design? As Is we talk about 60A @ 15A per channel – that is 3600 Watt limited only by power lanes. If I increase to 50A we would be talking 12KW – again the real limiter here is not each channel but those lanes feeding each channel. 12KW would require support for 200A – so no – it is not impossible, but it would require some more space – lol. It is just funny to think that it now should be lanes and wires that limit this design. This amount of energy from a 100x40mm board is insane!

MC4X INA194 Current Sensor

This show the new current sensor with INA194. The main reasons for changing to INA194 is that this supports -16 to +80V sensor range on high side + the chip is SO23-5 package that is a bit easier to mount than INA210 was.

C15 is a filter capacitor mounted as close to the shunt as possible. C25 is another filter mounted as close to V+ as possible and R32/C32 is a classic low pass filter. C25 is absolutely needed attempting to reduce noise on 3.3V as much as possible. The two other filters can be discussed. They can actually be done in SW as well.

I use a 0.001R shunt and INA194 do 50X gain. It is pin compatible with INA193 and INA195 that does 20x and 100X gain. With 1mOhm shunt we will get 15mV at 15A which amplified with 50X will be 0.75V. Also 15A over 0.001 is 0.225W. For a 15A design we can benefit from increasing the shunt to 4mOhm as this will be 0,9W and full 3V at 15A. Using a 0.001Ohm is actually a 50A design. The concern is currents below 1A. 1A is 50mV and max sensitivity for a 12 digit ADC is 0,007mV. In theory we should be fine, but I am worried about the signal/noise at these low currents. I will however need experience on this, so it’s nice to have gain and shunt options to play with. For a low current we should increase Shunt, but I will not worry too much about low currents on this design. I am not going to use a 3KW design to run a small, fiddly motor as I have other controllers for that.

With regards to 15A versus 50A design. The PSU lane is currently 4mm and limiting the total current usage to ca 15A. After this the PCB itself will start to heat up. I can easily fix that by using the trick of extra solder tin on the path. The 2nd limit is the lane from the Half-H-Bridge to the Shunt that will sustain 15A, but need to be a wire for 50A. If I replace this with a wire top-side I can also support heat-dissipation on the MOSFET through the PCB and a heat-sink directly on bottom side with a thermal layer will cool down both PCB and MOSFET’s to assist. I am more and more considering to just do this change, but let us see as I am also running tight on space here. 

Comparing this with the MC3P design I am using 15mm wider for 1 extra channel, main capacitors on the board and temperature sensors on PCB. I would actually struggle to get main capacitors on the MC3P design at all. I want to test DRV8301 anyway for fun, but the only functionality I actually lack is the is the over-current trip in DRV8301. We can do the same in SW, but an analogue trip is faster. Assuming I upgrade this design to 50A it would not make sense to use the more limited MC3P design at all – that said – I actually want to test DRV8301 so don’t worry – I will complete this as well in time.

MC4X60V Adding Temperature Sensor

One of the changes on the new MC4X design is that I space out MOSFET a little and add 2 temperature sensors on the PCB located between 4 MOSFET’s. I use MCP9700 in SO23-3 package that is just the right size. Adding to of this monitoring 4 MOSFET’s each should be work out better than attempting to add external sensors.

MC4X60V Routing

Using 100x40mm as format I actually seem to be able to move all components top-side and still add caps on board. I am not sure about density around MCU yet, but this is one driver. The weak links are as always the current paths, but I think this will be ok for 15-25A. This is just a routing experiment and this will be ok under the assumption that I do not need a heat-sink. I do however have the option to replace the big red lane with a 1 or 2 mm wire and use hole though to bottom lane to vent the SOP Advance. In which case I can even mount heat-sink on bottom. All components on top means I can use bottom lane as ground plane as well. Lets see.

This is 25% larger than the same channel with components on 2 sides. I have several times been surprised of how little extra space I need to make components on one side only.

Also I realize how little extra that is needed to target 50A here, but lets see how we go on MCU area first.

Updated 4X Motor Controller

This is just a simple block diagram over MC4X design to illustrate it’s components and summarize the planned changes.

  • More communication ports CAN and RS485. I hope to save some space and add more communication ports to support redundancy etc.
  • New PSU based on TPS54x60 providing 14-60VIN or 10-16V in. Support 10-12V for Gate driver, 5V for Hall sensor and 3.3V for MCU.
  • Added 2 temperature sensors on board located between MOSFET’s.
  • New INA194 base current sensors.
  • New SOP Advance MOSFET footprint will support both SOP-8 and SOP Advance allowing a wide range of MOSFET’s to be used.
  • 4 separate channels with IR2103 as Gate driver.
  • 4 separate high side current sensors.
  • 4 separate BEMF sensors,
  • Separate Hall Sensor port/Encoder port for additional positioning feed.
  • Separate end point connectors for positioning calibration.
  • Replace 2.57 pitch connectors with smaller 1.27 pitch
  • Move main caps on board
  • Change size to fit heat sink 100x40mm
  • Stick to 15A design as objective, maybe increase to 20A depending on what PCB can manage
  • Added pull-downs on PWM driver to avoid that gates are floating.
  • Use JST Micro as channel connectors.
  • New SWD Connector.

As for now I am still testing rev 1.0, so things are not written in stone. As for the new 3P controller I have put that on hold. I decided I wanted to do rev 1.1 of MC4X first. I do after all also have 3X coming in any day now.

I still have plenty of DRV10983 chips and boards so I will be playing around with that as well – we got plenty of motor fun coming up.

I have ordered separate test circuits for INA194 and this part is the only one that concerns me because of noise. I need to see if I can get a INA210 working on the existing design to test noise and noise filters.