Tag Archives: fixture

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.

Resistive heater dummy load

While testing moteus controllers, it is often necessary to experiment with high power conditions. For short durations, any decent sized brushless motor can work, as the windings have a non-zero thermal mass and take a little bit to warm up. However, when testing at high power for extended duration, it can be hard to find a way to get rid of all output energy. Even blowing a fan directly onto a motor only gets you so far when you are trying to get rid of 1kW.

Thus enter my resistive dummy load:

This is just a block of DC water heaters screwed into a plastic container. They are wired in series with some high current inductors to roughly approximate the inductance and resistance of a motor in the range of what is normally driven by moteus. When conducting a test, the container can be filled with water to greatly increase the available thermal mass (and if need be boil away the water).

Parts and Assembly

I have used this fixture with two different elements, a 24V 900W one, and a 12V 600W one depending upon what resistance I want to test with:

The container is just a basic polyproplene plastic one, so that it should be safe up to at least the boiling point of water:

The inductors are 33uH, 30A:

To assemble, I used a 1.25″ hole saw to cut each of the holes, then used a 1″ NPT nut to fasten each element in place. Each phase connected to 3 of the inductors in parallel in series with 4 of the heating elements. All three phases were tied together in the center to form a wye topology.

Updated moteus test fixture

I documented the first test fixture I built for moteus some time ago. As the shipment volumes have gone up, the fixture became something of a limitation, and also was a little problematic in a few ways.

The old “state of the art”

First, it relied on attaching 3 connectors by hand for each test, which was a decent fraction of the cycle time. Second, the pogo pins it used were non-replaceable, and also connected only to the debug phase wire test vias, which were tiny. They wore out relatively quickly, and replacing them required building a whole new board. Finally, since the pogo pins were PCB mounted, a PCB needed to be printed for any change in the pin locations or which pins to probe.

New fixture

Enter the new fixture:

From the side
With no board installed
Without the top platen
Lid raised, showing board contacts

This one uses modular test probe receptacles with replaceable tips, so that the tips can just be swapped out as they wear. These don’t appear to be available in an inexpensive manner in the US, but aliexpress has many options with 5 or 6 probe types in many sizes.

Second, the receptacles are all aligned with a 3D printed baseplate and platen to align them before contacting the PCB. This works alright down to the 1.5mm spacing test points on moteus, although that pitch is pushing what can be achieved with a 3D printed part.

Third, power, CAN, and the debug serial connections are now all probed from the bottom, so only one connector, the SWD programming port needs to be connected by hand.

Finally, the whole structure, including the top clamp is 3D printed now, which makes it potentially possible to do top probing and more easily adjust the dimensions.

With this new fixture, my cycle time for a test is around 60s. At that point, the time spent in the test program is about the same as the time it takes to unpack and package up the boards, so it isn’t really the limiting factor any more.

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.

Quad feet construction fixture

The quad A1 was the first robot I built with foam cast feet.  When I did the first feet, I jury rigged a fixture from some old toilet paper rolls to hold things in place while they were curing.  When I went to rebuild with my most recent leg geometry, I figured it was time to get at least a little more serious.  Thus, my new leg casting fixture:

dsc_0578

When an insert is cast into place, it is set on one of the trays, the tray is inserted into a slot, and then a weight can be placed on top and constrained by the fixture.

dsc_0579

This makes the casting process more repeatable and faster as I scale up production.  As a bonus, it can also be used as a fixture to epoxy the lower leg to the insert:

dsc_0591

Leg zeroing fixture

As part of provisioning a quad A1, or anytime the mechanical configuration has been changed, I need to go and record where the zero position of all the joints is.  The “0” position for the software now is with the shoulders perfectly horizontal, and the upper and lower leg sticking straight down.

Up until now, every time I’ve done this it has just been by eyeballing and with lots of foam and bubble wrap to shim things into place long enough to record the level.  Sometimes I had to go back and try a few times, as even determining when something is straight is not, well, straightforward.

So, I made two new fixtures to help with this process:

dsc_0608

One that rests on a flat surface and supports the shoulder to be exactly level, and forces the upper leg to be exactly at a 90 degree angle.  This assumes the robot is flipped over on the same flat surface.  The second snaps between the upper and lower leg, forcing them to be exactly straight.

With these two fixtures, I was able to get repeatability of my calibrations down to less than half a degree, which should be good enough for now.

 

Programming and testing moteus controllers

Like with the fdcanusb, I built a programming and test fixture for the moteus controllers.  The basic setup is similar to the fdcanusb.  I have a raspberry pi with a touchscreen connected via USB to a number of peripherals.  In this case, there is a STM32 programmer, a fdcanusb, and a label printer.  Here though, unlike with the fdcanusb fixture, I wanted to be able to test the drive stage of the controllers and the encoders too.

My solution was to create a mechanical fixture that each board slots onto, with pogo pins that connect to test points for the phase outputs.

dsc_0428

While it doesn’t make as good a connection as the solder through holes normally used to connect a motor, it is good enough to verify that the controller works.  As a side-bonus, it also makes it trivial to test that the absolute magnetic encoder works properly.

This video shows how the programming and testing process works, and walks through testing a few boards.

Programming a lot of fdcanusbs

To get ready for the initial limited release of fdcanusbs, I needed to program a whole bunch of them.  Further, I wanted to be able to scale up a few factors of two without being too annoyed with manual steps.  Thus, enter my minimal programming fixure:

dsc_0188

It isn’t much, just a raspberry pi 3b+, the official 7″ rpi touch screen, a STM32 programmer, a “fixtured” fdcanusb to drive the device under test, and a label maker.  The touch screen is mostly there to display the results if anything goes awry, as in normal operation there is just one button to push.  The final cycle time to program a fdcanusb and install it into the enclosure is around two minutes, which is good enough for now.