19 DOF Humanoid Robot with implemented sensors

Hi,

I connected SSC32U to Botborduino using the RXTXGnd configuration, I have the XBEE module connected to SSC32U so I can control the humanoid using flowbotics custom sequencer. my question , if I want to use the arduino for sensors such as gyroscope, distance sensor, how can I link the arduino to the ssc32u ? in other word, how can I program the arduino to use the sensors interact with the servos that is connected to SSC32U ?. now regarding PS2 controller I will use the modules that comes with flowbotics to have more in depth control. please advice ? thank you

Any help is appreciated it !

Hi,

Here are some answers to your previous post:

The USB port, XBee port and microcontroller port (pins TX/RX/GND) are all controller ports. They allow you to send commands to the SSC-32U and receive data. But, you can only ever use one at a time. Having more than one connected any time may cause issues (intermittent/continually). This would be like having two people holding a steering wheel in a car: it may work, but it will most likely just cause issues.

You can certainly connect the Arduino to the SSC-32U, either using the hardware serial (D0/D1) or software serial (any other pins). This would allow you to use any of the commands available (see the SSC-32U manual, pages 24-26).

We assume that by “interact” you meant send position commands to the RC servomotors, right? If so, use the manual linked above. The main command you will have to use is the “P” command.

You can read more about the PS2 controller module in pages 367-368 of the component reference guide. The module is very self-explanatory:

]The buttons send digital signals/:m]
]The sticks send analog values (floats)/:m]
]The d-pad sends an integer value based on position/:m]

Then, simply wire those output signal to your control code that triggers actions, sequences, etc. in the sequencer.

Sincerely,

Great answer, but regarding “interact”, I mean if I connect the SC32U to Ardiuno, I want the Ardiuno sensors to interupt the walking sequence for example if its reaching a wall for instance. Now if I create the walking gait sequence on the sequencer and triggered that using my PS2 controller then while the robot is walking he faced a wall, the ardiuno’s sensor here needs to interfere to stop the going on sequence. How can I do that ??

Since you wish to use both the XBee connection and the Arduino to control the SSC-32U, you will need some way of multiplexing the signal appropriately (not having them drive two signals simultaneously or fight each other).

The best option in such a case is to have these decisions to be made all in one place.

Here are some possible ideas:

]Have the SSC-32U output signals to the SSC-32U’s sensor pins (commands x/Vx, where x is [A,B,C,D,E,F]; check the SSC-32U manual page 34). Your sequencer can then read these signals and interrupt itself / change sequence based on those. You could have it read the values based on a timer or such. Also, it is already reading [A,B,C,D] by default, so you may need to remove/modify that code, too./:m]
]Have the sequencer send its commands through the Arduino instead of directly to the SSC-32U. The Arduino would act as a passthrough (from sequencer -> SSC-32U) unless the Arduino detects an issue through its sensors. Then, it would sending the commands / stop the sequence./:m]

There is probably a few others way to implement this, too.

Sincerely,

So the SSC32U is may be an easier root, but what sensors would work with SSC32U ? Do you have any thing in robotshop ? And on the flowbotics studio it seems support the phidgets sensors only !?

Any arduino sensors can work with SSC32 ?

The SSC-32U can only read sensors that output digital or analog values (such as a high/low signal from a proximity detector or an analog voltage from a IR sensor).

If the sensor requires a protocol of some kind (I2C, SPI, UART) or if it requires activation (Ping-type ultrasonic sensors), it cannot work with them through its passive sensor inputs.

Sincerely,

When you said : Have the sequencer send its commands through the Arduino instead of directly to the SSC-32U. The Arduino would act as a passthrough (from sequencer -> SSC-32U) unless the Arduino detects an issue through its sensors. Then, it would sending the commands / stop the sequence.

How can I do that ?

okay so I realised that flowbotics support the inputs sensors for the SSC32U, so now how am I suppose to know which sensor will work with SSC32 ?

I would like to utilize the ardiuno and its sensors, they are cheap and resources are available every where to write codes for such sensors, but the hybrid combination between the flowbotics sequencer and arduino is not there yet !

Any inputs from any one ?

Hi,

Here are some answers to your questions:

For this to work, you would need to connect the wireless connection to the Arduino, not the SSC-32U. You would also need to write some code to redirect data coming from the wireless connection to the SSC-32U and vice-versa. All of this is just an idea and we do not have examples of it at this moment in time. It will require you to research the issues and develop a solution yourself.

As mentioned previously, the SSC-32U can read passively read signals output to its special input pins (digital and analog signals). This should work for most sensors that continuously output a result (do not need to be triggered).
If you wish to use more complex sensors, you can simply process the signal first on a microcontroller and then output a transformed version to the SSC-32U, most likely using a PWM output to create an analog voltage. If you do so, we recommend placing an RC filter (low pass) at the output to smooth out the signal going to the SSC-32U’s input pin.

See previous answer concerning sensors and Arduino. You can technically use any Arduino-compatible sensors and then write some code to convert them to compatible outputs for the SSC-32U’s input pins. Doing so, you would have to move the logic of “what to do” back to the sequencer. The Arduino would only supply to the SSC-32U/sequencer app the state of the environment around the robot. The app would have to stop its own sequences and such.
This would require your sequencer app variant to read the input values from the SSC-32U and do something with them. Again, this is a custom solution and this is where you will need to do your research and decide on a solution and implementation.

Of course, if you have specific questions about the FlowBotics Studio language/primitives and how to use them, we can certainly help/point you in the right direction. But, you will have to determine the best solution for your situation/project yourself.
Sincerely,

thanks alot for the asnwers, so you mean to use the Arduino compatible sensors, connect them to SSC32 and try to activate their functions in flowbotics ? , as long as I know the sensors template that is supported in flowbotics is the phidgets sensors, now If I go the othet route which is the Arduino-sensors-SSC32, I guess I need to write codes in the IDE to assign function for different sensors to serve it purpose, right ?

honestly, after asking all these questions and looking in the forums around, it seems the best route of action would be to take the arduino route give it full control play around with the codes, and may be the smart thing to do is to convert the output codes from the sequencer to arduino sketches, now I dont know if that could be done though but if that can be done then the broken link is connected between the two world.

We do not currently offer a conversion utility for the pattern files created by the FlowBotics Studio sequencer and coding for Arduino (or other platform), but it is certainly possible to play pre-determined sequences from an Arduino-compatible board, such as what the Lynxmotion Hexapod kits do.

You can find here an example of a BotBoarduino code that performs a pre-defined sequence (connected to the servomotors directly, using the Arduino Servo library). You could easily replace the call to the Servo library ( .write() and .writeMicroseconds() ) by a Serial.println() instead, to send the position commands to the SSC-32U through the boards serial port (or using SoftwareSerial).

The output to the pattern file is done using the Ruby core command Marshal on the patterns object that was saved. Here is an example of what a typical output of a pattern object looks like:[code]#<Sequence:0xcfcc540
@frames=
#<Sequence::Frame:0xcfcc4dc
@t=0,
@duration=1.0,
@data={
:servos=>
1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500
],
:onOff=>
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
]
},
@pause=false

,
#<Sequence::Frame:0xcfcc39c
@t=1.0,
@duration=1.0,
@data={
:servos=>
500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0
],
:onOff=>
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
]
},
@pause=false
,
#<Sequence::Frame:0xcfcbcd0 @t=2.0,
@duration=1.0,
@data={
:servos=>
2500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0, 1500.0
],
:onOff=>
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
]
},
@pause=false
],
@name=“SequencerExample”
]
[/code]

Please find attached a copy of the original pattern file.

Sincerely,
SequencerExample.pat.txt (667 Bytes)
SequencerExample.txt (1.49 KB)