Blog post: https://stephencoyle.net/kilnettle
If you'd like to build your own tape dispenser, which tells you how much you've used, and blesses you afterwards, you have two choices.
- Leave out a pencil and paper one night before bed, and hope that by the morning God will have written down the instructions.
- Clone this repo, buy the required parts, a 3D printer, and get to work. Here's an assembly tutorial.
Please note that, while the dispenser does aim to fairly accurate, it's not perfectly accurate as it doesn't adjust for the amount of tape used. In the code I've just split the error, so it will tend to overshoot the measurement when a roll is full, and undershoot a bit when it's empty. Given we're only dealing with one-inch resolution, I feel like it's probably fine. You can tweak the code if you want to try and improve on this. There's also is a no-code way to tweak it, detailed below.
Feel free to make/reuse/modify this project for personal use. In the unlikely event that you're planning to spin up a large-scale production line to make thousands of these, I'd really recommend doing a few more revisions on the code and the models. In which case, I'm available at a very reasonable rate.
- 1× ESP8266 or similar (e.g. I used an ESP-12E)
- 1× IR photodiode (3mm)
- 1× IR LED (3mm)
- 2× 1k resistors
- 2× 10k resistors
- 1× 220Ω resistor
- 1× 2N3904 transistor (or similar)
- 1× LED (colour of your choice, I recommend red)
- 1× 26mm diameter speaker
- 1× 18mm × 12mm slide switch (or any that fits the space on the model)
- Battery contacts for 2x AAA batteries (e.g. Keystone 5204, 5226, 5213)
There are included KiCAD files which you can use to create a PCB for this, but you could also use point-to-point soldering or stripboard (see below).
| PCB Label | Component | Description |
|---|---|---|
R1 |
1K resistor |
|
R2 |
220R resistor |
|
R3 |
1K resistor |
|
R4 |
10K resistor |
|
R5 |
10K resistor |
|
D1 |
Photodiode |
Small black LED |
D2 |
IR LED |
Small clear LED |
D3 |
Indicator LED |
Red LED |
LS1 |
Speaker |
|
Q1 |
2N3904 Transistor |
|
U1 |
ESP8266 |
|
J1 |
GND |
|
J2 |
+3V |
- 1× tape dispenser body
- 1× tape dispenser lid (which holds the spool)
- 1× battery compartment cover
- 1× tape spool
- 1× "Greetings from Kilnettle" text
- 1× 33mm × 5mm hacksaw blade (for tape cutter)
- 1x 25mm × 1mm steel rod (for example, cut from a large paperclip)
- 2× AAA batteries
- 1x roll of sticky tape with ~27mm inner diameter and ~56mm outer diameter. I used this one.
I'm gonna keep these fairly sparse, and following what I did. But there's no right way to do it. In the very unlikely event that you actually want to make one yourself, and run into trouble, feel free to message me with any questions. The video version may also be more useful!
- Use PlatformIO to build and upload the included sketch, and build and upload the filesystem image.
- 3D print the included files.
- Insert the battery clips into the slots in the battery container. Note which side has holes for the positive and negative tabs to slot into.
- Fit the slider switch into the hole above the battery compartment. Either glue into place, or like I did, use a soldering iron to melt and smush the little nubs to fix it in place.
- Fit the IR photodiode and LED into the holes on the sides of the lid. They should be a fairly tight fit; push them all the way in. I added a little drop of superglue to keep them fixed in place.
- Add the speaker. It should click into place at the front of the body, though I added a little hot glue just to be sure. If you aren't using the PCB, it might be easier to add the transistor and resistor on or near the speaker itself, then tuck all that in with the speaker.
- Solder some wires to the battery tabs and switch.
- Follow the rest of the schematic to attach all the parts. If you aren't using the PCB, use the thinnest wire you feasibly can, and route the wires as best you can to allow the case to close. I'd recommend leaving a decent bit of slack, and regularly trying to fit the lid on to make sure all is fitting well.
- Once that's done, I'd recommend testing it out1, so you can check the software is flashed properly before you finish fitting things into place.
- Pop on the lid, if you're happy everything is working. The tabs at the back should clip into place in the case.
- Superglue the section of hacksaw blade in place on the front of dispenser. Make sure to put the sharper side facing up, if there is one, so it cuts the tape nicely.
- Attach the "Greetings from Kilnettle" text to the left side of the dispenser body (left when looking at the bladed end).
- For the spool, thread the steel rod through the hole in its centre. Add a drop of glue and line it up so that it protrudes an equal amount on either side. It should then press fit into the tape, and you can set it into the dispenser.
- Insert batteries (be careful to put them in the right way round), pop on the battery cover, and all being well, you should now be able to switch it on and enjoy your dispenser!
If you're not able to make a PCB, you could use a D1 Mini and some stripboard. See an example layout below that uses an MC01009 board. It uses uses pin headers so that each part can be connected using female jumper wires. Use a rotary tool cutting wheel to trim the board down so it can fit just behind the speaker.
There are some notable differences when using the D1 mini board:
- EN is pulled up
- GPIO15 is pulled down
- There is a voltage divider on ADC0, so R3 and R4 aren't necessary
- Specify
board = d1_miniin platformio.ini - Adjust
#define ESP8266_Variantin src/main.cpp
Footnotes
-
You can easily test it without a spool, by waving your finger around in the spool cavity, making sure you block the IR beam a few times. ↩

