UC San Diego COSMOS · Cluster 2

← All work

J-CAR

A sensor-driven kinetic sculpture: a multi-level marble run that detects, routes, lifts, and catches marbles automatically.

The tall J-CAR marble sculpture and its track system

The brief

A marble run
with a brain.

Team J-CAR was tasked with building a robust, professional kinetic sculpture with automatic capability, a human interface, sensors, a motor-powered elevator chain, safety nets, and a reliable finish.

Choose the right system

We sketched and compared three concepts: tri-funnel, double-loop, and dual-track. Using a Pugh chart and risk analysis, we selected the dual-track approach because it scored best overall for efficiency, buildability, code potential, human interaction, and visual impact.

Build and test

We built the frame, tracks, funnels, and elevator chain, then installed the motors, sensors, and button interface. Each feature was tested repeatedly while we adjusted the tracks, basket, and code for more reliable continuous movement.

System architecture

01

Sense

A light sensor recognized light and dark marbles. A speed sensor estimated a marble’s travel. Touch sensors controlled track position and the human interface.

02

Route

A motorized track switch responded to sensor input, directing the marble along the intended path through the sculpture.

03

Catch & reset

The basket motor moved to catch marbles after detecting their speed, while a separate flip-track motor kept a ramp moving back and forth.

My contribution

I wrote the final
controller code.

I hand-coded nxt1.c and nxt2.c, the two programs used to run the complete sculpture on the final day.

task main() {
  startTask(basket);
  startTask(sorter);

  while (true) {
    wait1Msec(100);
  }
}

NXT 1 ran two concurrent systems: the sorter and the basket. The sorter counted button presses, changed a track’s motor position, and used the light sensor to react to a marble. The basket program read marble speed, estimated the needed travel distance, converted it to motor encoder ticks, and then returned the basket to its starting point.

NXT 2 continuously moved the flip-track motor between two encoder positions. Splitting the work across two NXT bricks was not just tidy—it addressed a real power problem. With every motor connected to one NXT, simultaneous operation caused jitter; the second controller spread the electrical load.

Problems → solutions

Reliability was the real project.

We dealt with misaligned tracks, limited or snapped parts, inconsistent switching, and a basket that sometimes could not catch a fast marble. We added safety nets to catch stray marbles, fabricated custom mounts for misaligned parts, and kept iterating until the sculpture operated smoothly and continuously.

Team J-CAR: James, Christian, Aaryaa, and Rhoy.