BALL-AND-BEAM CONTROL RIG — FABRICATION PROTOTYPE
Created 22 October 2026

OPEN THE NATIVE ONSHAPE MODEL
https://cad.onshape.com/documents/0fceef7a1fb68dcf7a3bb439/w/08c8462187b1365e60e7a427/e/6eddba39355434e04e8f50fa

The final design is a multi-part Part Studio generated by the BallBeamBalanceRig
custom FeatureScript. It is positioned as an assembly, but does not contain
Assembly-tab mates or a running control simulation. Four REF_ bodies represent
purchased components; they are simplified envelopes and must not be printed.
The feature has a checkbox for showing these reference bodies. Dimensions are
editable in the FeatureScript source, not exposed as individual UI parameters.

WHAT IS INCLUDED
12 individual STL files, already oriented for printing in millimetres;
an assembled STEP file; the native FeatureScript source; CAD views;
solid/interference validation reports; and this assembly guide.
STL and STEP files were generated from the same dimensions and boolean geometry
used to build the Onshape feature, using a second CAD kernel locally.

NOMINAL DESIGN
Track: two 180 x 50 mm halves; 4 mm floor; 44 mm clear channel; 10 mm side rails.
Ball: purchased lightweight 40 mm table-tennis ball (about 2.7 g).
Base: 210 x 155 mm; tallest fulcrum features 89 mm above the base bottom.
Pivot: 5 mm metal axle, 80 mm above the base bottom.
Servo: positional SG90, with output shaft parallel to the beam pivot.
Crank: 40 mm diameter; 15 mm eccentric radius; attached to the STOCK servo horn.
Rod: 36 mm hole-to-hole, with 3.3 mm pivot holes.
Beam drive point: 100 mm to the right of the fulcrum, on the beam underside.
CS100A mount: assumes a Keyestudio KS0504/SR01-style 49 x 22 mm PCB.
Sensor face is nominally at x = -185 mm and height = 114 mm when level.
Arduino tray: nominal Uno 68.6 x 53.4 mm board, held with insulated straps.
Assembled envelope is approximately 388 x 155 x 134 mm, excluding cables/feet.

The end stops limit the ball-centre travel to approximately -112 to +162 mm.
Expected ideal range to the ball's nearest surface is about 53–327 mm.
Nominal ball-centre coordinate: x_mm = measured_distance_mm - 165.
Calibrate this offset on the real sensor; two-transducer geometry and echoes
can change the observed relationship. A geometric centre setpoint is about
165 mm measured range, not half the end-to-end sensor range.

PRINTED PARTS (ONE OF EACH)
01 Base and fulcrum         210 x 155 x 89 mm
02 Left track              180 x 50 x 14 mm
03 Right track             180 x 50 x 14 mm
04 Pivot saddle/splice      60 x 48 x 18 mm
05 Underside drive shoe     24 x 48 x 16 mm
06 SG90 mount              51 x 40 x 58 mm
07 Servo crank wheel       about 40 x 40 x 3.5 mm
08 Connecting rod          8 x 44 x 3 mm
09 CS100A mount            48 x 60 x 38 mm
10 Arduino tray            80 x 63 x 12 mm
11/12 Pivot spacers        9 mm OD; 5.3 mm bore; 4.4 mm long each

PRINT SETTINGS
PLA or PETG; 0.2 mm layers; four perimeter walls; 30–40% infill as a starting
point. Use solid infill for the crank, rod and spacers. Print the STL files in
their supplied orientations: track floor down, saddle/shoe broad mating face
down, wheel/rod flat, spacers standing on their circular faces, and other parts
base down. Use local supports for horizontal axle holes, the servo opening and
the sensor frame's upper bridge as needed by your printer. Remove supports
fully before assembly. Keep supports away from the track surface where possible.
The largest footprint is 210 x 155 mm: a 220 mm bed needs a small brim or none.
Check slicer bounds, bed clips and printer margins before printing.
Lightly sand the track seam and rolling surface. Do not scale the files to fit.
Nominal screw clearance is 3.4 mm, pivot clearance 5.3 mm; clean/ream holes to
the measured hardware. FDM fit has not been physically validated.

PURCHASED PARTS AND HARDWARE
1 positional SG90 with its original horn and original horn-retaining screw.
1 CS100A-based ultrasonic module; verify its board dimensions before printing.
1 Arduino Uno, USB cable and jumper wiring.
1 lightweight 40 mm ball.
1 smooth 5 mm steel axle, about 90 mm long, with two 5 mm shaft collars.
  An M5 x 80 bolt with washers/locknut can be used for a first fit check,
  but threads in the bearing area increase friction.
4 M3 x 14 screws/nuts/washers for the saddle-to-track connection.
2 M3 x 12–14 screws/nuts/washers for the drive shoe.
2 M3 x 12 screws/nuts/washers for the sensor mount.
4 M3 x 14 screws/nuts/washers for the servo mount to base.
4 M3 x 12 screws/nuts/washers for the Arduino tray to base.
2 M3 x 16 pivot screws and locknuts for the connecting rod.
2 spacers about 2 mm thick (or washer stacks) between rod and wheel/drive lug.
2 M2 screws, nuts and washers for the servo mounting ears (length to suit).
2 M2 screws/nuts or appropriate small screws to attach wheel to stock horn.
  Wheel mounting holes are 2.2 mm at 7 mm radius in four directions; choose
  two matching holes. Drill the replaceable plastic horn to suit if needed.
  The 6 mm central opening provides access to the original retaining screw.
Small cable ties/insulated straps, thin foam tape for sensor support, and
adhesive rubber feet at least 5 mm tall to clear underside nuts/bolt ends.
Regulated servo supply around 5 V with adequate peak current (2 A is a useful
starting capacity), common ground with Arduino, and wiring strain relief.
Hardware lengths are starting values; verify washers, actual horn and clearances.

ASSEMBLY
1. Add feet to the base. Bolt on the servo bracket and Arduino tray before
   installing electronics. The bracket has a notch beside the travel-stop post;
   its base screw pattern is x = 75/110 mm, y = 10/30 mm in assembly coordinates.
2. Butt the track halves together on a flat surface. Bolt both halves to the
   central saddle using the four holes at x = +/-22, y = +/-18 mm. Align the
   rolling surfaces flush before tightening. This splice must be rigid.
3. Attach the drive shoe under the right half using the diagonal hole pair.
   Fit the sensor bracket on top of the left end, inside the rails.
4. Insert the pivot axle through the fulcrum, a printed spacer, the saddle,
   the second spacer and the other fulcrum cheek. Fit external shaft collars
   without squeezing the moving saddle. The beam should rotate freely.
5. Insert the SG90 body through the 24 x 13 mm opening, shaft facing the crank
   side. Horizontal slots accommodate mounting-ear pitch variation. Use washers
   that bridge the slots. Confirm the body and output-shaft location against
   your actual servo. Use thin spacers at the mounting ears to adjust depth.
6. Power the servo without the linkage and command its neutral position. Attach
   the supplied horn, then screw the printed wheel to it. At level the eccentric
   pivot points RIGHT horizontally, toward the beam drive shoe. The printed
   wheel does not replace or reproduce the servo spline.
7. Connect the rod between eccentric wheel pin and drive-shoe lug. Put a 2 mm
   spacer between the rod and each joint. Use locknuts; joints must pivot freely.
   Adjust the horn angle/servo neutral so the beam is level. Check rod and screw
   clearance by hand before applying motion commands.
8. Secure the sensor board to the frame with thin foam tape and small ties
   through the side slots. Keep both acoustic faces unobstructed and aim their
   axes along the track, approximately 20 mm above its floor. The module travels
   with the beam. Route a loose flexible wire loop near the fulcrum.
9. Secure the Uno in its tray with insulated straps or a suitable removable
   pad, keeping headers, connectors, components and underside solder joints
   clear. The tray is universal; it does not claim an exact Uno hole pattern.

CONTROL AND COMMISSIONING
Suggested wiring: servo signal D9; sensor TRIG D6; sensor ECHO D7; sensor power
per its data sheet; all grounds common. Power the servo from its external supply;
do not assume the Uno 5 V pin or USB can supply servo peaks. Avoid unintentionally
back-feeding the USB/Uno power rail from the external supply.

Before closing the loop, move the ball to several known locations and verify
repeatable readings over the intended range. A spherical ball and nearby rails
can cause missed or false echoes. Confirm that the selected CS100A module can
track this ball; CAD verification cannot establish acoustic performance.
If needed, adjust sensor height/aim, ball surface, or usable range before tuning.

Start with a small servo sweep (+/-10 degrees from calibrated neutral), then
increase gradually while watching all hardware. The nominal +/-45 degree crank
range produces about -6.20 to +5.97 degrees beam tilt. Begin operation within
about +/-40 degrees. Mechanical stops engage around +/-8 degrees beam tilt;
they are backup stops, not the normal servo position limit. Never drive the
servo continuously into them. Keep integral action disabled until basic PD
control and position feedback work. Verify actuator sign with a gentle command.
Reject timeouts/out-of-range sensor returns, limit motion, and return to the
calibrated level command after sustained invalid readings. Stabilization firmware
and experimentally tuned gains are not included in this mechanical prototype.

VERIFICATION AND LIMITS
Onshape FeatureScript compiled and evaluated successfully with no notices.
All twelve printable parts are valid single CAD solids in the local kernel.
The level printed assembly has no positive-volume part overlaps.
Thirteen discrete kinematic positions across +/-45 degrees crank motion showed
no printed-part interference (this is a sampled check, not a continuous sweep).
Actual screws, nuts, servo horn, electrical wiring, compliance, friction, printed
tolerances and sensor echoes were not physically tested or fully simulated.
The final hole/slot refinements only remove material or move base fastening holes;
they do not change the linkage or its checked motion envelope.

COMPONENT SOURCES / ASSUMPTIONS
Keyestudio KS0504: 49 x 22 x 19 mm, CS100A-based module, near blind zone <4 cm:
https://docs.keyestudio.com/projects/KS0504/en/latest/docs/KS0504.html
TowerPro SG90 positional servo specifications; clone dimensions/horns vary:
https://towerpro.com.tw/product/sg90-analog/
Arduino Uno R3 official board information:
https://docs.arduino.cc/hardware/uno-rev3/
