Digital Contour Gauge

by tbrais in Workshop > Tools

4205 Views, 18 Favorites, 0 Comments

Digital Contour Gauge

PXL_20210514_164721409.jpg

A contour gauge is a useful tool for extracting a flat, two dimensional profile from a three dimensional object. What would be even more useful, is if the tool could input into a computer, for use in CAD modeling. This is what I've attempted to do with this prototype tool. It uses Firefly for Rhino and Grasshopper to collect data from the arduino-based hardware. Follow these instructions to make your own, make changes, developments, and contribute to this project!

Thingiverse for STLs and code: https://www.thingiverse.com/thing:4920999

How It Works

At the heart of this tool is essentially a single linear potentiometer, with each tine of the gauge collecting an independent reading. The potentiometer is made from Velostat, an inexpensive conductive plastic sheet.

Here is a great instructable by lonelysoulsurfer that uses the velostat for a ribbon controller: https://www.instructables.com/Make-a-Ribbon-Controller/ This project illustrates the idea very well. The same principle is at work here, except reoriented and multiplied.

Also, the dovetail design is inspired by Tomalinski’s gauge: https://www.thingiverse.com/thing:4037393

The plastic is clamped on each end of the housing with a conductive strip, so the resistance values are nearly the same along one axis, and vary along the other. We put 5v across it, and each tine will read voltage at a given point between 0-5v. These pins connect to the arduino via two 16 channel multiplexers. Here’s an instructable I referenced for the multiplexers by pmdwayhk: https://www.instructables.com/Tutorial-74HC4067-16-Channel-Analog-Multiplexer-De/ (Also used this for the base program)

In the grasshopper sketch, the tool is calibrated by reading the upper and lower reading limits and remapping them to 0-72mm, which is the range of the gauge. The points are plotted at intervals of 3mm(the width of each tine) on the x-axis, and then a nurbs curve is drawn through them.

Materials

This tool is designed using minimal and easily accessible materials. Here’s what you need:

PLA filament(or whatever you prefer), 1kg is more than enough 1x 11”*11” sheet velostat https://www.adafruit.com/product/1361 ~6’ 0.032” music wire(0.81mm) https://www.ebay.com/itm/201648862550?hash=item2ef3357556:g:JoYAAOSw-itXtK2F 1/16 x .014 copper tube (1.57mm) https://www.ebay.com/itm/K-S-8117-Copper-Tube-1-16-3-/233293884270 .016 x ¼ brass strip (.41 x 6.35mm) https://www.ebay.com/itm/223597182399?epid=1425121828&hash=item340f6e3dbf:g:o-8AAOSw~9Fd0ch7 11x M3x10 bolts Arduino Uno 2x CD74HC4067 16 Channel Analog Digital Multiplexer Extra header connectors 3x 0.1uf capacitors 2x 10k Ohm resistors Jumper wires

Printing the Parts

Screenshot 2021-07-30 210333.jpg

The parts for the body are designed to be printed upright(see image). Be sure to calibrate your printer so the parts fit well. I printed mine on an Ender 3 with 3 bottom and top layers, 2 perimeters, 10% infill at 0.2mm height with a 0.4mm nozzle.

If possible, try printing in a more resilient filament such as ABS or PETG.

Preparing the Body

PXL_20210428_230931685.jpg
PXL_20210428_231731417.jpg
PXL_20210428_233228810.jpg
PXL_20210428_234902604.jpg
PXL_20210428_235417782.jpg
PXL_20210513_044738204.jpg

Now that the body pieces are printed, check that the dovetail joint fits snugly. If it’s too tight, try sanding or adjust print settings and try again. There’s tolerance built into the model but it’s unlikely that it will be too loose.

Next, cut two brass strips ~4mm longer than the printed rail with holes in it. Tape the printed part and the strip together, aligned at one end. Mark, punch, and drill each hole out. The extra brass is bent up to act as a connection point.

It’s a good idea to solder the wire onto each of these now before they are in contact with the velostat, as the thin sheet is heat sensitive.

Cut a sheet of velostat 96mm x 180mm. The 180mm isn’t crucial, the sheet is to be folded in half. You want extra material on each side so you can stretch it taut. Try fitting the doubled-up sheet in the bottom body part, trim off excess as needed.

Once the sheet is sized right, place it in the bottom body and punch through into the middle hole on one side. Screw an M3 screw down slightly to hold it in place. Flip it around and pull the sheet tight, repeating this on the other side. Working from the middle out, you can achieve a tight and flat velostat sheet. Having established the holes, the piece can be reassembled with the brass strips and printed rails. Pull the sheet taught as needed. (I did this with the top part assembled. I’m not sure why, I would do this step while it’s disassembled.)

Making Contact Wires and Assembling

PXL_20210506_005256236.jpg
PXL_20210506_004627222.jpg
PXL_20210506_004601677.jpg
PXL_20210507_181220106.jpg
PXL_20210507_181853486.jpg
PXL_20210507_181312594.jpg
PXL_20210510_001729833.jpg
PXL_20210510_002830860.jpg

First, check that the 32 printed tines fit in the body snuggly with some resistance. There should be some resistance so the tines slide easily, but not freely once the pieces are broken in. The last tine on either end can be scaled slightly in your slicer to get a good fit. For my prototype, I just glued my extra tines together because there was a decent gap.

Next, cut the music wire into 45mm lengths. The ends are to be bent into a v shape on one end. Use the image as reference, and test fit into your printed piece. The size isn’t critical, as long as it peeks out the bottom and makes good contact. Repeat until you have thirty-two.

Using a utility knife, cut 15mm lengths of the copper tubing. I roll it back and forth with the blade until it cuts through. 32 of these also. The cutting may leave a bur, try to clean the up with the knife.

Insert the music wire into the tubing so the entire unit is 60mm long. This leaves space in the end for the jumper wire. The tubing is then crimped down onto the music wire. I used a set of wire cutters, applying medium pressure. Lastly, cut and strip one end of the jumper wire, insert, and solder.

Fit each one of these into the tines. I set them in by pressing on the copper piece with a soldering iron, but super glue would work also.

Place all the tines in the bottom body and slide the top body on. Screw in on the side with two holes first, then add the brackets and screw them on too.

Assembling the Circuit

PXL_20210510_200534235.jpg
PXL_20210503_180722705.jpg
PXL_20210510_232828537.jpg

Solder headers onto the multiplexer chips and wire everything on a breadboard according to the diagram. These can be soldered onto a stripboard after testing.

Upload Arduino Sketch and Test

Check out Troy Baverstock’s excellent Firefly tutorials to get your Arduino talking to Rhino: https://www.youtube.com/watch?v=a1fwyfkEHAg&ab_channel=TroyBaverstock

Upload the sketch and open the serial monitor. Notice how the values change.

Install Firefly for Grasshopper and Download Sketch

PXL_20210507_022103244.jpg

Firefly can be downloaded for free here: https://www.food4rhino.com/en/app/firefly

With the plugin installed, test the contour gauge using the Grasshopper sketch. Be sure to use the correct port for your setup.

Next Steps

Having tested this prototype, I believe that a standalone program would suit this tool better than Rhino. I’m experimenting with using a processing sketch with the DXF export library.

I will also be testing ProtoPasta conductive PLA filament as an alternative to Velostat. I’m hoping that using this material, I can finely tune the total resistance of the strip to 10k Ohms. This could even be printed in place with a dual extrusion printer. Updates to follow.

Thank you for reading, any and all feedback is appreciated.

Tomo