Plantmate DIY automatic tubing cutter with OLED unit choices and firmware version 2.3.0

Plantmate DIY Tubing Cutter Firmware v2.3.0: The Version 2 Update

The original DIY Tubing Measurement and Cutter Project showed how an Arduino-controlled machine can automatically feed flexible tubing to a programmed length and cut repeatable pieces. Firmware v2.3.0 is the latest release in the Version 2 series and is a substantial upgrade over the 1.x code published with that project.

Version 2 keeps the same core idea—a rotary encoder, 128 × 64 OLED, Arduino Nano, TB6600-controlled NEMA 23 stepper, and servo-operated cutter—but makes the machine easier to set up, easier to calibrate, and safer to operate within the limits of the existing hardware.

Download firmware v2.3.0 and read the complete Version 2 User’s Manual (PDF).

If you are starting a new build, the matched components are available in the Complete Hardware Kit for the DIY Tubing Measurement and Cutter Project.

What is new in Version 2?

Enter long lengths in mm, cm, or m

The newest v2.3.0 feature is a selectable length unit. Job length can now be displayed and edited in:

  • millimetres (mm)
  • centimetres (cm)
  • metres (m)

This makes long jobs much faster to enter. Instead of turning the encoder all the way from 100 mm to 10,000 mm, select metres and enter 10.0000 m directly.

The physical length is always retained internally at 0.1 mm precision. Changing the displayed unit does not change or round the programmed cut length; it only changes the way that length is shown and the size of each encoder adjustment.

Same physical length OLED display
Millimetres 1500.0 mm
Centimetres 150.00 cm
Metres 1.5000 m

While editing Length:

Selected unit Slow encoder turn Faster continuous turn
mm 0.1 mm 1 mm
cm 0.1 cm 1 cm
m 0.1 m 1 m

The selected unit is saved in EEPROM and restored after power is turned off.

Verify the first piece before continuing

After the first piece is fed and cut, Version 2 disables the stepper driver and pauses at CHECK PIECE 1. The operator can measure the piece before committing material to the rest of the batch.

  • Continue runs the remaining quantity with the same settings.
  • Adjust abandons the batch and returns to Job Settings.
  • End abandons the batch and returns Home.

This simple checkpoint can prevent an incorrect setting, tubing slip, or changed setup from producing an entire batch of unusable parts.

Calibrate from an actual 500 mm feed

The older firmware calculated feed distance from nominal roller dimensions. Version 2 uses a measured steps-per-metre calibration.

Select Setup → Cal500 and the machine performs a feed-only movement that it currently believes is 500.0 mm. Measure the actual movement, enter that result, and save it. For example, if the tubing moved 487.6 mm, enter 487.6—not 500.0.

This method compensates for the installed roller, gearing, microstep setting, and normal tubing compression. Repeat the test once to verify the result before production.

Recalibrate after changing tubing size or material, roller pressure, roller diameter, TB6600 microstepping, gearing, couplings, or any other part that affects feed distance.

Safer setup tools

The Setup menu now includes:

  • Feed-only jogs of -100, -10, -1, +1, +10, and +100 mm
  • The 500 mm measured-feed calibration routine
  • A guarded Blade Test with a confirmation screen

The jog controls make it easier to verify feed direction and movement in small steps. Blade Test requires the operator to confirm that the blade area is clear before running one Cut-and-Safe cycle.

Adjustable timing and servo endpoints

Version 2 adds settings for:

  • Settle: wait after feeding before the blade moves
  • Cut hold: extra time at the Cut angle
  • Retract: extra time after the blade is commanded back to Safe
  • Safe angle: the commanded blade-clear servo position
  • Cut angle: the commanded cutting position

Timing values are shown in 0.1-second units. For example, 12 means 1.2 seconds. Servo endpoints can be adjusted from 0 to 180 degrees, and Safe and Cut must be different.

These controls allow the firmware to match the installed mechanism without editing and recompiling the Arduino sketch. Always make small endpoint changes and use the guarded Blade Test before production.

More reliable motion and saved settings

The Version 2 motion sequence includes explicit TB6600 direction setup, a 10 microsecond STEP pulse, controlled acceleration, movement timeouts, and state-based operation. The encoder continues to be checked for a stop request during timing-critical feed and blade stages, even when OLED updates are paused.

Settings are stored with a version identifier, range checks, CRC validation, and readback verification. Stored values include length, unit, quantity, speed, measured-feed calibration, timing, and servo endpoints.

OLED layout designed for the 0.96-inch screen

Menus and status screens have been reorganized for the project’s 0.96-inch, 128 × 64 SSD1306 OLED. Values, units, selection frames, progress information, and action buttons are aligned to remain inside the display area.

Hardware compatibility

Firmware v2.3.0 is intended for the fixed Arduino Nano version of the Plantmate TB6600/NEMA 23 tubing cutter described in the Version 2 User’s Manual.

Function Arduino Nano pin
Encoder DT D2
Encoder CLK D3
Encoder switch D4
Servo signal D5
TB6600 enable D12
TB6600 direction A0
TB6600 pulse/step A1
OLED SDA A4
OLED SCL A5

The firmware expects the installed common-cathode TB6600 interface, an SSD1306 128 × 64 I2C OLED, and the pin assignments above. Do not upload it to a differently wired machine without first reviewing and adapting the code.

Important differences from the 1.x article

  • Version 2.3.0 offers mm, cm, and m. The older ft and in interface options are not included.
  • Settings written by the original 1.x firmware are not guaranteed to migrate. Record your current values before upgrading and plan to recommission the machine.
  • Existing valid v2.2 settings retain their exact physical length; the display initially defaults to mm if no unit preference has been saved. Compatible v2.1 metric settings can be migrated.
  • The Version 2 User’s Manual replaces the operating and safety instructions in the original 1.x article wherever they differ.

If your workflow requires feet or inches, or your wiring does not match the table above, remain on your current firmware until the Version 2 code has been adapted and tested for that requirement.

How to upgrade to v2.3.0

Before uploading

  1. Finish any active job and disconnect the machine’s input power.
  2. Write down or photograph the current length, quantity, speed, calibration, servo angles, and timing settings.
  3. Confirm that the controller is an Arduino Nano and that the wiring matches the Version 2 pin table.
  4. Inspect the blade, feed rollers, servo linkage, wiring, and guards before returning the machine to service.

Arduino software requirements

The sketch uses these libraries:

  • U8g2, including MUI/MUIU8g2
  • Versatile_RotaryEncoder
  • AccelStepper
  • Servo (included with the Arduino AVR platform)
  • EEPROM (included with the Arduino AVR platform)

Install missing libraries through the Arduino IDE Library Manager before compiling.

Upload procedure

  1. Download the v2.3.0 ZIP package.
  2. Extract the ZIP. Open Tubing_Cutter_TB6600_NEMA23_200/Tubing_Cutter_TB6600_NEMA23_200.ino.
  3. In Arduino IDE, select Arduino Nano and the processor/bootloader that matches your Nano. Many classic Nano clones require ATmega328P (Old Bootloader).
  4. Select the correct serial port.
  5. Verify/compile the sketch, then upload it.
  6. Disconnect USB and input power before reconnecting or servicing machine wiring.

Recommission after the upgrade

  1. Keep clear when power is applied. At startup, the firmware commands the servo to the saved Safe angle and waits before showing Home.
  2. Physically verify that the blade is clear. The controller cannot sense blade position.
  3. Review Unit, Length, Qty, Speed, timing, Safe angle, and Cut angle; then select Save.
  4. Use the smallest feed jog to verify direction.
  5. Run a guarded Blade Test with the tubing and blade area clear.
  6. Perform Cal500 using the production tubing and roller pressure.
  7. Run a quantity-1 test and measure the finished piece.
  8. Begin production only after the complete feed-and-cut cycle has been verified.

Version 2 quick user guide

The complete operating and safety information is available in the separate Tubing Cutter v2.3.0 User Guide blog post and in the downloadable PDF manual. This section is a quick reference for trained operators.

Encoder controls

  • Turn: move between fields or change a value.
  • Short press: select a button or enter/leave numeric editing.
  • Unit field: each press cycles mm → cm → m → mm.
  • During feeding or cutting: one press requests SOFTWARE STOP.
  • In a normal menu: press and hold to request SOFTWARE STOP.

A single frame marks the selected field. A double frame means a numeric value is being edited.

Set and run a job

  1. Power on and wait for the STARTUP sequence to finish.
  2. Visually confirm that the blade is physically clear.
  3. On Home, select Modify.
  4. Set Unit, Length, Qty, and Speed.
  5. Select More if timing or servo settings need adjustment; otherwise select Save.
  6. Return to Home, confirm the displayed job, and select Start.
  7. Supervise the feed and cut. Do not leave the machine unattended.
  8. At CHECK PIECE 1, measure the first piece and select Continue, Adjust, or End.
  9. At DONE, verify that motion has stopped and the blade is clear before handling finished pieces.

For a 1.5 m piece, choose m and set Length to 1.5000 m. For 10 m, use faster continuous turns for 1 m changes, then slower turns to trim in 0.1 m increments.

Calibrate the feed

  1. Verify that the blade is physically clear.
  2. Load the normal production tubing at the normal roller pressure.
  3. Establish a repeatable measurement reference.
  4. Select Setup → Cal500.
  5. Measure the actual movement after the feed stops.
  6. Enter the measured value from 250.0 to 750.0 mm and select Save.
  7. Repeat Cal500 to verify the correction.

Calibration performs feed motion only; it does not cut.

If something moves unexpectedly

Press the encoder to request SOFTWARE STOP. The controller stops issuing step pulses, sends the TB6600 disable level, commands the saved Safe angle, and latches the stop screen after the retract wait.

SOFTWARE STOP is not a hardware emergency stop. This machine has no hardware emergency-stop circuit, no blade-position sensor, and no tubing feed/presence sensor. A stop or retract message confirms only that the controller issued a command—it does not prove that power was removed or that the mechanism moved successfully.

If the machine is not physically safe, disconnect its input power without entering the hazard area. Disconnect power before clearing a jam, replacing a blade, touching the feed mechanism, adjusting mechanical parts, or checking wiring.

After correcting the cause, wait for motion to finish, select RESET, and physically verify the blade-clear position. An interrupted batch is cancelled and does not resume automatically.

Version 2 changelog summary

v2.3.0

  • Added selectable mm, cm, and m length display and entry.
  • Added unit-aware encoder increments for fast long-length setup.
  • Preserved one canonical physical length at 0.1 mm precision.
  • Saved the selected display unit separately without changing the physical length record.

v2.2.x

  • Added 0.1 mm length storage and measured steps-per-metre calibration.
  • Added first-piece verification before continuing a batch.
  • Added ±1, ±10, and ±100 mm setup jogs.
  • Added feed-only Cal500 and guarded Blade Test workflows.
  • Added adjustable feed-settle, cut-hold, retract, Safe-angle, and Cut-angle settings.
  • Added explicit TB6600 direction setup, 10 microsecond step pulses, state-based motion, and stop scanning during active operation.
  • Added settings validation, CRC protection, and EEPROM readback verification.
  • Reworked the menu and operating screens for the 128 × 64 OLED.

Download firmware and the full manual

The release package contains the Arduino sketch and Version 2 documentation needed to install and operate the update:

  • Tubing_Cutter_TB6600_NEMA23_200.ino
  • Tubing_Cutter_TB6600_NEMA23_200_User_Manual.pdf
  • Editable Markdown copy of the manual

Download the Plantmate Tubing Cutter v2.3.0 ZIP package

Download the Version 2 User’s Manual (PDF)

Please read the complete User’s Manual before commissioning or operating the machine. The manual covers setup, calibration, job operation, software stop behavior, error messages, troubleshooting, inspection, maintenance, stored settings, and the fixed Arduino Nano connections.

Build or upgrade your machine

Need the matched mechanical and electronic components? See the Complete Hardware Kit for the DIY Tubing Measurement and Cutter Project.

For the original build background and mechanical project overview, visit the DIY Tubing Measurement and Cutter Project. When using firmware v2.3.0, follow the new Version 2 User’s Manual for current setup, operation, and safety information.

Version 2 makes the tubing cutter much more practical for everyday use—especially for long lengths—while adding the calibration, first-piece check, and setup controls needed for more predictable batches. As with any machine containing a powered feed system and moving blade, it must always be commissioned carefully and supervised by a trained operator.

Leave a Reply

Your email address will not be published. Required fields are marked *