Can't we branch between discrete and pulse send in SSC32?

Hello,

I study robotics by using Legged Robot.

The leg robot is equipped with a gripper, and to save power, we do not want to send power to the gripper’s motor when it is not in use.
In other words, I want that it sends the necessary pulses when the gripper opens and does not want to supply power when it closes (when not in use).

So, I wrote the following code, which could send a pulse from low, but could not return to low once the pulse was sent.

Please answer my question. :bowing_woman:


String A = “”;
if(data.a = true){
A = String("#21L");
}else{
A = String("#21P") + String(1000, DEC);
}
}

@koki Welcome to the RobotShop Community. The SSC-32U does not have an official “power down” or “limp” command. You can try the “Cancel Output” function to see if that either stops the servo at the current location, or stops sending signals (which would cause the servo to effectively lose power). Page 32 here: http://www.lynxmotion.com/images/data/lynxmotion_ssc-32u_usb_user_guide.pdf

If the servo is not acting against a load, the current draw when holding a position should be minimal.

Thank you for your response.
I tried the following command .

String A = “”;
 if(data.a = true){
           A = String("#21P") + String(1000, DEC);
          }else{
           A = String("#21P") + String(1000, DEC) + String("<esc");
          }
}

I confirmed that the servo stops at the current position. How do I rewrite the signal when I want to stop the signal being sent?

Best regards

@koki Not aware of a command to stop sending pulses entirely. You might try the STOP command, but not sure if it stops the servo and holds or just stops sending a signal.

The LSS (Lynxmotion Smart Servos) have a “limp” command, but you would need a different setup.

Send a Pulse Width of Zero.
It stops the servo and keeps the Channel in servo mode.
What you are doing in this case is preventing half of the Duty Cycle of the Pulse Width from being performed by the Atmel. The other half is still being performed, with that other half being the Low Side of the PW Signal.

Since a PWM signal is basically a LOW_HIGH_LOW_HIGH toggle, and the value fed to the command is the length of time of the signal, by sending it a value of zero the HIGH side toggle never occures, but the Low side will. Since the Low Side of the PWM signal is Ground and the High is a voltage, sending it a 0 is basically keeping both sides at Ground, for the length of the PWM time. Thereby, keeping the signal line OFF to the servo PCB itself. inside the servo itself.

Since the Channel itself is never changed out of Servo Mode on the board, as it is doing by the use of the Discrete command and detaching the PWM logic from the Atmel Pin and converting it to Digital Output, the servo Mode is still active at the Atmel and the servo ready to go again at the servo itself as soon as the Pulse Width changes again to a non-zero value.

If the intent is to completely Limp the gripper servo, then use two servo channels and power that gripper at the power pin (not its servo pin) with the second servo connection, which you then control with the Digital Output command to enable the power to the servo itself. A simple way of doing this is to use an Optical Switch on the secondary servo pin (the one that will be the Digital Output control and the actual power rail is running from the controller, thru the Optical Switch and into the Servo. The servo is then receiving the same power the SSC is providing and the Optical switch is being triggered by the 5v HIGH on the secondary servo pin. The use of an Optical Switch ensures there is no physical connection between the higher voltages supplying the servo and the 5v of the Digital Output pin. It is a light connection, inside the Optical Switch, not a physical one.

Then to completely limp the gripper you LOW the Digital Output Channel Pin and leave the Servo Pulse Width alone.

SSC PWM______________________________________.
SSC Servo PWR_________OPT____________|______SERVO PWR GRIPPER
SSC DO ________________OPT

Like that. The OPT is just a switch enabling or disabling the power wire to the servo. It can even be soldered inline, after a cut to the wire is made in that wire and the two ends soldered to the OPT in and out pins. Use a DIP Optical Switch so there is more real estate to solder the wires in and out on the actual switch.

Two SSC Channels, one is PWM, one is DO and the DO is toggled high or low to cut or provide to the power pin of the grippers servo, not its PWM pin. Just make sure when sourcing the Optical Switch that the HIGH SIDE of the switch is able to handle the power level and current of the servos you are using. The Enable/Disable side of the OPT is usually 3 to 5v to enable so it should be fine on the SSC Digital Out

The Zero Pulse Width method also works but the gripper will still be drawing a bit of current, itself. If that is acceptable, the hardware method with the Optical Switch can be omitted.

Hope This Helps.

ACIGAN INTERNATIONAL
Design Division
Development Division

A crude image that illustrates the connects better then the text one.
Black - Ground (tied together)
Blue - Servo Signals
Red - Power.

The DO is blue because that is on the Signal pin of the SSC, not the power pin. It is the 5v signal HIGH or LOW to enable or disable the switch. The OPT can even be powered by same signal, in that when the DO is HIGH, the OPT is physically turned on, settles, sees the enable is also HIGH and enables itself. Those chips run at 5v so the DO pin would be doing both functions to the OPT when in HIGH state.