Skip to content

The Machine · Recipes

Swinging Striker

Design stage

Updated 2026-10-19

An arm hangs from the middle of an aluminum top bar and swings side to side, striking a drum on each side. A magnet under its tip nudges each pass, and the drums hang on chains, so they swing away when struck and come back on their own time.

Loading the model

Drag to turn · scroll to zoom

Printed

3DWhere we started. This is one version of it, with a V-slot arm, rubber strikers, and a 10-inch and an 8-inch hand drum on chains. Press Play: the magnet under the tip grows the swing, the arm strikes both drums, the drums swing away and come back, and the magnet brakes the arm to a stop. The swing is simulated from the physics, not drawn by hand. Printed parts are drawn in orange; everything else is bought.

Overview

Cost, roughly
About $220
Printing
About 2.5 hours
Building
A weekend
Difficulty
Moderate

Anatomy

1
Energy source
The arm's swing, topped up by an electromagnet's pull on each pass
2
Control
The magnet, switched on as the tip swings in to grow the swing, or as it swings away to brake it, timed by an angle sensor on the pivot
3
Sounding body
A drum hanging on chains each side; we started with a 10-inch and an 8-inch hand drum
4
Reset
None needed. The magnet brakes the swing to a stop
3D views. It shows the whole element from the front, and the pivot from behind, with its two bearing plates, the arm's hub and the angle sensor. Both views are drawn from the CAD model.
Fig. 13D views. It shows the whole element from the front, and the pivot from behind, with its two bearing plates, the arm's hub and the angle sensor. Both views are drawn from the CAD model.
First sketch. This is the first idea, with the three ways to drive the arm and how the size of the swing picks which drums sound.
Fig. 2First sketch. This is the first idea, with the three ways to drive the arm and how the size of the swing picks which drums sound.

How it works

  • An arm hangs from a fixed pivot under the middle of an upside-down U of aluminum extrusion, and swings side to side. A drum hangs on chains on each side, its head facing the arm. We started with a V-slot arm, rubber strikers, and a 10-inch and an 8-inch hand drum; the choices below cover the alternatives.
  • The arm is the mallet, with no levers or hammers. It strikes one drum on each swing direction, a tick and a tock with two different sounds.
  • The drums swing too. A struck drum swings away on its chains and comes back on its own time, about 1.1 s there and back against the arm’s 1.3 s. Where it is when the arm comes round changes when the next strike lands, and whether it lands at all, so two pendulums write part of the rhythm together.
  • Nothing positions the arm. An electromagnet under its tip pulls on the steel washers there as the tip swings in, which adds a little to every swing, like an electric pendulum clock. Pulling as the tip swings away brakes it instead. An angle sensor on the pivot shaft tells the ESP32 where the arm is at every moment, so it knows when to pull. Direction decides when; physics does the playing.
  • The size of the swing is the music. A swing that stays inside the drums is silent, and a bigger one reaches both and strikes harder. So the element can swing in silence while it lines up with the beat, then grow into the drums on the beat itself, as Control asks of elements that move.
  • It converges rather than snapping to a beat. From still, the first strike comes about a second and a quarter after the magnet starts pulling, and stopping takes about as long. Every strike is planned that far ahead.
  • It plays softly. Nudged, the arm meets a drum at about 0.4 m/s, a gentle hand tap. Drums that ring carry it. For louder, clamped drums give more back, and the cock-and-drop drive strikes about three times as fast.
  • It differs from the Gantry Pendulum in what moves. The Gantry hangs a ball on a chain from a carriage that a stepper slides along its bar, and strikes targets clamped still; it can dash, strike once and catch the ball dead. Here nothing slides. The pivot is fixed, the arm is stiff, the drums swing, and the only drive is a magnet’s pull on each pass. It’s simpler to build and quieter to run, and less exact, because the drums write part of its rhythm.
  • It’s a close cousin of the Click, which nudges a wind-up metronome’s swing with the same kind of magnet. The Click could be this mechanism in disguise.
  • An ESP32-S3 runs it. It listens for the wireless signal, reads the sensor and switches the magnet, and it runs from the shared power-tool battery. If it hears nothing for a couple of seconds, it brakes the arm to a stop.

Ways to play

  • Strike once on cue. Grow the swing just enough for one strike, then brake. The swing takes a second or so to build, so the element starts early by that much and the strike lands on the beat.
  • Play a steady tick and tock by holding the swing just past the drums. The arm strikes every half swing, about every 0.65 s, whenever the drums’ own swing lets it.
  • Swell by letting the swing grow pass by pass, from silence to a light touch to full strikes.
  • Line up in silence, swinging inside the drums while lining up with the beat, then grow into them on it.

Before any code, swing the arm by hand and feel how a struck drum’s return moves the next strike.

Notes

  • This is a first design. Expect one round of fitting when it’s built.
  • The motion in the 3D model is simulated from the physics, with the arm, both drums, the magnet’s pulls and every strike. How much each strike bounces, how hard the magnet pulls and how fast the drums settle are guesses that a test build will measure. At the end of the loop the drums are eased to rest, a little sooner than real drums would settle.
  • Costs in the parts list are rough estimates for budgeting, not checked prices. They add up the version we started with.

References

  • In the well-known metronome synchronization demo, several metronomes on a loose shared platform drift, then pull each other into sync. It’s the physical version of the focus lock, though the Machine composes the moment instead of waiting for it.
  • Electric pendulum clocks keep a pendulum swinging with small timed pushes, and older clocks drive it from a falling weight through an escapement. They’re the model for “direction decides when; physics does the playing.”

Parts

Ingredients

KindPartQtySourceEachFile
PrintedPivot plate, bolts to a face of the top bar and holds one bearing2··STL
PrintedHub, clamps the shaft and holds the top of the arm1··STL
PrintedSensor bracket, holds the angle sensor behind the pivot1··STL
BoughtAluminum extrusion, 20 x 40 mm V-slot, 800 mm, for the top barLong enough that a struck drum can swing well out without reaching the legs.1·$15.00
BoughtAluminum extrusion, 20 x 40 mm V-slot, 700 mm, for the legs2·$13.00
BoughtAluminum extrusion, 20 x 40 mm V-slot, 300 mm, for the feet2·$7.00
BoughtAluminum extrusion, 20 x 20 mm V-slot, 720 mm, for the low bar that carries the magnet1·$5.00
BoughtAluminum extrusion, 20 x 20 mm V-slot, 580 mm, for the armYour choice: see The armIts bottom end needs an M5 thread in the center hole. Many suppliers tap ends to order; otherwise the hole is already the right size for an M5 tap.1·$4.00
BoughtCorner brackets for 20 mm V-slot, with screws and T-nutsOne joins each leg to the top bar, four join the legs to the feet, and four hold the low bar, one under and one over each end.10·$1.00
BoughtBall bearings, 608 size (8 mm bore, 22 mm across), for the pivotThese are skateboard bearings. Shielded ones keep the dust out.2·$1.00
BoughtSteel dowel pin, 8 mm, 40 mm long, for the pivot shaftIt's ground to size, so it slides through the bearings without play.1·$1.00
BoughtShim washers, 8 mm bore, 1 mm thickOne goes between the hub and each bearing, so the hub touches only the bearings' inner rings.2·$0.50
BoughtRubber bumpers, 25 mm across and 20 mm tall, with an M5 studYour choice: see What strikes2·$1.00
BoughtSteel flat bar, 30 x 12 mm, cut to 60 mm, for the arm's weightsEach weighs about 170 g. Drill each for two M5 screws, 40 mm apart.2·$2.00
BoughtSteel fender washers, M5, 40 mm acrossThey stack on the arm's tip, for the magnet to pull on.3·$0.50
BoughtElectromagnet, 40 mm across, 24 V, sold as a lifting or holding magnet (P40/20)Your choice: see How the swing is drivenA 24 V magnet runs straight from the battery. Its back has a threaded hole in the middle, which holds it down to the low bar.1·$10.00
BoughtMagnetic angle sensor board, AS5600, with its magnetYour choice: see How the swing is drivenThe small round magnet sold with it is magnetized across its face, which the sensor needs.1·$3.00
BoughtHand drum, 10 inchYour choice: see The drums1·$30.00
BoughtHand drum, 8 inchYour choice: see The drums1·$25.00
BoughtSteel link chain, 2.5 mm wire, about 1.4 m in all, cut into fourYour choice: see How the drums hang1·$4.00
BoughtM5 eye bolts, with a T-nut each4·$1.00
BoughtQuick links, 3.5 mmOne goes at the top of each chain, through whichever link sets the drum's height.4·$1.00
BoughtSmall screw eyesTwo go into the top of each drum's shell, one near each end.4·$0.25
BoughtESP32-S3 development board1·$6.00
BoughtBattery adapter for the shared power-tool platform, and a 5 V buck converterThe magnet runs from the battery, through the fuse, the stop button and the relay. The ESP32 takes 5 V.1·$15.00
BoughtThe listener parts every element carries, as on the Control pageThey're a blade fuse holder and a 2 A fuse, a latching stop button with a spare contact, the status light, the number switches and their resistors. The stop switch under Choices has a plain two-pole switch in place of the stop button.1Link$12.00
BoughtMomentary push button, normally open, for the test buttonA short press plays each note once, and a long press relearns what the element can by itself. Any small panel button that closes while it's pressed will do.1·$1.00
BoughtRelay module, 5 V, high-level triggerIt's the switch the magnet's power goes through, after the stop button. The MOSFET then switches the magnet on and off for each pull.1·$2.00
BoughtMOSFET, IRLB8721, to switch the magnet1·$1.00
BoughtSchottky diode (1N5819), a 100 Ω resistor, a 10 kΩ resistor and two 4.7 kΩ resistorsThe diode and the first two go with the MOSFET. The 4.7 kΩ pair are for the sensor's long wires.1·$1.00
BoughtSmall project box, for the electronicsYour choice: see The electronics1·$5.00
BoughtM5 screws, T-nuts and washers, assortedPivot plates (eight M5 x 12), the hub (two M5 x 10), the weights (four M5 x 16), the tip (one M5 x 12 through the washers), and an M5 x 12 set screw on a T-nut that the magnet screws down onto. Drop-in T-nuts make the arm easiest.1·$5.00
BoughtM3 screws, an M3 x 6 set screw, and three M3 heat-set insertsThe set screw holds the hub on the shaft. The inserts go into the hub and the back pivot plate.1·$3.00
Total$217.50

Tools

  • 3D printer, PETG
  • Hex keys, 1.5, 2.5, 3 and 4 mm
  • Soldering iron, for the heat-set inserts and the wiring
  • An M5 tap, unless the arm's end comes tapped
  • A drill, for the weights and for small pilot holes for the screw eyes
  • A small file, for a flat on the shaft
  • Two pairs of pliers, to open the chain at the right link
  • A multimeter, to set the 5 V converter

Choices

Decisions that are yours to make. Where we started is the version in the 3D model and the ingredients: a starting point, not the right answer.

How the swing is driven

What keeps the arm swinging, and decides when it sounds?

Magnet nudgesWhere we started

SoundSoft to medium strikes on both drums, and swells, because the size of the swing is the volume. A swing that stays inside the drums is silent.

It has the fewest parts, and nothing moves but the arm. A swing takes a second or so to build and as long to stop, so it lines up with a beat over a few swings rather than snapping to it. The angle sensor on the pivot times every pull.

Cock and drop

SoundOne firm strike, about three times as fast as a nudged one, landing exactly on cue

A holding magnet on a post by one leg keeps the arm raised to one side and lets go on the beat. Only the far drum can be struck, because a drum on the latch side would stand in the raised arm's way. A small winch with a cord re-cocks it, slowly and in view, so it plays once every few seconds.

Falling-weight clockwork

SoundA steady tick-tock at one size, like a grandfather clock, with the escapement's own tick underneath

A weight on a cord turns a printed escape wheel, and its anchor gives the arm a push each swing. A motor only winds the weight back up. It can start and stop, but it can't swell or choose a drum. It's the most to build and the most like a clock.

A servo driving the arm directly was ruled out. It works, but it moves point to point with no momentum, which reads like MIDI.

The arm

What swings?

V-slot, 20 x 20 mmWhere we started

SoundThe strikers make the sound, not the arm. It's stiff, so all of the swing goes into each strike.

It matches the frame. The weights, the strikers and the tip washers all sit on T-nuts, so each slides to a new place with a hex key.

Hardwood blade

SoundA little give as it strikes, which softens the attack

It's a flat oak or ash slat, about 50 x 12 mm, warmer to look at, and the strikers and weights screw straight into it. It needs its own socket in the hub.

Steel rod and bob

SoundAs stiff as the V-slot, with the weight low, so the most is behind each strike

It's a 10 mm rod with a heavy bob that slides on it and locks with a set screw, as on a clock's pendulum, and the strikers sit on the bob. It's the slimmest and most elegant, and it needs its own hub.

Whatever the arm, where its weight sits sets the swing. As drawn it takes about 1.3 s there and back. Slide the weights up to swing faster, or down to swing slower.

What strikes

What meets the drums? There's one on each side of the arm, and they needn't match.

Rubber bumperWhere we started

SoundA round thump with a soft attack

They cost pennies and come with an M5 stud that screws into a T-nut in the arm's side slot. Harder rubber sounds brighter, and rubber is kind to drum heads.

Felt

SoundThe warmest and roundest, like a bass drum's beater

Use a felt beater head on a short M5 screw, or a felt pad glued to a small block. Felt packs down over months.

Hardwood knob

SoundA crisp, bright knock with plenty of attack

A wooden drawer knob comes with its own screw. It's loud on a hand drum, at its best on a woodblock, and harder on drum heads.

One of each

SoundThe tick and the tock differ by the striker as well as by the drum

Try rubber on one side and wood on the other.

The drums

What hangs on each side? They needn't match.

Two hand drums, 10 and 8 inchWhere we started

SoundTwo pitches of a round, open thump

They're light, about 0.35 to 0.45 kg, so a strike sends them well away and their own swing shapes the rhythm most. Any frame-style hand drum works, tunable or pretuned.

Two small toms

SoundDeeper and punchier, with a longer ring

They're heavier, 1 to 2 kg, so they hardly swing and the tick-tock stays steady. The screw eyes go into the shell.

Woodblock and cowbell

SoundA dry knock and a clank, the clearest tick and tock

They're light and cheap. Hang each from two cords so it stays face on to the arm.

Found things

SoundEach has its own voice. A biscuit tin rattles, a bucket booms and a pot lid rings.

They're free, and the most surprising. Anything with a flat face that can hang level will do.

Hang each so the striker lands about halfway between the middle of the head and its rim. The middle sounds deep and short; nearer the rim it's brighter and rings longer.

How the drums hang

Free to swing, or held still?

Two chains eachWhere we started

SoundA struck drum swings away, stays face on, and comes back on its own time. The chains add a faint clink.

One chain near each end of the shell keeps the drum level as it swings. Its return moves the next strike, so two pendulums write the rhythm together.

One cord each

SoundThe drum swings and turns, so each strike lands somewhere new on the head

It's the least predictable. A drum that turns side on can be missed altogether.

Clamped still

SoundCrisp, even strikes that land when expected

Each drum bolts to a short 20 x 20 mm arm off the leg, like the Gantry Pendulum's targets. The arm keeps more of its swing after each strike, so the magnet keeps up a louder tick-tock, but the drums' own swing is gone.

A chain's length sets how fast its drum swings back, about 1.1 s there and back on 30 cm, against the arm's 1.3 s.

The stop switch

What cuts the magnet's power at the element?

Latching emergency-stop button, with a spare contactWhere we started

The red mushroom head anyone nearby knows to hit. It stays down until it's twisted to release, so the element can't start again by accident. Its main contact cuts the power and its spare contact tells the ESP32. About $8.

Two-pole power switch, a rocker or a toggle

Smaller, plainer and cheaper, about $2. One pole cuts the power and the other tells the ESP32, so it does the same job. It doesn't read as a stop to someone who doesn't know the Machine, and it switches back on as easily as off. Rate its contacts above what the element draws, as the button's are.

Keep the second pole either way. It tells the ESP32 the power was cut, so it brakes whatever swing is left before it plays again when the power comes back, as after a stop from the Bridge. Either way the relay stays, since it's how a stop from the Bridge reaches the element when no one is at it. A two-pole switch wires as the button does: one pole in place of the main contact, from 11 to 12, and the other in place of the spare contact, from 13 to 14.

Print

Material
PETG
Layers
0.2 mm
Walls
4
Infill
40%

Every part fits a 150 mm bed and prints without supports. PETG takes the knock of each strike better than PLA, but PLA is fine for a first try.

The printed parts

  • Pivot plate, bolts to a face of the top bar and holds one bearing× 2

    Which way up
    Flat on its outer face, with the bearing pocket facing up
    Supports
    None
    Time
    About 50 minutes each

    The two plates are the same. The bearing is a press fit into the pocket, against a thin lip. If it's too tight, sand the pocket a little; if it's loose, a dab of glue on the bearing's outer ring holds it. Two heat-set inserts go into the outer face of the plate that goes on the back, for the sensor bracket.

    STL ↓
  • Hub, clamps the shaft and holds the top of the arm

    Which way up
    Standing up, as it sits on the arm, with the socket opening down
    Supports
    None
    Time
    About 45 minutes

    The socket's roof is a short bridge. A heat-set insert goes into the hole in its top, for the set screw onto the shaft.

    STL ↓
  • Sensor bracket, holds the angle sensor behind the pivot

    Which way up
    Flat on its back, with its two legs standing up
    Supports
    None
    Time
    About 10 minutes
    STL ↓

Assembly

  1. 1

    Join the feet, legs and top bar with corner brackets into an upside-down U, the top bar sitting on the legs.

    CheckThe bar is level, and the frame doesn't rock on a flat floor. Pushed sideways at the top, it doesn't sway.

  2. 2

    Fit the low bar between the legs, about 5 cm above the feet, with a corner bracket under and over each end. Leave its screws snug, not tight. Its height sets the magnet's gap, later.

  3. 3

    Press a bearing into the pocket of each pivot plate. Melt two heat-set inserts into the outer face of one of them; that one goes on the back.

    CheckEach bearing sits flat and square, and turns freely under a finger.

  4. 4

    Tap the arm's bottom end M5 if it didn't come tapped. Drop T-nuts into its slots, one in the front and back slots at the top for the hub, two more in each of those lower down for the weights, and one in each side slot for the strikers.

  5. 5

    Melt a heat-set insert into the hole in the top of the hub. Fit the hub over the arm's top end, with its two M5 screws into the top T-nuts.

  6. 6

    Bolt one pivot plate loosely to the middle of the top bar's front face, four M5 screws into T-nuts in its two slots. Push the shaft through its bearing, then a shim washer, the hub, the second shim, and the second plate's bearing. Bolt the second plate to the back face of the bar.

    TrickyThe two plates must line up across the bar. Tighten their screws with the shaft already through both bearings, a little at a time, swinging the arm between turns. If it stiffens, one plate has moved. Then file a small flat on the shaft under the hub's set screw and tighten the set screw onto it, so the shaft turns with the arm.

    CheckLifted to one side and let go, the arm swings for well over a minute before it dies away.

  7. 7

    Bolt a steel weight to the front and the back of the arm, about 43 cm below the pivot. Screw a striker into each side slot, about 48 cm below the pivot. Bolt the three washers to the arm's tip with an M5 screw.

    CheckThe arm hangs straight down, and swings in line with the bar rather than wobbling across it.

  8. 8

    Screw the M5 set screw halfway into a T-nut in the low bar's top slot, and screw the magnet down onto it, face up. Slide it along until it sits 3 to 5 mm to one side of where the tip hangs.

    TrickyA magnet right under a still arm can't start it swinging, because it pulls straight down. A few millimeters off center, its first pull sets the arm moving.

  9. 9

    Slide the low bar up the legs until the washers pass 2 to 3 mm above the magnet at the bottom of the swing, then tighten its brackets.

    TrickyThe gap is most of the magnet's strength. Every millimeter closer pulls much harder, but if the washers ever touch the magnet, the swing dies.

    CheckSwung both ways by hand, the washers never touch the magnet.

  10. 10

    Glue the sensor's round magnet onto the end of the shaft behind the back plate, centered. Screw the board to the bracket, chip facing in, and the bracket to the back plate's inserts.

    TrickyOff center by more than about a millimeter, the reading wobbles as the arm swings. An ordinary disc magnet won't work; it has to be the kind magnetized across its face, as sold with the board.

    CheckThe chip sits 1 to 2 mm from the magnet, square to it and centered on the shaft.

  11. 11

    Fit two M5 eye bolts into the bar's bottom slot above each drum, one over each end of its shell. Put two screw eyes into the top of each shell, near each end, in small pilot holes. Hang each drum from two lengths of chain, a quick link at the top of each.

    CheckEach drum hangs level with its head facing the arm square on, and both chains take its weight.

  12. 12

    Choose each drum's height by which link the quick links go through, so the striker lands about halfway between the middle of the head and its rim. Slide each drum along the bar until its head is about 9 to 10 cm from the striker's face.

    TrickyCloser drums are reached by smaller swings and struck harder, because the arm meets them nearer the bottom of its swing, where it's fastest. Too close, and a struck drum swings back into the arm before the arm has left.

    CheckWith the arm still, both drums hang clear of it. Swung by hand about 15 degrees to each side, the arm meets both, face on.

  13. 13

    Wire it in the box on the leg, following the wire list under Wiring. The fuse comes first, then the 5 V converter for the ESP32, and the stop button and the relay for the magnet's power. The magnet goes through the MOSFET, and the sensor to the ESP32 by four thin wires along the bar's back slot. Join all the grounds.

    TrickySet the 5 V converter with a multimeter before the ESP32 is connected. Most come set higher, and more than about 6 V destroys the board.

    CheckWith the battery in and no code running, the ESP32's light is on, the magnet is off and the arm swings freely. Press the stop button, release it, and nothing moves.

  14. 14

    Before playing, check what the ESP32 relies on. Swing the arm by hand and watch the angle the sensor reports. Then pulse the magnet each time the tip swings in toward it.

    CheckThe angle rises and falls smoothly, with no jumps, through the whole swing. A few pulls, one each pass, take a still arm to its first strike.

Wiring

The fuse comes first, right after the battery. The ESP32-S3 runs from the 5 V converter. The magnet's power goes through the stop button and then the relay, so either one cuts it, and the MOSFET switches the magnet on and off for each pull. The status light, the number switches and the battery reading are wired the same way on every element, so they're on the Control page, not here.

Wiring · Swinging Striker
PowerSignalGround, all joinedPins drawn faint are left empty.

Wire list

  1. Battery adapter, +

    Fuse, 2 A, in

    PowerRed, 16 AWG

    Keep it as short as the adapter allows. Nothing connects ahead of the fuse.

  2. Fuse, 2 A, out

    5 V converter, IN+

    PowerRed, 22 AWG

  3. Fuse, 2 A, out

    Stop button, 11

    PowerRed, 20 AWG

  4. Stop button, 12

    Relay module, COM

    PowerRed, 20 AWG

    The stop button's main contact opens when pressed, cutting the magnet's power itself, so a program that hangs can't ignore it.

  5. Relay module, NO

    Electromagnet, +

    PowerRed, 20 AWG

    The magnet's own leads are short. Join them to a pair that runs along the low bar's slot and up the leg.

  6. 5 V converter, OUT+

    ESP32-S3 board, 5V

    PowerRed, 22 AWG

    Connect it only once the converter is set to 5 V.

  7. 5 V converter, OUT+

    Relay module, VCC

    PowerRed, 22 AWG

  8. ESP32-S3 board, 3V3

    Angle sensor (AS5600), VCC

    PowerRed, 24 AWG

    The sensor runs at 3.3 V so its signals match the ESP32's.

  9. ESP32-S3 board, 3V3

    Resistor, 4.7 kΩ, 1

    PowerThe resistor's own leg

  10. ESP32-S3 board, 3V3

    Resistor, 4.7 kΩ, 1

    PowerThe resistor's own leg

  11. Battery adapter, −

    5 V converter, IN−

    GroundBlack, 22 AWG

  12. Battery adapter, −

    MOSFET, IRLB8721, S

    GroundBlack, 20 AWG

    This is the magnet's return.

  13. 5 V converter, OUT−

    ESP32-S3 board, GND

    GroundBlack, 22 AWG

  14. Relay module, GND

    ESP32-S3 board, GND

    GroundBlack, 22 AWG

  15. Resistor, 10 kΩ, 2

    ESP32-S3 board, GND

    GroundThe resistor's own leg

  16. Resistor, 10 kΩ, 2

    MOSFET, IRLB8721, S

    GroundThe resistor's own leg

  17. Stop button, 14

    ESP32-S3 board, GND

    GroundBlack, 22 AWG

  18. Test button, 2

    ESP32-S3 board, GND

    GroundBlack, 22 AWG

  19. Angle sensor (AS5600), GND

    ESP32-S3 board, GND

    GroundBlack, 24 AWG

  20. Angle sensor (AS5600), DIR

    ESP32-S3 board, GND

    GroundA short jumper to the board's own GND pin

    It sets which way the angle counts. Left loose, the reading can flip.

  21. ESP32-S3 board, GPIO 5

    Relay module, IN

    SignalAny color, 22 AWG

  22. Resistor, 10 kΩ, 1

    Relay module, IN

    SignalThe resistor's own leg

    It holds the relay off while the ESP32 starts, when its pins float.

  23. ESP32-S3 board, GPIO 16

    Resistor, 100 Ω, 1

    SignalAny color, 22 AWG

  24. Resistor, 100 Ω, 2

    MOSFET, IRLB8721, G

    SignalThe resistor's own leg

  25. Resistor, 10 kΩ, 1

    MOSFET, IRLB8721, G

    SignalThe resistor's own leg

    It holds the magnet off while the ESP32 starts.

  26. ESP32-S3 board, GPIO 17

    Angle sensor (AS5600), SDA

    SignalAny color, 24 AWG

    The sensor's four wires run from the pivot along the bar's back slot and down the leg, about 80 cm. Keep them together, twisted if you can.

  27. Resistor, 4.7 kΩ, 2

    ESP32-S3 board, GPIO 17

    SignalThe resistor's own leg

    The two 4.7 kΩ resistors keep the sensor's signals crisp over the long run. If the board has its own, these do no harm.

  28. ESP32-S3 board, GPIO 18

    Angle sensor (AS5600), SCL

    SignalAny color, 24 AWG

  29. Resistor, 4.7 kΩ, 2

    ESP32-S3 board, GPIO 18

    SignalThe resistor's own leg

  30. Stop button, 13

    ESP32-S3 board, GPIO 4

    SignalAny color, 22 AWG

    This is the stop button's spare contact, so the ESP32 knows it's been pressed.

  31. Test button, 1

    ESP32-S3 board, GPIO 14

    SignalAny color, 22 AWG

    The test button. The ESP32's own pull-up holds the pin high until it's pressed, so nothing else goes on this pin.

  32. Electromagnet, −

    MOSFET, IRLB8721, D

    PowerBlack, 20 AWG

    Seen from the front, the MOSFET's legs are G, D and S, left to right.

  33. Electromagnet, −

    Diode, 1N5819, A

    PowerThe diode's own leg

  34. Diode, 1N5819, K

    Electromagnet, +

    PowerThe diode's own leg

    It goes across the magnet, with its stripe toward +, and soaks up the kick when the magnet switches off.

Get these right

Set the converter first
Most 5 V converters come set higher. Turn its screw with the battery in and a multimeter on its output until it reads 5.0 V, and only then connect the ESP32. More than about 6 V destroys the board.
Don't leave out the diode
Each time the magnet switches off, its coil kicks back a spike far above the battery's voltage. The diode across it soaks that up. Without it the MOSFET fails, often within minutes.
The sensor at 3.3 V
Many AS5600 boards also take 5 V, but then their signals are too high for the ESP32's pins and can damage them. Run it from the ESP32's 3V3 pin.
The pins
Any free ESP32-S3 pins will do, except 0, 3, 45 and 46, which the board reads as it starts, 19 and 20, which are its USB port, and 35 to 37 on boards with eight megabytes of extra memory (marked R8). Pins 1 and 4 to 15 go to the parts every element shares, as on the Control page, the test button on 14 among them. If you use others, change them at the top of the firmware.

Mounting

Everything fixes to the V-slot frame with T-nuts and screws, so any part can slide to a new place or come off with a hex key. Nothing wired swings. The magnet sits on the low bar and the sensor on the back pivot plate, so no cable has to follow the arm.

The frame
Corner brackets join it at every joint, with M5 screws into T-nuts in the slots. The low bar between the legs has a bracket under and over each end, so it slides up and down to set the magnet's gap.
The pivot
The two printed plates bolt to the front and back faces of the top bar at its middle, four M5 screws each into the bar's two slots. The shaft runs between them, under the bar.
The arm
It hangs from the hub on the shaft. The weights, the strikers and the tip washers sit on T-nuts in the arm's own slots, so each slides along it.
The magnet
It sits on the low bar's top face, screwed down onto an M5 set screw in a T-nut, a few millimeters to one side of the tip.
The angle sensor
It's on its printed bracket on the back pivot plate, held by two M3 screws in heat-set inserts. Its wires run along the bar's back slot to the right leg.
The drums
Each hangs from two M5 eye bolts in the bar's bottom slot, one over each end of its shell, so it slides along the bar to set the gap.
The electronics
The box goes on the back of the right leg, about 30 cm up, on two T-nuts. The wires run down the leg's slot to the battery, and up it to the bar and across to the low bar.
The stop button
It's in its own housing on the front of the right leg, near the top, where a hand finds it without reaching past a drum.
The battery
The adapter sits on the right foot, behind the leg, on two T-nuts, so the pack slides on and off without moving anything else.
The wires
Clip-in slot covers hold the wires inside the extrusion's slots, out of the drums' way.

The electronics

Hidden in a box, or on show?

Closed boxWhere we started

A small project box, bought or printed, bolts to the leg. It's tidy and safe from a swinging drum, but it hides the electronics.

Open plate

The boards sit on standoffs on a flat plate on the leg, with the wires dressed along the slot. The electronics become part of the look. It wants neat wiring, and nothing guards it from knocks.

DIN rail

A short length of 35 mm DIN rail goes on T-nuts, with each board in a snap-on holder. It looks like a control panel, and any board comes off with a flick. The holders add a few dollars.

Whichever you pick, keep the stop button on the outside, where anyone can reach it.

Tuning

Tuning

The test button
A short press grows the swing for one strike each way, then brakes it to rest. Hold it for two seconds and it measures the swing again from the angle sensor, as it should after the weights or the strikers move. It works only while the element is resting, with no Bridge in range or with the Bridge holding it silent. While it plays or is stopped, the button does nothing. A stop ends a test at once, and pressing again ends one early.
Strikes too quiet
Let the magnet keep up a bigger swing, or close its gap a millimeter. Moving the drums in a little also helps, because the arm meets them nearer the bottom of its swing, where it's fastest. Past that, clamp the drums, which give back more of each strike, or try the cock-and-drop drive.
The tick-tock keeps stalling
Each strike is handing nearly all of the swing to the drum. That happens when a drum weighs about what the arm does at its strikers, about half a kilo here. Make the arm heavier at the strikers, or hang a heavier drum.
Strikes in clumps, with gaps between
The drums are swinging out of the arm's way and back. That's the drums writing part of the rhythm, and it's the point. To change its pattern, change a drum's chain length; for a steady anchor against the free drum, clamp the other.
A double hit, a quick "ta-dak"
A struck drum is swinging back into the arm before the arm has left. Move that drum out a little, or use a softer striker, which gives less bounce.
Tick and tock at different loudness
The arm isn't hanging midway between the drums, or the drums aren't the same distance out. Slide one drum along the bar until they match, or keep the difference; an uneven pair gives a swung rhythm.
The swing won't start
The magnet is right under the still tip, or too far below it. Set it 3 to 5 mm to one side, and close the gap to 2 or 3 mm.
The swing dies too soon
Something rubs. It may be the hub against a plate, the washers on the magnet, or a bearing pinched by its plate. With the magnet off, a flicked arm should swing for well over a minute.
Strikes landing early or late
The firmware plans each strike from the arm's swing time, which changes whenever the weights or the strikers move. Let it measure the swing again from the sensor after any change.
Clinking from the chains
The links knock as a drum swings. Slip a short piece of heat-shrink over each eye bolt's eye, or hang the drums on cord for silence.

Variations

Drums in a row
Hang a second drum just beyond each of the first, nearly touching. A hard strike knocks the near drum into the far one, giving a strike and a quick echo, while a soft strike leaves the far drum still. That makes the size of the swing choose between one sound and two.
A longer arm
A 1 m arm on a frame about 1.2 m tall swings slowly and grandly, in about 1.7 s there and back. It strikes no harder; the frame wants to be stiffer and the top bar longer.
Two arms on one bar
Two arms, each with its own magnet and sensor, on a longer bar, with a drum between them that both can reach. They can play call and answer, or both strike the middle drum at once. Hung from a bar that can sway a little, they pull each other into step, like metronomes on a shared board.