how to build a custom \"bed of nails\" tester for your 3d printer electronics
Printed circuit board)
, You will want to have some sort of QA to make sure your motherboard is working properly and not defective.
In-the most popular method
Circuit testing is a bed using a DingTalk fixture.
There are many very expensive solutions, but you will learn here how to create your own nail test bed by simply using a 3D printer.
I have written a lot of the design and software needed for the test board, these are all open source, so you \'d better take advantage of this and use it (
If you modify the license, please respect it and post your changes! ).
In this note, I will discuss how to build test fixtures for RAMBo 3D printer controllers as an example of how to design test fixtures for your electronic devices.
However, I will also focus on how to adjust my design for my own motherboard.
I made two Test fixtures for Rambo one.
1B and later Rambo 1. 3L controllers.
The second design is slightly different from the first one, just making some improvements that make it easier to build and use, but I will show most of the images/videos of my RAMBo 1.
1B design, because this is the design I have the most documents.
Obviously, while this note will focus on the design of RAMBo, you have to take into account that each PCB is different and therefore there will be different requirements.
In our example, if you are building a 3D printer or a CNC controller, most of the things here fit, otherwise you have to adapt.
For example, you may not need to use a motor to test the stepping driver, or you may need a different resistor value when testing the power rail.
First of all, you need to have some material at hand before building a PCB tester: If you are building a test fixture for Rambo, then the following additional items are required: first non-
The obvious item in the list is a 3D model of the PCB.
You need to generate the OpenSCAD model of the PCB to be tested.
There is an EagleToOpenScad ultra-low power consumption (
Steve Kelly wrote)
For Eagle, which is very useful in this case, just run ULP, select (20)
Dimensions, extrusion, regular holes, plates only and skip holes, and then scad models of the PCB are generated (
Other PCB design software may have a similar script or you can export the file to Eagle format.
You also need some pogo pins and their sockets, I used two types of pogo-pins, the P100-A2 and P100-
F1, and R100-2W receptacle. The P100-
A2 has a flat head (concave)
Used to contact the welding pins from below the board while the P100-
F1 has Tips (convex)
Poke into the tip of the unwelded pin or hole.
I also used the hot sleeve plugin 94 80a331 from McMaster-
I found the Carr of the M3 Bolt very useful for fixing the printed parts together.
Hot sleeve plug-ins are unnecessary though, as you can still use standard nut and bolt systems, but I prefer to use hot sleeves because they are very practical and reliable.
Finally, you need a controller.
Basically, this means that you need some sort of electronic controller with a large amount of GPCos in order to view and browse the various connections you will have with DUT (
Equipment under test).
This can be anything from arduino to beaglebone or your own board that is used as a controller.
In our RAMBo test fixture example, I used the second RAMBo board as a controller because it has a lot of extended ports.
Watch the video above for an overview of all the projects needed to build RAMBo 1. 1B test jig.
Note that my updated design no longer needs the blank PCB listed, but it still helps to make everything cleaner and easier to connect with the controller (
If using the same board as the controller).
Please also pay attention to the use of ICSP programmers, motors and optoelectronic equipment
This is an extra feature to test RAMBo and you may not need them if the PCB is not needed.
Also, Lambo doesn\'t need an ICSP programmer unless you need to test the blank board that just came out of the assembly line.
There are quite a few items that need to be printed, which takes some time, so you can start printing some as you prepare the 3D model of the PCB.
SCAD source code for all 3D printed parts (with pre-
Generated STL file
I have the following on my github: The README file has been updated to explain what each file is for and how everything is combined, but we will go through this in detail here.
So first, start by printing the following items: If you are building the RAMBo test fixture, then you will also need to print the following: in order to align with the motherboard, the pogo pin requires a stable \"track\" system.
To do this, we will print 2 copies of the PCB, one at the bottom, one at the bottom, and the other in the middle, which will hold the top of the socket.
By connecting the two plastic plates with a fixed-size gasket, you can then insert the pogo pins, which will be fully aligned with vias on the PCB and in contact with the board after insertion.
We also need a top plate to press on the PCB in order to maintain good contact with the pogo pin.
You can also install pogo pins on any test point on the PCB.
However, I would suggest making any test points that need to be tested into a small via so that it can be pogo pins at the bottom of the PCB as this will make everything easier.
If you are building the Rambo test fixture, you can proceed to the next step, otherwise, continue reading. .
While printing all the common parts, what you need to do is create a 3D design of the PCB.
Create your motherboard using the eagletoopenulp script mentioned earlier. scad file.
Then you should look at Rambo.
The Scad file, then edit the generated board. scad (
Starting from the previous step)
Make it look a bit similar.
For example, add an include at the top of the file, then change the module definition, add the board _ thickness and the hole_size as function parameters.
You should then use the poly_circle function to change the hole of the screw bar to and set the radius to m3 _ radius (
Or depending on the type of mounting hole you are using).
Also, it is common to change each circle to a call to the: hole function.
Scad, it will only create a square, you can also edit it to use a circle or polygon, but I find that when 3D is printed, square holes are much more effective in keeping pogo pins with good hole size accuracy.
You will notice that I have grouped each hole type in different parts, for example: you really don\'t need to do this, but I think it is feasible to separate each hole in this way, it also allows me to enable/disable holes and print boards with only the required holes to speed up the printing process.
However, what you might want to do is group the holes through vias and test points in case you have a test point to poke from above the board.
Once you adjust the board.
Then open the rambo_botto_plate.
Scad and save to the bottom of the board.
Scad and replace the call to the RAMBo function with the call to the motherboard function name.
Basically what this file does is print the union of the two boards, the first one is 1mm thick, 1. 5x1.
5mm holes and 4 others.
5mm thick belt 1. 65x1. 65 mm holes. The smaller 1.
The 5mm holes will be large enough to allow the socket pin of the pogo pin to pass through, but not much of the socket to pass through at 1.
For a larger portion of the container, 65mm holes will be large enough.
Use this combination 1. 5 mm and 1.
With 65mm holes, the pogo pin socket will work closely with the holes.
You should then edit the rambo _ plate.
The Scad file, save it to a new file, and change the call to RAMBo to a call to the name of the board.
I have set the hole size of the middle plate to 1. 65x1.
65mm holes, not big enough to hold the top of the socket, but enough to drive the drill through, the 5/64 bit makes it the perfect size.
You may be able to modify it to use 1. 95 or 2.
0mm holes to see if the socket is appropriate, this is what the calibration test is about.
The Test file is used to Test various sizes (
The accuracy and calibration of each printer are different, so in any case, calibration may be required first).
You should modify the rambo _ top_plate when you are done.
Scad to fit your board.
This file does something, first of all, it prints a board with everything disabled (
Now is the time to disable the bottom hole and enable the top hole for the test point)
, It adds a hole to the capacitor and fuse holder coming out of Rambo, and if your circuit board also has huge capacitors, you may need to remove the holes and add them somewhere
It adds a larger hole to the M3 rebar, because the top plate is often inserted and removed, so a larger hole is needed here.
However, if you use the pogo pin on the top plate, you may want to keep the M3 hole in the same size as it should be, but it will be a little more difficult to get it through the screw bar.
It also adds a projection of the gasket pushed down on the board and the clamping system.
It will add M3 holes to the fixture and nut holes, or if you enable the hot sleeve insert for the fixture (
Enabled by default in configuration. scad)
, It will only add holes for M3 hot sleeve plug-in.
After completing all the modifications of the board, generate STL files from scad and print these parts.
The next step is to prepare the 3D printed part for use with the test fixture.
For example, the roof needs to be heated-
Set the insert installed into it.
Also suitable for motor support and photoelectric-endstop mount.
If you don\'t want to use heat-
Set the insert and you can disable it in the configuration.
The STL file and regenerate the STL, then you can protect all of these components using bolts and nuts.
The middle board also needs to be prepared with a drill of 5/64.
Actually, I think the hole size in the hole should be modified to 2.
0mm before printing, but I personally have not tested it.
It mainly depends on how well the X/Y/E steps of the printer are calibrated.
Note that, contrary to what the video above says, you should not drill the bottom plate because this design has changed and the bottom plate has two sizes of holes depending on the height of the layer, it is best to use tweezers to ensure that the holes at the bottom are large enough to fit the pogo pin.
The next step is to drill wood for our 3d prints.
The video above shows a summary of my first design, but since then it has changed a lot.
The first picture shows the completed redesign and you will notice some differences.
Here are the differences that need attention when drilling: first, the controller is in the same position as the test fixture tower, so you don\'t need to make room for the two plates on the plate, it will make the plates cleaner and not mess up with the wires.
The motor pointing to the center makes it easier to ship the test fixture as it will be more sturdy, which also helps wiring the end station.
As you can see, the motor and endstop are wired under the plate and let\'s look cleaner.
I would suggest leaving the drill holes in the area to the prototype board until everything ends after the board.
The prototype board will contain any additional content you may need and will have a voltage divider for testing the supply rail voltage.
As far as your own motherboard is concerned, you have to figure out what is needed, but as far as our RAMBo test fixture is concerned, what we are doing is: Voltage divider for heating
Use the bed, heater and 5v power rail for 4.
7KOhm and a 47KOhm resistor, so we will weld a male head of 3x1 and then three 4.
As you can see in the video above, 7 KOhm resistors, another 3x1 male head, three 47KOhm resistors, and then another 3x1 male head.
For the thermal resistor reading, we will use four 100KOhm resistors and connect them between the pins of the thermal resistor, so we will use the 4x1 male head, 4 100KOhm resistance and another 4x1 male header.
In the new test fixture design, I also welded a USB cable with a plug on the prototype board so that I could connect the USB directly to the motherboard by testing the ig.
The next step is to assemble the Tower of the test fixture by inserting the screw bar into the mounting hole of our printed board and inserting the plate gasket into it.
Make sure the board is in the right direction, facing up and aligned.
Then fix it with nuts to make sure it is tight.
You will then insert the pogo pin socket into the hole until all outlets are plugged in and have the same height as the height that needs to be aligned.
Note that in the video I show a blank PCB at the bottom of the Assembly, however, the new bottom board design will have a larger, smaller hole, the socket can be fixed in place without the need for PCB.
This is useful if you want to poke small vias or test points and the pogo pin is not suitable for bare PCB (
In the case of RAMBo, The vias of the stepping motor VRef is really too small, so it is not suitable for the pogo pin, which is why I have to remove the PCB from there).
After all sockets are plugged in, insert the pogo pin into it.
Please note that if you need to poke the welded pin, if you need to poke the unwelded pin or the small via, use the flat pogo pin with the pointed pin.
Once done, insert the DUT at the top of the Assembly and make sure all pogo pins are aligned correctly and in contact with the board.
You can then use epoxy glue to make sure the pogo pins are fixed in place and do not fall off the assembly.
Use epoxy glue on the top of the bottom plate, not on the middle plate, because once dry, epoxy glue will definitely stop the pogo pin from moving, you don\'t want to do that at the bottom, because it can prevent good contact with the wire later.
The rest of the project here is the motor.
In our RAMBo case, we want to test the stepping driver, so we need to test it using the coding logo and optical end stop on the motor.
All we need to do is install the motor on the board using the motor bracket.
Twist the optical frame to the motor and install the optical frame on it.
We then insert the simple _ encoder logo into the shaft of the motor and keep it-
Screws or M3x5 screws.
We insert the wire into the hole on the board and remove it from the position side of the fixture tower connecting the motor.
In the picture above, you can see the appearance of the wire from under the board.
Depending on your choice of the controller, you may need to make some preparations.
If you use arduino, beaglebone, or other types of controllers with direct GPIO, then you may not need to do anything.
However, if you use your own motherboard as a controller, as in our case at Rambo, then you may need to do some preparation.
We will use T0, T1, T2 and T3 I/O on the controller for analog input, but these inputs will be contaminated by resistance and capacitance on the circuit board circuit, so, we need to describe these values to make sure that the simulated values reported are the exact values we want.
We also need to use simulation-
Ext expansion board, so we want to weld a welding head for it.
You then need to upload the test firmware to the controller.
Make sure to keep the hex file of the compiled Test fixture firmware as it is also needed to test the DUT device.
The most difficult task here may be to properly connect each cable without causing any confusion.
The source code of Rambo will be of great help.
Uploader software, which can easily adapt to other boards and provides a pin mapping class: you can simply match the pins of the target (the DUT)
Connect to the controller to connect everything.
There are a few things to note, though: once you \'ve connected everything, you\'re ready for the test run.
Once everything is connected and mounted on the board, your test fixture is ready.
However, I found it very useful to connect the wire to a blank PCB using a stackable arduino head, and then you can easily plug it into the controller.
Take a look at the video above that shows an overview of the test fixture for Rambo 1.
3L and how to connect everything when using bare pcb.
Once you have everything connected, the rest is to test your motherboard.
You need Rambo-
Upload software from my github repository (
Make sure you check out the \"v2\" branch). The RAMBoTest.
Py script is the main executable to test the RAMBo board.
You can run the tester using the following tools: You can also provide it with specific tests to run as parameters, for example: if you need to disable tests, you can program in RAMBoTester.
Py by editing the file and adding a line similar to the following: Many configuration options can also be used in configuration/configuration. py file.
However, if you do not use the Lambo board, you will need to adjust the software to your board.
The software has recently been rewritten from scratch so that it can be easily ported to other motherboards.
However, a basic understanding of Python programming is needed.
The new design allows a more modular approach in which each test is represented by a unique object and each test type is implemented in its own class.
Some base classes can be used to handle the basic functions of test cases, logging mechanisms, and test logic.
The test/module contains the base class and the test module.
The base classes are: there are several general-purpose tests, such as TestGPIO in the gpio.
Py and testandialog simulation.
Py itself has more specific test classes that are derived from them, such as testtickets and testend derived from TestGPIO and TestThermistors, TestVRefs, and testsupply rails
There are also some specific tests, such as ProgramFirmware, which is a test wrapper for avrdude and TestMotors that can test the stepping motors and verify that they are all working properly.
To implement a new test, you must derive from the test case class and rewrite the _ test and _ verify methods.
The _ Test method needs to perform the Test using whatever is available in the context object (
More information later)
The _ verify method needs to set \'self \'.
The status of the value in the TestStatus enumeration.
The context object passed to the _ test and _ verify methods is an object derived from the TestContext, and its purpose is to pass information between tests that can be used by test cases.
For example, an interface accessing DUT is available in context.
Target when the controller is available as context. controller.
Also, most tests need to access specific fields from the object context. pinmapping.
In order to provide the required information to the test case, you need to derive a class from TestContext.
More specifically, you need to instantiate a self in your subclass.
For example, if you need to turn the power on/off before and after the test runs, you can do so by rewriting the testingstart and TestingEnded methods.
Finally, you need to implement a new class derived from TestRunner for your motherboard.
This is very simple. You just need to define yourself.
Contains test variables for the list of test case objects and returns the context you created through the context property.
You can then create the TestRunner object and call the Run method to Run all the tests, or you can give it a specific test list to Run if you want.
There\'s a lot more to say about the software, such as fatal, required, _ finally test cases, or how to configure the log system to use the database, or how to get a summary of test execution, or disable specific tests, what each test status means, and so on. .
However, the source code is quite simple and the documentation is good and you can find a lot of things by reading the code.
I leave you with a model to test the software\'s potential GUI in which the GUI can be dynamically generated from any TestRunner instance and give control of each test to the user.
Today, there are so many electronic options for 3D printers, each with more clones.
Unfortunately, most of the electronics that people buy are barely tested, and often can be easily damaged due to lack of QA.
Hopefully, this project will make it easier for electronic manufacturers, distributors or printer manufacturers to test their electronic products before sending them to customers, thereby improving the reliability of their motherboard, the reputation of the brand, and customer satisfaction.
It takes about 50 seconds to test the motherboard, where it takes more than 40 seconds to upload firmware and verify the upload.
It takes only a few seconds to switch the motherboard, so this is a very fast and useful way, especially when the manufacturer already needs to upload his own firmware to the motherboard, add 30 seconds per board, make sure that there are no defects that will upset the customer and avoid returns.
Overall, it took me nearly 2 months to study the design and software development of this machine.
Multiple iterations and multiple attempts failed.
I hope that the wider community will benefit from my efforts and accept the basic principle behind open source, that is, to stop reinventing the wheel, reuse the work of others and improve it.