Introduction

Ingun manufactures Test Probes, Fixtures, and various accessories for their fixtures. We leverage the MA2xxx series from Ingun for most production-level Test Fixtures and use the FB-ABF-V-I-MA2xxx Inductive Sensor to detect when a test fixture has been closed automatically.

IMG_20200326_182714.jpg

The sensor outputs a 12V signal when the fixture is closed, 0V when the fixture is open, and this signal needs to be converted to something that can be read by a computer running the test software.

In this tutorial we will :

  • Interface an Ingun Inductive Fixture Switch to a SparkFun Pro Micro development board
  • Write firmware (using Arduino) for the development board
  • Create a python module that can communicate with the device using a USB Serial Port
  • Design an enclosure using Fusion360
  • 3D print and assemble the Ingun Fixture Switch Reader

Resources

If you'd like to follow along or take a look at the design files for the project, they are available on GitHub here.

Electrical Design

To interface this sensor with a computer, we will use a SparkFun Pro Micro (3.3V), this development board has an ATmega32u4 processor which makes it easy to implement a USB Serial port to communicate with.

To interface the inductive sensor to the Pro Micro, a voltage divider is used. The sensor outputs 0V when the fixture is open and 12V when the fixture is closed and this voltage needs to be divided down to 3.3V so that the IO on the Pro Micro isn't damaged.

Screenshot from 2020-03-26 18-37-36.png

To help indicate if the device is powered and if the switch is closed two LEDs are used. The first LED is controlled by VCC from the Pro Micro. This pin outputs 3.3V when the Pro Micro is powered over USB. The second LED is controlled by Pin-7 on the Pro Micro to show when the fixture switch is closed or open.

To connect the Ingun switch, we used a .1" IDC connector that we already had on hand.

Perfboard Prototype

The circuit was prototyped on a piece of perfboard.

IMG_20200326_184315.jpg
IMG_20200326_184350.jpg
IMG_20200326_184413.jpg

After finishing soldering up the prototype, we moved onto developing some simple firmware for it.

Firmware

The SparkFun RedBoard is compatible with Arduino, which made it extremely fast to get this device up and running. The firmware uses a pretty straightforward processing loop.

Screenshot from 2020-03-26 18-57-48.png

The switch state is read and the status LED is updated to the new switch state. The serial command buffer is then checked, and if a command is available it is processed.

To get the switch state, `read_switch` is sent over a serial port, the device will then respond with a '0' if the fixture is open and '1' if the fixture is closed.

Screenshot from 2020-03-26 19-07-40.png

After some slight debugging, we are ready to test all of the firmware features.

IMG_20200326_190146.jpg

With the test fixture open, the LED is off.

IMG_20200326_190135.jpg

With the test fixture closed, the LED is on. Let's test the serial port commands work as well.

Screenshot from 2020-03-26 19-06-15.png

Serial port works!!

Now that all of the features that are required are working, we are ready to build a Python module to communicate with the device.

Software

Since we use Python for almost all of our software at FixturFab we will build a Python module for controlling the Fixture Switch Reader called FixtureSwitch.

To communicate with the device, the pySerial library is used. A class called FixtureSwitch is created, and within the init method we connect to the serial port.

The 2 commands that are supported by the device are then implemented within their functions in the Python class.

Screenshot from 2020-03-26 19-17-14.png

Enclosure Design

To prevent the device from shorting out within a test fixture, an enclosure will be created. To design this enclosure, Fusion360 was used.

The first step was to create a model of the device. This model doesn't need to look exactly like the perfboarded device but needs to have similar mechanical dimensions so that the enclosure can be designed around the device.

device_model.JPG

The case will be designed using 2 parts, a bottom half which the device will sit in, and then a top half that will sandwich the device in place. The 2 halves will screw together using M3 heat-set inserts and screws.

The bottom half of the case contains a cutout for all of the leads and solder joints to have clearance along with holes that the heat-set inserts will be inserted into.

Bottom.JPG

The top half of the case contains cutouts for the Ribbon Cable Connector, Power and Status LEDs, and the USB connector. It also has countersunk holes for M3 screws to be inserted into.

Top.JPG

The entire case is then put into an assembly to verify that there aren't any clearance issues before 3D printing the enclosure.

Complete.JPG

Printing the Enclosure

To create the enclosure we will use an inexpensive FDM 3D printer. The STL's of the top and bottom case pieces are exported from Fusion360 and then imported to Cura.

Cura.JPG

The generated Gcode is then sent to the 3D printer and the parts are printed.

Device Assembly

Adding the Heat-Set Inserts

After removing the case pieces from the 3D printer and removing the support material the Heat-Set inserts need to be inserted into the bottom half.

IMG_20200326_194709.jpg

To insert the heat-set inserts, a soldering iron is used. They make special tips for this task, however, we typically just use whatever tip is currently on the iron and then pliers to make sure the inserts aren't pulled out when the iron is removed.

IMG_20200326_194915.jpg

Assembling the Case

The device assembly can now be completed using the top/bottom case parts, the perfboarded device, and 4 M3x10mm screws.

IMG_20200327_082631.jpg

First, the perfboard is inserted into the top half of the case, this makes it easy to align the connectors and LEDs.

IMG_20200327_082655.jpg

Now the top of the case is attached to the bottom of the case using 4 M3x10mm screws.

IMG_20200327_083530.jpg

Adding the Fixture Switch Reader to a fixture

To attach the reader to a fixture, a small strip of VHB will be used. A cable is also assembled by taking a 10 conductor ribbon cable and splicing it to both the Ingun switch (12V, Sig, GND) and the 12V power supply in the fixture (12V, GND).

The reader is then attached to the base in the lower left-hand corner of the fixture, allowing for the status LED to be easily visible.

IMG_20200327_084852.jpg

The switch is then attached to the Intel NUC which runs the test software, which can now read when the fixture has been closed.

IMG_20200327_085018.jpg

Lessons Learned

This was a pretty straightforward and quick project to complete, we did learn a couple of things along the way:

  • Having some 0.100" spaced terminal blocks on hand would be great
    • It would have been much easier to connect 12V and the Ingun fixture switch using terminal blocks instead of having to splice wires to a ribbon cable.
  • Arduino's are great for quick prototyping, we should always have these on hand
  • A larger current limiting resistor on the LEDs would be a good call
    • While the LEDs can take 8mA, they are way too bright

Comments