logo elektroda
logo elektroda
X
logo elektroda

STB5100 and Mach3: Configuration and Issues

User question

stb5100 with mach3

Artificial Intelligence Response

Direct answer to the question

• Yes – the STB5100 is a 5-axis USB motion-control card that can be run from Mach3 via the dedicated “BL-UsbMach” (Novusun) plug-in.
• The board does not use (or need) the LPT/parallel-port driver; all step/dir timing is generated on the STB5100 itself.
• Correct operation depends on:
 – installing a plug-in that matches your Mach3 build,
 – supplying both logic-side (5 V USB) and field-side (12-24 V) power,
 – wiring step/dir, limit, e-stop and spindle pins exactly as listed in the board manual, and
 – understanding current limitations (no software-slave axis, max ≈ 100 kHz per channel, etc.).

Detailed problem analysis

  1. Hardware architecture
    • STB5100 contains a small MCU/FPGA that receives motion vectors from Mach3 over USB and generates deterministic step pulses (≤ 100 kHz, 2–5 µs min. pulse width).
    • It provides five step/dir outputs (XP|XD … BP|BD), four general-purpose opto-isolated outputs (OUT1-OUT4), five isolated inputs (IN1-IN5), a relay (RL-NO, RL-COM), a 0–10 V analog spindle output (VSO) and an MPG header.
    • Two power domains are mandatory:
      – +5 V from the USB-B connector (logic & PC-side of optos)
      – 12–24 V DC (> 0.5 A) on the 2-pin terminal (field-side of optos, relay coil, analog stage).
    • Because step generation is local, the PC no longer requires a deterministic kernel; Mach3 can therefore run on 32- or 64-bit Windows (XP → Win 11) as long as the plug-in loads.

  2. Software/plug-in chain
    • Only the “BL-UsbMach.dll” supplied by Novusun/Sainsmart will expose the STB-series controller to Mach3 (Config » Plug-in Control » BL-UsbMach).
    • Use Mach3 build 3.043.062-066; older or heavily patched versions sometimes fail to open the plug-in’s property page.
    • After enabling the plug-in you do not enter pin numbers under “Ports & Pins”; mapping is done once inside the plug-in dialog (figure 1). Mapping must match the silk-screen labels:

    Axis STEP (PUL-) DIR (DIR-) Enable
    X XP (Pin 2) XD (Pin 3) ENA (Pin 14)
    Y YP (Pin 4) YD (Pin 5)
    Z ZP (Pin 6) ZD (Pin 7)
    A AP (Pin 8) AD (Pin 9)
    B BP (Pin 16) BD (Pin 17)

    (Pin numbers shown are those printed on the PCB, not Mach3 LPT numbers.)

  3. Motion characteristics
    • Pulse width auto-scales with frequency but verify that the chosen driver (TB6600, DM542, etc.) can accept 3.3–5 V logic with ≥ 2 µs pulses.
    • Max reliable rate from field reports ≈ 80–100 kHz. At 8× micro-step and 200 step/rev, that is ≈ 375 mm/s on a 5 mm-pitch screw – plenty for hobby routers.

  4. Limitations and work-arounds
    • No axis-slaving in firmware. If you need gantry squaring, hardware-tie the A-axis STEP/DIR to Y (or buy a board whose firmware supports slaving, e.g. NVEM/NVUM 7-axis, UC300, SmoothStepper). Inverse DIR on only one side if motors are mirrored (simple 74HC04 inverter or use opposite driver polarity).
    • Only one on-board relay; external solid-state relays may be needed for coolant, vacuum, etc.
    • Analog spindle output is un-buffered; keep shielded twisted pair to VFD AVI/ACM and tie grounds.

  5. Typical commissioning sequence

    1. Install Mach3 → copy BL-UsbMach.dll to Mach3\PlugIns → start Mach3 → enable plug-in, restart.
    2. Attach USB cable, wait for USB-Serial driver (“USB-SPRING” or “Gameplay USB-Device”) to appear.
    3. Feed 12-24 V to the board, observe PWR LED.
    4. Enter the plug-in config, map XP→X step etc., set pulse polarity (+/-), set base frequency 100 kHz.
    5. Under “Motor Tuning” define Steps / Unit, Velocity, Accel (these values are still held by Mach3).
    6. Test each axis in MPG/Jog; if direction wrong flip DIR polarity inside plug-in.
    7. Wire IN1 = E-Stop (NC to GND), IN2-IN5 for limits, probe, etc. Enable in plug-in I/O page, set Active Low.
    8. For spindle:
      – Map PWM-out pin (often pin 1) to AO/VSO, tick “Use spindle motor output” and “PWM.”
      – Set PWM base 300–1000 Hz depending on VFD spec.
      – Map Output#1 to RELAY pin (pin 16/OUT1) and link to M3/M5.
    9. Save, power-cycle controller, retest with M3 S1000 and a multimeter (expect ≈ 2 V at VSO for S1000 if 0–10 V corresponds to 0–5000 rpm).

Current information and trends

• Novusun continues to update the BL-UsbMach plug-in (last public build mid-2023).
• Community patches add soft-limits and MPG MPG configuration; check CNCzone “STB5x00 thread.”
• Ethernet motion cards (ESS, UC300ETH, Planet-CNC) are gaining favor due to lower EMI sensitivity and real-time buffering; if you outgrow USB, migration is straightforward.
• Mach3 itself is end-of-life; future-proof projects can adopt Mach4 or UCCNC, but STB5100 is Mach3 only.

Supporting explanations and details

• Why no standard “Ports & Pins”? – Because USB cards implement virtual IO. The LL (low-level) driver in the card already knows which physical line is “Pin 2,” so Mach3’s legacy LPT bitmap is bypassed.
• Pulse/Dir topology: STB5100 uses common-anode wiring (PUL+/DIR+ permanently tied to +5 V). If your driver uses common-cathode, reverse the connections (DIR+ → 5 V, DIR- → XD).
• Charge-Pump: some board revisions expose a 12.5 kHz watchdog input; the plug-in can generate it from pin 17. Leave disabled unless you need fail-safe lockout.

Ethical and legal aspects

• Mach3 is closed-source, licence bound to one PC. Using a cracked copy violates ArtSoft EULA and may cause plug-in refusal.
• Always wire a physical e-stop in series with drive power; depending solely on USB for stop commands is unsafe.

Practical guidelines

• Mount the controller in a grounded metal enclosure to reduce radiated USB noise.
• Route step/dir as shielded twisted pair, 5 V single-ended, ≤ 30 cm if possible.
• Use ferrite bead on USB cable; disable Windows “USB selective suspend.”
• Keep the 0–10 V analog line separate from stepper wiring; add RC filter 100 Ω/0.1 µF at VFD input if erratic.
• If you experience intermittent disconnects, insert a powered USB hub or move the PC ground reference closer to machine ground.

Possible disclaimers or additional notes

• Because firmware is proprietary, custom features (rigid tapping, backlash comp at controller level) are not available.
• Reported freezing on Windows 10 22H2 stems from FTDI driver 2.12.x; revert to 2.10.x or use Zadig-libusbk.

Suggestions for further research

• Investigate open-source motion stacks (GRBL-ESP32, FluidNC) if you need Ethernet, web UI, or g-code streaming from SD.
• Compare jitter and throughput of STB5100 vs ESS/UC400 vs DDS-controlled STM32 boards.
• Look up IEC 60204-1 for machinery safety wiring, and ISO 13849-1 for e-stop performance levels.

Brief summary

The STB5100 + Mach3 ensemble is an inexpensive path to 5-axis hobby CNC control. Install the correct BL-UsbMach plug-in, power the board’s two domains, map axes inside the plug-in (not Ports & Pins), respect its limitations (no firmware slaving, ≤ 100 kHz step), and pay attention to shielding and grounding. For higher reliability or advanced features you may eventually migrate to Ethernet or Mach4-class controllers, but for light-duty routers, plasma tables and engravers the STB5100 remains a viable, budget-friendly option.

User question

os master salwe

Artificial Intelligence Response

Direct answer to the question

  • Your phrase “os master salwe” looks like a typo. Do you mean: 1) OS master–slave (leader–follower) architecture in operating systems, or
    2) Master/slave (axis slaving) in CNC motion control (e.g., Mach3/STB5100)?
  • Brief key points for each:
    • OS: Classic asymmetric multiprocessing (AMP) where one “master” CPU schedules/controls “slave” CPUs. Today we prefer leader–follower/primary–secondary terminology.
    • CNC: Some motion controllers support a “slave axis” that mirrors a master axis; low-cost USB boards like the STB5100 typically lack true software slaving under Mach3 and require hardware signal splitting.

Please confirm which topic you meant so I can focus the details. Provisional, consolidated guidance follows for both.

Detailed problem analysis

  • Operating systems (OS) master–slave (leader–follower)

    • Concept: In AMP, a designated master processor performs OS duties—task scheduling, I/O coordination, interrupt handling—while other processors execute tasks assigned by the master. This simplifies coordination but can bottleneck at the master under heavy load.
    • Contrast with SMP: In symmetric multiprocessing, all CPUs run the same OS image with peer scheduling; better scalability but higher complexity (cache coherency, locking, NUMA awareness).
    • Where AMP still appears: Heterogeneous SoCs (e.g., big.LITTLE, MCU+DSP/AI accelerators) where a general-purpose core orchestrates specialized cores via mailboxes, shared memory, or RPMsg/virtIO.
  • CNC/motion control axis master–slave (leader–follower)

    • Objective: Drive two or more motors in lockstep for a single axis (e.g., dual‑Y gantry) and optionally square the gantry via independent homing.
    • Two approaches:
    • Software slaving: The controller/plug‑in duplicates trajectory data to multiple axes and supports independent home switches per motor for auto‑squaring.
    • Hardware slaving: Physically parallel the step/dir signals from a single axis to two drivers. Both motors always move together; independent homing/squaring is not available.
    • STB5100 with Mach3 specifics (commonly encountered):
    • The Mach3 USB plug‑in for STB5100 does not implement Mach3’s software slaving. Practical result: you wire Y STEP/DIR to both Y and A drivers (hardware slaving). If the motors face opposite directions, invert DIR on one driver or in its wiring.
    • Limitations: No independent homing for auto‑squaring; any racking must be corrected mechanically or by manual alignment. EMI hygiene and grounding are essential due to USB susceptibility.

Current information and trends

  • Terminology: “Master/slave” is being replaced by neutral, descriptive terms:
    • OS/distributed systems: leader–follower, primary–replica.
    • Buses/devices: controller–peripheral/target.
    • Motion control: master axis–follower axis.
  • Architectures:
    • OS: SMP dominates general-purpose systems; AMP persists for heterogeneous embedded designs.
    • CNC: Ethernet motion controllers (e.g., ESS-class, UCxxx-class) are preferred for robust software slaving and independent homing; Mach3 is legacy, with migrations to Mach4 or LinuxCNC for better controller support.

Supporting explanations and details

  • AMP timing path (OS):
    • Master handles timer ticks, dispatch, and interrupt affinity; workers execute runnables. Shared memory regions and inter-processor interrupts (IPIs) carry work items and signals.
  • SMP vs AMP practical trade-offs:
    • SMP: higher throughput, better core utilization; requires scalable locks, RCU, fine-grained interrupt distribution.
    • AMP: deterministic control and simpler verification in safety-critical embedded contexts; potential single-point scheduler bottleneck.
  • CNC hardware slaving wiring sketch:
    • Controller Y STEP → both drivers’ STEP+; Y DIR → both drivers’ DIR+; share grounds; set one driver’s DIR polarity opposite if the motor orientation is mirrored. Keep twisted, shielded pairs; short runs for STEP/DIR; star ground to chassis.

Ethical and legal aspects

  • Language: Avoid “master/slave” in documentation where possible; use leader–follower or primary–replica.
  • Safety (CNC): Implement hard E‑stop that drops motor power contactors; do not rely on USB/software stop. Follow machinery safety practices (e.g., interlocks, proper grounding, fusing).

Practical guidelines

  • If you meant OS (AMP vs SMP):
    • Choose AMP when coordinating heterogeneous cores or when determinism and certification simplicity dominate.
    • Choose SMP for general compute scalability; design with cache-aware data structures, lock minimization, NUMA locality.
  • If you meant CNC axis slaving:
    • With STB5100 + Mach3:
    • Use hardware slaving: parallel Y STEP/DIR to both drivers; verify direction and steps/unit.
    • Home/square: Without independent homing, square mechanically; use alignment jigs and dial indicators; periodically re-check.
    • Mitigate EMI: shielded cables, grounded enclosure, ferrites on USB, separate power/signal routing.
    • Need auto‑squaring: Move to a controller that supports true software slaving and dual home switches per side.

Possible disclaimers or additional notes

  • Details vary by controller firmware and plug‑in revisions; always verify capabilities against your exact hardware/plug‑in version.
  • Mach3 is end-of-life; controller vendors’ plug‑in quality differs widely.

Suggestions for further research

  • OS: Examine leader–follower scheduling patterns, IPC via shared memory + IPIs, and heterogenous compute frameworks (e.g., OpenAMP).
  • CNC: Investigate Ethernet motion controllers with independent homing support; review best practices for gantry machines (dual encoders, stall detect, closed-loop steppers/servos).

Brief summary

  • OS context: “Master–slave” maps to AMP, with one leader CPU orchestrating followers; SMP is today’s norm for scalable performance.
  • CNC context: Low-cost USB boards like STB5100 lack true software slaving under Mach3; use hardware slaving or upgrade controllers for independent homing/squaring.
  • Please confirm which domain (OS vs CNC) you’re targeting, and share your hardware/software stack if it’s CNC so I can provide exact wiring diagrams and parameter settings.

Ask additional question

Wait...(2min)
Disclaimer: The responses provided by artificial intelligence (language model) may be inaccurate and misleading. Elektroda is not responsible for the accuracy, reliability, or completeness of the presented information. All responses should be verified by the user.