An alternative firmware for OSSM written in Rust
You can find the original hardware and software here
- Full RS485 based motor control
- Motor settings set automatically
- S-curve motion planning
- Strict mechanical bounds checks
- Adjusting depth, velocity, and stroke start on the fly
- Off-the-shelf control board support
- Patterns
- Install Rust using the instructions here
- Windows
- Download and run rustup-init
- Select "Quick install via the Visual Studio Community installer"
- Select "Proceed with standard installation (default - just press enter)"
- Linux or MacOS
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
-
Open a terminal
-
Install the ESP Rust toolchain for Xtensa devices as well as the
espflashtool for flashing devices by running the following commands:
cargo install espup --locked
espup install
cargo install espflash --lockedMore information can be found here
-
See the supported boards section to see if your board is supported and use the feature flag in the next step
-
If on Linux or MacOS set the environment variables with:
. $HOME/export-esp.sh- Compile with and upload with:
cargo xtask run <board_name>When you first start the machine it may appear that nothing is working.
Power cycle everything! Disconnect the motor power supply as well as the controller board for a few seconds and then reconnect everything.
This is necessary because the motor comes with a baudrate of 19200 from the factory. This is very slow and on first boot OSSM-RS will change it to 115200 which requires the motor to be power cycled to take effect.
If you check the logs you should see: Motor baudrate updated. Please power cycle the machine!
See supported boards
Connect a ~1500uF >50V capacitor between the power pins. 2200uF 63v was found to work well
Power pinout (motor shaft facing up):

Data pinout used for the diagrams (motor shaft facing down):

| Pin # | Function | Description |
|---|---|---|
| 1 | NC | |
| 2 | RS485_A | RS485 + |
| 3 | RS485_B | RS485 - |
| 4 | NC | |
| 5 | NC | |
| 6 | COM | Ground for RS485 and outputs |
| 7 | WR | Alarm output (active low) |
| 8 | RDY/PF | Encoder pulses |
| 9 | ZO | Encoder zero |
| 10 | RS485_Power | 5V in the datasheet, but seems to take 3.3V just fine |
These are designed to closely mimic the patterns provided by the stock OSSM firmware
- Simple
- TeasingPounding
- HalfHalf
- Deeper
- StopNGo
These are designed to take advantage of the features provided by OSSM-RS
- Torque
The list of patterns is stored under pattern/mod.rs
The easiest way to create your own is to copy, rename and modify one of the existing patterns in the pattern directory.
Don't forget to add it to pattern/mod.rs as well.
For details see the documentation of the Pattern trait and the related structs (PatternInput and PatternMove)
Open an issue if you want to see something added
- Off-the-shelf control board support
- Patterns
- R&D wireless remote support