Some noob questions regarding SSC-32

Hi, am a student doing my final year in university

Ssomehow got myself into a robotics project and I know nuts about programming :wink:

Am considering getting the SSC32 servo controller to control my quad.

I’ve tried previously to control the gait with a PIC18F252 BUT failed miserably :cry: as I can’t update the servos fast enough to maintain control over the servos: Keep overflowing the 20ms and the servos loses power.

Now I am stuck and hope can clarify some questions:

I got 4 DI input as foot sensors, 2 PWM inputs from accelerometer (Memsic2125), and a main processor (PIC18F4550)

The Question is:

  1. Do I connect ALL the inputs to the microP and let the SSC32 control the gait

OR

  1. do I have ALL the sensors connected to the SSC32, and query from the microP?

  2. I understand that I need to send commands (ASCII) to the SSC32 to move the servos. Is there examples for quad/hex so I can get a rough idea of how I should program the walking gait?

I somehow need to get my bot to walk and sense the ground (something like micromagicsystems Hexapod V4) :unamused: :unamused:

Am quite lost already, can someone point me a direction?

I roughly understand that I need to send a query for the servo position once the foot sensor senses the ground, and send that specific servo position to that leg to hold it’s position. The whole cycle repeats for each leg, WHILE still maintaining the walking gait

Cheers
Zack

Hi Zack,

Programming the ZPIC18F4550 won’t be much different then the '252. Are you programming in C or ASM?

You should consider just sending commands to the SSC32 to move the servos, and not try to wait for sensors initially. Much too complicated! Get the quad walking first!

Look up the code for a CH3 'bot. It’s a hexapod, but it will show you how to update the servos in a big main loop.

You can probably read the sensors from either. If they are on the 'bot computer, then their service takes up time. If they are on the SSC32, then you have to read through the RS-232 to get the info. Takes time in either case!

It would be nice to query the servo position at the exact time the foot switch closes, but you don’t need to do all of that initially! Just get the 'bot to walk on level ground!

Alan KM6VV

This should be the file you’re refering to right? ==> eh3r01.txt
** This is not C language… Is it BS language??

Have printed it out and am going to digest it over the weekend :laughing: :laughing:

Okie, thanks for the enlightenment. Will go figure out the gait and get the bot walking 1st

Hi Zack,

Yes, the example is in BASIC, you’ll have to translate to C. Ask me or the forum about parts that aren’t obvious.

If you’re at all familiar with BASIC, you can work out the algorithms used.

Alan KM6VV

Thanks alot mate! :smiley:

I’ll be crunching down the codes, and hopefull I don’t get choked too much along the way :imp:

Had a talk with my professor and am kinda in a deadend… :cry:

My programmers have disappeared, and my project is due in 1.5mths and counting down… :imp: :imp: I’ve gone through the program, and have serious doubt if I can even make it to walk a few steps if I chose to run the quad via my PIC chip.

Pls bear with me with these questions:

I intend to buy the SSC-32 squencer to run the quad, as I am running on a tight schdule with reports and presentations and a demo session…

  1. If I wish to run my quad independently, I can place a 24LC512 EEPROM to store the sequence? Thus removing the need for a serial cable linking to my com?

  2. Is possible for me to query the 4 digital/analogue/ inputs via the sequencer as I intend to link my foot switches to the SSC-32 so that my quad will not walk blindly :unamused:

Thx a million :smiley:

Hi Zack,

If you get the SEQ program, you can develop walking sequences with it, then save in the EEPROM of the SSC32 (example 1). You’d need some simple commands from the PIC board to tell the SSC32 to start playing back the saved sequence.

You could also write a simple program for the PIC, and have it “play back” the same sequence TO the SSC32 (example 2), which might be more useful.

You’d be using your PIC controller board, and the SSC32 in both above cases.

The PIC program would have to be able to send ASCII strings (in either case) to the SSC32. Not hard to do. See Microchip for com examples.

The new 2.nn version of the SSC32 would be needed, as it supports the EEPROM (an old one might also, but verify first. A recent topic for the SSC32 thread).

Commands to the SSC32 can read the A/D channels. These would have to be read back by the PIC, and then you could probably read the current position of the servos, and command them to that point. This should stop them.

Or, simply stop the sequence being sent to the SSC32 (2nd example above). You’d get a little more travel after the sensor detection, but works. Possibly easier to program.

It might also be possible to stop the EEPROM sequence from being executed (1st example above).

HTH

Alan KM6VV

Thanks for the prompt reply :smiley:

I was thinking if I can simply run the playback sequence from the EEPROM without any other interfacing

OR run SSC32 from the PC with the sequencer and read the inputs from the ABCD input pins, store the squences in the EEPROM and let my quad walk autonomously.

From what you’ve mention regarding sending ASCII to the SSC32, instead of characters??

example: "#5 P1600 T1000 "
The example will move servo 5 to position 1600. It will take 1 second to complete the move regardless of how far the servo has to travel to reach the destination.

So I will send: (part of codes)

putchar(35); //#
delay(XX);
putchar(‘5’); //5
delay(XX);
putchar(80); //P=80 (dec)
delay(XX);
putchar(‘1600’); //1600
delay(XX);
putchar(84); //T
delay(XX);
putchar(‘1000’); //1000
delay(XX);
putchar(‘13’); //
delay(XX);

Is this it?
As you can see I’m quite confused with regards to sending ASCII thus the reason why I initially plan to run directly from the computer using the sequencer. But my professor requested I have some sensors to further develop for presentation/demo.

Zack :blush:

Hi Zack,

ASCII is just standard characters; you seem to have the idea.

Alan KM6VV

Thanks Mate!! You’re a life saver! :smiley:

Anyhow, just to update:

I’ve receiver my SSC-32 and the visual sequencer. And have been fiddling around with it.

Got a crazy question (it’s 820pm and I AM still in my lab :confused: ):
What’s the difference between “SEQUENCE” and “STEP”?

I’ve created a project, then i’ve got a gait to test in mind:

  1. do i create multiple steps in 1 sequence?

OR

  1. create multiple sequence with 1 step in each sequence?

cheers :wink:
Think I need some beer :laughing: :laughing:

A sequence is a set of steps, and steps are stored positions of serovs.

So, you would make a sequence, then you could add steps to that to make the robot… walk, kick… take over the world… :smiley:

And if you didn’t already, you add additional steps by clicking on the green ‘+’. That will add a new step add the end of the current sequence.

Hope that helps,
James.

Thanks

I’ve made a walking (forward) sequence with 10+ steps, still need fine tuning AND kinda jerky in certain steps. At least it’s no longer dragging a foot :unamused:

A new questions: I keep encountering the following type of errors:

Sequence : 000001 Step : 000007 Servo : 9
Can’t be moved to a new position ! => Busy : 300mS

Sequence : 000001 Step : 000007 Servo : 17
Can’t be moved to a new position ! => Busy : 300mS

Sequence : 000001 Step : 000008 Servo : 17
Can’t be moved to a new position ! => Busy : 600mS

Sequence : 000001 Step : 000009 Servo : 17
Can’t be moved to a new position ! => Busy : 900mS

There wasn’t any error (box turning yellow) when i was framing the steps, but once I try to run the sequence once, the above errors popped out. :angry: :angry: And I can’t run the seqence :imp: :imp:

Can someone explain? Thank you

I will point Laurent this way when he logs on.

I think this happened to me when playing with the Expert Step Parameters options (top-right of the SEQ screen). I unchecked Expert and it stopped erroring.

Hello,

Expert mode allows to use different Time values for each servos during a step AND using a different “Step” time.
so, a servo can stop before the step ends and another servo can continue moving after the step ends.

there’s two reasons for a servo to be busy :

  • you are trying to move it in a step but the previous step time is < to this servo time…so it’s still moving (busy).
  • you are trying to move it in a step but the previous step time is < to the time needed to move the servo to its new position at “max rate”…so it’s still moving (that’s the boxes going yellow issue).

When moving a servo using expert mode you can choose to lock the rate or the time :
-When locking the time, if you move the servo it will adjust the speed to keep the time constant => but moving too far will exceed “Max rate” forcing it to finish after the step time, making it busy for a while.
-When locking the rate, if you move the servo it will adjust the Time to keep the rate constant => but moving too far will make the servo move to finish after the “step time”, making it busy for a while.

you can solve overlapping issues :

  • by increasing the previous step “step time” by the time needed
  • by decreasing the busy servo “time” or increasing it’s “rate”
  • by uncheking the expert mode checkbox and choosing a "global time for the step and its servo (all servos will ends within the step time)

Laurent

What is a “QPL0” command from SIM to SSC32?

Alan KM6VV

:smiley: Thanks guys

Yup, I was fiddling around with the expert timing, since some steps can be faster than others. Didn’t realise the timing collision there :blush:

Got my quad to walk forward, and turn Left/Right :laughing: FINALLY!! I can show something for my FYP demostration

Another NEW question:

  1. May I know if it is possible to reverse the steps i’ve made?
    eg. I’ve programmed the forward gait; all i need is to reverse the gait to make the robot walk backwards.

===> Is there some way I can mirror the program, and save as another sequence? So I have a forward/ reverse gait sequence. Instead of keying in a whole new sequence… :wink:

Thanks

** Am making a vidz, will post a link once I am done. hopefully by this week :smiling_imp: :smiling_imp:

Take a look into the installation directory and open the “GP Sequencer” folder.
(Typically : “C:\Program Files\Sequencer_SSC-32\GP Sequencer”)

  • The GP Sequencer Documentation : doc.pdf is in there.

"QPL
Query a player. Returns 4 bytes

  1. The sequence number being played (or 255 if no sequence is being played)
  2. The index moving to in the sequence
  3. The index moving from in the sequence (0 through the maximum step
    number)
  4. The remaining time in the step, 100ms per bit (e.g. if there are 700ms
    remaining, the value will be 7)"

Hello ZeRoCoOl

the best way to use sequences is to use the GP Firmware/sequencer + a 24LC256 or 512 external EEPROM.
so you don’t need to use the Botboard+Chip to store and handle sequences, you just need it to control what sequence to play according to sensors input etc…
the GP sequencer allows to control speed from -100 to +100, so you just need to build a forward sequence then use a negative speed ratio to go backward.

there’s no mirror feature in SEQ, i think i will add this.

You’re in luck, we are releasing the SSC32-2.01GP firmware today. 8)