avery.izatt

school project

Centerfuge: A Science Museum Exhibit Controller

For my engineering class we built an exhibit for the Eureka science museum. I wrote the Arduino firmware that runs its motor safely, with a speed knob, attract mode, session timers and fault handling.

2026ArduinoC++PlatformIOPWM motor controlState machines

Our engineering class built an exhibit for the Eureka science museum. Because the public would be using it, the electronics had to be safe and hard to misuse. The controller I wrote is an Arduino Nano driving a motor through an H-bridge, with a knob for speed, an RGB status LED and a strobe LED.

The professional handoff documents are the main record of the finished project. They are shown below in their original report/manual format rather than being converted into a replacement article.

Open original · Download .docx
Open original · Download .pdf
Open original · Download .pdf

Download the editable final report (Word) or the bill of materials (Excel).

Engineering notes

The controller is a small state machine:

State diagram of the Centerfuge controller: startup lockout, attract mode, idle ready, running and fault

How it behaves:

  • Startup lockout: the motor won’t run until the knob has been brought back to zero, so it can never spin up unexpectedly when powered on.
  • Attract mode: after 15 seconds of nobody touching it, the exhibit goes to a gentle LED animation to invite visitors over. The motor stays off.
  • Sessions: turning the knob starts a session, which ends on its own after 45 seconds.
  • Smooth speed: the knob is averaged to filter noise, ignores tiny changes, and the motor speed ramps up and down instead of jumping.
  • Safety: a minimum running speed avoids a noisy, weak motor, and a fault state shuts the motor off and blinks the LED if something goes wrong, such as the motor running flat out for too long.

A few of the numbers behind that, all in constants at the top of the firmware so the exhibit can be tuned without touching the logic:

Setting Value
Knob samples averaged 8, with a deadband of 6 counts to ignore noise
Motor treated as “off” below knob reading 40
Knob must be below this to arm at startup 50
Running PWM range 120 (lowest useful speed) to 255
PWM ramp 2 counts per loop
Idle until attract mode 15 s
Maximum session 45 s
Fault blink every 300 ms

The stall protection is honest about its limits: the comments call it a placeholder, because real jam detection needs a current sensor or an encoder. For now, running at PWM 250 or more for 8 seconds is treated as a jam and trips the fault state, which needs the knob returned to zero to clear.

I also wrote a simpler version that keeps the core safety features: the startup lock, a 15-second run limit that resets when the knob returns to zero, a startup kick to overcome static friction, and slew-rate limiting.

← all projects