Thursday, July 1, 2021

Lots of machining!

Hello again, 

as always I did not plan to make such a long break from documenting stuff, but this time I waited to finish preparing all the parts so that the photos are as good as they can get. Basically, this entry is about making the parts needed for the remaining nine actuators and an additional tenth actuator that's going to serve as a test unit. 

The whole process took me around 1,5 months, but only because I had a few hours available every weekend (I did not want to mess up with my neighbours :P). The first step was to purchase the stock at a local company. I got around 5.5 kg of aluminium stock in 140mm diameter slices cut on a band saw.

The surface finish was quite bad so I had to face mill each side of each slice and then proceed with milling the parts. Besides face milling, each slice was drilled with seven holes to keep it fixed to the table. Each hole was widened on both sides of the slice so that the screw head could hide inside the material for the purpose of face milling.


Basically I've drilled seven 3mm holes, widened them at one end, screwed the stock to the table, face milled it, turned it around, widened holes by hand using a electric drill, screwed to the table and face milled on the other side as well. The whole process of face milling and drilling holes took me around one hour per two slices. 

When first two slices were ready I could proceed with machining parts. I didn't have any particular plan, just started with the parts I've had the least. These were the motor base parts:

During milling I found some things I could optimize for example before I used to mill the distancing part without utilizing the material that's inside the part. It was just cut out and additionally had to be fixed so that it doesn't fly away. I found out that the material could be used to mill the planet carrier and there still will be enough material to cut the distancing part. Additionally the rest of material on the sides could be used to mill sungear mounts. I'm not the best at describing things so I prepared a photo - story of the process :





I like how these PCB caps present in the sunlight (these were actually cut out of a 6mm aluminum sheet, hence the brownish finish on the first six of them): 

I wish I had flood coolant system, as after more aggressive cuts I had to wait for the part to cool down. Moreover I had to stand nearby with a vacuum cleaner to clear the chips in deeper grooves so that they don't build up. Anyway I'm happy with the overall result - the machine did just fine, without any major issues. After all, milling these parts was actually the reason it was created. Group photo: 


After finishing all the custom parts I proceeded with motor parts and gears I had to modify slightly. The rotors were milled with four slots and the top surface was face-milled. The shaft was cut so that the encoder magnet could be glued onto it. 



The thing I'm not particularly happy about is that five out of 12 actuators have the magnets glued to the shaft without any additional fixture. The rest is actually held in place using a miniature 2mm rod going through the shaft and the magnet, because the magnets have a small hole in the center. Unfortunately I ran out of stock on them and had to use regular ones. 

The magnet on the right has a small 2mm hole which helps to align and properly fix it to the shaft

If anyone knows where to buy them (I got these from a friend of mine), I'd be grateful for leaving a comment. 

Next I cut out the stators out of the original case. It was a long and stressful process as I didn't want to mess up the windings or the laminated steel sheets. I centered each motor in a vise and bored a hole through the aluminum case leaving only around 0.4 mm of material on each side. Then I manually milled the remaining material in two opposing spots and used a screwdriver to break the walls to the inside freeing the stator. 

After that each stator was cleaned and a thermistor was glued in between the windings with expoxy.



The sungears had to be modified slightly as well. I had to mill two lobes on opposing sides so that they match the part that is screwed to the rotor. It was quite stressful as well and ended up with one broken tool (the 1.5mm 3 flute endmill) when I wanted to go a bit faster. 

When these were ready I press-fitted them onto the aluminium shafts that are visible on the photos below. 

As for now I've finished soldering the remaining PCBs, without testing them yet. Now it's time to press each stator onto the base part and make sure everything is hunky dory. Some pre-assembly family photos in the end: 





The process of tiling these parts was tedious, but I'm really happy with the photos (could use some more light though). 

Thursday, May 6, 2021

Power board, control board and isolation module PCB design

 Hi!

Lately, I've been working on a few PCBs located in Wolfie's torso. In theory, there should be at least two PCB's - one responsible for power supply distribution (in my case called the "power board") and the other serving as SPI to CANFD converter equipped with an IMU, magnetometer, and wireless communication (in my case called the "control board"). 

the internals of the torso 

Having talked to my friends from MABrobotics I decided to galvanically isolate the main computer and the control board from the high-power actuators to minimize the chances of damaging the control unit in case any bad things happen on the side of the actuators. At the same time, I didn't have any chance to play with isolated circuits before, so it seemed to be a great opportunity to learn some new stuff. 

As there isn't much free space inside the torso and I didn't want to place the power board near RPI I had to go for a modular design. I decided to split it into the non-isolated base part and the optional isolation module. I think it is quite a reasonable solution because in case there's something wrong with the isolation part, I can always use the basic, non-isolated variant. After a short introduction let's have a look at the torso electronics diagram:


Starting from the left side, there is a 4S2P 16.8V Li-ion battery with a BMS integrated into the battery case (I plan on doing another write-up about the battery itself) and the main supply switch. Next, there's the power board PCB. It has a main shunt resistor that is used to measure the current going in for the whole system (ie. the actuators and control electronics). The small voltage drop is amplified using a current sense op-amp and the battery voltage is monitored using a voltage divider. Both voltage signals are fed to a connector that goes to the control board. In the basic variant (without isolation), RPI and control board power supply comes from a non-isolated DC/DC converter. The actuators are turned on and off using a HotSwap controller that is equipped with its own shunt resistor just for the actuators and controls three external MOSFETs. 

Power board


In case the isolated part works properly in the first iteration the current amplifier and DC/DC converter are not going to be populated on the powerboard and the isolation module is going to be placed on top of it. The isolation module is equipped with an isolated DC/DC converter supplying the 5V bus (3A max), an isolated ADC, and a photocoupler for isolating the digital on/off signal for actuators. There are also two LDO's for the primary and secondary side of the ADC and actually, that's it. The main difference is that no analog voltage signals are connected to the control board, but rather an SPI bus that is used to read the ADC's readings. 

Isolation module

There are only six connectors on the power board for powering the actuators, but these get multiplied on the front and back side using two small distribution boards like this:
        
CANFD bus and supply distribution board

I'm not particularly happy with them - I think they are really packed and kind of ruin the slick design on the inside of the robot, but trust me there's no other way. The robot is simply too small to fit that many connectors in any different area. 

The blue rectangle on the main diagram is illustrating the components placed on the control board. The board is designed to fit as a "hat" on the Raspberry Pi. It has two G4 microcontrollers - one solely for CANFD communication with the actuators (the communication is isolated as well), the other working as orientation estimator (IMU+mag), taking care of wireless communication and SPI readings coming from the isolation module. It's also partially responsible (together with RPI) for controlling the actuators supply bus. In case the RPI or the navigation algorithm detects any faults they can, independently of each other, turn the actuators off.

Control board

I guess the explanation combined with the diagram will help to grasp the overall idea. The PCBs are going to be sent for manufacturing soon, but I'm mostly worried about the global IC shortages. We'll see how it goes - hopefully not messing up my plans :) 

The next post is going to be about the custom battery I'm preparing right now ;) 

Saturday, March 27, 2021

Single leg prototype - jumping tests

Hello!

    I hope this entry will be more exciting than the previous ones, as I'm going to show you the working prototype of Wolfie's leg. The leg was built to confirm that the actuators can withstand high torques occurring while jumping. The setup completed more than 1000 jumps on the test stand and no failures were observed so I guess after some more testing I'll be ready to continue with making twelve of these :) 

    The test stand was built from parts I had lying around. That's why it is kind of ugly. Since it's just a tool to test the actuators I didn't pay special attention to aesthetic aspects. It has a plywood base to which a 400mm long 40x40 extruded aluminum column is mounted. The 8mm rails are the remains of my old printer which got disassembled (I have built a new one - will write about that soon ;)) and so is the cart with linear bearings. The rails are mounted to the top and bottom of the column so in the middle they appear to be a bit wobbly. 


    The hip of the leg was slightly modified to fit the cart and the rest of the leg remained unchanged. It is able to operate its all 3DoFs, however, due to lack of MOSFET transistors, I am unable to operate the hip joint for now. It's a subject for another discussion but long story short I had to replace the MOSFETS some time ago as I found that the ones I was using started to fail at higher voltages due to unknown reasons. I still find this very odd and want to do a more controlled comparison between the two (SIS862DN (failing even though it is "beefier" in parameters) and SISA88DN (which is working just fine)). So for now it's a 2DoF leg, but soon I'll be making an order for powerboard parts and I'll get these MOSFETS restocked. 

    Besides I modified the cabling so that the supply cables are thinner (AWG18 compared to AWG16) and I added some twisted CAN cables for improved noise immunity. Still thinking about the best way to route the cables inside the chassis, which is somewhat linked with the powerboard itself (that I'm currently designing). 


    Actually, there's not much more to it. I derived the kinematic equations once again just to find out that the ones from here are working just fine and are much shorter (I was unable to simplify my equations). Besides I wrote a simple python code to command the trajectory (in reality it's just a few points in space) through my CAN<>USB dongle. Eventually, this came out (sorry for the image aspect ratio - it was the only way to film the test stand without revealing the mess on the desk :P):




    I'm pretty happy with the results. I managed to achieve 15cm of jump height and it could probably be more on a higher test stand and better rails. Moreover, nothing actuator-related failed which is great news. I was particularly worried about the sungear slipping on the shaft and breaking my double keyway connection or just a shaft fracture, but it didn't happen through the tests. The actuators remained cool, at around 30*C even after a few hundred jumps. The only thing that failed was the slipping belt that drives the knee. It turned out that it was not tensioned properly and slipped under big loads. This was resolved by making the leg 1 mm longer so that the belt was initially tensioned and could be tensioned even more with screw tensioners.

    Another failure, that was kind of expected (and isn't taken into account :P), was the rubber material on the foot. For the initial prototype, I have used a very soft (20 shoreA) urethane rubber that I had lying around, just to test my mold and the foot design itself. During testing, the soft rubber got squished and broke off the foot. I have to do some research for a better foot material for sure.

    Anyway, this is probably all I've got for today. Currently, I'm working on a powerboard PCB and battery pack design, so soon I'll post something about that ;) 

Wednesday, February 17, 2021

[OLD PROJECTS] Minisumo robots (part 1)

Hello!

    This time I'd like to write about something different from walking robots and brushless actuators - my robotic projects from the past. These projects were a very important part of my engineering carrer and I feel obliged to at least mention them here and leave a short note on the most important ones.

    I started my hobby by building simple sumo robots for competitions that took place regularly in my country and in many other places all over the world. The sumo robots are standardized i.e. the each category has a certain mass and dimensions restriction that the robot has to fulfil in order to participate. The goal is simple - push the opponent out of the dohyo (this is the name used for describing the ring the robots are fighting on). Each event's rules are different, but generally the robots should not intentionally destroy each other, directly interfere opponents sensor readings, emit gasses or drop any parts/substances on the ring (so it is not the battlebots kind of thing). 

    I used to build robots in two categories - mini and nanosumo. This entry is dedicated to my minisumo robots. 

Haker

    Haker was my first minisumo robot created back in 2011/2012. The frame was soldered from manually cut laminate pieces. The motors were just two big servos and the wheels were made out of nutella jar caps with adhesive pads glued on their perimeters. The robot was equipped with two flaps used to lift the opponent (or trick its white line sensors, so that it backs off and falls of the ring).


Robot's structure with flaps down
Robot's structure with flaps in the down position

Robot's structure with flaps up position

    The controller board was based on through-hole elements and home-etched laminate. Looking at it today I'm amazed it did work back then :) The opponent sensors were homemade IR sensors with two infrared leds modulated with 36Khz PWM signal and a TSOP receiver. It was essential to cover the leds with black tape, so that only the reflected light would trigger the receiver. White line sensors were just tcrt5000 infrared reflective sensors mounted in each of robot corners.

Main controller board - the microcontroller is atmega8, and the H-bridge is LM298



    Two opponent infrared sensors - each of them was equipped with a separate Attiny13 microcontroller

Haker with onboard electronics 

    Eventually the robot was equipped with flags that meant to distract the opponent's distance sensors. 

Finished Haker robot

And a short video of robot operation: 

Haker 2

    Haker 2 was the second robot that I created. It came with a few new solutions, especially new motor unit based on worm gears, and integrated proximity sensors. The goal was to keep the center of gravity as low as possible, and reduce robot's height in comparison to previous iteration. The base of the robot consisted of a home-etched PCB board with steel case around it. The PCB had an extension for mounting the gearbox and the motors.

First revision of the Haker 2 control PCB

Second revision of the PCB

    The gearbox was built with available components from disassembled devices and toys. Back then I wasn't particulary worried about the durability of these plastic gears :) Of course, in the end, it turned out to be a poor drivetrain design for minisumo robot, as the gears were wearing out quickly during battles.
The gearbox without motors

    The wheels were initially made of two pieces of PVC tube wrapped with small rubber bands, but eventually the tires were casted from soft silicone for improved adhesion.  



    The case was made of 1.5 mm metal sheet, that was cut in the desired shapes. Some of the pieces were soldered together in order to form a solid shel



    Back then I even tried to make my own soldermask using a special high-temperature paint. It was rather soft compared to real soldermask layer, but it protected the PCB from random short-circuits between traces. 
PCB with homemade soldermask

Finished robot
And a "battle" video with it's older brother:


Family photo

Haker 3

    Haker 3 was the third and last of "Haker" robots series. The biggest difference, compared to earlier versions, were the pololu micro motors (which were used in most minisumo robots back then). These motors were really small and could easily fit inside two PCV tubes serving as rims. Again the robot consisted of a big PCB board:


    The PCB was the base to which all other components were mounted. I remember I found this "powerful" double channel H-bridge MC33932, which I was very excited about as other robots were based on TB6612, which used to fail from time to time. White line sensors (KTIR0711S) were located in the front part of the PCB, near the edge. 

      The cover was made entirely out of laminate pieces (that weren't aligned very well...):


    The device on top of the battery is actually a start module that was used to simultaneously turn on both robots, instead the "five second rule" (the robot was triggered by hand and had to wait "exactly" five seconds before starting). With the start modules it wasn't possible to cheat by launching the robot earlier than the opponent. 

    The only videos I have are when the robot wasn't equipped with laminate shields: 

    This entry is getting too long, so I will stop for now and divide the history of my minisumo robots into two parts. Till now I've introduced three of five minisumo robots that I created. These first three did not win any competitions, but things have changed, when it comes to the next two robots ;)



Tuesday, January 12, 2021

Static torque testing

Hi!
 
Recently, I haven't posted any updates as I was completely absorbed with my bachelor's thesis. Thankfully, it's almost finished and I'll have some more time for the actuators and quadruped robot soon. This post is going to be short, but I want to post the static torque data that I said I would, but most probably I forgot. So here it is: 


    The test bench consists of a single motor, dynamic torque transducer (it was purchased by our sumo robot club to measure both static and dynamic torques), and a lever to fix the other end of the transducer's shaft to the test bench. Obviously for now the sensor works only in the static scenario. The motor was commanded with incrementally increasing q currents and the measured torque was plotted. I tried to cool the motor down to room temperature before each run in order to minimize the influence of increased temperature. 
       It was able to produce 3Nm of peak torque at about 35A of q-axis current (near 10A on the power supply). The torque constant was determined to be roughly 0.125Nm/A in the linear range. After commanding currents above 25A the motor starts to saturate, so the torque performance is reduced and the motor is heating very quickly. Overall I'm happy with the results, 3Nm of maximum torque should be sufficient to perform basic types of gaits. Especially if I make the quadruped structure lightweight. 







Saturday, November 21, 2020

Actuator thermal testing

 Hi

Today I'd like to post some thermal data that I've gathered recently. I wanted to check what is the maximum continuous torque of my motor module. By continuous I mean the amount of torque the motor is able to produce infinitely without overheating.  It seems that many actuator manufacturers  interpret "continuous torque" differently - sometimes by continuous they mean a short period of time, which is far from being continuous (Josh made a similar observation in his log: https://jpieper.com/2020/08/07/up-rating-the-qdd100-beta-thermal-bounds/). I decided to test my actuators and determine what is their continuous torque rating. The test stand was rather simple - an actuator with  a lever pushing against a table. 

I was simply commanding different torque values and waiting for the actuator to heat up. This was quite a monotonous process as the estimated time constant was about 16 minutes and I stopped each experiment after a duration of five time constants (almost 1,5h). 

I wanted to go one step further and prepare a simple first order system model.  After all the thermal circuit can be modelled similarly to a simple parallel RC circuit, where the resistance is the thermal resistance form the module to air, capacitance is the thermal capacitance, voltage is temperature and current is power loss. The input to the system is power loss that occurs on the winding resistance. The model is able to fit a single curve, however due to changing thermal resistance to ambient it is no good in predicting a few different responses. This is the outcome: 

The ambient temperature was about 25*C, and the actuator initial temperature was 30*C.

As you can see the thermal resistance varies with different currents being applied. This is why it is so hard to predict the resultant temperature response based solely on the current. Nevertheless the real characteristics helped me to determine the maximum continuous torque which is 0.875Nm (7A), and with that current the device should never reach 65*C. 

In the next entry i'm going to publish some static torque data. 

Tuesday, November 17, 2020

New method of fixing the sun gear to the shaft

 Hi,

this is going to be just a short log about new way of fixing the sun gear to the aluminium shaft mounted to the rotor. During some high speed tests of the actuator I noticed that the sun gear slipped on the aluminium axis when I tried to stop the output 3d-printed lever. I was kind of expecting it as I haven't made a strong interference fit and used just a regular epoxy adhesive and paid no extra attention to that part. I decided to try some new methods. 

The first idea was to make a hole in the aluminium stock before milling, and then mill the motor shaft part so that the shaft has this long groove. A similar groove was milled in the sun gear as well. As you might expect it was supposed to be a keyway connection. The key was simply a piece of mild steel screw shaped to fit the empty space. 

before pressing in the key

After pressing the key


The connection looked ok, but was a bit springy when I tried to break it using pliers. I succeeded eventually and saw the shaft was weakened by the groove. 

broken connection


The second idea was to make something like a shape connection (I do not know the professional name) where the shaft and gear are milled with a matching shape and then just pressed onto each other. This connection does not require additional elements, however it is inevitable to avoid the rounded edges when milling the shaft "tab". The rounded corners favor breaking the gear by pushing on its walls outwards. 

"shape fit"
This kind of connection weakened the gear and when I tried to break it I just broke the gear. It could be influenced by the additional force exerted by the pliers as well, but I did not want to take that chance. 

The last idea was to make two small tabs on the shaft (making it more rigid as well) and two grooves of the same shape in the gear. However the tabs were substantial smaller, and they reached only half of gear's length. The rest was just a normal shaft, though slightly larger in order to make a strong connection when the gear is press fitted onto it. 

Two small tabs milled with 6mm endmill

Two small grooves made with 1,5mm endmill

The two parts were cleaned with alcohol and epoxy adhesive was applied on the contact surfaces. I used a vise and slowly pressed the gear onto the shaft. I haven't really tried to break this part manually, however I mounted it in the motor module and till now it survived a few hard shocks and about 0.45Nm of continuous torque (on the motor shaft). 

If it fails I'll try adding loctite adhesive, but hopefully this connection will be strong enough ;)