I believe that Devon’s calibration program stores the offsets in the SSC-32 registers. You probably have to reboot the SSC-32 to get the new registers to be reloaded. Not sure if his program does that or not. But then again, I think you have to then change wiring, so it is probably caught anyway… As I mention, I normally just use my own stuff for this.
The new SSC-32 Servo Sequencer Utility does save the calibration settings in the Initial Pulse Offset registers. When you are done doing the calibrations, do you click the Calibrate button a second time to exit the calibration mode before you unplug your robot?
Also, like Kurte said, you need to power cycle the board for the new settings to take effect.
Note: I don’t have SSC-32 Servo Sequencer program nor work in flowstone or the like, so I am not sure what Devon actually did in those programs.
My guess is that he relied on you power cycling the board in order to have the SSC-32 startup and read the new data. In my own Arduino Phoenix code base, I instead, tell the SSC-32 to reboot, after I update this data. The code to do this is pretty simple:
delay(10); // give it some time to write stuff out.
SSCSerial.println("GOBOOT");
delay(5); // Give it a little time
SSCSerial.println("g0000"); // tell it that we are done in the boot section so go run the normall SSC stuff...
delay(500); // Give it some time to boot up...
But when all else fails cycling power is the easy/sure way
I don’t believe that the SSC-32 Servo Sequencer program does anything with the servo settings you get when you “CALIBRATE”. Perhaps I am missing something in that program. It would be nice if it saved the calibrated settings in the SSC-32 initial-pulse-width registers. I used that program to position the servos where I wanted them, and then manually copied them on a piece of paper, from which I copied them into the initial-pulse-width registers of the SSC-32 by using LynxTerm. Now my robot assumes the configuration specified by those registers when I power up.
I was looking in your code to see if you read those registers to determine the initial servo settings, and I could not find anything looking like that. Perhaps I missed it. Do you do that? I want to try to write a program to control my hexapod, and I am going to do that. All servo motions will be relative to those settings.
Happy New Year!
Ted
Nope, I do not do anything with the Initial pulse width registers and likewise I am pretty sure the flowstone programs don’t as well. I set the Initial offset registers. Those are the ones in the 32-63 range.
So far I have had no need to have the SSC-32 start outputting pulses to the servos, until my program is ready to tell it where I want them to go. Especially since many times, the program comes up in a lower power usage mode and only activates the servos when you tell it to (like hit the start button on the PS2). Also in many cases the programs try to detect the battery voltage and if it is too low will not enable the servos to be turned on or turn them off.
But it the offset registers are great (as far as they go), as they allow you to write your program to for example output 1500us pulses to all of the servos and it can hide the fact that on some servos the center may be at 1500 others 1550 and others 1450… Some of us actually wished that the firmware would not restrict the offsets to ±100, as that would have opened up other possibilities, but it was vetoed and a different topic.
Thank you for your help.
Hallelejah Kurte!
You speak the Truth. When assembling my first robot, nothing worked. It had previously worked fine on my workbench. My SSC-32 had accidentally been flexed and I was afraid that I had damaged it. I tested power which was good and tested with Lynxterm and could connect and successfully get a reply from the ver command.
Then, looking at the board again - and I had mounted the SSC-32 in a different orientation than it was before. So instead of connecting the servos to ports 1-16, they were connected to 17-32.
D’oh!
The new RB-Dsp-07 - SSC-32 Servo Sequencer Utility does store the calibration values in the IPO registers.
@tedkurtz When you do calibrate, you use the knobs to adjust the calibration and not the sliders, correct?
If you have FlowBotics Studio, you can open the SSC-32 Servo Sequencer project and look at the source code by doing Shift+Escape. Once in the editor mode, open the main module, open the main module within it, open the LM SC-32 + Comport module (towards the bottom-right), and open the Calibration module. You will see here the code that generates the command string with the IPO values.
When I calibrated with the SSC-32 Servo Sequencer, I did not use “CALIBRATE”. I simply used the up/down arrows to get the servos into the positions I wanted, and then I hand copied the settings onto a piece of paper, and from there into the SSC-32 initial-puilse-width registers using LynxTerm. Old fashioned, but it worked. The Servo Sequencer should be able do this. If I were programming it I would use the have the user get the settings they wanted any way they wanted, and then have “CALIBRATE” upload those settings to the SSC-32 initial-pulse-width and initial-pulse-offset registers.
Ted
The SSC-32 Servo Sequencer Utility works a bit differently since people don’t necessarily want to calibrate their robot at the 1500 position. So, when in Calibration mode, you have both sliders and knobs. The sliders control the output position signal and the knobs adjust the calibration offset. If you want to adjust your robot when in the neutral servo position (often the case), you need to set the slider to 1500 and then drag the knobs up/down to adjust the offset.
We checked the code and confirmed that the Calibrate mode sends the PO commands at the same time as it changes the IPO registers, so changing the knobs adjusts the calibration immediately/live and a reboot (or power cycle) is not needed.
I played around using LynxTerm and the SSC-32 Servo Sequencer, and the Sequencer does indeed seem to function as you described. I discovered that, rather than trying to rotate the knobs with the mouse, I could change the offsets by dragging the knobs up and down.
Thank you for your explanation.
Ted