Public Lab Research note

Riffle conductivity caps and other housing ideas

by mathew | February 10, 2016 01:54 10 Feb 01:54 | #12674 | #12674

What I want to do

Follow up on @Donblair's Riffle housing specification with some tested parts.

There are two design ideas I'm working from, current versions of the original through-the-cap conductivity screw design, and my preferred strategy of using rubber stoppers.

The through-the-cap designs were subjected to a limited test between late December and early January. They were supposed to stay at the bottom of a water filled trash can for seven days, but they freed themselves and floated to the surface a bit earlier.


Cap & Screw conductivity sensors

don's original sketch

I want to make sturdier elaborations on Don's original sketch of cap with screws through it, pictured below. The original design had two mechanical problems: wood screws through the plastic cap leaked. Also, the alligator clips attached to the inside are easy to dislodge and less than ideal.

screws and alligator clips

screws and alligator clips, inside

More recent testing has revealed that the size and distance of the screws may create calibration issues, and so large screws may not be ideal. Machine screws with nuts and rubber washers work much better, and I'll show three versions of that strategy, including very small(0-80) screws for more ideal sensor placement.

0-80 screw kit

0-80 (size 0, 80 threads per inch) screws are the smallest standard-sized screw in the US & Canada. They are a specialty item available only from catalogs. Not all parts (like the ring terminals) come in size 0, so the parts selection is based on best guesses of inside and outside diameter of 0-80 screws.

Parts list (with McMaster Carr part #'s)

  • One 22mm bottle cap and 2x each of:
  • 5/8" 0-80 pan-head machine screws, stainless steel (91772A060)
  • 0-80 hex nuts, stainless steel (91841A115)
  • 002 square profile rubber o-rings (170N12)
  • #0 nylon washers (90295A310)
  • #2 ring terminals or 'stud rings' crimpable wire terminals (7113K263)
  • #0 aluminum washers 93286A153

I tested two configurations-- just screws and rubber o-rings and screws, o-rings, and nylon washers to hold them in place.

With Nylon washers:

P_20160209_143604_HDR.jpg P_20160209_143615_HDR.jpg

This is the easiest configuration to assemble. The bottle cap is sandwiched between rubber washers, and nylon washers hold the rubber washers in place. On the inside of the cap, two #0 aluminum washers pin the oversized #2 ring terminals down. The thick nylon washers make the small screw more stable, and make the tiny nut easier to tighten down by exposing it away from the cap's surface.

The nylon washers aren't a necessity, however, and if carefully tightened down, the rubber washers will sit under the screw's head:


Notice how they pucker! this isn't ideal, and as Don noticed, they can pop out.

6-32 screw kit

6-32 (size #6, 32 thread per inch thread density) are the smallest screws one can regularly find at a hardware store (sometimes 4-40 is available), and the smallest size for which washers are usually purpose-made. Two can fit in a cap and form a fine seal. As mentioned, they may be too large for a good calibration. Assembly is the same as the 0-80 configuration.

Parts list (with McMaster Carr part #'s):

  • One 22mm bottle cap and two of each:
  • 5/8" 6-32 pan-head machine screws, stainless steel (91735A150)
  • 6-32 hex nuts, stainless steel (90257A007)
  • #6 rubber washers (90130A007)
  • #6 nylon washers (90295A380)
  • #6 ring terminals or 'stud rings' crimpable wire terminals (7113K265)
  • aluminum washers #6 (93286A007)


Stopper-based closure & rigid holders

I have previously advocated for a stopper-based closure, which can used instead of a cap-based closure of the top of a bottle. @Donblair has tried this in a very simple form, just a stopper filled with silicone, and has also had success. We have played around with beeswax and while it looks like a good sealant (and quick!) no one has tried a field deployment.

I want to elaborate on a better mount. That said, no one has built sensors around this strategy yet. I did made this prototype without all the parts listed below, and without a working Riffle (still waiting for delivery).

Parts list (with McMaster Carr part #'s):

  • Rubber stopper with 3/8" hole (#3 for 22mm bottles, #7 for "gatorade" sized bottles)
  • 3/8" OD rigid plastic tubing, I used PET tubing (8585K11)
  • Silicone aquarium sealer (7327A21) or maybe Beeswax
  • #4 or #6 hose clamp (5321K14)
  • 1/16" plastic loop clamps (8876T58)
  • 5/8" 4-40 pan head machine screws (91735A109)
  • 4-40 pan head hex nut (90257A005)
  • 18650 cell battery holder purchased at a 'vape shop'

The small plastic loop clamps (If I had them in hand) would be screwed down with the riffle with the machine screws, and grip the wire, which attaches to the plastic tubing with the hose clamp. The wire loops into the battery holder.


I will need to try this out with a taller bottle like a 1-liter.

This mount was partially inspired by a moment of public transit serendipity-- watching someone change the battery in their e-cigarette on the bus. I realized they not only had an 18650 cell in their e-cigarette, they also had a keychain battery holder. I went to a nearby 'vape shop' and attempted to buy such a keychain holder. The atmosphere was clouded with candy-scented foulness and I left quickly without the thing I wanted, instead getting a multi-battery holder I cut down. I ordered the keychain holder online.

Presta valves and pressurization options.

Previously, I've filled a Riffle bottles with rice for electronic protecting structure, desiccation, and pressure resistance. Many underwater devices are filled with mineral oil for the same reasons. But both of those are messy options. What if the bottle could be easily pressurized and depressurized with air?

I tested whether I could fit a Presta valve into a bottle with 0-80 conductivity screws. the answer is a qualified 'yes.' I can regularly inflate a soda bottle to 40PSI. Tightening down the Presta valve and making sure it is fully supported requires precision in assembly; without the nylon hold washers the valves leak.

Parts List:

  • Presta valve cut from a bike tube (ask a bike shop for a flat)
  • Presta hold nut
  • 2x 1/4" ID x 1/2" OD x 1/8" thick rubber washer
  • 2x 1/4" ID x 1/2" OD nylon washer

The presta valve needs rubber washers on the inside and outside, and nylon washers holding those rubber washers in place. The rubber excess cut off of a bike tube will hold the valve in place on the inside.



Questions and next steps-- Making rubber washers?

I tried using both the laminate paper insert washers in normal sodapop caps, but also wanted something more durable. I bought a leather hole punch and a sheet of 1/16" rubber and cut some custom washers. I don't know if they're a success. They stick and make it hard to tighten the cap very far. maybe with some oil they'd work.


I did this Help out by offering feedback!

People who did this (0)

None yet. Be the first to post one!


my bulletted lists of parts are improperly formatted on purpose as a markdown workaround. I can't start a sentence with '#' or it becomes a huge title. So all the parts, which should say "#0 machine screw" or the like say "machine screw #0"

Reply to this comment...

Let's see if the backslash (\) escape works:

#0 machine screw
#2 nylon washer

In a list:

  • #0 machine screw
  • #2 nylon washer

Reply to this comment...

look at those lists now! thanks!

Reply to this comment...

I wonder if I will miss Markdown when the Rich Editor is implemented.

Reply to this comment...

Presta valve on a soda bottle - yes!

Reply to this comment...

Wow, amazing note. Thanks so much for putting all this so nicely together, @mathew!!!

Still digging in, but quick thoughts:

  • The 6-32 screws with # 6 rubber washers look great to me. The readings I've done indicate (I think) that for a two-probe design (like this one), a trick that helps to diminish stray field effects (electric field lines that extend beyond the space between the two screws, and interact with e.g. the sides of a calibration container) is to choose probe size and probe spacing that differ significantly -- i.e., it's best (perhaps) to use smaller screws spaced further apart, or larger screws spaced more closely. Exactly as you're doing in the photos above. I'll likely try 6-32 or a comparable size in my next trials -- as you say, it's the easiest to source in the local hardware store.

  • it'd be nice to also come up with a nice way of coupling our temperature probe to the water temp that is as easy to implement and render waterproof as the screws + washers designs shown above. Perhaps adding a third screw, and attaching the temp sensor inside the bottle to the screw (somehow), would accomplish this ...

Reply to this comment...


I bet the thermal coupling with a temperature probe could be easily accomplished with some heatsink thermal paste connecting the temperature sensor to a screw through the cap.

That said, I'm strongly in preference to building more components around the stopper-based design and will focus on that, and conductivity setups that fit through the stopper, along with a thermistor.

While I'm sensitive to this use case of rapidly deployed DIY conductivity, I'm more interested in a more rigid bottle platform supporting a variety of sensor configurations.

As a thin piece of HDPE, the cap is a very confining component on top of a very confining (22mm wide) housing size. It seems to me that the ease of setting up a screws-through-the-cap demo has been driving this design, while it introduces a host of other problems without satisfactory solutions:

My primary concern is the rigidity of the internal riffle mount and security of wiring between sensor and riffle. The cap and the riffle can't be rigidly connected because sensors take up the whole cap surface. So the riffle must be mounted independently, and space given to twist the wires between riffle and bottle. The wires are inherently going to get yanked around and that is a reliability issue.

Putting screws through the cap solves a single sensor use-case at the expense of all others since we haven't identified any way to put other sensors through caps at the same time.

If we're going to do screws-through-the-cap as a default configuration suggestion, I'm skeptical that 6-32 screws are worth using despite their ease of availability. 6-32 screws are easy to get, but the ease of working with them stops there:

  • Its hard to make properly sized holes for them, as the cap material is hard to drill out and too wide to be poked through with a tack without dramatic warping.
  • The screws are awfully crowded in the cap, especially trying to keep the ring terminals from touching.
  • Its hard to fit the screws and the ring terminals in a way that doesn't effect the cap's threads. The screws are big enough that they warp the surface of the cap and create flexion during tightening and loosening, a structural issue that might become a calibration issue.

Reply to this comment...

How many sensors can a Riffle monitor gracefully?

Considering that the typical sensors that might be used are cheap and maybe unreliable, does it make sense to have three $2.00 temperature sensors as replicates? Conductivity sensors are even cheaper (a couple of screws), and notoriously unreliable, so why not have three of them on each Riffle deployment?

If the Riffle and batteries are in a water bottle, can a single cable bundle pass to a separate enclosure that is a sensor pod? The pod could be a simple container of tough material (e.g., PVC) that is easy to drill and seal. The pod could bristle with replicate sensors. This gives each Riffle deployment a rigorous test of the precision of the sensors used, in addition to redundancy in case of failure.

But I guess that sensor pod could be just a little bigger and the Riffle could be in there.

I have once again convinced myself to abandon the water bottle.


Is this a question? Click here to post it to the Questions page.

Reply to this comment...

To sum: @cfastie will be using a Nalgene bottle, @mathew will be using stoppers and pop bottles, and @donblair will be using screws and water bottles, because the riffle can fit in almost anything.

Reply to this comment...

Yes Nalgene. Remember when BPA drove all responsible mothers and other tree huggers to abandon Nalgene water bottles? I have a box in the shed full of old Nalgene bottles.

Hoarders: 1
Normal people: 0

Is this a question? Click here to post it to the Questions page.

Reply to this comment...

That's how i keep score too @cfastie !

Reply to this comment...

Some ideas:

I love the presta valve idea (I used to work in a bike shop, and we threw many of these away each day from flats). I wonder if having a large metal post nearby would interfere with the conductivity measurements?

I'm jumping into the middle of the stopper vs. cap discussion without knowing much, but I like the flexibility of using caps, because of the fact that you can adapt the design to use with larger bottle openings, like the nalgene. Have you experimented with a design that has only cables passing through the cap? Cables could connect to whatever sensors or antennas the deployment is using, if fitting all the sensors on the cap is limiting.

For temperature sensors, do many uses require the sensitivity of having the sensor to be outside of the bottle? Because otherwise the temperature sensor could be attached to the inside of the bottle, assuming the bottle comes to equilibrium with the stream temperature fairly quickly, saving space on the outside.

Goodwill and other thrift stores can be great places to look for old nalgene bottles, and other wide mouthed plastic bottles. Sometimes these come from local losts-and-founds.

Is this a question? Click here to post it to the Questions page.

Reply to this comment...

@pdhixenbaugh, we have experimented with putting cables straight through the cap, and it hasn't been successful. the plastic (HDPE) of caps is very hard to glue to and can't be sealed with adhesives or sealants, it has to be a mechanical seal with gaskets or rubber washers.

there are ways to do it mechanically involving custom hardware, such as this Blue Robotics cable penetrator ($4):


While that part is both open source AND cheap, its a custom part from a single supplier. A bunch of those in the lid of a Nalgene bottle would make for a nice and easy-to use system though.

Reply to this comment...

Any hollow bolt can be a cable penetrator. These cost $1.20 apiece, but you also need two nuts and rubber washers. The hole is only 2.3 mm in diameter, so not many cables can pass through each one. Those nice Blue Robotics penetrators have a bigger hole (about 5 mm?) and better facility to glue the cable in.


For many uses a temperature sensor can be inside the enclosure, but some uses might call for more contact with the medium. Waterproofing the temperature sensor for external use is a separate challenge.

Is this a question? Click here to post it to the Questions page.

Reply to this comment...

I've looked at those vented set screws-- their vent holes are tiny but they might work.

I'd like to try sealing one with glue. My suspicion is that its going to be hard to get enough glue in to get a good seal, and that the glue will fill the hex and make removal hard. At a buck a piece its hard to complain and definitely worth a shot.

Reply to this comment...

These M12 vented screws give another .2mm of space for wires (2.5mm) and a knurled end for better purchase when turning. I'd feel comfortable completely filling the hex-key head with glue on one of these: but at $6.75 not including washers and nuts, they can't beat Blue Robotics.

McMaster isn't known for cheap hardware. They just have the best catalog. A better deal is probably available elsewhere and this is a more standardized industrial part.

Reply to this comment...

Threaded lamp pipe. 3/8" OD. $3.27 for 8 pieces


and nuts, $2.77 for 12 pieces


This makes six cable penetrators for: $3.27 + $2.77 + rubber washers + glue for sealing the wires inside the pipes

But regular 3/8" hex nuts are cheaper and should work better.

Lowes has brass nipples, eight for $2.98
Or you could use the threaded tube from those discarded Presta valves.

Is this a question? Click here to post it to the Questions page.

Reply to this comment...

I ordered these lamp rods, some of the threaded cable penetrators, and some silicone tubes to the pdx office. The blue robotics folks say steep bulk discounts (and custom colors!) are available, but we'll check out how these work side by side

Reply to this comment...

those lamp rods! mic drop

I've toyed with brass nipples, but most valves expect to be screwed into a thicker material and have tapered threads (labeled NPT usually). You can't put a nut on a tapered thread, unfortunately.

Reply to this comment...

I don't follow. Are you saying they will work, and drop the mic in a "hellz-yeah" way? or are you saying they won't work and drop the mic like a Nintendo controller after losing at Tetris?

Is this a question? Click here to post it to the Questions page.

Reply to this comment...

I'm excited about lamp rods.

sorry, I was confusing the 'lamp nipples' with air hose nipples and the like: Screen_Shot_2016-02-11_at_3.27.50_PM.png

My one concern is that brass parts will corrode faster than stainless. don't see any stainless lamp pipe on a quick look though.

Reply to this comment...

The lamp pipe looks very close to an ideal solution, but... lead is added to brass to make it more machinable. If the brass isn't certified for use in Californian plumbing, its probably 1-3% lead with high lead motility in electrical grounding and water contact uses. Both outcomes are likely in a long-term underwater or underground sensor installation.

I was hoping that RoHS certified lamp components for the EU might be lead free. but copper alloys have an exception under RoHS.

I think this same lead problem applies to the presta valves as well.

I've only seen light steel as a replacement for brass in lamp pipe. I haven't seen stainless steel or other alternative non-corrosive material. Light steel seems like a bad option because it corrodes readily, but painted steel has a good track record in marine uses. I'd rather use a completely non-toxic material like light steel and coat it in a tough enamel paint, like nail polish.

Reply to this comment...

Threaded lamp pipe comes in zinc plated steel, but I don't think we will find stainless. Here are two bulk suppliers of nipples:

A 1 1/2 inch long nipple costs $0.15.

Another problem is that the threads are non-standard (27 threads/inch) so you probably have to use the skinny nuts made for lamps. Standard 3/8" nuts can be 16, 24, or 32 threads/inch.

The thicker lamp nuts are $0.05 apiece:

Is this a question? Click here to post it to the Questions page.

Reply to this comment...

These 18650 keychain battery holders just arrived. They're great:




Reply to this comment...


Tried drilling through bottle cap, then making the hole really jagged using an awl. Then a pen tube through a rubber stopper, thick layer of silicone sealant on outside. Pressed it snug, then backfilled on the inside and let it cure.

The fact that the silicone goes through the cap and flares on both sides makes it work, even though "technically" it doesn't adhere to this type of plastic.

Technically, you can't glue plywood with fiberglass , but it works in practice. And it looks like this method of passing wires out of a soda bottle works in a similar way.



This test was just with a pen with standard plug in it. Assuming it will work to pass wires through the tube and then backfill with more silicone. I'll try that next to make official, but just seeing if I could improvise something with what I had.

FYI, we got the lamp parts in the mail today, and they have a lead warning on them:


Possible we can source parts that don't contain lead, but something to consider in modelling a DIY solution that people might make from local hardware store, espec if we assume not everyone will go through the trouble to track down lead free version to throw in the creek.

Reply to this comment...



hasn't lost a drop!

Reply to this comment...

Reply to this comment...


Reply to this comment...

Login to comment.