Controlling Servos on FAST Expansion Boards¶
Understanding EXP board addressing
This command is used with FAST Expansion and FAST Breakout Boards via a FAST Serial Protocol (FSP) connection to the EXP Bus. Please read the EXP Overview to understand the operation of these commands and addresses.
The FAST Expansion board
FP-EXP-0071 has four servo ports. This page provides an overview of how you control them via the FAST Serial Protocol.
Since servos connect to expansion boards, you need to address your commands to the particular expansion board the servo is connected to in order to communicate with it. This is covered in the EXP Overview.
The FAST Serial Protocol has several commands for controlling "motors", which include servos, steppers, traditional motors, etc. Only a subset of the motor commands will be used for a particular motor type.
EM: Configure Motor¶
Before a servo can be used, it should be configured. The
EM: command is used to do this.
- INDEX - Which servo on the board are you configuring? 1-4. (TODO confirm, or is this 0-3?)
- 1 - What type of motor is this? Servos use a value of
- MAX_TIME_MS - what's the maximum time this servo is allowed to run? Powers it down after this, acts like a safety limit. Valid range is 0 - FFFF (which is 0 to 65,535ms)
- MIN - pulse time, in µS, for the servo to move to its minimum position. Default is
- MIX - pulse time for the servo to move to its maximum position. Default is
- NEUTRAL - pulse time for the servo to move to its home position. Default is
The default pulse times will most likely be fine for most servos. (Depending on what you bought, you might have access to a data sheet where you can see the exact values used.) In prac
servo pulse width trial and error, default is “standard”, 1 min, 2 max 1500 idle CM: command, address is what??
EM: index: servo port max_time_ms: max length of time it will allow, FFFF, what’s this for? Kinda like a failsafe? min, max, center, pulse in uS. 2 bytes each, 1000, 2000, 1500
Motors, which apply to servos? ML is highest value, MH is lowest MP: position is one byte 00-FF, time_ms is max
MH: Motor Home
MP: Motor Position
Documentation Feedback? Requests? Confused?
Hi! I'm Brian, and I'm responsible for the documentation at FAST Pinball. If you have any feedback, requests, corrections, ideas, or any other thoughts about this documentation, please let me know! You can email me at firstname.lastname@example.org. Thanks!
N or > jump the next page, P or < for previous, search with S or ?