HSBNE's Interlocks

So some of you might have noticed the new interlock on the table saw and wondered how it came about.

The current interlock has taken a little bit to produce and is based on advice and support from multiple members, including but not limited to @pelrun @doc @Thermoelectric and myself.

Its guts consist of:

  • A modified sonoff TH16, which looks like this:
  • A three-phase contactor
  • An addressable led
  • An RFID coil and reader

All of those things crammed together inside that little box looks a little like this:

So how did we get here?

First up I popped open and modified the sonoff to add headers, like so.

Then once I had the headers on, I tested that I could use the addressable LED on the single GPIO pin I could use on the board (GPIO14).

I tried to test the RFID reader but interestingly it wouldn’t power up. It turns out the 3.3v output on the sonoff was outputting 3.2v when the board was powered. This was enough for the board and the esp8266 (it only needed 3v) but the RFID coil no likey that. So I ended up soldering a cable onto the 5v-3.3v regulator where the 5v came in.

Then, some appropriately trained electricity gnomes wired it up and I threw some test code on the sonoff to see if it would turn the contactor on and off.

It worked and the contactor switching nearly made that assembly fall off the bench.

After changing pants, everything was put into the box.Holes were drilled into the case to accept waterproofing grommets and it was all systems go.

Except I then discovered that the code I’d been testing the RFID coils with had been lost, so @pelrun whipped up some better code.

After that, I tested it. A LOT

So that’s it, version one done and it’s now sitting on the Table Saw gathering sawdust.

Stay tuned for version 2.


Ok, so my plans for Interlock V2 are in a holding pattern waiting for some current transformer samples so I’ll talk about goals for V2.

Version 1 was a prototype and so had some problems like:

  • It’s huge.
  • That status LED is hard to read.
  • Swiping on and off is hard
  • I only had one GPIO and I had to drill a hole in the top of the sonoff th12 board
  • Wiring inside the box was hard due to the way we had to route cables from the sonoff (from either side of the sonoff case)

I intend to address these issues by:

I purchased a hall effect AC current sensing board but it’s tiny and there’s shit all isolation between the 240v side and the chip. So i’m currently looking into implementing a current transformer setup like http://www.the-diy-life.com/simple-3-phase-arduino-energy-meter/.

Buut the sonoff th12 only had one GPIO pin and so I’m going to be moving to using a Sonoff TH10 which looks like this:

This way I can break out both GPIO pins (via a built in 2.5mm 4 pole audio jack) and use one for the status light (like I was previously) and the other to read the current transformer state. Except neither of the GPIO pins broken out (GPIO4 or GPIO14) are the analog to digital converter on the esp8266.

To work around that, I’m designing a PCB to take the cables from the 4 pin audio cable, have a plug for the status LED on the lid and then either an attiny85/attiny13a/comparator IC to turn the analog voltage from the current transformer also onboard into a digital on/off signal depending on if the tool is in use.

For anyone who is curious, I’ve worked up a BOM at https://docs.google.com/spreadsheets/d/1sQvaxc8gp7CUdddq65luUwCwQNSQK4HCsXnodN-CSEk/edit?usp=sharing and currently I’m estimating that the single phase interlocks will cost $60-$65.

I hope to update this thread soon with a resolution to the current transformer testing and then plan a budget and working bee for us to build one for each tool we need