Some tooling#
3D Printing#
For quite some time, I’ve known that I will need a 3D printer for this project. In the first instance, I’ll need some sort of framing to hold the 64 under-square components, the Raspberry Pi, the multiplexers and (if I get there) some sort of user interface components. Not to mention some convenient cable clips, or similar, to help with cable management (I want this to be a neat and tidy build).
Since my last post, I’ve taken delivery of a Bambu Lab A1 Combo 3D printer. It’s not just for me, it’s also for my son to learn a little too. So far, I’m very pleased. It’s been super easy to setup and use. My son and I have both printed several models from the marketplace such as a “printer poop” basket, printer accessories (both for me) and too many fidget toys (for my son).
Because the printer will live in my home office, and will be used by my son, I wanted to keep the fumes under control, so bought a fnatr enclosure and extraction kit. It wasn’t very cheap, but it was simple to put together, does a great job and looks quite neat and tidy.
Additionally, I’ve started to play with FreeCAD which I chose because I have (three decades ago) used AutoCAD (I’m talking about the v12/v13 days here). So far, I’ve found it reasonably straight forward to learn. I particularly like the way I can use “sketches” to draw two dimensional objects to then turn into 3D elements. I find this very similar to what I recall AutoCAD being like.
My first effort was to design and print a Pi breadboard station. Nothing fancy. Just a board that can hold my Raspberry Pi 4 and a couple of breadboards. My first attempt was unprintable - just because I hadn’t quite done things correctly on my first go. I abandoned that model and drew it again. Exactly the same model, but with my new learnings it was much quicker and worked first time.
Overall, I was very pleased with the results. Mainly that feeling of “Look, I designed and made that!”. Very satisfying. It was, however, not perfect.
- The cut out I left for the Pi board didn’t have a gap for the protruding micro-SD card. No problem, I now boot of a USB stick.
- The Pi board cut out also didn’t quite leave enough room for the USB power and micro-HDMI connectors (I hadn’t left enough room for the plug casing). No problem, I took a Dremel to it (it looks terrible, but it works).
- I added an array of 1mm holes at 2.54mm spacing to mimic a breadboard. The idea was to use this as a space to store components. I was using PETG for this print and the holes essentially didn’t come out clean - more a rough, nail-file-like texture than distinct holes. No problem, I just don’t have that feature.
Whilst the board is not perfect, it works for now. I fully intend to do a revised version at some point, but have been happily using this one over the last week.
Talking NFC#
I’ve made my first steps with the hardware. I purchased a few random “bits and pieces” to start working out how to use (and talk to) NFC components. I started with this PN532 NFC board.
It was surprisingly simple to hook up to the Pi. Just four wires:
- 5v power
- Ground
- SCL - Serial Clock
- SDA - Serial Data
Once hooked up, I started work on a software test rig. For each of the components that I use, I want to also produce a software test rig so that I (and others) can experiment with different boards/components. As always, it’s small steps rather than trying to build it all in a day. I managed to build a small test harness that simply polls the NFC module every half second to grab the NFC ID. It worked, but that’s as far as it went.
Thinking about antennae#
The interesting part is that this NFC module has the antenna built in. Clearly it is not feasible to have one of these under each square (simple geometry wouldn’t allow it, and my wallet would object too). I noticed that the board also has a surface mount antenna connector. It’s not clear how this can be used, or even if it’s functional, but it’s got me starting to think about the antenna. I’ve always said I don’t want to rely on 64 NFC modules. Instead, I want to use antenna multiplexers to connect multiple antennae to a single NFC module, and then cycle through them.
With this module, it could be that I can use an external antenna, or it might be that I need to use different NFC modules. But what is fairly clear is that I’m going to need to either buy pre-made antennae, or make my own. I believe making your own (reliable) antenna can be challenging - so of course that is the route I want to investigate.
If I hand-make the antenna, the challenge is going to be consistency. If I make an antenna with three or four turns in a coil, I’ll need to use capacitors to tune it to 13.56 MHz. But when I come to making the second, it’s unlikely to be exactly the same, meaning it will need its own tuning. Scaling that up to (at least) 64 antennae is going to be a nightmare.
I’d rather have something more repeatable. My first thought was to 3D print a jig or former to ensure the turns are exactly the same each time. But then why stop with printing a jig, why not print a frame that will contain the coil and live within the board structure.
Current thinking is to have the wire held in a track in a 3D printed plate with another plate on top. This would keep the wire in an exact position. As long as the tails are also uniform, this should make for a repeatable process. But not only that, I should be able to design these “antenna sandwiches” to fit directly to the internal grid/frame making consistency of positioning also straightforward.
So up next is ordering some multiplexers (I’ve ordered a few of these CD74HC4067 Mux boards to play with), along with some antenna wire, capacitors for tuning and some ferrite sheet for shielding.
Why do I think I need ferrite sheet for shielding before I’ve even built it? Well, remember I also want an LED indicator light underneath each square. That’s two components under each square. I’m hoping I can use these WS2812 LED rings - essentially an LED board with a hole in the middle. The hole is where the antenna goes.
Confession#
I’m away from home at the moment, and made the cardinal sin of not pushing my code to Git before leaving home (I’m sure I shall be punished in the next life for this). So I can’t share links to the code. I also can’t share any photos of the 3D printer setup or my Pi Breadboard Station. I’ll post again in the next few days to provide some links to code as well as some images.