Skip to content

The Machine · Recipes

Gantry Pendulum

Design stage

Updated 2026-10-19

A ball on a chain hangs from a carriage that rolls along an aluminum top bar. A stepper slides the carriage in time with the swing to build it up, sends the ball into a target on either side, and catches it to a stop.

Loading the model

Drag to turn · scroll to zoom

Printed

3DWhere we started. One version of it: a 40 mm steel ball on a 50 cm chain, a steel plate and a wood block, on V-slot wheels. Press Play: the carriage rocks the swing up, the ball strikes the plate and then the block, and the carriage catches it. 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 $210
Printing
About 2 hours
Building
A weekend
Difficulty
Moderate

Anatomy

1
Energy source
The swing of a ball on a chain
2
Control
A stepper slides the carriage the chain hangs from, in time with the swing
3
Sounding body
A target on each side, swapped at will; we started with a steel plate and a wood block
4
Reset
The carriage catches the ball to a stop
3D views. The whole element from the front, and the carriage up close with the hanger the chain swings from. Drawn from the CAD model.
Fig. 13D views. The whole element from the front, and the carriage up close with the hanger the chain swings from. Drawn from the CAD model.

How it works

  • A ball on a chain hangs from a carriage that rolls along an aluminum top bar. A stepper motor pulls the carriage back and forth with a toothed belt. We started with a 40 mm steel ball on a 50 cm chain; the choices below cover the alternatives.
  • Nothing positions the ball. The motor only moves the top of the chain, and the ball follows by swinging, the way a crane’s load follows the crane. Direction decides when; physics does the playing.
  • The swing keeps its own time. A ball on a chain swings at a pace set only by the chain’s length: 50 cm takes about 1.4 s to swing there and back. Nothing can hurry it, so the element plays at that pace or across it.
  • Three moves:
    • Rock. Move the carriage back and forth in time with the swing, heading one way while the ball is out the other. Each swing of rocking adds about three times the rock’s reach to the swing, so rocking 35 mm either side reaches targets 16 cm out in about two swings. Rock farther for a bigger swing and a louder strike.
    • Dash. With the ball hanging still near one target, the carriage dashes toward the other. The ball is left behind, swings after it, and strikes about 0.6 s after the dash began: one strike, and the hardest.
    • Catch. At the end of each swing the ball stops for an instant. If the carriage slides over it right then, it stays stopped, the way a crane operator stops a swinging load.
  • Two targets, one each side at ball height. Each comes off with a thumb screw, so they can change mid-performance.
  • It plays softly. Rocked, the ball meets a target at about half a meter a second; dashed, at about one. That’s as fast as the ball would be going if dropped from 1 to 5 cm. Targets that ring, like metal or hollow wood, carry it. For louder, use a heavier ball; a longer chain doesn’t help.
  • Every strike is planned ahead. A strike lands a predictable time after the move that causes it, so the element starts early by that much and the strike lands on the beat.
  • Control: an ESP32 listens for the wireless signal and drives the stepper through a quiet driver. A switch on the back of the bar gives the carriage a known starting point. It runs from the shared power-tool battery. If it hears nothing for a couple of seconds, it catches the ball and goes quiet; faults show on the board’s light.

Ways to play

  • Single strikes on cue: dash, strike, catch. From cue to stillness takes about a second and a half.
  • Continuous swinging: the carriage keeps rocking, and the ball strikes every half swing, tick and tock, about every half second on a 50 cm chain. Each strike takes much of the swing’s speed away, so the carriage keeps feeding it.
  • Swells: rock a little harder each swing, and every strike lands louder than the last.

Before any code: push the carriage by hand in time with the swing and feel it grow, then jerk the carriage sideways and watch the ball chase it.

Notes

  • This is a first design, drawn but not yet built. Expect one round of fitting.
  • The swing in the 3D model is simulated from the physics, with guesses for how much bounce each target gives back. A test build will give the real figures.
  • Costs in the parts list are rough estimates for budgeting, not checked prices. They add up the version we started with.
  • The firmware in the downloads is a first version. It compiles, and the physics it runs is tested against the CAD simulation, but it hasn’t yet run on a built element. It listens for Control, the one broadcast signal every element hears, and until there’s a bridge to send it, its bench console plays the notes.

Parts

Ingredients

KindPartQtySourceEachFile
PrintedHanger, turns on the pivot bearing and holds the chain1··STL
PrintedBelt clamp, bolts to the front of the gantry plate1··STL
PrintedBelt clamp plate1··STL
PrintedIdler mount, slotted to tension the belt1··STL
BoughtAluminum extrusion, 20 x 40 mm V-slot, 600 mm, for the top barV-slot has V-shaped grooves along each face. The carriage's wheels roll in them, so the bar is also the rail.1·$12.00
BoughtAluminum extrusion, 20 x 40 mm V-slot, for the legs, about 14 cm longer than the chain (640 mm here)Your choice: see How long it hangs2·$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, 120 mm, for the target arms2·$3.00
BoughtCorner brackets for 20 mm V-slot, with screws and T-nutsTwo join the legs to the top bar, four the legs to the feet, four hold the target arms, and one under each arm's tip holds a target.12·$1.00
BoughtV-slot gantry plate for 20 x 40 mm extrusion, about 88 mm squareYour choice: see The railIt needs a hole midway between the two lower wheels for the pivot bolt. Most have one; if not, drill 5 mm.1·$15.00
BoughtSolid V wheels, with bearingsYour choice: see The rail4·$3.00
BoughtWheel spacers, 6 mm, two plain and two eccentricYour choice: see The railThe eccentric pair goes on the lower wheels and sets how hard the wheels grip the bar.4·$1.00
BoughtNEMA 17 stepper motor, 40 mm body1·$12.00
BoughtNEMA 17 L-bracket1·$3.00
BoughtGT2 pulley, 20 teeth, 5 mm bore, for 6 mm belt1·$2.00
BoughtGT2 idler, 20 teeth, 5 mm bore1·$2.00
BoughtGT2 belt, 6 mm wide, 1.2 m1·$3.00
BoughtTMC2209 stepper driverQuiet enough that the motor doesn't whine over the targets.1·$6.00
BoughtBall bearing, 625 size (5 mm bore, 16 mm across), for the pivot1·$1.00
BoughtSpacer, 5 mm bore, about 8 mm long, and two thin 5 x 8 mm shims, for the pivot1·$1.00
BoughtSteel link chain, 2.5 mm wire, cut to length (about 42 cm here)Your choice: see The chain or cord1·$4.00
BoughtQuick link, 3.5 mmJoins the chain to the ball, so the ball comes off in seconds.1·$1.00
BoughtM6 eye boltYour choice: see The ball1·$1.00
BoughtSteel ball, 40 mm, drilled and tapped M6Your choice: see The ball1·$8.00
BoughtSteel plate, about 140 x 100 x 3 mmYour choice: see The targets1·$5.00
BoughtM5 thumb screws, with rubber washers, to hold the targetsYour choice: see How the targets are held2·$1.00
BoughtMicro switch with roller lever, and a mount for 20 mm V-slot1·$3.00
BoughtESP32 development board1·$6.00
BoughtBattery adapter for the shared power-tool platform, and a 5 V buck converterThe stepper driver 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 pageA blade fuse holder and 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 trigger, contacts rated 10 AThe switch the motor's power goes through. Here it stands in for the MOSFET the Control page also allows, because a MOSFET module switches the ground side, which would leave the stepper driver grounded only through the ESP32.1·$2.00
BoughtElectrolytic capacitor, 100 µF, 35 VAcross the driver's motor supply, to soak up the spikes the motor sends back.1·$1.00
BoughtSmall project box, for the electronicsYour choice: see The electronics1·$5.00
BoughtM5 screws, T-nuts and washers, assortedWheels (M5 x 35, and one M5 x 45 for the top-left wheel, which presses the home switch), pivot (M5 x 30), belt clamp, idler, motor bracket and idler mount.1·$5.00
BoughtM3 screws, and four M3 heat-set insertsClamp plate, motor, and an M3 x 12 through the hanger's fork as the chain's pin.1·$3.00
SalvagedHardwood block, about 140 x 90 x 20 mmYour choice: see The targetsMaple, oak or a scrap of flooring.1··
Total$205.00

Tools

  • 3D printer, PETG
  • Hex keys, 2.5, 3 and 4 mm
  • Soldering iron, for the heat-set inserts and the wiring
  • Two pairs of pliers, to open the chain at the right link
  • A drill, for a hole in each target
  • A multimeter, to set the 5 V converter
  • A phone with a stopwatch, to time the swing

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.

The ball

What swings into the targets?

Steel ball, 40 mmWhere we started

SoundA hard, bright hit that makes metal ring clearly

About 260 g. Sold drilled and tapped for railings and gear knobs. Dents drum heads and soft wood over time.

Steel ball, 50 mm

SoundThe loudest, with twice the weight behind the same hit

About 510 g. Harder work for the motor when it catches, and harder on the targets.

Rubber ball, about 60 mm

SoundLike a soft mallet, round and warm, with less attack

A lacrosse ball, about 145 g, drilled through for a bolt. Safe on drum heads and gongs.

Hardwood ball, 50 to 60 mm

SoundA warm knock, the quietest of these

Drilled craft balls, 50 to 80 g. Cheap, and the easiest on the motor.

The ball hangs on a quick link, so changing it takes seconds. Keep its middle at the same height, or time the swing again.

The chain or cord

What does the ball hang from?

Steel link chainWhere we started

SoundA small clink from the links on each strike

Looks the part. Welded short-link chain hangs straightest; twisted chain tends to spin the ball.

Thin wire rope

SoundSilent, so you hear only the strike

Doesn't stretch, so timing stays exact. Needs crimped loops at each end.

Braided cord

SoundSilent, and a touch softer on the strike

Cheapest. Stretches a little, which blurs the timing, and can twist.

How long it hangs

How far below the carriage is the middle of the ball?

Short, about 30 cm

SoundA quick swing, about 1.1 s there and back

A compact frame, about half a meter tall. Smaller swings.

Medium, about 50 cmWhere we started

SoundAbout 1.4 s a swing

A frame about 70 cm tall.

Long, 75 cm to 1 m

SoundA slow, stately swing, 1.7 to 2 s

A frame 1 to 1.2 m tall, which wants to be stiffer, and a longer top bar.

The length sets the tempo, not the loudness. A longer chain doesn't strike any harder. The legs are about 14 cm longer than the chain.

The targets

What does the ball strike? There's one each side, and they needn't match.

Steel plateWhere we started

SoundRings long and bright, like a bell

A hardware-store offcut, 2 to 4 mm thick; thicker plate rings lower and longer.

Hardwood blockWhere we started

SoundA short, dry knock

Any dense offcut. Cut a slot into it, like a temple block, for a hollower voice.

Found metal

SoundEach has its own pitch. Gongs and pot lids shimmer, and a cowbell clanks.

Hang a gong or lid from its rim; a cowbell or tube needs its own holder.

A drum

SoundA thump, with a buzz from the wires on a snare

Rubber ball only. A frame drum stands on edge; a snare or tom goes on its own stand, tilted so the head faces the ball.

Each target comes off with a thumb screw, so they can change mid-performance.

How the targets are held

Clamped still, or free to swing?

ClampedWhere we started

SoundCrisp strikes that land when expected, and the target still rings

Pinched by a thumb screw between rubber washers. Predictable.

Hung on a cord

SoundThe target swings away, rings freely and comes back on its own schedule

Two pendulums write the rhythm together, as on the Swinging striker. Less predictable, and that's the point. Light targets swing a lot.

The rail

What does the carriage roll on?

V-slot wheelsWhere we started

SoundNearly silent, a soft roll

Cheapest, because the bar is the rail. The wheels need setting, wear over time, and can knock on hard catches if they're loose.

MGN12 linear rail

SoundA faint hum as its balls roll

About $20 more. Stiffer, with no play and nothing to adjust. It needs a printed carriage plate, not drawn yet, to carry the hanger and the belt clamp.

The stop switch

What cuts the motor'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. The ESP32 knows where the carriage is only by counting the steps it sends, so the second pole is how it learns the power was cut, and finds its home switch again before it moves. Without it, a carriage pushed by hand while the power was off could be driven into the end of its rail. 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 shrugs off a warm motor and the knock of a catch; PLA is fine for a first try.

The printed parts

  • Hanger, turns on the pivot bearing and holds the chain

    Which way up
    Flat on its back, with the bearing pocket facing up
    Supports
    None
    Time
    About 25 minutes

    The bearing is a press fit. 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; keep glue off the inner ring and the balls.

    STL ↓
  • Belt clamp, bolts to the front of the gantry plate

    Which way up
    As it sits on the carriage, belt grooves facing up
    Supports
    None
    Time
    About 25 minutes

    The heat-set inserts go into its top face once it's printed.

    STL ↓
  • Belt clamp plate

    Which way up
    Flat
    Supports
    None
    Time
    About 10 minutes
    STL ↓
  • Idler mount, slotted to tension the belt

    Which way up
    Base down, with the wall standing up
    Supports
    None
    Time
    About 50 minutes
    STL ↓

Assembly

  1. 1

    Build the carriage for your rail. On V-slot wheels, fit the four wheels to the gantry plate, with plain spacers on the upper pair and eccentric spacers on the lower pair. Use the long M5 screw for the top-left wheel; its tail presses the home switch.

  2. 2

    Put the carriage on the top bar and set its grip. On wheels, slide the plate on from one end, wheels in the grooves on the bar's top and bottom faces, then turn the eccentric spacers until the lower wheels grip.

    TrickyThe carriage has to go on before the legs do; once they're on, it can't get on or off the bar. Turn each eccentric a little at a time and roll the carriage between turns. Too loose and it knocks on every catch; too tight and the motor stalls.

    CheckThe carriage rolls end to end with no tight spots, and you can't rock it on the bar by hand.

  3. 3

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

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

  4. 4

    Melt the four heat-set inserts into the top of the belt clamp. Bolt it to the front of the gantry plate, above the bar, with the nuts behind the plate.

  5. 5

    Bolt the motor to its L-bracket with the pulley on its shaft, and the bracket onto the top of the bar at one end. Bolt the idler mount to the other end, with the idler on an M5 bolt through its slot.

    CheckThe pulley, the idler and the grooves on the belt clamp all line up.

  6. 6

    Lay one end of the belt in the clamp's grooves, teeth down, and screw the clamp plate over it. Run the belt around the idler and the motor pulley, back to the clamp, and clamp the other end. Tension it by sliding the idler along its slot.

    CheckPushed hard by hand, the carriage turns the motor rather than jumping a tooth.

  7. 7

    Press the bearing into the front of the hanger. Bolt the hanger to the plate between the two lower wheels, in this order from the front, an M5 x 30 bolt, a thin shim, the hanger, a thin shim, the spacer, the plate, and a nut behind.

    TrickyThe bolt must clamp only the bearing's inner ring. If it pinches the hanger or the bearing's outer ring, the swing dies within a few beats. The thin shims are what stop that.

    CheckFlicked, the hanger spins freely for a second or two.

  8. 8

    Hang your ball. Pin the top link of your chain in the hanger's fork with the M3 screw, or tie a cord through it. Cut it so the middle of the ball hangs at your chosen length below the pivot bolt, counting the quick link and the eye bolt, then hang the ball on the quick link.

    TrickyThe length sets the element's tempo, and every timing in the firmware follows from it. Time ten swings and write the real figure down; it won't be exactly the one from the formula.

    CheckTen swings take about 11 s on a 30 cm chain, 14 s on 50 cm, 17 s on 75 cm and 20 s on 1 m.

  9. 9

    Bolt each target arm to the front of a leg with two corner brackets, at the height that puts the middle of your targets level with the middle of the ball. Slide one more bracket under each arm's tip, hanging down, to hold a target.

  10. 10

    Hold your targets. Drill a hole near the top of each and fix it to its bracket with a thumb screw, with a rubber washer on each side, or hang it on a cord if you chose to let it swing.

    TrickyPinch the rubber just enough to hold the target square. Too tight and it can't ring; too loose and the ball knocks it away.

    CheckTapped, a target rings rather than thuds. The ball, pushed gently, meets each target flat on its face, near the middle.

  11. 11

    Slide each target along its arm until its face is 15 to 25 cm from where the ball hangs at rest. We started at 18 cm.

  12. 12

    Fit the home switch to the back of the top bar, where the long wheel screw presses it with the ball still about a centimeter clear of the nearer target.

    TrickyThe switch has to sit inside the targets. Homing drags the ball along under the carriage, so a switch set past a target drags the ball into it. Move the switch whenever you move the targets.

    CheckWith the carriage against the switch, the ball hangs clear of the target.

  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 motor's power. The stepper goes to the driver, and the switch to an ESP32 input. 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 motor turns freely by hand and the ESP32's light is on. Press the stop button, release it, and nothing moves.

  14. 14

    Load the firmware from the downloads with the Arduino environment for ESP32, and open its serial monitor. Type in the time for ten swings and the gap from the ball to the targets, as its README says.

    TrickyThere's no sensor on the swing. The firmware knows where the ball is only by simulating it from its own moves, so a wrong swing time means strikes off the beat and catches that leave a swing. Time the ten swings carefully.

    CheckIt homes the carriage to its switch slowly and glides to the middle. Typed in, "play 1" strikes the right target a second later, then the carriage catches the ball and glides back.

Wiring

The fuse comes first, right after the battery. The ESP32 runs from the 5 V converter. The motor's power goes through the stop button and then the relay, so either one cuts it. 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 · Gantry Pendulum
PowerSignalMotorGround, all joinedPins drawn faint are left empty.

Wire list

  1. Battery adapter, +

    Fuse, 2 A, in

    PowerRed, 16 AWG

    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, 18 AWG

  4. Stop button, 12

    Relay module, COM

    PowerRed, 18 AWG

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

  5. Relay module, NO

    TMC2209 driver, VM

    PowerRed, 18 AWG

  6. Capacitor, 100 µF, +

    TMC2209 driver, VM

    PowerThe capacitor's own leg

    Solder its legs straight onto the driver's VM and GND pins. The stripe on its side marks the − leg.

  7. 5 V converter, OUT+

    ESP32 board, 5V

    PowerRed, 22 AWG

    Only once the converter is set to 5 V.

  8. 5 V converter, OUT+

    Relay module, VCC

    PowerRed, 22 AWG

  9. ESP32 board, 3V3

    TMC2209 driver, VDD

    PowerRed, 22 AWG

    The driver's logic runs at the ESP32's 3.3 V, so its signals match.

  10. Battery adapter, −

    5 V converter, IN−

    GroundBlack, 22 AWG

  11. Battery adapter, −

    TMC2209 driver, GND

    GroundBlack, 18 AWG

    The motor's return. Use the driver's GND pin next to VM.

  12. Capacitor, 100 µF, −

    TMC2209 driver, GND

    GroundThe capacitor's own leg

  13. 5 V converter, OUT−

    ESP32 board, GND

    GroundBlack, 22 AWG

  14. ESP32 board, GND

    TMC2209 driver, GND

    GroundBlack, 22 AWG

    The driver's other GND pin, next to VDD.

  15. Relay module, GND

    ESP32 board, GND

    GroundBlack, 22 AWG

  16. Resistor, 10 kΩ, 2

    ESP32 board, GND

    GroundThe resistor's own leg

  17. Home switch, COM

    ESP32 board, GND

    GroundBlack, 22 AWG

  18. Stop button, 14

    ESP32 board, GND

    GroundBlack, 22 AWG

  19. Test button, 2

    ESP32 board, GND

    GroundBlack, 22 AWG

  20. ESP32 board, GPIO 25

    TMC2209 driver, STEP

    SignalAny color, 22 AWG

  21. ESP32 board, GPIO 26

    TMC2209 driver, DIR

    SignalAny color, 22 AWG

  22. ESP32 board, GPIO 27

    TMC2209 driver, EN

    SignalAny color, 22 AWG

    Low turns the motor on. The ESP32 holds it high while the element waits, so the motor doesn't hum.

  23. ESP32 board, GPIO 33

    Relay module, IN

    SignalAny color, 22 AWG

  24. Resistor, 10 kΩ, 1

    Relay module, IN

    SignalThe resistor's own leg

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

  25. Home switch, NC

    ESP32 board, GPIO 32

    SignalAny color, 22 AWG

    The switch's normally closed contact, which opens when pressed. A broken wire then reads as pressed, so the carriage stops rather than driving into the end.

  26. Stop button, 13

    ESP32 board, GPIO 13

    SignalAny color, 22 AWG

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

  27. Test button, 1

    ESP32 board, GPIO 15

    SignalAny color, 22 AWG

    The test button. The ESP32's own pull-up holds the pin high until it's pressed. The board reads GPIO 15 as it starts, but only to choose whether to print, so holding the button then does no harm.

  28. TMC2209 driver, 1A

    Stepper motor, A1

    MotorThe motor's own cable

    1A and 1B go to one coil, 2A and 2B to the other.

  29. TMC2209 driver, 1B

    Stepper motor, A2

    MotorThe motor's own cable

  30. TMC2209 driver, 2A

    Stepper motor, B1

    MotorThe motor's own cable

  31. TMC2209 driver, 2B

    Stepper motor, B2

    MotorThe motor's own cable

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.
Finding the motor's coils
Motor wire colors vary by maker. Touch two wires together and turn the shaft by hand; if it suddenly turns stiffly, those two are one coil. If the motor runs backwards, swap the two wires of one coil.
Never unplug the motor with power on
Disconnecting a running stepper can destroy the driver. Press the stop button first.
The pins
Any free ESP32 pins will do, except 0, 2, 5 and 12, which the board reads as it starts, and 34 to 39, which have no pull-up for the switches. The board reads 15 as it starts too, but only to choose whether to print, so 15 carries the test button on every element. If you use others, the firmware needs to know.

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 rides on the carriage: the motor, the switch and the electronics stay put, so no cable has to follow it.

The frame
Corner brackets, two at every joint, with M5 screws into T-nuts in the slots.
The motor
On its L-bracket on top of the bar at the left end, with two M5 screws into T-nuts in the bar's top slot.
The idler
The printed idler mount sits on top of the bar at the right end, on two T-nuts. The idler slides along its slot to tension the belt.
The home switch
A V-slot switch mount on the back face of the bar, near the motor. It slides along the slot, so it can follow the targets when they move.
The targets
Each arm is a short 20 x 20 length, held to the front of a leg by two corner brackets. One more bracket hangs under each arm's tip and holds the target.
The electronics
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.
The stop button
In its own housing, on the front of the right leg near the top, where a hand finds it without reaching past the swing.
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 sight and away from the swing.

The electronics

Hidden in a box, or on show?

Closed boxWhere we started

A small project box, bought or printed, bolted to the leg. Tidy, and safe from a stray ball, but it hides the electronics.

Open plate

The boards 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 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 plays each of its notes once, starting about a second after you let go: a strike at each target, a swing, then the catch. Hold it for two seconds and it finds its home switch again instead. 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. The time for ten swings is still measured by hand, at the console.
A thud where there should be a ring
The target is pinched too hard, or touching its bracket. Ease the thumb screw. If it still thuds, the ball may be too soft for that target; steel brings out metal.
A double hit, a quick "ta-dak"
The ball is bouncing straight back into the target, or a hung target is swinging back into the ball. Catch sooner after the strike, clamp the target, or move it a little farther out.
Strikes too quiet
Rock farther, for example 50 mm either side instead of 35, or move the targets a little farther out so the ball has more room to gather speed. Past that, use a heavier ball. A longer chain won't help.
Tick and tock at different loudness
The swing isn't centered between the targets. Move the carriage's resting point or one target until they match. Or keep the difference; an off-center swing gives an uneven, swung rhythm.
Strikes drifting off the beat
The swing time the firmware uses is off. Time ten swings again. Also listen for speed creeping up as it gets louder; a bigger swing reaches the next target sooner, so loud playing runs slightly fast.
The ball keeps swinging after a catch
The catch came too early or too late; it has to land just as the swing runs out. Nudge its timing until the ball hangs still.
A knock from the carriage on each catch
The wheels are loose. Give each eccentric spacer a small turn.
A whine under the music
The stepper driver isn't in its quiet mode. Check its settings; the TMC2209 has a near-silent mode for slow moves.

Variations

A rigid arm instead of a chain
A light rod or tube, clamped in a hub instead of the fork. It can push as well as pull, so dashes and catches get crisper, and it never clinks. It also stops being a ball and chain.
Sensing the swing
Let the ESP32 see the swing instead of predicting it. A magnetic angle sensor (an AS5600 board, about $3) faces a small magnet that turns with the chain. Then catches come out clean even when a strike takes an unexpected amount out of the swing, and continuous swinging stays locked to the beat. It needs the pivot rebuilt so a short shaft turns with the hanger in two bearings, with the magnet in the shaft's end. Not drawn yet.
A longer bar, more targets
On a 1 m bar the carriage can carry the whole swing along to a different pair of targets, so one ball plays several. Targets at different distances add another control, because small swings reach only the near ones.
Two pendulums on one bar
Two carriages, each with its own motor and belt, on a longer bar, with a target between them that both can reach. They can play call and answer, or both strike the middle at once. The firmware has to keep the two balls from meeting.