Reference
Last revision 2026/01/27
PPM interface
PPM interface, a very important parameter is PPM extreme, there are two species way to set it.First, send instruction through UART interface; second, it is in Set set mode, while led Status1 and Status2 flashing, user using remote control model put the corresponding bar in its extreme location respectively stays about 3 seconds, the drive will automatically recognize threshold value. In this process, if S1 and S2 have already hold right PWM input, Drive will calculate reliable limits according to the signals, if there is only one correct PWM input, then the drive will use this signal as an final limit values. Certainly, you can also send PWM signals of the two limit positions through AVR, regardless of which method you use, PPM limit value shall not exceed the scope 500us-2500us. Since the use of PPM interface, any other configuration parameters can be set directly apart from PPM extreme, if you do need to set up the relevant parameters, you must configure them using UART interface. All the fault messages, it should be checked with above 1.10 table in Protection. In addition, both in open-loop or closed-loop control mode, the relationship between PPM signal and motor speed are described as the figure below (Note: when the signal is below the minimum limit value or above the maximum limit value, the drive will not respond).

Instruction
This version's instruction set system, a total of 44 instructions, does not distinguish between uppercase and lowercase, all instructions, whether were sent or returned, there will be "Enter + line feed (\r\n)" as a command terminator. All system parameters can be grouped into the Immediate variable parameter and non-immediate parameters, these parameters will be saved (EEPROM) when return in response to "read drive configuration parameters" command even if off power, the remaining parameters will lost (RAM).
- Immediate variable parameter is that user setting takes effect immediately (Note: need to perform "EEPSAV" to saves all present configuration parameters in order to ensure those will not lost if power off), including each motor’s acceleration/deceleration, PID parameters asynchronously and synchronous speed (Note: asynchronous and synchronous speed are in detail below).
- Non-Immediate variable parameter refers to what have set to be only saved in the EEPROM ,after the system was reset, it can take effect.
To allows user’s program easily interpreting the return directive package, overview the whole set of instructions throughout the drive, in addition to directives"RCONFIG"(read drive configuration parameter), all configuration parameters are read in the one-argument form. Follow passage will analyze each instruction meticulously start with the address1 of drive :
Query drive type (ID,PING\r\n) The type of Veyron motor drive series can be accessed through this command, such as: send the order to brush DC motor drive, returns "BDC\r\n".
- Send: 1,PING\r\n
- Return: BDC\r\n
Read the drive configuration parameters (ID,RCONFIG\r\n) Through this directive, will get all the configuration parameters of the drive, after you set the parameters, you can query parameters whether have been changed according to the requirements with this directive, if it has been changed, and it had to be saved in the EEPROM, it’s available to use "save all current configuration parameter" command mentioned bellow, then the parameters can be saved.
- Send: 1,RCONFIG\r\n
- Returns: (drive all configuration parameters)
Restore factory settings (ID,FCONFIG\r\n) All configuration parameters restore to factory settings with this command, drive will automatically reset once receiving the instruction and allow the configure to factory parameters.
- Send: 1,FCONFIG\r\n
- Returns: none
Query Help (ID,HELP\r\n) The instruction help you get the wiki address of DFRobot products, user can search the drive models on this page, then can get corresponding document.
- Send: 1,HELP\r\n
- Returns: (wiki addresses of the DFRobot products)
Save all the configuration parameters (ID,EEPSAV\r\n) By the instructions to save the current configuration parameters, before saving, it’s better to use the "read drive configuration parameter" command to confirm whether the current configuration parameters are setting values, drive will automatically reset once receiving the instruction and allow the configure to factory parameters.
- Send: 1,EEPSAV\r\n
- Returns: none
Set the baud rate (ID,SBR,********\r\n) This drive supports 10 commonly used baud rate, respectively, 1200, 2400, 4800, 9600, 14400, 19200, 28800, 38400, 57600, 115200, the factory default value is 57600. For example, set the baud rate to 115200
- Send: 1,SBR,115200\r\n
- Returns: none
Set the drive addresses (ID,SNA,***\r\n) Drive’s range of addresses is 1~126, the factory default value is 1. When multiple drives running in parallel, two of the same bus address are not allowed. Different address drive, as receiving instructions from host at the same time, response only if the address is identical with itself, or 0 (broadcasts) . For example, the drive address is set to 8
- Send: 1,SNA,8\r\n
- Returns: none
Get the number of cumulative pulse encoder (ID,GEP,*\r\n) This command allows to gets the encoder's pulse numbers accumulated, the range is: -2147483648~2147483647, drive will quadruple the signal of encoder PWM if phase difference of 90 °, if the actual encoder has 200 lines, the drive will turn it into a 200x4=800 line through the internal hardware, so far the drive only supports incremental encoder. For example, to get the number of cumulative pulse encoder of M1
- Send: 1,GEP,1\r\n
- Returns: (actual accumulated pulse number, notice that there are positive and negative, symbols for
directions)
Reset encoder cumulative number of pulses (ID,CEP,*\r\n) The instruction specifies a way to reset encoder cumulative number of pulses to zero of one motor. For example, to reset encoder cumulative number of pulses to zero of M1
- Send: 1,CEP,1\r\n
- Returns: none
Set encoder line (ID,SER,****,####\r\n) By setting this directive, it can be applied to two motors (M1/M2) encoder line, note: when you set the encoder lines, both must be set, you cannot set a certain route alone. The factory default value is 1. For example,set M1 encoder line to 100, M2 to 200
- Send: 1,SER,100,200\r\n
- Returns: none
Set reduction ratio (ID,SGR,****,####\r\n) Two motors’ gearbox reduction ratio can be set with the instruction (M1/M2), actual controlling and output speed is the actual load speed. Users may set this to 1 to get the really true speed of motor. In addition, the drive supports decimal reduction ratio, accurate to 2 decimal digits. The factory default value is 1.
For example, to set the reduction ratio of the M1 to 12.34 and set reduction ratio of M2 to 23.45
- Send: 1,SGR,12.34,23.45
- Returns: none
Set direction mode (ID,SDIR,*\r\n) In most applications, the motor is sometimes required to run in clockwise, but sometimes counterclockwise, we call it as bidirectional control mode. However, in a number of engineering applications, it only rotates in one direction, we call it one-way control mode. In fact these modes are same in the UART interface, but in PPM and Analog mode is rather different, on the one hand it is prone to human manipulation errors, on the other hand the precision of the input signal is reduced by half. This drive can be easily set to one type of orientation mode: configuration parameter of 0 indicates a one-way mode, 1 indicates a two-way control mode. The configuration parameters are valid only in Analog mode and PPM, the factory default value is 1.
For example, direction of the drive mode is set to one-way mode
- Send: 1,SDIR,0\r\n
- Returns: none
Set the PWM signal generating method (ID,SPWM,*\r\n) There are two independent N-Mosfet full bridge driver circuits, Mosfet gate drive signals of most drives cannot be set by user, in order to meet the needs of some users, we set three modes which can be selected, corresponding relationship between PWM generation and configuration parameters are as follows: 0:Hpwm-Lon 1:Hpwm-Lpwm (on-off) 2:Hpwm-Lpwm (on-off-on, the factory default value) For example, Mosfet driver signal is set to Hpwm-Lpwm (on-off) (Note: the pattern is completely complementary mode)
- Send: 1,SPWM,1\r\n
- Returns: none
Set zero signal detection or not when start (ID,SSD,*\r\n) Only in the PPM or Analog interface mode, and the direction mode is one-way,the zero signal detection when start is available to set. For most of one-way control mode applications, there are more stringent security requirements, such as in PPM or Analog interface mode, because these modes without acceleration/deceleration feature are servo-controlled, System suddenly reset causes violent impact to load, when the motor holds dangerous loads, it will be a threat to personal safety. In this case, you can start the zero signal detection to enhance security. When system suddenly reset motor at rest, only after the control signals is near to stop before they can engage in normal controls. Configuration parameter of 0 indicates to disable the zero signal detection, of 1 means enable zero-signal detection, the factory default value is 0.
For example, to enable zero-signal detection
- Send: 1,SSD,1\r\n
- Returns: none
Gets the current rotation speed (ID,GVC,*\r\n) Note: in a closed-loop control mode, return speed value is the current output speed after deceleration, the unit is r/min; in open loop control mode, the return parameter is the quantification speed set last time. For example, to get the M1 's current speed
- Send: 1,GVC,1\r\n
- Returns: (current actual output speed)
Get the maximum rotation speed (ID,GVM,*\r\n) In closed-loop control mode, the maximum speed of the motor is detected automatically in SET mode after a deceleration maximum speed, the unit is r/min, when the user's configuration speed is higher than the value, the directive will not respond; in open loop control mode, the maximum speed for quantifying is fixed at 1000. Such as accessing to M1 of maximum speed
- Send: 1,GVM,1\r\n
- Returns: (the maximum speed of the motor, the road)
Set synchronous speed (ID,SVS,*,*****\r\n) Synchronous speed refers to the speed once you have set, the drive will immediately regulate motor speed according to the parameters, aware that synchronous speed should not exceed the maximum speed, otherwise the drive will not respond to this command. For example, to set the synchronous speed of the M1 to 100r/min
- Send: 1,SVS,1,100\r\n
- Returns: none
Set asynchronous speed (ID,SVR,*,*****\r\n) Synchronous speed refers to the speed once you have set, the drive will Not immediately regulate motor speed according to the parameters, only when it receives command-Perform asynchronous speed before it can take effect. If need simultaneous control of multiple motors, by setting asynchronous motor speed to each motor, and then sent by radio to perform asynchronous speed commands.
For example, to set the asynchronous rotational speed M1 to 100r/min
- Send: 1,SVR,1,100\r\n
- Returns: none
Perform asynchronous speed (ID,AVR,*,#\r\n) The directive should perform with "set asynchronous speed" instruction to realize strict synchronization of multiple motors. The two parameters which are not corresponding to the mentioned above corresponding to the M1,M2 (1, 2), both values can only be 0 or 1, 0 signifies that the motor is not performing an asynchronous speed, 1 indicates that the road to perform asynchronous speed. *- the parameter to M1,#- the parameter to M2. For example, performing asynchronous speed to M1, M2 does not perform asynchronous speed
- Send: 1,AVR,1,0\r\n
- Returns: none
Get Acceleration (ID,GACC,*\r\n) In a closed-loop control mode, acceleration is r/min/s; in open-loop mode, is a quantitative parameter, no matter the open-loop or closed-loop control, acceleration acts on motor speed. To this drive, when speed’s absolute value increased or the speed is in opposite direction, the absolute value of the rate of velocity changing is the acceleration values, but not like other regular drives which changes the absolute value of the rate of deceleration slowing to 0, then accelerate up to the value of target velocity when the direction changes. For example, to access to the M1 acceleration
- Send: 1,GACC,1\r\n
- Returns: (the motor acceleration)
Get reduced speed (ID,GDEC,*\r\n) In closed-loop control mode, the speed reduction unit is r/min/s; in open-loop mode, is a quantitative parameter, no matter the open-loop or closed-loop control, acceleration acts on motor speed. When the direction of the motor is consistent, and absolute value decline,the rate of change of velocity are deceleration values. For example, to get the deceleration value of M1
- Send: 1,GDEC,1\r\n
- Returns: (the road motor deceleration values)
Set increase or decrease speed (ID,SAD,*,*****,#####\r\n) The directive sets motor acceleration/deceleration values at the same time. In closed-loop control mode, the speed reduction unit is r/min/s; in open-loop mode, is a quantitative parameter. Such as acceleration of M1 is set to 50, the deceleration is set to 100
- Send: 1,SAD,1,50,100\r\n
- Returns: none
Get the PPM Max (ID,GPA\r\n) PPM Max factory default value is 2500us.
- Send: 1,GPA\r\n
- Returns: (PPM maximum)
Get the minimum PPM (ID,GPI\r\n) PPM minimum factory default value is 500us.
- Send: 1,GPI\r\n
- Returns: (PPM minimum)
Set PPM extreme (ID,SPPM,****,####\r\n) Drive PPM maximum can be set in two ways, one is in SET mode, the automatic recognition of PPM maximum, the specific method will be introduced in PPM interface. Second: user can reset PPM maximum in UART interface. Regardless of which method, all PPM minimum value must be guaranteed not less than 500us,the maximum PPM value is less than 2500us. For example, to set PPM control signals of the drive the minimum and maximum value respectively for 1000us and 2000us
- Send: 1,SPPM,1000,2000\r\n
- Returns: none
Get the control signal mode (ID,GSM\r\n) Drive control signal patterns into the sustainable mode and discontinuous mode, sustainable mode refers to drive will keep the parameters set before once it received a valid control signal,it will changed until it receives new parameters. Discontinuous mode is that the drive will stop working once valid control signal is not received within a stipulated time, and indicates a failure of losing signal(a specific time, please refer to "set a break mode time limit" directive). In addition, the control signal mode is valid only for PPM and UART interfaces. Return parameter of 0 indicates that continuous mode and 1 indicates a break mode, the factory default value is 0.
- Send: 1,GSM\r\n
- Returns: (current control signal mode)
Set the control signal mode (ID,SSM,*\r\n) For example, the control signal mode is set to continuous mode
- Send: 1,SSM,1\r\n
- Returns: none
Set time limit of break mode (ID,SDCT,****\r\n) Discontinuous mode time limit, the maximum can be set to 10s, its timebase is 10ms. For example, to set the discontinuous mode time to 1s
- Send: 1,SDCT,100\r\n
- Returns: none
Get the PID parameter- Kp (ID,GKP,*\r\n) For example, to get the parameter of M1 velocity loop PID- Kp
- Send: 1,GKP,1\r\n
- Returns: (the current Kp values M1)
Get the PID parameter- Ti (ID,GTI,*\r\n) For example, to get the parameter of M1 velocity loop PID- Ti
- Send: 1,GTI,1\r\n
- Returns: (current Ti values M1)
Get the PID parameter- Td (ID,GTD,*\r\n) For example, to get the parameter of M1 velocity loop PID- Td
- Send: 1,GTD,1\r\n
- Returns: (the current Td values M1)
Set the PID parameters (ID,SPID,,******,##,&&\r\n) M1 and M2 velocity loop PID parameters of the drive is completely independent, including scale parameter, integral, differential parameter. These three parameters can be used in SET mode, the drives will auto-tune based on the load on the motor, draw the ideal parameter values, which greatly facilitates the use. Of course, the drive did not deny user configuring on their own, the three parameters can be set up through the directive, user can observe practical effects of speed servo combined with "real-time output motor speed" instruction and related software. For example, to set PID parameters of M1, Kp, Ti, Td is respectively to 0.2, 4, 1
- Send: 1,SPID,1,0.2,4,1\r\n
- Returns: none
To get the maximum permissible continuous current (ID,GMCC\r\n) Actual current is greater than the maximum permissible continuous current, and less than the maximum permissible peak current, allowing time for 2s, larger than the 2s, the motor will stop automatically and indicates overcurrent fault, factory default is 25000, unit- mA.
- Send: 1,GMCC\r\n
- Returns: (maximum permissible continuous current)
To get the maximum permissible peak current (ID,GMPC\r\n) Actual current is greater than the maximum permissible peak current, allowing over 400ms, greater than 400ms, the motor will stop automatically, and indicating over current fault, the factory default value is 30000, mA.
- Send: 1,GMPC\r\n
- Returns: (maximum permissible peak current)
To get the current current (ID,GCC,*\r\n) Such as access to M1 current current
- Send: 1,GCC,1\r\n
- Returns: (M1 current, unit is mA)
To set the maximum permissible continuous current and maximum permissible peak current (ID,SMLC,*****,#####\r\n) The maximum permissible continuous current should not exceed 25000, maximum permissible peak current shall not exceed 30000. Noteworthy is that the two motors share the same parameter. For example,to set the maximum permissible continuous current and maximum permissible peak current, respectively to 12000mA and 15000mA
- Send: 1,SMLC,12000,15000\r\n
- Returns: none
To get the maximum allowed temperature (ID,GMT\r\n) Drive temperature measuring range:-10~100℃, resolution of 1 degree Celsius.
- Send: 1,GMT\r\n
- Returns: (maximum allowable temperature unit: ℃)
To get the current temperature (ID,GCT\r\n) If the current temperature is greater than 40 ° c, fan drive interface will output 5V/500mA power, user can add-in a 5V fan or relay control power fan, to cool the drive off, when the temperature drops below 35 degrees Celsius, power supply will be disconnected. If there is no cooling measures or do not work, when the internal temperature is higher than the maximum allowable temperature, the motor stops, and also indicates over- temperature fault.
- Send: 1,GCT\r\n
- Returns: (drive temperature near the current power driver IC ,unit: ℃)
To set the maximum allowable temperature (ID,SMT,***,\r\n) Maximum allowable temperature value cannot be greater than 100 ℃, if it dose, the drive will not respond to the Setup instructions. For example, to set the maximum allowable temperature at 50 degrees Celsius
- Send: 1,SMT,50\r\n
- Returns: none
To get the system voltage (ID,GSV\r\n) If when the system voltage exceeds the limit voltage range, the motor will stop and then indicates the undervoltage or overvoltage fault.
- Send: 1,GSV\r\n
- Returns: (the current *10 system voltage at a resolution of 0.1V)
To set the limit voltage (ID,SLV,***,###\r\n) The recommended voltage DC drive range 12~36V, limit setting value should not be less than 6V, upper limit value is not greater than 40V, otherwise the drive will not respond. For example, to set respectively the driver's lower and upper voltage threshold to 10V and 24V
- Send: 1,SLV,100,240\r\n
- Returns: none
To get the fault information (ID,GER\r\n) Fault messages should be converted to a hexadecimal number, querying about origin fault in the following table:
| Bit | Error Sources |
|---|---|
| 0 | Reserved |
| 1 | Lower Voltage |
| 2 | Over Voltage |
| 3 | Over Temperature |
| 4 | M1 Over Current |
| 5 | M2 Over Current |
| 6 | Control Signal Lost |
| 7 | Reserved |
| 8 | Reserved |
| 9 | Reserved |
| 10 | Reserved |
| 11 | Reserved |
| 12 | Reserved |
| 13 | Reserved |
| 14 | Reserved |
| 15 | Reserved |
Control Signal Lost: (1,GER\r\n) when the control mode is a break mode, the host controller is required to send control commands within a set time, if there is no control signal for a set time, drive will consider control signals as lost.
- Send: 1,GER\r\n
- Returns: (fault information, such as return of 2, then indicates the undervoltage protection)
Clear all fault messages (ID,CER\r\n) After the failure, the drive goes into protection mode, the motor will not be able to drive. In the UART interface, it can be in normal mode by clearing the fault information; in the PPM and Analog interfaces, resupply power, reset drive, shall enter into the normal mode.
- Send: 1,CER\r\n
- Returns: none
Output real-time speed (ID,OUT,* \r\n) Real-time speed of motor output is mainly to regulate PID parameters, if needed, to stop exporting, simply enter an empty instruction "\r\n". Worth noting is that in order to monitor the PID parameter tuning results in a better way, the command will call a return of motor speed in real time. For example, to get the M1 real-time speed
- Send: 1,OUT,1\r\n
- Returns: X,Y,Z\r\n (x, y, z are for the abstract representation of the actual data, x means the x time drive speed measurement, value range: 0~4294967295;Y said the actual speed of motor; z is motor target speed.)
Was this article helpful?
