Oh well, this entry is maybe related to the classic piece of the same name.
But the origin goes back to last year's #SPDT16: 16-bits arithmetic unit with relays where I wanted to "ding" a bell when a multiply or divide multi-cycle operation was over.
It turns out that the "bell" I found online was not appropriate. It's an electromechanical oscillating ringer with a nasty sound that lasts as long as you supply it with current. It works but meh.
I want a real bell, a distinct sound that will rise up from the clatter and clickety vibrations of the thousands of relays. Something monotonal and different. But I don't want to bet on a wrong item again on eBay.
Then I remember that video (linked above) and the final minute. Tubular bells. I realise I don't need a "bell" shaped metallic structure, I just need a steel tube !
Well I happen to have some (sold as blinders bars in the decoration shop on the corner) and I just sawed 395mm out of the 16mm diameter rod. There is no special reason for this length, though it sounded ok when I tested the whole bar. The original bar was 2m long, 2m/0.4m=5 so I think I struck the 5th harmonic.
Then it's an easy matter to determine the nicest-sounding vibration mode, and select the best place to "excite" the tube. I pass the tube through a sheet of hard foam and find that it sounds OK when the fixation foam is approximately L/4 (a tiny bit more, probably because the interaction with slightly detuned higher harmonics create a low frequency vibration). "Excitation" comes from the bottom. That's not practical to hang a 40cm tube from the final structure and I would prefer a horizontal system like with vibraphones...
I can use a horizontal configuration by placing the foam at the exact middle of the tube and reach the 2nd harmonic of the tube, a clear tone but I'd like it to be lower. The L/4 fixation probably got a different harmonic with a lower dominant resonance... Anyway, it works horizontally with just household^Wworkshop items (a bit of antistatic foam, can you do cheaper ?)
Then there is the excitation which must be electronically controlled. The idea is to have one bell for user output (controlled by a GPIO signal) and another later for signaling faults (like invalid opcode, out of range access, whatever).
The electronic problem is that the coil must be energized as a "one shot", monostable way. The coil pulse must last long enough to move the hammer, whatever the duration of the trigger signal.
My idea is to charge a capacitor (through a reasonable resistor) and discharge it through the coil under a relay command, a bit like with the hysteretic relay latch (and its charge pump-like system). But first I have to find the proper coil...
Looking through my collection of random "coil based devices", I find tiny vibrators : a small motor and a little mass of metal that makes the whole vibrate. That one needs 100mA at 1.5V and is a complete assembly, ready to be powered from the 3.3V rail. The voltage can be dropped with a Glühbirnchen in series with the motor.
But this is not a one-shot hammer-style "ding", it is still close to the ringer I wanted to replace.
So one way to get an electromagnet is to disassemble a relay. Here's the core from a 12V relay, with the coil and the magnetic part to "loop back" and focus the magnetic field.
The electromagnet attracts the steel when energised - even a few volts, but the action is not "hammer-like" because one of the parts (the tube or the electromagnet) must move, and they are heavy, and this dissipates the energy, and the tube doesn't "ring".
Then there is the problem of remanence. Even after the pulse into the coil has ended, the electromagnet still sticks to the bar. Well, a freewheel diode across the coil seems to solve the problem.
I'd like the pulse to last for about 1/10s so let's see how much capacitance is needed : t=R×C, with R=57 ohms (approx). C=t/R=1500µF
I tried with 10000µF and it was apparently too much, but 470µF works well. You can vary the energy into the coil by changing the input voltage. And I have not even considered the inductance of the coil, which certainly messes with my estimates. I just checked : 68mH is not insignificant :-D
There is an obvious problem with the mechanical structure as the wire is a bit plastic and changes shape after several moves. Steel wire becomes necessary. The tube's fixation system is also not adapted for repeatability...