My Advanced Realistic Humanoid Robots Project
artbyrobot
Posts: 85
I am planning to use the Parallax Inc. 3-axis gyroscope for the balance system

So I did manage to add a pair of braided solder wick wire as a added layer over the nickel strips of the highside mosfet setup and I insulated that with red electrical tape folded over it. I also insulated everything else in sight for the most part. I lost the original control circuit so I made the replacement flat flex pcb style which should be more robust. I also added a yellow 30ga wire for the 20v input line of the gate pin of the main mosfet. I also got my fiberglass window screen mesh ready to be installed to insulate the solder wick wires acting as heatsinks. So this setup is getting close to install ready now but I want to test it again to make sure its still working after all the major changes and messing with it so much.
On another note, I noticed that stacking the 0.1mm x 4mm x 100mm nickel strip plus braided solder wick to reduce resistance and increase conductivity made the lines a bit thicker than I'd like, especially after adding tape. So to resolve this I decided to roll with 0.2mm x 6mm x 100 mm hand cut out strips of pure copper plate. I was not aware of this option before but I was able to find copper in .2mm thickness in a roll on amazon that I can use for this. With this thicker size and the much lower resistance of copper I should be able to run 30a through it with less than 1w of waste heat which is great. And this will still give me a way thinner result than what I used on this first one while lending lower resistance by getting rid of nickel strip entirely for the high amp stuff (aside from the shunt resistor nickel strip which I still plan to keep).
For continuity: this project began in an earlier thread here (2024 build log): https://forums.parallax.com/discussion/176010/my-advanced-realistic-humanoid-robots-project --- This new thread is to resume visible updates going forward.

Comments
I was randomly talking to chatgpt about how I have been feeling burdened by having to make my own BLDC motor controllers for my robot lately and it randomly mentioned integrated half-bridge power modules as something I could use to cut down on my labor load in making these motor controllers. This immediately stood out to me as something I'd never heard of and something intriguing. I have so far been working on my lowside switch and highside switch which together form a half bridge. Many solder connections have been involved and alot of discrete components are involved. The concept of an integrated half bridge on a single chip - meaning two big power mosfets and all the drive circuitry for those power mosfets all condensed into a single chip would be a huge reduction in size and component count as well. So I researched if any are able to do 8v 30a for my 2430 BLDC motor's needs. Turns out there are some out there. At first I was looking at Texas Instruments CSD95377Q4M Half‑Bridge Driver (30 A) which can do 30a continuous so perfect for me. However, I didn't want to lock myself into a single vendor chip that may one day be discontinued. I prefer something ubiquitous with many competitors making it that can be purchased from aliexpress. Something commodity level. This way I future proof it and don't have to worry about any one manufacturer discontinuing parts I'm using and prices soaring because of that or simply the part becoming unavailable. So after a bit further digging I found CSD95481RWJ QFN chipset on aliexpress sold by several vendors and one was under $1 each. So it is equivalent to two power mosfets plus all drive circuitry for each power mosfet all for under $1. This one also has 60a continuous rating. It is only 5mm x 6mm in size which to me is insane. This is so much smaller than the setup I've been working on yet just as powerful. They are usually used for tiny buck converters and used directly on videocard PCBs and in servers and in automotive PCBs and much more. In any case, using 3 of these half bridge chips you can drive a BLDC motor. The consolidation of so many parts into such a tiny package is truly blowing my mind. So I ordered 60 of these chips - enough to drive 20 BLDC motors. I am leaning toward using these for all my motor controllers if working with them is easier than working with discrete components like I have been. They are cheaper to work with I think - I'd have to run the numbers on that though. They even have built in temp sensing we can read in which is a bonus. Their built in current sensing will not work for BLDC motors so I'll still need my shunt resistor current sensing circuit setup external to it but that's ok. All in all these appear to be a game changer in terms of reducing part count so less potential points of failure and also reducing board footprint so miniaturizing my electronics even more which is very good for us. I'm still needing to work out now how I want to hook these up in terms of PCB making for it and any discrete external components needed to support it. It is also top cooled which is interesting. I'm envisioning using silicone thermal adhesive to glue on a copper pad that has my braided solder wick wires already soldered to it. These will carry the heat away to my water cooled pipe system.
I'm kind of amazed that nobody really seems to use these for BLDC motor controllers. They seem perfect for it. Maybe I'll start a trend. Assuming I don't find out the hard way why they are never used for this application!
note: the full product title: "(5pcs)100% original New CSD95481RWJ 95481RWJ CSD59950RWJ 59950RWJ QFN Chipset"
note: for my previous BLDC motor controller design I was needing to use 6 digital IO pins to drive a single BLDC motor controller's 6 power mosfets by way of their control circuitry. But for a BLDC motor controller design using 3 CSD95481RWJ H-bridge chips, I will only need to use 3 digital IO pins on the microcontroller. These CSD95481RWJ H-bridge chips use a pwm pin that is a tri-state pin - you can have high, low, and floating as the signal you send to it from your microcontroller. Digital output high and low are the usual digital output modes but the floating mode you do in your code by configuring the pin to be a digital input pin which makes it a floating pin. These 3 states fed into the chip makes it either give you V+ as its output or V- as its output or just off/floating as its output. This corresponds perfectly to the normal h-bridge 3 states we'd be using with our discrete components previous microcontroller design. So this savings in total digital I/O pin usage on the microcontroller means you can drive more motors per microcontroller in theory which is pretty cool.
Well I deep dove into the CSD95481RWJ IC route. I estimate it will cut the work in half roughly for every motor controller made and cut the size taken up by about 60% compared to my previous discrete components approach.
Now I will note that I did come across the BTN8982TA which is rated to 40v and can handle 30a continuous 50a peak short burst. But it's TO-263 form factor so about 4 times as big as the CSD95481RWJ. It also costs about $2 each so double the price. It's not a bad option though all things considered but just not quite as good as the CSD95481RWJ for the reasons mentioned. I note it here so I don't forget about it. It can be a great option if the CSD95481RWJ doesn't work out in the end or something.
Anyways, for the thermal concern - which is my biggest concern, I plan to top cool the CSD95481RWJ using a .2mm plate thermal siliconed into place on top of the CSD95481RWJ and then solder a bundle of 4 braided solder wick wires to that and run that off to the water cooled copper pipe about 4" away. The top cooling only handles about 30% of the cooling according to chatgpt. The most important 70% is from the bottom cooling through its pads on its bottom. For this I plan to use double stacked .2mm thick copper plate soldered to its IC pads. So that's .4mm thick. Also it will be around 2mm wide where it attaches to the pads. It will then route out from under the chip and swing upward into free space and head over to the 8v+ and 8v- buses coming from the 8v motor battery banks in the robot's lower torso. These thick copper traces I will fork off of with braided solder wick wire right near the CSD95481RWJ IC chip for thermal conductivity reasons. This braided solder wick wire will be live so I will wrap it in fiberglass window screen so nothing can touch it - preventing short circuits. It will then be electrically isolated from where it connects to the water cooled copper pipe with thermal conductive tape. The braided solder wick wire attaching to these thick copper traces will be a bundle of 4 per trace. The various decoupling capacitors this chip calls for I will connect to its output pins using flat flex PCB DIY hand made. I'll be attaching this PCB first and attaching the thick copper traces to the underside pads second as a separate layer that goes underneath the flat flex PCB layer. The flat flex PCB layer will mostly stay around the outsides of the chip and have its center cut out and removed - the part of it that would get in the way of the underside main pads under the chip. So the flat flex PCB will just hug the outsides of the IC mainly in a U shape around the chip leaving the center of the bottom of the chip free to solder to with my thick copper traces.
Note: the thick copper traces will be cut out with scissors from a roll of .2mm copper sheeting I bought on amazon which I mentioned a few posts back. Double stacking it wil double its thickness and increase its conductivity both electrically and thermally.
Note: in a usual setup with this CSD95481RWJ IC, a multilayer board with a array of vias is used to bring the heat downward off the chip and into another lower layer within the multilayer board where it can then radiate on said layer outward in every direction. In my approach, I use thicker traces than the layers of a multilayer PCB has so I have alot more local copper in play. Then instead of the heat transferring down and then outward in all directions on very thin copper, mine travels down then in a single direction outward away from the IC on that trace. The trace will need to be as wide as possible as soon as possible. I expect to get it from 2mm width - the width of the pad - to 5mm width within a few mm. This rapid transition to a wider width combined with the use of much thicker copper compared to a multilayer PCB's copper thickness of its layers means I should be able to exceed the thermal performance of a multilayer board using my approach. Especially since I also plan to quickly fork off the main traces with bundles of 4 solder wick wire braids that will carry the heat off to a water cooled pipe 4" away.
Note: in my attached schematic I only show a single CSD95481RWJ IC because they are all wired up the exact same way. It's just doing it 3 times for each of the 3 phase wires of the BLDC motor.
Note: I will use a single electrolytic capacitor per motor controller also not pictured in the schematic.
OK, so when I was thinking of using both my discrete components motor controller design parts I already made and then also separately implementing the integrated half bridge IC design going forward, it hit me that the 8v- and arduino gnd tie together on the half bridge IC by necessity but this ruined their intended isolation I needed for my discrete components motor controller design particularly for the lowside switching portion of that schematic. On the lowside switching portion, the little mosfet has 12v- and arduino gnd tied to its source pin. If on the integrated half bridge I also have to tie arduino gnd and 8v-, then that means 12v- and 8v- and arduino gnd are all tied together always.
That completely ruined the necessary isolation between arduino gnd/12v- and 8v- that I had intended to be in place for my lowside switch setup. So that was bug #1 freshly introduced that I would then need to solve for in my discrete components motor controller design. When studying this out on the discrete components motor controller design, another error hit me: when any lowside switch turned on in the design, the 12v- dedicated power supply gnd and the 8v- motor supply gnd become connected as long as that lowside switch is on. Since every lowside switch had always access to 8v gnd on its source pin, then even one moment of 12v gnd and 8v gnd attachment anywhere on the robot would cause every lowside switch in the entire robot to immediately turn on at the same time. So if any turned on, then all turned on. This was a huge oversight. For some reason since I only designed and focused on one half bridge conceptually at a time, I did not consider the effects one half bridge has on its neighboring half bridges. This just never occurred to me. I guess conceptually I envisioned that every half bridge had its own personal 12v ground from its own personal 12v supply that was electrically isolated from the entire rest of the robot. But of course that's not practical even if it is technically possible. So in testing, things did work, but would have failed as soon as I tried to test more than one half bridge at a time. So I caught this bug before testing revealed it.
I discussed this horrible situation with chatgpt and it taught me that in a complex system like a robot, grounds of all your different supply rail voltages cannot be relied on to be isolated from one another like I was treating it. Even if at times they were momentarily, one switch, one change and suddenly they are not and it all becomes a common system ground again. So if I can't safely assume a ground for any given voltage is safely disconnected from the grounds of other voltages, I should not rely on switching on and off access to any particular ground to any of my lowside switches. Instead, I should be shorting the gate driver of the lowside switches to ground to shut them off rather than messing with their source pin's ground connections like I was before. I am to leave the source pin's ground connection as 12v- and its gate connection as 12v+ at all times except when I want to shut it off - at which point I short the gate pin to gnd using my logic level mosfet to do so.
The fix was very straightforward and minor: I just had to add a 100ohm resistor in series with the gate pin of my big power mosfet lowside switch and then reroute my little mosfet a09t drain pin to the big lowside mosfet's gate pin instead of its source pin. The connection to its gate pin must be downstream of that 100 ohm series resistor so that the path from the big mosfet's gate pin has almost zero resistance when traveling through the little mosfet's drain line and over to its source line into ground. This way when you turn on the little mosfet, the big mosfet's internal capacitor quickly empties out, flushing into the path to ground created by the little mosfet and that discharges the big mosfet, shutting it off. When you want it back on, you shut the little mosfet off, which allows the big mosfet's internal capacitor to charge up again, which turns the big mosfet back on. So the setup now acts like a normally on relay.
Note: the resistor on the drain line of the little mosfet that we used to have when it fed into the source line previously is now removed. We want no resistance on there because that would impede the little mosfet's ability to discharge the big mosfet's internal capacitor in a timely manner. We want to be able to not only discharge that capacitor quickly but also direct all incoming current from the 12v+ line that makes it past the 100ohm resistor heading for that big mosfet's gate into our ground path. This rapid redirect flushes so much of that already limited current that hardly any can make it inside the gate of the big mosfet which causes the gate of the big mosfet's voltage to approach near zero volts. So it's called a "pull down" path to ground.
Attached is a photo of my schematic before and after the fix.
Attached is a photo of full updated schematic with the changes in place.
That all having been said, this discrete components original bldc motor controller design, now fixed, is worth keeping archived, but is now basically abandoned now that I have access to the time, money, and space saving shortcut of my integrated half bridge IC based design. It's kind of sad to abandon something I spent so much time on, but who knows, I may still use it if I ever come across a motor that I can't find a cheap half bridge integrated IC for in the future. It's a great schematic to have at the ready for that scenario.
Ok so I was thinking now that each half bridge is just a tiny IC rather than a pair of hefty power mosfets, the space taken up overall by my entire bldc motor controller is going to be about 3cm x 1cm x 2mm which is insanely small for 30a continuous at 8v motor controller! This realization caused me to reconsider whether I even need to treat this as a single motor controller cluster that has to be sat like a horse saddle onto the side of my bldc motor - my original intention for my discrete components original design for my original bldc motor controller. What I realized instead is that things are now so small that I can simply build a half bridge for each phase as a inline element nested inside the cable run leading to each phase wire of the bldc motor. So instead of having a dedicated spot for each motor controller, I'm going to have just a slight bulge in the phase wire leading out from the bldc motor and that bulge will contain the half bridge that handles that phase wire. All nested inline. This is the easiest way to implement and most streamlined I think. It also means the whole motor controller will just be "floating" in midair, not actually mounted to any motor or anything at all. Just part of the wire harness nested right in there. This is a radical approach IMO. Only made reasonable by the fact we miniaturized the design by such an insane degree.
So the previous version of the schematic was intended to be mounted to the side of the motor like a horse saddle and had an l shape so inputs would come up from bottom and outputs out to left side toward motor phase wires. These L shaped half bridge setups would be stacked next to eachother side by side. In the new variation everything is inline, inputs coming from right and outputs exit out left side to motor.
Here's the updated inline variation of the schematic (no longer L shaped flow like before).
This young YouTuber goes into lots of details about motor control for robots. That said, he uses the ESP32, not the Propeller.
-- https://www.youtube.com/@h1tec/videos