Skip to main content

A simple command line tool for testing and moving servos

Project description

Servotest

Just another program to test servos if they work

image

This Project is a multi purpose diognostic tool for testing sts3215 servos (also standard pwm servos [i think]). I needed a way to bench mark my servos for my other projects to test if they even work.


YOU WILL NEED

STS3215 servos (obviously) Wonrabai/Waveshare bus servo Adapter (A): (Jumper set to Mode B) like this one https://www.amazon.com/Waveshare-Integrates-Control-Circuit-Supports/dp/B0CTMM4LWK/ (now optional! just enter test mode)

  • USB-C cable
  • 12V power supply (for the servo)

Safety: The servos are quite storong so please remove any obstructions and it has safety features like overcurrent protection and overtemperature protection BUT it can still break if you abuse it enough. Guardrails: Integrated error handling for disconnected hardware or serial collisions.


Installation

Installation

pip install servo_tester
servotest

Update the PORT variable in main.py to match your Device Manager (e.g., COM3 or /dev/ttyUSB0).


Configuration

Open Servo_Benchmark_tester.py in your text editor and check the top of the script:

  • Hardware Mode: Change PORT to match your Device Manager (e.g., COM3 on Windows or /dev/ttyUSB0 on Linux).

  • Test Mode: Change PORT to "TEST". This lets you run the script without any hardware connected. It will skip the serial check and print the raw hex packets to your screen in BRIGHT RED so you can verify the math and logic.


Select Your Mode

Run the script

  • Option [1] Automatic Benchmark: The script performs a "sanity check" sequence. It tests the absolute minimum (0), the absolute maximum (4095), and runs a "sweep-swoop" rapid response test before returning the servo to neutral.

  • Option [2] Live/Manual Mode: * Raw: Type a number between 0-4095 to move to a specific register position.

    Degrees: Type a number followed by d (e.g., 180d or 90.5d) to move to a specific angle.

    Exit: Type exit to return to the main menu.

  • [3] Macro mode: it will copy all the instrucitons made in the live mode and replay them in the same order.

  • [4] Clear Macro & Reset: it will clear all the instrucitons made in the live mode and replay them in the same order.



TROUBLESHOOTING

If you see a [GUARDRAIL] ERROR, check the following common issues:

  • Power: Is the 12V Power Supply actually plugged into the Driver Board? (USB alone won't move the servos).

  • Jumper: Is the jumper on the Waveshare board set to Mode B (USB Mode)?

  • Port Busy: Is another program (like Arduino IDE, Serial Monitor, or another Python instance) using your COM port?

  • Drivers: If the COM port doesn't show up in your Device Manager, you may need to install the CH340/CP2102 drivers for the adapter board.

  • If you (or a user) gets a "Permission Denied" error, they need to run one command to give themselves access to the "dialout" group: Linux Fix: sudo usermod -a -G dialout $USER (Then log out and back in).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

servotest-0.1.7.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

servotest-0.1.7-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file servotest-0.1.7.tar.gz.

File metadata

  • Download URL: servotest-0.1.7.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for servotest-0.1.7.tar.gz
Algorithm Hash digest
SHA256 d9159331f4c68e65cec5977a95ca1ce81697720f38f54ca4286adba36e1f8237
MD5 a04341721f8b3905e19540e417428983
BLAKE2b-256 350bddf91d5aaa1045595be01cedd74ec726bd7728bed0761446d878d77843de

See more details on using hashes here.

Provenance

The following attestation bundles were made for servotest-0.1.7.tar.gz:

Publisher: python-publish.yml on N30Yang/Servotest

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file servotest-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: servotest-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for servotest-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 a17e41bf661205d96092b24db5f8d9991f7e5d84744aa955e1c771e54e5c497c
MD5 4fe45857017858317017233f707ef8a5
BLAKE2b-256 65c719bff617cf9523f2bf6015563279f11c9f7ab55e1ee5f212115f7879484b

See more details on using hashes here.

Provenance

The following attestation bundles were made for servotest-0.1.7-py3-none-any.whl:

Publisher: python-publish.yml on N30Yang/Servotest

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page