8x8 Haptic Wordclock
I spent way too much time and money on this project but I am still happy with the result. One reason that it took me so long is a major mistake in the electronics design which I only realized rather late the other is that many of the mechanics are on the edge of what you can achieve with consumer FDM printers in terms of tolerancing and friction.
The clock is driven by 64 magnetic actuators based on PCB coils. It has 2 mm travel and is latching in both positions, i.e. power only needs to be applied when switching positions.
There are two other projects which inspired me to do this, first I saw a video of this 192px haptic display built by researchers from Switzerland to help blind people. The other is the mechanical 7-segment display made by indoorgeek. From the Swiss haptic display, I was able to get a lot of useful information on the technical design by reading their publications and patents. My first intention was to make an 8x8 haptic display for displaying weather icons or to play classic games like snake and Arkanoid the idea of making a word clock only came later.
Supplies
Parts
- 64 pcs NdFeB N45 magnets, diameter 4 mm, height 4 mm (magnethandel.de)
- 64 pcs NdFeB magnet, diameter 1.5 mm, height 7 mm, (aliexpress)
- 1 pc self-adhesive ferrite foil, 60 x 60 x 0.1 mm (conrad.de)
- 4 pcs M3 screws, 30 mm long + nuts
- 2 pcs custom PCB with coil matrix (see below)
- 1 pc custom driver PCB (see below)
Tools
- SMD soldering equipment
- a decent 3D printer
- hole punch pliers
CAD Design
I designed the clock in Fusion360. What helped a lot are the "User Parameters" because I had to go through many iterations before getting the tolerances right.
The clock consists of three stacked PCBs with 3D-printed spacers in between. Everything is held together by 4 M3 screws at the corners. The PCB at the back contains the drive electronics followed by a spacer and another PCB which contains a matrix of PCB coils. Then comes a holder plate for the magnets followed by another PCB with coils. On top of that, the letters are located which are connected to the magnets by pins that go through a hole in the center of the PCB coils. Finally, the front plate contains cutouts for the letters and holds them in place.
PCB Coil Design
The optimal coil design for this type of magnetic actuators is well described in this publication. You want the track distance to be as small as possible. The trace thickness has to be as large as possible but as thicker tracks mean lower resistance and higher current the maximum is usually limited by the drive electronics. Surprisingly, the number of turns is not that important if your figure of merit includes the power consumption, however, as the total resistance again depends on the track length you want a certain number of turns. Finally, if you are not afraid to spend the extra money you can increase the magnetic force considerably by using a 4-layer PCB instead of just two layers. I ended up with the following parameters:
start radius:1.2mm
track distance: 100µm (mm)
track width: 150 µm (mm)
number of turns per layer: 12
number of layers: 4
The start radius is necessary because there is a hole in the center of each coil for a pin that gets pushed by the magnet. The coils were designed in KiCAD using a Python script as described in this instructable. Remember to alternate the winding direction when changing layers.
Coil Matrix PCBs
To limit the number of drive channels the PCB coils are arranged in a matrix similar to a flip dot display. This is also where I made a major mistake. Each coil is connected to two diodes which allow powering the coil with either polarity without activating the other coils. However, I connected the positive and negative rows together to reduce the necessary drive channels. It turns out this was not a good idea because in this way you get crosstalk between the coils. In the end, I still managed to get everything working by unsoldering half of the diodes and applying the same polarity to all coils. This works because the PCB at the back can push the magnets to the front while the other PCB can push them back. However, I originally wanted to have the magnets in alternating polarity to limit the interaction between them which was not possible in the end. Still, the design files of the (wrong) PCBs can be found on my GitHub.
I ordered the PCBs from Aisler since these were 4-layer PCBs with large dimensions (15x15cm) they were not cheap. Definitely the most expensive PCBs I ordered so far.
Magnet Interaction
One of the most challenging aspects of making a dense matrix of magnets is interaction between the magnets. Since I originally wanted to make a dot display instead of a wordclock my goal was to get the pitch as small as possible. The interaction between the magnets can lead to neighbouring magnets moving together or not moving at all because the resulting torque increases friction. As already mentioned one way to limit the interaction is alternating the polarity of neighbouring magnets the other is magnetic shielding. The best materials for shielding are those with a high magnetic permeability like Fe, Co and Ni. The Swiss researchers used cylinders made from low-carbon steel as magnetic shielding. I tried many different things including ferrite foil, mu metal (the second most expensive thing I bought for this project after the PCBs) and stainless steel cylinders. In the end, I used non of them since I did not really see much improvement. However, sometimes individual actuators of the clock are failing probably because of the aforementioned friction problem.
Latching Plates
Since I wanted the letters to stay in position without powering the coils I used a ferromagnetic material on either side where the magnets can hold on to. This design was copied from the Swiss researchers. At first, I tried to use stainless steel washers or iron washers but then realized that the ferrite foil I originally wanted to use as magnet shielding works best. I made small rings with a hole punch plier and attached them to the PCBs on the opposite side that is facing the magnets. These latching plates also help to mitigate the magnet interaction problem as the holding force prevents neighbouring magnets from moving simultaneously.
Driver PCB
I wanted to use an H-bridge driver to be able to switch the polarity of the coils. With my (wrong) matrix design I needed 32 half-bridge channels (with the correct design one would need 48 channels). Also, I needed about 1 A per coil to move the magnet. To me, the DRV8912 seemed most suitable since it has 12 independent half-bridges with 1 A RMS current each. Moreover, it can be controlled via SPI which makes it easy to connect several of them to an MCU without the need for additional shift registers. For the microcontroller, I chose an ESP8266 based Wemos D1 mini since it offers WiFi so I do not need any additional buttons to control stuff. All in all the driver is really simple and just consists of 3 h-bridge drivers plus some decoupling capacitors, the ESP, and a USB-C socket as power supply. Unfortunately, I also managed to screw this PCB up but nothing which could not be fixed with a few bodge wires. The corrected PCB design files are also on my GitHub.
3D Prints
Making moving parts with a 3D printer can be challenging because of tolerancing and friction caused by the rather rough surface finish. As can be seen in the picture above I did a ton of 3D prints playing with different designs, magnet sizes, and tolerances. As already mentioned there are still some problems with the actuators sometimes not moving due to friction. What I want to try out in the future is the tribo filament by Igus. In addition, I recently found out that I get major improvements in print quality if I use the PrusaSlicer instead of Cura for my MK3s (not surprising perhaps, I guess they just know their printers best). Everything was printed vom PLA. The stl files are also on my GitHub but be aware that you may have to change the tolerances for your 3D printer.
Assembly
The assembly is rather straight forward.
- insert nuts into back plate
- stack the first coil matrix PCB on the back plate
- stack the magnet holder plate on top
- insert magnets (with same polarity because of mistake in PCB design)
- stack second coil matrix PCB on top
- press fit magnet pins into 3D printed letters (again same polarity)
- attach letters on top of PCB, magnet pins go through the holes
- stack front plate on top
- fix everything with M3 bolts
- attach driver PCB to back plate
Code
The code was adapted from the Adafruit 8x8 word clock it can again be downloaded from my GitHub. You need to enter your WiFi SSID and password and timezone into the code. Once the ESP is connected to your WiFi it gets the time from an NTP server. Every 5 minutes the letters will type the current time. I use a 100ms long pulse to drive the coils but shorter pulses down to 20ms also seem to work. Since there was no library for the DRV8912 available I am writing directly to the registers.
I encourage you to go crazy with the code and add some new effects!
Closing Remarks
It was a bumpy ride but I think the satisfying clacking sound alone was worth the effort.There are definitely some open issues that I would like to fix in version 2 of the clock.
- correct schematic of coil matrix
- maybe divide the coil matrix into tiles to save costs on PCB manufacturing
- try out low friction tribo filament
- maybe replace 3D printed front plate by lasercut acrylic
- try out multi-color prints to improve visibility of letters
- make a proper 10x11+4 word clock