OpenValence Download

Nucleus

The firmware for the OSSM Flagship PCB. It runs the Valence hub, plans the motion and generates the quadrature signal that steers the servo drive.

Built on ESP-IDF. Apache-2.0.

Status

Runs on an ESP32-P4 dev board and bench rigs. The Flagship PCB is still in design (see Hardware). No release yet; when there is one, it will be on Downloads.

Motion timing

One stroke, from the Wi-Fi buffer down to a single edge. Time slows as the view narrows; the readout says by how much. Positions are Kinetic² output drawn as a 100 mm stroke, the steps are Nucleus's 208.608 per mm.
Details

The planner keeps a strip of the next 128 positions in mm, one per 1 ms tick. Past the end of the strip the steer holds the last position and counts a planner stall.

Every 1 ms tick the steer reads the strip and gives the LP core three things: a velocity, a fence and a lease renewal. The fence is a pair of edge counts that no edge may cross. The lease is a 4 ms timer.

Wi-Fi stalls are covered separately: the client sends segments up to the schedule horizon minus 100 ms ahead, which is 900 ms at the factory horizon of 1000 ms.

The LP core emits A/B quadrature edges, and its signed edge count is the machine's position. Its poll loop is 5 cycles, 125 ns at 40 MHz, and every edge lands on that grid. Measured at a prime edge rate on a Rigol DHO4204, the spread is 128 ns peak to peak and the rounding does not accumulate.

The LP core runs from its own SRAM. While the main cores erased and wrote flash with the cache off, a scope saw 2,156 transitions and 0 illegal ones, so saving settings does not glitch the motor signal.

Chips

Safety

Pairing button Draft

These gestures are drafts and may change. The access tiers are in the Valence docs.

Firmware updates and rollback

An HTTP POST to /ota on port 80, with a token, writes the new image to the idle slot and reboots. The new image is on trial: if its hub task hangs before it proves itself, the watchdog resets the PCB and the bootloader brings back the previous image.

Related

Nucleus is the hub in Valence: it holds the machine's state, and clients such as Phosphor send intents that it clamps and echoes. It plans motion with Kinetic and runs on the Flagship PCB. The same hub code compiles to WebAssembly and runs inside Phosphor as Neutrino, so you can try it without a PCB; see Demos. The diagrams show the whole system, and Components lists every part.