Out of connector space

It’s fun to assemble a Hat as complicated as a 4-channel Motor Driver the first time, but you need to be prepared for a few surprices. I spaced out 4 connectors to be able to test each channel better and the intention was to add JST Micro connectors. But, as I only used 1.27 headers on the 3D and not the proper package I missed out that the space to components on each side is to small (see red square). I will make this work, but a note to rev 1.2 is to modify this.

And while we are at it – I have not added a single led on the 60V DC/DC PSU – very annoying since I power the MCU and Driver separately.

Don’t worry – it will be plenty of comments that need to go into Rev 1.2.

This board is the first of this design, but I tagged it Rev 1.1 because it is a diversion from rev 1.0 on the smaller 30V/20A design.


To tall components

I am quite pleased with the 1000uF and supercap design, but they are to tall for the 8mm spacer between boards. I will have problems stacking other board on top as they risk shorting the boards. I can just about get one of the smaller super-caps, but no chance for the 1000uF capacitors.

The easiest solution is to just replace the spacer with an 11mm PCB spacer that is perfect for the connector anyway. I do however have an additional challenge with the heat-sink coming on botton. This Board is ok by itself, but I need to adjust the mechanics to be able to stack it.


Failing MCU

I have always added a minimum on components on my design and on the 60V/50A Motor Driver I have 4 PSU of which 3 is SPC3819. So assembling this I only mounted a minimum to get the MCU ticking and got a surprise – it would not tick. Soldering off MCU, putting it in tester and it ticks perfectly. Soldering it back on and no. Ok, soldering a 2nd unit and I have the same problem. So, I finally added the super-cap to the PSU above which feeds the MCU and voila – they both work.

This circuit mistake is pure stupidity from my side. I assumed it was so much capacitance that I could drop the standard 10uF on the output not considering the fact that without anything the smallest dip in voltage will be exposed to the MCU causing havoc. More important, I think I need to modify my designs to have a 10uF close to power input on the MCU’s from now on.

The four PSU’s are:

  • 3.3V from USB (above)
  • 12V for gate drivers (DC/DC)
  • 5V for Hall circuits
  • 3.3V for non-MCU parts

The MCU part have the supercap and can feed from the 12V. But, even on the 5V input from USB – no capacitor. I see the mistake – it would have a cap there if it daisy-chain and feed from the 12V, but not if it feed from USB. I don’t think the designer was fully awake the morning he drew this ๐Ÿ™‚

The purpose of these PSU’s are that the 5V on the RPI buffer can feed the MCU without being connected to the 60V chain of destruction.

R30 has the wrong value in schematics – I always use 2k2 on leds.


3-Phase 50A Modifications

I want to attempt a few changes on this 3-phase controller.

  • Remove the 3rd current sensor marked in red at top.
  • Remove the output holes at right and take the output directly from between the MOSFET’s.
  • Add at least 1 temperature sensor. I can use more space between MOSFET channels and maybe squeeze in the temperature sensors here. I would prefer two, but one is ok.
  • Modify power input so one wire comes at top and one at bottom. This enables me to easier mount the capacitor directly on the wires.
  • Strengthen power paths to support 50A++. The MOSFET is capable of 160A and 400A phase currents, so it is all about heat dissipation and current paths.

I have no experience with these MOSFET’s, I still lack experience with the temp sensors, current sensors and 2-3mm wires etc – so it will take a while experimenting on the 4 channel before I am ready to move on this smaller and more specialized design.

AD5231 Digital Potentiometer

I showed the MOSFET driven resistor array earlier and while searching for digital potentiometers I found 2 that are SPI based on 10K. One is the MCP41010 with 255 steps, but the one I really liked is the new AD5231 with 1024 steps. They exist in 10K, 50K and 100K versions and provide a far more elegant solution that a discrete array of MOSFET’s and resistors.

AD5231 cost ca 4.- USD, but it contains memory for power up, support both 3V, 5V and +/- 2.5V and a lot of advanced functions. I have a few analogue designs I want to dig into with this, an analogue PSU is one of them.

Wiring the 50A controller first time

I started to mechanically assemble the 4 channel 3KW controller. One note is that 2mm wire is easy to work with, while 3mm wire is very hard to get right. In fact, to assemble this it might be better to design with 2x 2mm wires than using a 3mm. I have not started with components yet, I am just making the mechanical wires ready. All in all it went easier than I feared, but I still have some wires to prepare in the middle so we will see how it goes.

Just to remind everyone – the 2-3mm wires are to support 50A out.

As can be seen on this pictures – these boards have a major design flag. You can see the square pads that will solder to the pad’s of the wider SO8 MOSFET’s, but what is missing is the array of went holes to the back-side. This should have connected the MOSFET’s to the back and used the ground plane as base heat-sink + enabled us to connect a heat-sink that was connected to the MOSFET’s. Without this the MOSFET will heat up far to fast, so I am not going to attempt 50A out of this yet. But, we should still be able to manage 20-30A out.ย For now I just want to assemble and test the unit. I lack both motors and PSU for heavier load testing anyway yet. I will send for a modified revision as soon as I have some experience from this.

What I am most curious about here is to test the new super-MOSFET’s supporting 60V and 160A with an insane 400A pulse drain + temperature sensors and current sensors. I have a ducted fan 12V/30A + a 12V/15A motor, but I need to increase my arsenal of test motors.

Programmable Function Generator


Assuming I create one Hat with AD9851 and a second with an analogue, programmable PSU and a 3rd with an amplifier this project suddenly becomes very realistic. I doubt that I can get all I need on one Hat and an analogue low noise ย +/- 24V PSU is actually so awesome that I would like one anyway.

AD8008 is a SO8 size amplified that support 5-15V and ca 100mA up in high frequencies. I will need a different solution for +/- 24V out, but I will return to the amplifier Hat.

I might also use AD8008 for high frequency 3.3V/5V signals and simply settle for <300Khz or something on the more powerfully amplifier focusing on audio channels.

I need to find time for some breadboard experiments before I start on this + I need to look for solutions to higher frequencies on the amplifier Hat. It will be much cheaper to just go and buy a 2-channel DDS ready boxed, but where is the fun in that ๐Ÿ™‚

Analogue, Programmable PSU

This weird circuit is a programmable, analogue PSU. It is basically only a LM317 and an array with resistors and MOSFET’s so I can program the voltage out by selecting a combination of 10 resistors. This is not straight forward, but I can at least Select 10 preset values. In addition I use an ADC to measure actual voltage out. I need to calculate resistor values, but this will work just fine and solve my challenge with how to get a programmable PSU for a function generator.

R7 and R12 decide the max output voltage. By switching on/off MOSFET’s you change the voltage divider adjusting LM317 and hence the output voltage. This is not the most elegant PSU, but it is analogue avoiding the challenges with switching noise on a DC/DC regulator.

To get a negative voltage I do the same with LM337 and a different MOSFET array, but I will get an additional challenge I need to divide input voltage. Assuming I have 24V in I can establish ground out on 12V and have a circuit that output +/-12V. To do this I also need to ensure that signals to the MOSFET’s have correct voltage using the new ground as reference. I think I can get away with that by using the new ground as ground for the MCU and AD9851 as well.

I use 2N7002 in the example above which cover 60V in SO23-3 package, but you can use any N-channel MOSFET. LM337 needs to be associated by P-Channel MOSFET’s I think. This circuit is excellent for a breadboard test.


Function Generator Hat

I need a function generator and I like AD9851. What I really would like is a Function Generator Hat with programmable +/- voltage like the diagram below:

This is not impossible, but the DDS, Amplifier and Programmable PSU on a small Hat is not realistic. Or – well – I need to think about that one. In the meanwhile I decided on a compromise as follows:

I can easily switch between 3.3V and 5V using SPC3819 and that alone is a start. AD8008 amplifies the signal at high bandwidth giving 100mA out which is decent and AD9851 deliver a very decent 70Mhz function generator. This should be very realistic to get in a Hat format.

I seriously would like to program +/- 10V or similar out, but I need to work on that. It is possible, but I have 2 challenges – (1) is the noise of a DC/DC so I need to dig into a programmable, linear PSU. (2) Amplifier at high frequency, but I wonder if I am ok with <1Mhz at this functional level. So, in short – the programmable amplifier can be a separate Hat.