Confusion about the SSC-32

Sorry if this seems obvious, but I’m new here and have been searching fruitlessly for a long time, among this forum and others.

Some information to preface; I am trying to build a hexapod robot using as little pre-built and pre-programmed material as possible. I can program proficiently in PBasic as well as several other languages, and understand the engineering side well enough. My problem is that I only have a Board of Education and a Basic Stamp right now. I would like to buy a Bot Board II, and would also like to use only the BBII to run the robot. I don’t really understand how the SSC-32 works, and whether or not it is necessary. My limited knowledge was that it would help with the sequencing and movement of servos, but is it necessary? Could I, albeit with a little extra work, program my BS2 with the proper gaits and sensors, and then stick it in the BB? By the way, this is going to be an autonomous robot. Thanks!

Hi and welcome Shevek,

I could be wrong, but my guess is that the BS2 would not have the necessary processing power to properly drive all of the servos of your hex robot. Of course this could depend on your design of the robot. How many servos do you expect to use for the legs? My guess is 12 or 18.

You would be well served by purchasing something like the SSC-32. It not only allows your program to offload all of the work of holding the servos in their desired locations (generate the pulses at the proper intervals). It also with moving a group of servos in a coordinated way. That is suppose you wish to move all 6 legs with lets say 18 servos as part of a gait. For each sequence in the gait you will need to move all 18 servos to their next position in a certain amount of time. Some servos will need to move more(faster) than others, such that all of them arrive at the proper positions at the same time. The SSC-32 takes care of that for you.

I hope this helps and good luck

Kurt

Thanks, that helps a lot actually. I really appreciate the help, as well as the quick response time! :smiley:

You are very welcome.

Kurt

To go into a little more detail. The BS2 has only 16 I/O pins. If your hexapod has 18 servos you are sunk already. If your hexapod has 12 servos you could in theory connect 12 servos to it. However, there is a technical limitation to how many servos can be controlled sequentially. Servos require their control pulse to be updated every 20mS. The control pulse can vary from .5mS to 2.5mS. So in the worst case scenario where all 12 servos are at 2.5mS the time required to generate the pulses is 30mS. This would cause the servos to be underpowered and noticeably jittery.

As Kurt mentioned the BS2 does not have a lot of processing power. It would never be able to control a 3DOF leg hexapod as the math involved is extensive. It could control a 12 servo hexapod using the SSC-32 as a servo controller though. To get the most from the BS2 you can utilize the built in 12 servo hexapod sequencer. That feature allows you to control the walking of the robot with simple commands where you just tell it which direction and speed you want it to walk.

The Bot Board II with an Atom Pro processor has 20 I/O pins. It also has a command called hservo which is a hardware based servo control method that has no timing issues as it operates just like a separate servo controller built into the microcontroller. This would allow you to build the code from scratch if that the direction you want to go in.

Hope this helps.

I was just reading through this and thinking that someone not familliar with the products discussed could interpret the quote as suggesting the bs2 has the sequencer built in (if they want to read it that way.) To be clear just in case, the 12 servo sequencer is a feature of the ssc-32 and not the bs2, which in turn means you would need an ssc-32 to get the most out of your bs2 if you want to run more than pre-canned sequences from it. :wink:

Thanks again for the help guys. I’m ordering an ssc-32 today, and I’ll come back if I need any more help.

Just to continue the thread, I’m hoping I can get some additional novice help. I think I have found what I need with the SSC-32 but before I buy I would like a little more confidence that it will work.

I am putting together a contraption that needs to actuate up to 6 servos at a time out of a total of 12. The input will be one of 5 pedals and a matrix of up to 24 switches linked to each pedal. The servos will actuate depending on which pedal is pushed and which switches are on. I think I know generally how to program this, but I’m unsure of the electronics setup.

I have the BS2 Homework board. I think I can tell from above that I certainly need the SSC-32. However, I’m doubting that the BS2 Homework board will work since there are limited inputs… BUT, I would love it if someone could let me know for sure that it will not work… if it can work, GREAT, I’ll probably need more help later. If it can’t, are there any suggestions for a microcontroller that would do the trick… does the SSC-32 have it’s own microcontroller? If so, can I program with PBASIC or do I need to learn something else.

Lastly, I suspect I’ll need to figure out how to power this contraption… that can come in a separate post, but if there are any tutorials that might give me an end to end answer on this setup, I would REALLY appreciate the guidance. Thanks!!

Uh, so are you saying 5 x 24 … 120 switches? Or 24 switches and the 5 pedals are something else like a potentiometer that you combine in logic with the switches to do something?

Maybe define “contraption” a bit more in terms other than switches and pedals so it is simpler for people to wrap their heads around what you want to do. Also there are questions like how fast you need to read the switches and can multiple switches be pressed at once that will drive what people might suggest as solutions.

Realistically you should start your own thread since this sounds like a separate project. :wink:

The SSC-32 doesn’t have a microcontroller. The SSC-32 reads commands sent via a microcontroller such as the Basic Stamp or a Basic Atom, or even a PC. The SSC-32 follows instructions, it does not give out instructions except for servo pulses. The ssc-32 can control up to 32 servos so you are covered there but for the number of I/O pins, you might need a kind of multiplexer which I can’t offer much help on.

If you are going to control several servos at the same time, the SSC-32 is definitely the way to go.

The Atom Pro 28 will give you more I/O but not enough to hang a switch on a separate I/O pin. However there is a better way. Make a row and column setup. Then you can scan 24 switches with only 10 I/O pins.

Here is a diagram.

http://www.rabbit.com/documentation/docs/manuals/MicroStarterKit/images/matrix_k.gif

Never mind the signals shown, I stole it from the internets. :wink: lol

So the idea is if you put a high on a row and look for a high on a column you can detect more switches then you have I/O pins.

So you’re making a guitar preset box?

simple row x col doesn’t work so well if he has more than one key pressed simutaneously.

Yeah, I know… Just waiting for a further explanation of what He’s trying to do.

That is Neat-o! 8)

Hello all,
Well, it has been a little while but I have the SSC32 and I have a 74HC165 for my inputs. Thanks for the grid/matrix suggestion. I haven’t looked at it too closely because I seem to be set up with the input register chip. However,

I seem to be having 2 key problems.

  1. On the input register (74HC165)I do not yet have all of my switches installed so the lines without switches seem to jump on/off randomly. As long as I have a switch on the pin, it seems to work ok but could this be indicative of a problem?
  2. Although the logic seems sound (pushing a pedal is in fact actuating my servos differently depending on the switch settings attached through the 74HC165)… the servos are jumping and very jerky each time through the loop? My programming must not be right. How can I continue to check the status of my inputs yet only try to move the servos the first time? Anyway, here is my code (well, a good chunk of it is plagerized from various forums and websites… I’m not a programmer, can you tell?). The high and low calls directly to the BS2 inputs are for LED’s I’m using just to make sure the logic is sound:

’ {$STAMP BS2}
’ {$PBASIC 2.5}
’ This program demonstrates a simple method of turning three BASIC Stamp
’ I/O pins into eight digital inputs with a 74HC165 shift register.

’ ----- I/O Definitions ]-------------------------------------------------
Clock PIN 0 ’ shift clock (74HC165.2)
SerData PIN 1 ’ serial data (74HC165.7)
Load PIN 2 ’ output latch (74HC165.1)

’ ----- Constants ]-------------------------------------------------------
DelayTime CON 100

’ ----- Variables ]-------------------------------------------------------
switches VAR Byte ’ switch data

’ ----- Initialization ]--------------------------------------------------
Reset:
HIGH Load ’ make output and high
DEBUG CLS,
“Switches 76543210”, CR,
“-------- --------”, CR,
“Status …”

’ ----- Program Code ]----------------------------------------------------
Main:
DO
GOSUB Get_165 ’ get switch inputs
DEBUG CRSRXY, 9, 2, BIN8 switches ’ display current status
IF switches.BIT0 = 1 AND switches.BIT1=0 AND switches.BIT5=1 THEN
SEROUT 15,6,"#0 P850 #1 P1500 #2 P1500 #3 P1500",13]
LOW 13
LOW 14
HIGH 12
PAUSE 10
LOW 12
’ PAUSE 50
ELSEIF switches.BIT0 = 0 AND switches.BIT1=1 AND switches.BIT5=1 THEN
SEROUT 15,6,"#0 P750 #1 P1500 #2 P1500",13]
LOW 12
HIGH 14
HIGH 13
PAUSE 50
LOW 14
LOW 13
ELSEIF switches.BIT0=1 AND switches.BIT1=1 AND switches.BIT5=1 THEN
SEROUT 15,6,"#0 P500 #1 P1400 #2 P1600 #3 P1400",13]
HIGH 13
HIGH 14
HIGH 12
ELSE
SEROUT 15,6,"#0 P750 #1 P1500 #2 P1500 #3 P1500",13]
LOW 13
LOW 14
LOW 12
ENDIF

    PAUSE DelayTime ' pad the loop a bit
LOOP

’ ----- Subroutines ]-----------------------------------------------------
Get_165:
PULSOUT Load, 1 ’ load switch inputs
SHIFTIN SerData, Clock, MSBPRE, [switches] ’ shift them in
RETURN

What do I need to do to keep my servos smooth without losing the ability to change reaction to my inputs quickly?

Any thoughts are helpful.

Just to close the loop on the question above… I found my issue was due to the way I was trying to power the servos… seems obvious now but I had my SSC32 logic and the servos powered oss of the same 9v battery. There is a great “announcement” post under the SSC32 forum that gives the various powering options… I read the manual but the post helped drive the options home. A separate power for logic and servos is definitely the way to go… duh. :unamused:
Thanks!