ADC Comparison – What and How I am Testing

I built a tool to measure DC performance of an ADC. Since I have it, I figured I may as well use it to investigate the four ADCs I have lying around- an esp32, and arduino uno (atmega328), SAMD21 based feather board, and the ADS1015. This post is about the data I want to collect and analyze.

Key Performance Indicators:

The things I look for in an ADC for DC performance are a high effective number of bits (including with oversampling), good monotonicity, low DNL and INL. All of these characteristics are related, but each one gives me a feel for the ADC, and only some of these are listed in datasheets.

Here is the data I intend to capture.

Standard Deviation + ENOB

The standard deviation per DAC output code is a good metric to start with. It is important to have resolution, but if the lower bits are twiddling back and forth seemingly randomly, they are not really useful. We can measure this twiddle and find out how many bits are useful- the effective number of bits (ENOB), for a single read. Even better, that twiddle might not be random- if we look at 100 codes and average them, we should get closer to the “real” value (oversampling).

I took 100 readings with the ADC per output code. The “true” value of the ADC is probably close to the mean of these readings. I calculated several standard deviations based on this mean- the standard deviation for the population of all readings, and then the standard deviation of oversampling 4x, 8x, and 16x.

As the oversampling increases, the standard deviation of the population of oversampled results decreases. Basically since we are averaging a bunch of samples, the random error cancels out and we end up closer to the mean. The standard deviation should be reduced by a factor of 1/sqrt(n) where n is the number of samples (standard error). Here you can see the results of a run with the SAMD21. I plotted the 1x and 16x sampling, as well as the predicted 16x sampling (dark blue over orange). It is pretty cool to see the theoretical value line up with the measured value. If these don’t line up, its a sign that the errors are not random- and that means that oversampling wont actually help get close to the “true” value.

One artifact of calculating ENOB this way is that at the edge of a code, the standard deviation is going to be really high compared to mid-code. You can see this effect here- the xticks are set to be the width of an ADC code, but they are not aligned. Usually the standard deviation is pretty small, but it gets really big near what are likely code transitions. Since we usually don’t have a map of the whole ADC when we are measuring something, we have to take the worst case scenario (our measurement could be on a code). Still, averaging helps improve ENOB.


Monotonicity is related to ENOB- the output codes should be monotonic at the effective number of bits. Since my reading from the ADC is in terms of averages of 100 readings, I will use the standard deviation/10, since the standard deviation should be reduced by sqrt(100 readings). The worst case standard deviation is about 14.5 LSB, so I chose to look at the output code every 1.5 LSB ADCs of input voltage.

In theory, this should always be a positive difference- the output code should increase by at least 1 every 1.5 lsbs. However, this is not the case. There are 39 non monotonic jumps, and each of them is only a little bit bad- about 1 LSB. In terms of the code/code plot. these correspond to flat spots, or places where the codes actually decrease, or are flat, as seen in the next section.


There are two DNL errors to look for, DNL<-1, which causes missing codes, and DNL>1, which causes non-monotonic (not always increasing) behavior. Looking for missing codes is easy and is done more or less by brute force – fortunately in this in this example, there were no missing codes.

It is not surprising to have codes be wider or skinnier than 1 LSB of the ADC. However, DNL>1 causes a the ADC output to be flat for a while- this means that we have extra error that we is hard to account for. I looked for codes that were more than 3 standard deviations from the mean width, and then plotted the errors. The widest code (aside from the expected nonlinearity near 0) was an astounding 7LSBs!

output from tool showing outliers and zoomed in DNL

Max INL Measurement

To get the INL, I just took the sum of the DNL’s. Since I didn’t correct for offset in this case, there is a large jump in DNL at the start.


I now have a tool for measuring real world DC performance of ADCs. I have a few ADCs lying around, and I want to figure out what kind of defects they have and compare them!

Testing An ADC for DC Characteristics

The tester!

With the ADSXXXX series out of stock for the foreseeable future, I needed to evaluate the ADC’s on several micros to understand if they would be good enough for my application – reading oxygen sensors. Mostly I care about DC characteristics, because my signal should be changing very slowly- on the order of many seconds.

I’ve seen a lot of interesting work done on ADC characterization and calibration, but only rarely do the posts explain where the reference voltage is coming from. If the voltage source is noisy or has some nonlinearity or bias, it will throw off the calibration.

really really excellent series on adc error/calibration from

demo showing how the esp32 adc is bad

auto-cal of the esp32 adc*

The most obvious way to do this is to generate a really nice (precise + accurate) voltage, put it into the ADC, and then figure out what the expected error is for a sample or for multiple samples. With enough resolution on this voltage, I can look for missing codes (high DNL) and for error in value from code-to-code (INL), and find really good gain and offset correction factors, and come up with an idea of how good the ADC is (at DC, for some ADC settings, etc).

The trick, of course is generating the nice voltage. Since I don’t have a sub-mv programmable reference voltage, I had to buy one. Since I didn’t want to spend hundreds of dollars on a non-programmable benchtop equipment, I decided to buy a 16-Bit DAC. These chips are pricey, but on the order of a pastry and a coffee, not a nice bicycle or oscilloscope. Instead of spinning my own board, I bought an eval kit to speed things up.

The DAC8050X comes in a one and two channel flavor. I got the two channel flavor in case I wanted to make differential measurements at some point in the future. These are really nice, and offer <1LSB nonlinearity. This is really pretty impressive to me, and looking at the typical characteristics, the INL and DNL are way way lower than 1 LSB.

The DAC80502 is also pretty sweet in that it has programmable gains for both the reference and the outputs- this gives it a really wide range of outputs, without any external circuitry. It also has an external VREF in, so you can supply a voltage range you care about. Combining the two outputs with some creative-op amp-ery could give you a really wide range of voltages to play with, but I really care most ab out the sub-3v range, which this is perfect for.

*this seems somewhat sketchy given the really bad stated INL/DNL for the adc, and the fact that the DAC on the esp32 seems to be 8bit. it might make the output look linear, but I wouldnt use it for anything important

Who tests the Tester?:

When making measurements against a standard, its important to understand how good your reference is. In this case the DAC is being used as a reference, which means it needs to be very “nice”. There are many charts in the datasheet, showing that all kinds of systematic and thermal drift, referred noise, error under load, etc. The total unadjusted error appears to be around .02% typically, and the INL/DNL per code is <<1 bit, usually around .2 LSB. While these charts are all very reassuring, its nice to verify them.

To do this I connected the DAC to a nice 6.5 digit multimeter (Agilent 34465a) and captured a 5 reads at each output code, and then calculated the error per code, to verify. This turned out to be a slow process, because 2^16 (65.5k) times even a few milliseconds is a LONG time. In order for the instrument to have a high enough resolution/accuracy, I had to wait a long time for it to collect data, so the test ended up taking ~4 hours.

N.B. the 34465A is a lot faster at resolving lower voltages than the lower spec models- those would have taken even longer!

very nice!

This chart shows the measured voltage and the difference in voltage from output code-to-code in LSB. The ideal difference code-to-code should be 1LSB of voltage – 1 LSB is Vref/(2^16). A difference of 0 indicates no change in output (a missing output code) and the distance from 1LSB indicates how far from the ideal each step is (INL). A different-sign difference between codes, which we don’t see here, indicates that the output is not monotonic (increasing or decreasing constantly). Fortunately, the worst thing seen are some missing codes at the start.

NB: this happens even without auto-zero on, and the meter can read negative voltages, so these really are missing codes (DNL>1). This seems wrong compared to the datasheet, but my measurements should be good enough to capture this. That said, I wont totally rule out some small dc offset or error in measurement.

That means this DAC is pretty awesome. The standard deviation of the errors is about .073 LSbs. Its not quite gaussian (kurtosis 1.17) because it has basically no tails, but its close enough for me. As you can see the LSB error code to code (DNL) is usually less than .2, which matches with the datasheet.

NB: this result was obtained under ideal circumstances. When I worked at my computer/charged my phone right next to it and generally jostled the setup, I got non-monotonic readings an more LSB error. With short wires to the DMM and good test practices it performed much better.

Preliminary Data:

Here is a read of the SAMD21 ADC with the internal 1VREF and no gain, compared to the DAC with 1.25VREF. The total error/code is shown below in LSB. This is a lot more than the stated 15 bit total unadjusted error, but I haven’t used the built in gain/offset correction, and I’m not sure if this incorporates the samd21 adc arduino bug. As you can see, a simple offset could reduce this total error by about 40%. Interestingly, there were a couple very odd codes near the 1/3 and 2/3 points where the error quickly jumps.

Micro Micro Word Clock!

Just another version of the micro word clock. Like the old version, this uses a matrix that is more widely available than the original matrix, including on adafruit. Unlike the older version, this version is very tiny (no larger than the display) and it incorporates a battery fallback for the RTC, as well as a USB connector for power. This was a fun layout as I had to balance my hype for assembling teeny tiny parts (generally low) vs size.

PCB Layout Trickery

there wasn’t a lot of real estate on this board once the display was placed, since it is through hole. The pins basically cage in the rest of the components. In order to get a clean layout (no vias on any of the display pins), I did a lot of pin swapping. Based on having to tweak the code last time for a new matrix, I knew that I had total flexibility here.

I also had to add a programming header somewhere but I really had no room on the front or back for even something like a tag connect. My solution was to add a connector via a castellated connector on the edge of the board. Then I used pogo pins and a little jig to make a bed of nails so the boards could be reprogrammed once assembled.

I also used a magnetic USB connector, which is ancient Greek for “an accident waiting to happen”. These cables come with a microUSB to tiny PCB adapter, and the cable itself snaps on and catches the adapter. the “hot” side has absolutely no protection that I can see, and actively accumulates magnetic (conductive) particles. The power is also routed through an open joint on the end of the connector (kind of a slip ring system). Since it basically adds two unreliable, moving slip joints to the power path, its very important for the coin cell to do its job to prevent the RTC from losing time.

Next Stop:

I think the next stop for this project is to teach a few people how to use kicad. its a cool little project that’s hard to mess up, but that makes a pretty neat little widget without too much trick soldering.

Dactyl Manuform Flex PCB

My flex pcbs showed up and they are just lovely. Unlike a rigid PCB, they are a kind of coppery gold translucent color with shiny copper underneath. And unlike a rigid PCB, I had to spend hours and hours carefully routing every trace in smooth, even curves, so the whole thing just has a delightful aesthetic. They came in sheets of two (right and left) with the flexes being retained in the sheet by a few small tabs. This is a great way for them to come because once they are free of their nest, they become very flexy and floppy (as planned).

Time Savings vs Handwiring:

Wiring up a dactyl with these flexes is dead simple and fast. I estimate that it takes about an hour to put on all the diodes and to solder all the switches. I’ll time myself next time when I am not taking photos (and running to microcenter), but it would be easy for someone to do in an evening, provided you are used to surface mount soldering. My first dactyl took me multiple evenings of careful snipping, bending, soldering, stripping, and checking, I would estimate that took 8++ hours.

Assembly Steps+ Notes:

Soldering to a flex pcb is a little different than soldering to a regular pcb. The big differences are that it is very floppy, and that the pcb coverlay (kind of like solder mask) has very low thermal conductivity, and it is very thin. I did all my soldering on a heat proof silicone mat, with a normal sized chisel tip on a hakko FX888D with tweezers and no magnification. You don’t need a fancy iron, but magnification can help if you are not used to components of this size. The small size components (and orientation) are important to preventing stress on the solder joints when the flexes are flexed. Below are the steps I took to solder this thing. These steps assume you already have a keyboard with the keys installed (look at the flex to make sure you install them in the right orientation- pins should be close to the bottom of the keyboard).

A note on safety: unlike rigid boards, flex boards are springy and if they release at the right time, I’m sure they could shoot some molten solder somewhere bad- say your eyes. It seems like a very good idea to wear some eye protection while working with these.

I’m free!

1: Remove the flex from the backing sheet. This should be done by carefully pulling the flex apart instead of tearing the flex or using a knife. find each tab and pull perpendicular to the tab take your time. Once the flex is fully free, double check to make sure there are no tabs left between the flexes.

Diodes on parade!

2: Diode soldering. The cathode (marked with a line) goes on the “cup” side of the solder mask. Solder the diodes on, or if you want super detailed instructions, continue on. First, I deposited a small blob of solder on one side of every diode pad. I put the solder on the pad on my dominant hand side. Then I laid out a bunch of diodes, and lined them up so all the cathodes were facing one direction. on this board, most of the diodes are cathode-on-left so that is how I lined them up.

Just a tiny dab of solder

Once I had all my diodes ready to go, I started tacking them to the board, working towards my dominant hand. that way the iron/iron wielding hand does not have to cross over already soldered components. Once the diodes were soldered, I rotated the mat that the flex was on and tacked on the other side. if a diode didn’t look flat, I took it off and reworked it.

Like a slinkie! Note tack soldering on top and bottom buttons

3: The next step is to start to install the flex. I started on the outermost row (outside the pinky row). I simply pulled the pcb up and into the shell- it was happy to extend out like a slinkie so that some of it was outside the shell while I worked. First, I made sure that the pins from the switches went through all the holes on the pcb, then I tacked down the first and last pins with solder. Once the flex was tacked, I went through and soldered each pin to its pad, making sure to get a good connection. Once the row was done I would start the next row.

thumb cluster detail

4: Thumb cluster buttons are a little different- each one lives on its own little mini flex connection. It worked well for me to tack them down one at a time. NB the “L” peninsula buttons do not change orientation- the bottom side of the PCB should always face the switches.

5: Solder the micro. NB the island that the micro sits on is meant to be folded over, so that the micro sits on top of it. There is some text that says “THIS SIDE UP” to indicate the right side. If your micro came with headers on all the pins, and you don’t want to remove it, you can snip off the extra flap of material. The USB connector should point “down” towards the thumb cluster. The micro orientation might seem strange to some- its mean for a USB bulkhead like this one, so the “wrong” orientation is meant to let the cable have a nice service loop in the shell.

6: Program the micro. Plenty of tutorials on that, and I will have some files up soon to fix a few pin order mishaps that happened on these boards (one header is flipped). NB some kapton tape should be placed under the micro to prevent shorts.

What went wrong:

one of the pin ones is not like the other one…

Inexplicably, I flipped a single header, so there may need to be separate firmwares for the left and right hands. This is annoying, but not nearly as annoying as wiring up a whole dactyl or screwing up in some way that is not a small matter of programming (SMOP).

What’s next?

I need to test the right side and finish my second keyboard (for the office).

How do I get one?

Twoards the end of the week I will be putting the extra prototypes up for sale. If you are interested, you can submit some info here to be notified.

Hey! where are the design files?

At the moment, I have decided not to share the design files. Unlike many projects there is little to be learned from them for repair or use. The boards are literally transparent, and the schematic is the same one thats been used on pretty much every dactyl. I have decided I want a bit of a head start selling these to recoup some of my costs before I make it easy for anyone to just go and buy a grip of them and sell them and put them up for sale (however unlikely that is).

Flex PCB For Dactyl Manuform

After my first dactyl, I decided I needed at least another one, maybe two for my home, my office, and some third place. Unfortunately, instead of just sucking it up and wiring it by hand, I had the delusional notion that it would take less time for me to make a flex PCB to do the wiring for me.

Design Process

My initial design process was to do a quick paper prototype. To do this I printed out (on a 2d printer) a lot of 1u sized pieces of paper and fit them to an empty dactyl shell. bridges were added to these connections, and the whole thing was scanned on a flatbed scanner. after a few iterations I had a pretty organic board that fit pretty nicely, but ultimately it was going to drive the price up because it did not use board area efficiently, and it was going to bump me out of a lower price bracket.

The original layout. it reminds me of the arcteryx logo

The original design helped me work out some of the main layout challenges around the thumb cluster, which was helpful for the next iteration. Unfortunately, the organic shape made the flex quite inefficient in space usage. Instead of trying to get a flex that would conform exactly to the shell, I realized the main spacing issue was between columns (keys are spaced about 23 mm vertically). To simplify routing, I decided there would be a single connector between columns, with a few specialized connectors for the thumb cluster and the ‘extra keys’.

I went back and forth between physical prototypes, electrical layouts, and sketches to arrive at this final shape. Paper cutouts are a cheap and fast way to design, and making a physical model gives me a lot more confidence in terms of clearances (especially for assembly). Doing this in a CAD model would have been possible, but nightmareish, due to the curvature and odd angles of the switch connectors.

Here is the final version! Since its a pain to make the actual flex parts of the pcb in kicad, I tried to minimize unique flex connection types.

Kicad Minutiae

The inter-column connector design was refined over time, and it let me make sure I had the right number of interconnects between columns. Due to constraints in kicad in routing arcs, the actual flex had to be laid out and then converted to a pad footprint in the footprint editor. this means the flex tracks are represented as parts on the schematic, which is a little annoying because it makes the nets not work for DRC errors/net connections, as each pad can only have one anchor. It also made it a little irritating to change routing, because the actual footprint/schematic needed to be changed to make a routing change. On the other hand, I was guaranteed identical routing between all my interconnects.

Flex Details

There are a few little flex details that I threw in, which I hope help make the board more functional mechanically. As you can see above, the main flex parts were routed without overlapping copper to prevent the thicker copper (copper-kapton-copper standwich) from stiffening the flex. I also tried to add maximum radii on the parts that would flex.

Here you can see the bridge where traces go to the microcontroller. on this flex, there are a couple notches which should help define a board flex location.

Diodes were placed to minimize the stress on the solder joints by putting them perpendicular to the flex direction.


Well…its ordered. The rest of the keyboard parts are in hand, so I am hoping to have another keyboard in a few weeks, with a lot less wiring!

Dactyl Manuform For MechEs

Dactyl builds seem to mostly be done by people who either know what clojure is (professional keyboard pokers), or at least people who are in the electron herding/plumbing industry. This means that there’s not a whole lot of build guides written by people who know to hate STLs with a burning passion, and who might actually want to use typical feature-based CAD (and not keyboard mashing) to edit their keeb to their liking. While there are many reports of being able to open openscad files in freecad, that did not work for me.

Fortunately joshreve used python to make a generator that can create a STEP, albeit one with a lot of self-intersecting and bad geometry that prevented solidworks from opening it on the first go. After a few hours of editing, I was able to knit up all the surfaces and make a solid body. But shoutout to joshreve-this work was critical!

In the spirit of making this available to other mechanical types, you can get the fixed up .sldprt and .steps from here.

Goal: see if I can get used to this keyboard

What does 🐾 do???

I picked an extremely whacky keyboard to build, because why not? Worst case I get hooked on it, spend a lot of time making a keybord nobody else will use, and I have to build my own keyboard for the rest of my life. Best case, I make it and decide its awful and retreat blissfully into querty land.

Unlike most people who seem to tout the wonders of the manuform, I do a lot of CAD. CAD means you use a mouse, and you have to type a lot of numbers. I’d like to see what the manuform can bring to that- specifically, can I right-hand-mouse and left-hand-numpad? Would I like a layer for common shortcuts just for specific programs? Would it be cool to have a trackball built into my keyboard? I have questions that have not been answered by a cursory google search and so I will have to find out for myself.

What did I change?

As a mechanical-type engineer, I like things to fit together without having to drill extra holes or to hot glue in connectors. So it was important to get the case holes right, to prevent that. The micro however, will be taped (double sided) to the interior, since there will be no force on it from removing connectors etc.

I also moved the screw bosses to the inside of the case, since they will look better there. they are sized for M3 heat set inserts from McMaster.

Of course, there has to be some frivolous embellishment on it because it is both 3d printed and a keyboard. Instead of spending hours on this, I just threw some text on the “knuckles” of the keyboard. “PROTO–TYPER” seemed to be appropriate, as it is a prototype to see if I like split weirdo keyboards enough to keep using them.


There are better guides out there on this but overall it is straightforward to wire these keyboards and if done carefully, there is little danger of anything shorting out, and even if something is shorted, its easy to fix. If I were to do it again I would use enameled copper wire or fully stripped 28 ga wire and a wire wrap tool, with cut to size ptfe tubing as the insulator. I think this would be easier than carefully cutting 20 or so small wires per row. I will say that it took a surprisingly long time to solder this, even for someone who is fairly good at fiddly soldering.

Update: A Few Months Later

It took me a few months to button this project up, and in the mean time I have been using the keyboard. It is now my daily driver- for everything. Surprisingly I have been spending most of my time in kicad and altium instead of solidworks, but the time I have spent in all three programs has been pretty pleasant.

I think the most challenging thing will bet to remap all the important shortcuts to the left hand, and for those that cant be remapped, to make an application specific layer. For example, the ‘M’ key is really important for moving things in kicad- but its on the right hand. That means that to move stuff, one of my hands has to come off the mouse or the keyboard.

One thing that has been surprisingly nice is my navigation layer, which makes the left home keys arrow keys, and the right home keys the mouse directions. the thumb keys on the right side become left and right mouse clicks. I would say if I am not in a cad program, my hands stay on the keyboard, which is nice! The only issue is that its easy to get stuck in a layer (or my numkey layer) and not know that I am in that mode when I first sit down and start typing my password. some kind of indicator will need to be built into the next version.

The Micro Word Clock 2021 Edition

I am planning on teaching some people to use kicad, since its my new favorite EDA tool. I searched high and low for a decent circuit that would do something cool, with a good variety (but small number) of parts. Basically something fun and not intimidating. I got hooked on formatc1702’s micro word clock. It is an excellent use of the atmega8 series unusually high current drive outputs.


left- original gyxm-778 matrix. Right adafruits luckylight KWM-20882CVB matrix

The one catch was that I had a lot of trouble finding the GYXM-788ASR LED matrix called for in the bill of materials. Fortunately adafruit sells a similar 8×8 matrix from luckylight. I tried to design around this by including both footprints, but I ended up mostly making a mess (and I still couldn’t find the 788!). Both are common cathode but the row/column nomenclature is flipped. To formatc’s credit, they did a good job with the firmware. It was easy to find pindefs.h, which let me swap around pins until I was happy. My strategy was to create a test pattern and make sure it shows up where you want it on the matrix. This was much faster than tracing every signal and creating the right pin definition the first time.

The second catch was that after programming, I couldn’t get the time to change! After glossing over the code it seemed like this must have something to do with the RTC- and after some gentle probing/touching the board it would occasionally work. Initially I attributed this to the crystal not starting up, but after many power cycles and other pokes, it seemed like the crystal would actually run just fine. As a last resort I read the datasheet, and lo and behold, the Vbat pin needed to be grounded.

I bridged these two pins

A blob of solder quickly remedied this deficiency in my pcb, and afterwards changing the time worked just fine. I suspect that sometimes the chip “just works” if that pad happens to be at the right potential on reset, but sometimes it doesn’t. The button presses update the RTC time, not a time on the micro. So if the RTC does not start up, then you can’t change the time.

Other Notes

Pin1…probably. I prefer a dot!

I used the default footprints from kicad for a lot of the parts, and the pin 1 designators are a little wishy-washy. They look more like an printing error than a clear indicator for pin 1. I guess I will get used to it instead of re-creating every part from scratch, but if I only have a few parts, throwing a dot on the PCB would go a long way during assembly.

I should have also added a polarity marking on the power connector, and a couple of i2c test points wouldnt have hurt either. Since this was a quick board just for me and the parts are big, I didn’t worry about it.

Upgrades for V2

I figured if I was going to do this board again, I may as well overdo it. I managed to cram everything into a board roughly the same size as the matrix itself, even after I added a coin cell and a USB connector for 5V power. The coin cell will keep the RTC running for about 10 years, even if it loses usb power. This way I can program it, ship it to someone, and they can just plug it in and the RTC will know what time it is. The ground plane is far from perfect but its about as good as I will get with a board this size

Since the time will basically never need resetting, the switch for changing the time is very very small. I used the NanoT switch which is about the same size as an 0805, which is very very small indeed. And because programming is now a one-time affair, I moved the programming header to castellated vias/PTH on the edge of the board. They .1″ pitch so they should be easy to solder to headers if I cant scare up a pogo pin jig for them. For some reason the ground pad shows an air wire. The 5V is purposely left floating since I don’t care about that connection.


The git repo can be found here. Its probably not ready for prime time yet, but check the readme. I will update that when its reproducible.

Sitec Inflator Valve Service

As a scuba diver, I know that its only a matter of time until my gear looses the battle against corrosion and crud. Unlike most other sports, getting gear serviced is very frustrating- I have yet to find a place that can tell me exactly how long service will take and even for simple service, kits are often not in stock, or are a pain to get.

So this is a post about servicing my inflator valve, which has felt a little leaky. While I have not noticed any noises, it has felt like there is always a lot of air in the suit, even if I have not added any.

To be fair to sitec, they do make very reasonably priced kits available (from Europe), which contain a few orings, as well as a special clip that will almost certainly be broken when the valve is disassembled. They also do provide disassembly tools, if you want to buy them.

If I could get a kit for a reasonable price (from the US), I would have- however, I have a 3d printer and not a lot of patience, so I decided to fix it myself.

If you cant open it, you don’t own it…

Step one was to get the valve out. Whoever tightened it down really did a “good job”. To avoid waiting to get the special wrench from sitec to even find out if my valve was leaking, I printed my own. You can get the files here. These wrenches fit down over very small lugs on the inside and outside of the inflator valve.

maybe the culprit!

Next, the BARE sticker was peeled off and the button underneath was unscrewed with a 2mm and 4mm hex key. This allowed the valve barrel to be removed and the orings inspected. Interestingly, the bottom one was nicked-possibly the source of the leaking.

My model of the inflator valve, sitec part number

I started my maintenance with taking my inflator valve apart. After measuring some orings, it seems like the two small orings in the valve itself can be replaced with -008 orings, the oring in the nipple is a -009 oring and the swivel oring is metric 19.5 ID x 3mm cross section. All are available on McMaster, and buna N should be sufficient. Basically for the same price as a single repair kit, I got about 50- aside from one crucial part- the clip.

The Clip

RIP clip

I really cant explain why sitec chose to use a plastic clip to retain the outside of the valve to the inside of the valve. While it obviously works, there is no way to get it off without destroying it. Other folks have replaced it with C clips and spacers. I also bought said c clips, but I also modeled the clip and printed one on a pretty beefy multijet fusion printer.

Sweet sweet 3d printed clip

It seems like it works fine! I have managed to stay completely dry while using it. There is no perceptible “wiggle” in the assembly, and it still rotates fine. If you want to make your own, the files for the clip (and the whole valve) are on grabcad.


There was some crusty stuff in the screw that holds the valve together. I imagine it is a sealant to keep water from leaking under the sticker, through the screw, and into the suit. To keep this sealed, I added a little aquaseal during reassembly.

Also, the sticker seems to have gone back on just fine- which is surprising, given that it was left off for several days.

Sitec QuickNeck Install

My drysuit neck seal has always been about a 90% fit, which means that 100% of the time my suit floods. Sometimes a little, sometimes a lot! Considering the dropping air and water temps, I decided to do something about it.

Sending my drysuit out for repair was not a good option for me- its prime diving season here in the northeast, and the idea of sending any of my critical gear off for an unknown amount of time makes me sad. If I valued my own time, I don’t think I “saved money” by doing this install, but I certainly now know how I can fix my suit- and how long it will take. To me that is worth it.

Here are my notes- nothing special, and sadly not enough photos.

Material and Process

  • Sitec Quickneck ring
  • 220 grit sandpaper
  • silver sharpie
  • acetone
  • heat gun
  • DRIS dry adhesive (heat activated sheet adhesive)
  • Gear-Aid Aquaseal-NEO (NEO. not normal aquaseal!)

First I had to remove the old seal. I heated mine up with a heat gun and it peeled right off. My original seal was on the outside, but this ring will be installed from the inside of the suit, as you can see above.

I needed to enlarge the neck hole ever so slightly on my suit. I started by stenciling the outside of the neck seal onto the inside of the suit. Then I very carefully trimmed the inside hole 2-3 mm at a time until the neck seal could fit through without any distortion of the fabric.

Once that was done, I sanded the area between the stenciled silver sharpie and the neck hole with 220 grit sandpaper, then wiped it with acetone with a lint free rag (aka used “procedure” face mask). Now that the fabric was roughed up, I put down three coats of aquaseal NEO to create a surface that the dry ahesive would stick to. According to DRIS, the sheet adhesive wont stick to some fabrics.

Prepping the ring went just about the same way- I trimmed the adhesive to the size of the ring. Then I sanded the ring with 220 grit, and wiped it with acetone. Then I heated the seal with the heat gun, and pressed it down onto the seal with a brayer/roller.

The photo is after the release liner was removed- you can see the milky white glue where it is cool and the clear glue where it is still hot.

To finalize the installation, I followed the same process of heating the ring and pressing it into the suit. This is fairly forgiving, but it pays to be patient and work you way around the seal.

Results + Recommendations

Two big thumbs up for the new neck ring. I am now dry all the time, and if I tear a seal I can quickly install a new one. More importantly, I now know how to patch my own drysuit, which means I don’t need to worry about sending it out for a few months if it gets a hole in it.

I would recommend this kind of work to anyone who has a drysuit who priorities deterministic execution of repairs over the great mystery of sending stuff out- however its not for the faint of heart since you do have to cut up your drystuit. If you do decide to do this take your time, and good luck!

Integrated Dive Information and Oxygen Transmitter (I.D.I.O.T)

I.D.I.O.T wrist mounted display

Knowing your PO2 goes a long way towards making it safer to go deeper with an oxygen rebreather. If you want to go pure O2, it can be used to monitor how purged the loop is, and if you want to go a little deeper it can basically turn an O2 rig into a sort of mixed gas rebreather (or a full mixed gas rebreather with proper diluent addition).

Sensors tucked away in the counterlung. This will be switched to the inhale side of the CL.

In order to conveniently know my PO2, I have purchased O2 sensors. Having built in temperature compensation and having reliable manufacturing seems like a big plus vs fabricating, assembling, testing, QCing and calibrating my own.

For my first iteration I have started with just two cells. A third would be easy to add if this works out.

Layout and Logic

Not to scale

The electronics are going to be split into three parts- the cells/stuff in the counterlung, an electronics box, and a display. I decided that the only things in the counterlung should be the sensors themselves and a connector.

Wiring is absolutely a nightmare.

The “Electronics Box” will house the brains of the operation (an ESP32), and the battery. Batteries and other flammables will be kept outside of the oxygen rich environment of the rebreather, for obvious reasons. In the unlikely event of the battery shorting to the cells, hopefully the high impedance of the cells will limit resistive heating or fire. In the future, a USB port with a cap will be wired in for charging.

Box as tested

This box has been tested to ~80 FSW with just the cord grips+cord installed, and it passed without noticeable leaking. The cord grips are MSM-M SKINTOP connectors. They don’t seem like the should work, and yet they do. Mcmaster sells these as “submersible cord grips”. N.B. they make a face seal with the enclosure, and do not require a gland like an SAE o ring boss (ORB) fitting.

The main oring seal is a 1.5mm oring made from cord stock and superglued at the ends. You can see the join just above the middle heat set insert in this photo. Surprisingly this does not seem to create any significant leak paths, although there is always a slight possibility that I will have to eat my words on that someday.

The display will be upgraded to a HUD at some point, but for now it will be wrist mounted. It displays two PO2 cell readings, a compass heading, and (in the future) the depth. As you can see in the photo, the top row is “highlighted” to show a problem- the cells are disconnected and are reading a very high PO2.

The Electronics

EE layout

Reading an off the shelf galvanic O2 cell is dead easy, since the temperature compensation and shunt resistor are built in. However, the output voltage is fairly low, and so it should not be fed directly into the ADC of a typical micro. It is possible to read such a voltage (~20mV), but it wastes a good portion of the resolution of the ADC.

For example, the maximum output expected is 2V (representing a PO2 of 2). With a 5v ADC, we are only ever using 2/3 of the range of the ADC, which effectively limits our resolution of PO2s to 2/3 the resolution of the ADC.

Since these signals are also not amplified or buffered in any way, it seems good to keep them away from the mcu. I have resolved to put them on an I2C DAC with an internal gain stage, which will let me both maximize resolution and keep the signal wires for the cells short. To this end, I used an ADS1015 breakout from adafruit.

Since it was on hand, I also threw in an LSM303 to use as an electronic compass. Since the compass has no “inertia” it has kind of jumpy readings, but doing some smoothing should help to get it to be a little less jittery. I could also try some compensation for nearby electronics, but they seem to have little effect. The LSM accelerometer/magnetometer lives in the wrist piece, although I did consider mounting it in the “head”, which would show you body heading, but not necessarily what you are looking at.

The display is the 128×64 OLED featherwing. Its easy to integrate, and it is fairly compact in terms of “extra space” for unused headers/buttons.


Believe it or not, this was taken in 10 feet of water while the sun was still up. Zoop for backup depth gauge/dive timer

I headed to the mystical mystic lake to do some testing. The combination of near zero visibility to start with and a haze of sediment/algae/stuff I don’t want to think about made for a more-or-less night dive like conditions, even with a light, during the day. However, the little O2 cell reader and compass seemed to behave relatively well. Most importantly the firmware did not crash, and no water seemed to get in. Cant wait to test it somewhere actually fun!