The Half H-Bridge channels are working very well. I initially had some issues with IR2101 as I do not have pull-up’s. but moving to IR2103 this one have logic to prevent short-cut. This is however a weakness, so I need to add a pull-down resistor so I know the state of the MOSFET before the MCU starts. I will have a New batch of IRF7862 in a few days, this time from Arrow so I can continue testing.
The 0.33F Super-cap have proven it’s worth. It absorb spikes and keep the MCU alive for several seconds after a power down, giving us more than plenty time to detect power glitches.
It is a few mechanical things. I want to move on to micro JST connectors to save some space. It is also a bit tight between the screw connector and the Shunt’s, so I need an extra mm there. I am also looking into using a wired Shunt. I also need to change the drill holes to support the heat-sink I am using and I want to change how I mount capacitors.
The only remaining challenge is the high side current sensors and Hall Sensors. I might need 5V for both these as I move on. Current sensor is the main challenge. INA210 will only support 26V which is “ok” for this controller as we can limit it to 24V, but I would like a solution that is not so fiddly to put on and support higher voltages. I do however have a stack of INA210 so we can try these a bit more first.
This does however come at a trade-off as I have very little space available and INA210 is rather handy. As mentioned before I am doing high-side current sensor rather than the simpler low-side since this allows me to use each channel independently.
Returning to 5V I could actually replace the AMS1117-3.3 with SPX3819-5.0 and SPX3819-3.3. This is a SO23 package with 0.5A spec and I could use TPS54260 to increase input voltage to 60V and 2.5A for 12V. In fact I would like to change the design to become 60V or at least 48V, but MOSFET’s are limited to 30V.
These small, advanced controllers are a bit more work to route than you expect, but I managed to add two extra connectors as well.
- J1 – 4 pin 2.54 pitch connector with Power and CAN.
- 4x 2mm mounting holes.
- 60V to 3.3V DC/DC regulator TMS54060.
- Power Led.
- J6-Analogue or SPI connector.
- Status Led.
- DRV8313 with build in Gate Driver and MOSFET supporting 8-60V and 2.5A.
- J3-Motor and Hall Sensor connector.
- J4-Digital IO/UART Connector.
- J2-SWD Connector.
- STM32F303CB with 128Kb Flash, 40Kb SRAM. Full 32bit M3 Arm ticking at 72Mhz.
- CAN Tranceiver supporting SN65HVD233, but can also use SN65HVD230. 1Mbps and slope control as well as 3-state and programmable loopback (HVD233 only).
- J5 – optional 120 Ohm terminal resistor for CAN Network.
- Extra holes on power to add large capacitor needed for motors.
It will be around 2 months before I can work on this, but I should get a new batch of MOSFET’s for MC4X15A arriving any day allowing me to continue on this controller while I wait for this one.
This is a 3D model of my new BLDC Controller “MC3X3ACAN”. 3X means 3 separate Half H-Bridge channels, 3A means 3 Ampere- it is actually 2.5A max with 3.5A in peaks. This design does not include current sensors, but I have Hall Sensors since this is my target and better for low speed applications. I decided to skip current sensors, supercap and serial memory to get size down. I would have needed ca 2 cm more for that. But, I am also aware that currents sensors are very difficult to use on small motors at low speed, so it’s not a big loss. The 3D model shows STM32F303CB, but I will double check that I also can use STM32F103CB/C8. I have never used F303 before as well, so this will be fun to test!
The size is 50mm x 20mm and I am happy about this knowing that this is a 60V design with hall sensors and all components on top-side. I am not fully finished as I need to squeeze in capacitor mounting holes at left + I would like a few extra IO ports on a JST Micro Connector.
I used CAN on this for a change, but the focus here is to test my DC/DC converter as well as DRV8313. The big win is that this has all components on top layer allowing me to use the bottom layer as ground plane. Yes I can do that regardless, but I try to avoid ground planes on component sides because I get short-cuts easier ase I hand-assembly these for now. Replacing CAN With RS485 will only need 2 extra resistors.
One option that will require a bit more space is to replace STM32 with ESP32 and test the Motor & Hall Interface on ESP32. That would be a cool device with full Wifi and fun to experiment with so I will find time to do it.
This just show the routing of the TPS54060 based DC/DC. The upper picture show the actual routing, while the lower show the real PCB once I add the ground plane. I still lack a few details to connect ground to the ground-plane in cases where ground is on a blue (top) lane. In this case I actually want to order with and without ground plane to see the difference on noise. This design is for 0.5A. I would need a larger coil for 1.5A or 2.5A. The components here are 0603 mostly, so the DC/DC area is ca 15 x 15 mm only. Learning from previous mistakes I need to add a scope test point because testing the DC/DC is one of the main objectives with this design.
Two of the resistors decide what voltage I want out which can be anything from 0.8V to 57V. I used Reference values a bit adapted, but might need to experiment to find E96 values for specific voltages. I am typically interested in 3.3V, 5V and 12V designs. I will add a separate DC/DC breakout with larger coil before I order this.
This module took me by surprise. I thought I had ordered a 5V to 5V isolation module, but realized it is a 240V AC to 5V/1A full PSU unit in a box that is 38mm x 22mm and 18mm height costing 3.6 USD or similar. I actually have a project that need something like this, so this came very handy.
This is my first attempt on a 60V to 3.3V DC/DC converter. I am using the reference diagram for TPS54060 with a few modifications.
Starting at left I use a SS16 Shotky diode + a 1000uF since this is for a motor driver. You can otherwise use far less capacitance on the input. I left EN and PWRGD floating – EN is used to set under voltage shut down, while PWRGD signal if there is an error. L1 and C8 is the PWM filter and at right you have a standard Led to indicate power. C7,R7,C2,R6 and C3 are just from the reference diagram. Their values impact things like switching frequency. I need to read the datasheet properly and doublecheck with what others have done, so I can’t guarantee that this will work – but, we can give it a try!
This 3D model is the first attempt of routing a simple version of a DRV8313 60V BLDC Controller. This board is 50 x 20 mm, so it is really small and you can see the DC/DC in the red circle. I drew the 1000uF on the outside because it will be mounted as an extension fo the board. I also decided to use a coil at the size of 2x 1206 package. I should mention that all components here are on top-side. I will return to the BLDC controller itself later. This is DRV8313 With hall sensors only. This is a simpler design than the one I mentioned earlier as it lack the super-cap, current sensors and Serial memory, but it still have hall sensors. Looking at the density of the Board I probably need to extend the length a few mm as I finish it – lets see. To add the missing features I probably need another 2 cm – not sure.
I was hoping for even smaller Space on the DC/DC, but the number of components and the size of those SS16 diodes drags it up a bit, but draw a square 15 x 15 mm on a paper and you realize how small this actually is – and this is a 60V to 3.3 DC/DC delivering 0.5 to 1A. This design is 0.5A, but I can swap out with TPS54160 to get ca 1A if I need to.
I found 2 series of DC/DC converters that can handle 60-75V from TI that also is available from AliExpress showing that they have some popularity. These all cost around 1.2 USD from my sources and are decently small.
These converters consist of a chip with build in MOSFET’s and PWM generator so you basically add the inductive filter and a bit of external components to adjust values. I will end up with 12+/- components on each design. Current limit range from 0.5 to 3.5A on what seems to be pin compatible devices.
Focusing on TPS54060 for now that deliver 0.5A and comes in a very small MSOP-10 package with a Pad on the bottom. I know that some of the 1206 package inductors are rated to ca 200mA and I use one of these on the DRV10983 with success. I was thinking of replacing the AMS1117 on the DRV8313 with this design and minimize size on everything. 200mA is a lot where space does matters due to total size.
60V is quite attractive for BLDC controllers as it makes it very safe to operate 48V. For an actual 60V system I would use the 75V LM5575.
Adding to this I also found a dead cheap linear SO-23 Regulator 16V to 3.3V/500mA (SPX9918). This comes in both 5V and 3.3V versions making it easy to operate with 12V, 5V and 3.3V. I will need 12V for Gate Drivers, but I might also need 5V for some chips.
What I still lack is a low cost/small space isolation DC/DC for 12,5 & 3.3V.
I fancied testing my MC4X15A motor controller as the driver for a PSU. The code is very simple as I bit-bang a PWM with 50% duty and use filter consisting of a 100uH coil and 1000uF capacitor.
The result was quite good. I did however notice some input ripple. As I also scoped the Lab PSU output I saw a much, much smaller of the same ripple. Replacing the cables the input ripple improved. What happens is that due to wire resistance we get a power drop as we start drawing current. The drop was actually 1V before I changed cable.
My home made little PSU actually worked quite well. I would have needed a better filter, but output ripple was not horrible and if I had put a decent driver and wiring it probably would have disappeared.
I used 100uH, but a real PSU would use something like 10uH to get a lower power drop in the filter. My motor controller hold it’s ground at 1A, but temperature on HEXFET’s started to rise at 1,2A. I need to work on cooling obviously.
This scope pic is from the 3.3V on my MC4X15A – Universal Motor Controller. The MCU is running and I have the 0.33F Supercap mounted. Ca 200mV point to point ripple is to much for my taste, but it works and this is far better than I have measured out of the Lab PSU’s. I am also using the DPS5005 in this case just to see if it worked at all.
This started as a small experiment as I wanted to see the effect of swapping out the inductor on my LMR14206 – I obviously need to revisit my lab PSU design. The lab PSU and scope is located next to each other on the shelf and I only need to switch it on to introduce noise – I don’t even need anything connected. I obviously have introduced a noise source in my lab that I need to figure out.
This is a set-back because I have been extremely happy with DPS5005 before this.
Returning to LMR14206 I seem to be stuck with 200mV point to point ripple. I am also puzled to as why I see the same ripple on 12V and 3.3V, but I will get some help investigating that. The actual reading on the scope pic is much higher, but that is the external noise. The ripple signature will differ a bit from using DPS5005 versus Thaoxin as they introduce different noise pictures. The small spikes you see above is the 1.25Mhz switching frequency of LMR14206 – and just for the record – it’s no problem adding a filter on the 12V and remove this ripple, but that add PCB size and complexity – part of the objective here was small space.
I decided to test my LMR14206 based DC/DC again and replaced the 15uH inductor with a 47uH inductor on the 12V design. The scope pictures was a shock:
This first scope picture show what I saw as 12V out. It is 12.2V, but look at that ripple picture of several voltages. To compare I scoped what I got out of my PSU and what a shock – I saw the same signature in and huge spikes & ripples out of the DPS5005 based PSU.
This is with no load and it show the same noise signature. The Scope above have different time scaling. Replacing the DPS5005 with the older Thaoxin I also instantly saw a different ripple signal from LMR14206 as can be seen below:
This is a bit better as we have 12.2V and +/-100mV ripple out. But, I need to go back and open my DPS5005 to figure out where the ripple noise is introduced.