Tag Archives: 3dprint

New Project: Juggling Robot

I’ve been looking for a new motor control project to tackle that is both interesting, and a bit more unique than another Ascento clone. Looking around, I was surprised at the current paucity of robots capable of more advanced juggling feats. There are quite a few that can manage 3 balls, and nearly none I’ve found that can manage more, with the exception of Nathan Peterson’s inclined ball roller. I figure that I have access to lots of factory second moteus controllers, which are capable of quite demanding control applications, so I should be able to put something together.

This is what I’ve got so far:

This is a single 6 DoF Stewart platform controlled by 6 moteus r4.11s with mj5208s acting as the servos. A pi3hat and power_dist are nestled inside a 3d printed hexagon. M4 push rods with tie rod ends connect the servo horns to the upper platform, which has an indent to “catch” the ball. At this point, all I’ve done is some simple open loop toss behaviors without any fine tuning or aiming. It can reliably catch and toss some 50g micro juggling balls up to around 30cm, and can throw (but not catch) up to around 80cm.

My intention is to first get this to be able to throw and catch at higher throws, then do some basic 1 hand patterns with 2 or maybe 3 balls. Once I get that working, then I’ll add in a second platform to make the second hand and see what I can pull off. I’ve got an rpi global shutter camera with the intent to do visual tracking of the balls if necessary, but we’ll see how accurate I can get the tosses just open loop first.

The hackaday project page with an overview is here.

5 Side PCB Test Fixture

If you look around online, there are lots of examples of PCB test fixtures used to perform end of line testing. In the low to medium volume scale, nearly all of these are either clamshell or 2 side affairs, where probe pogo pins or interfaces are connected to the bottom and top of the board.

When developing the moteus-n1, one of the challenges was the number of right angle board edge connectors it has. Those right angle connectors are what allow it to maintain a very low overall stack height when installed in applications, but are also much harder to perform testing on, since by definition the access points are not vertical. On the base n1, there are 6 total right angle connectors, 2 on each of 3 sides, and future variants may have additional bottom side CAN and power connectors populated to make 8 total right angle connectors.

In very low volume testing, say less than a hundred a day, it is feasible to just have a human manually connect cables to each of the connectors for each board being tested. As the volumes scale up though, this becomes a big bottleneck, and if the testing is not performed in a low-wage country, it can amount to a measurable portion of the overall product cost.

Design Overview

Thus, meet the test fixture I built for the moteus-n1:

It is manually actuated with a single big lever. As you pull the lever down, a series of guideways cause first the top plate to clamp the board into position vertically, and then subsequently three side plates slide in horizontally to attach probe points to three of the side edges. It is mounted in an 2020 extrusion frame that also hosts a 24V power supply, a Raspberry Pi and mjbots pi3hat, a lightly modified mjbots power_dist, and a custom STM32 nucleo I/O expander board.

I can’t say that the mechanics of the system are particularly elegant, but they work. When I started on the project some time ago, I went looking through a bunch of mechanisms to try and find something simple that could sequence the motions I wanted. I got pointed to thang010146’s youtube channel (for which you can get everything offline too) which is an amazing repository of ideas! However, after looking at a large fraction of those, and other resources to boot, the best I had come up with was a cam-like system where bearings were made to slide through pathways with a controlled profile. The profile can then be tailored to create arbitrary motion profiles for each of the driven pieces.

For instance, the vertical aspect looks like this in the closed position:

The guideway in the “closed” region forms an arc centered on the center of rotation of the handle, this keeps the top plate stationary. Then there is a region where the top plate is lifted, and finally a region at the end which is once again an arc about the center of rotation when the top plate is at its maximum extent. Thus, when the handle is pulled, the top plate initially remains level, drops down, and for the last N degrees of handle rotation, remains fixed at its lowest point.

The side plate that engages from the rear of the board is constructed nearly identically, with a guideway on the same face of the handle. The two plates that come from the left and right use a similar guideway, but here the guideway is in the curved section of the handle, which was harder to model in CAD.

This view from the back shows that the guideway for the left and right rails runs straight during the bulk of the handle pull, and then near the end pushes the side probes in towards the board. 3D printing this geometry was challenging, and I ended up printing a closed channel, and then post-processing it to remove a thin wall after printing was complete.

For the probes, each of the 5 sides has a removable probe plate which can be easily swapped out or changed. Most of the probes use the same modular test pogo pins that the most recent r4.11 test fixture used. Most of these pogo pin receptacles used the same installation approach that the previous fixture used, in that the holes for them were directly 3D printed. However, for the 1.5mm pitch JST ZH pins, PA50 size probes were required, and I could not get my prusa to reliably print usable hole sizes. So instead I had it print a tiny registration hole, and then used a $15 micro-PCB hand drill in two stages. First at 0.8mm all the way through, then at 0.9mm halfway through.

This allowed the receptacles to be pressed in reliably with a small arbor press:

This worked well for all the things that could be pogo-pinned, however the JST GH connectors are not amenable to be probed with any of the standard probe shapes. For those, I instead hand whittled mating GH connectors by removing the locking latch and shaping the remaining plastic to help them mate from a wider range of angles and offsets. Then I hot-glued them into place into the removable probe plate. I will admit they were finicky to get working well. The probe plate got re-printed a few times to line things up well, and the hand-whittling was an iterative process until I could get the connectors to reliably mate into the board.

Like in the previous fixture, a mj5208 motor is installed in the bottom, to provide a way to test the magnetic encoder and to test the power stage of the driver.

The I/O expander is an STM32 Nucleo board mounted into a simple custom PCB. It has a bunch of 0.1″ pin header connectors for all the probes to connect to, and routes all the things that need to be sensed with ADCs to resistor dividers, all the GPIOs to appropriate pins on the nucleo, and anything that is tested with an external device like the RS422 transceiver to yet other connectors. I populated it by hand, and included a 0 ohm resistor on nearly every line so that I could easily disconnect things that didn’t work, which ended up being necessary when I made some mistakes in pin assignment.

The Raspberry Pi 4 that runs the software has a mjbots pi3hat attached. That powers the rpi from the 24V input and also is used for a CAN connection to the power_dist board. A quick 3D printed mount holds it together and lets it clip onto the frame.

A hall sensor is mounted on the spring clip, so that the test application can automatically start the test cycle when the handle is fully closed.

Operation and Software

The software used is a derivative of the software used for the previous test fixture. First, it was updated to use the I/O expander board to take all the new measurements, such as verifying that all the ground and power pins on each connector are working properly, as well as all the additional GPIOs. Second, and more obvious, is that it was updated to use the python textual library to create a two-paned application.

One pane shows the ongoing results of the current board being tested, and the other pane shows the previous board’s results. The script was also updated to play an audible sound when a board is ready to be removed, so that uploading results from the previous board can take place in parallel with the beginning of the next test cycle.

Conclusions and Future Work

With this fixture, it is possible to reliably test and package more than 70 boards an hour, including all the additional test coverage. That is up from around 30-40 boards per hour with the old fixture. While the r4.11 has less need for side probing, it is still possible that a fixture based on this designed for it will be made at some point, if nothing else to add verification of the ABS port and the improved test cycle time.

Gear testing fixtures

The qdd100 servo uses a planetary geartrain as the transmission reducer. This consists of an outer ring gear, an inner sun gear connected to the rotor as the input, and 3 planets connected to the output. The tolerances of these gears directly impacts the performance of the servo, namely the backlash and noise.

To date, I’ve been hand-binning these and testing each servo for noise at the end of production. To make that process a bit more deterministic, and with less fallout, I’ve built up a series of manual and semi-automated gear metrology fixtures to measure various properties of the gears.

Some of the simple ones are just tools to hold micrometers in convenient locations relative to gears or meshing gears, like this one to measure the OD of the ring gears at various points:

Or this one to measure the meshing of the sun gear with a rack gear:

Or this one to measure the meshing of a ring gear with a reference sun gear:

Semi-automated tools

As I went to use these techniques for production, manually measuring the gears both was tedious, and still not as useful as it could be. It wasn’t feasible to do more than record a minimum and maximum when measuring a gear by hand, and for some parameters, measuring it at many points around the circumference is helpful. Thus, I’ve started on some automated gear testing fixtures.

The first is one that tests sun gears against a reference planet:

This has a few pieces. The motion platform is a moteus devkit motor with a reference planet gear attached. This spins a “test” sun gear which rests on a linear rail. Then a dial indicator is positioned to record the position of the carriage. An arduino connects to the SPC data port on the dial indicator to programmatically read the position. I used a technique similar to this forum post, except that my iGaging dial indicator runs off about 3V, so I didn’t bother with a separate pull down transistor and just toggled the REQ pin between input and output low to initiate readouts. That meant I could just plug the 4 wires directly into the Arduino.

When this runs, the reference planet is spun through small increments and the micrometer reading is captured at each point. This measures the “double flank” mesh distance of the gear pair. Here, the indicator spring applies a pressure to the test gear, forcing it to mesh with the master gear.

To make this work, I characterized the reference planet gear by running a reference sun gear (which is a 20 tooth M0.5 gear), at all 20 different phases relative to the planet. Then I took the median of the distance across all the runs as the “reference curve” for this planet.

Then test gears are measured relative to that reference curve. That shows the delta between the center distance at each point and the reference distance, so should be relatively well calibrated for the fact that my master gear is not perfect, nor mounted perfectly concentric. Here is a plot from the same gear taken four times at different phases, shifted laterally to compensate for the phase difference and shows that it is relatively consistent and repeatable.

The process is unfortunately slow, primarily because the dial indicator SPC port only emits data at 2Hz, and it takes about 2 readings to settle after each motion. I was using 8 points per planet tooth for the above plot, which works out to 320 total samples per evaluation. At 1.5s per sample, that is around 7 minutes per gear! Fewer points still give reliable results, at a corresponding reduction in fine resolution.

Forgiving the slow speed, this does seem to give profiles that are repeatable to within about 10 microns, which is good enough for the binning I am doing now.

New machine(s) day, more Prusas

This is somewhat belated, but only recently have I actually gotten them all set up in the desired configuration. Welcome to the newest members of the mjbots factory line, another 2 Prusa MK3Ss! That makes 4 total, now all neatly lined up in a row:

The first two have had a greater than 60% duty cycle over the 3 years I’ve had them, and situations kept coming up where I was blocked on 3d printer bandwidth. For now at least that need is sated.

Microscope mount

I’ve been using a relatively inexpensive microscope for SMD soldering work for some time, connected via HDMI to a 24″ monitor.

For the price, I’m definitely happy with it, but as I’ve been doing more soldering work, I’ve become less happy with the mounting stand. The arm it mounts to often does not reach far enough to get the optics over the part of the board in question, or the base is too tall or wide to fit under it. If you want to examine something from the side, you have to tip the entire base over. I have resorted to spinning the microscope around and counterbalancing the base with a large weight, which works for some definition of “works” but only improves the reach by a little bit.

I wanted to improve the situation, so built a 3d printed mounting fixture to position the microscope head. It provides for a few more degrees of freedom than the factory issued one, and provides a lot more reach:

The tubes are held together with M4 bolts with each axis having a thumbscrew used to lock it in place. The optics can now be tilted in the pitch or roll direction, and the total reach is around 25cm, up from the stock 7cm.

The only parts I had to purchase uniquely were these 14mm tubes from amazon, some thumbscrews used to tension each of the clamps, a steel plate used to weight the base down, and a new LED lamp. I already had sufficient M4 heat set inserts and mounting bolts to fit everything else together. Here’s a photo from before I had the actual steel weight plate installed:

Another foot failure

The first feet I built for the quad A0 lasted for maybe an hour of walking before snapping off. The current design, has been much more robust – completing a lot of intensive walking and jumping. However, all things must fail:

Looking at the failure, I was surprised I used so little material in the region in question. For now, I just made it 4x thicker and we’ll see how long that lasts, although ultimately it may need to be a different design or machined instead of 3d printed.

quad A1 chassis updates

I finally got around to fixing a number of minor glitches in the quad A1’s chassis recently.

1. The raspberry pi is now far enough away from the left panel that you can connect the HDMI if you choose.

20200506-rpi_mounting

2. I no longer have vestigal studs for the pre quad A0 junction board on the other side.

20200506-power_dist

3. The switch got moved down to between the legs.

dsc_0631

4. So that the entire top surface can be used for mounting things if necessary (note the additional inserts at 160mm diameter).

dsc_0632

5. And finally I added a shielding on the inside to cover up the guts on the left and right side.

dsc_0633

dsc_0634

Nothing too significant, but I had a running list and it was getting long enough that I figured it made sense to finally knock them off.