View Full Version : Control Scenario Question

Paul Sherman
11-30-2006, 09:00 PM
I'll try to simplify a question I asked in another forum in hopes of getting some input. Right now all I want to know i this kind of scenario is possible using a Basic Stamp; then I'll go ahead and worry about actually doing it.

I've got two large transmissions that I can control via 2 torquey Futaba servos...imagine the machine steering & turning like a tank; one transmission slows down or reverses the other moves ahead, and the machine turns. But once the turn is done, I need to get BOTH sides back in sync with each other, we'll call this Zero Position.

What I envision is using a Hall effect sensor, or optics on rotating shafts. I need the Stamp to tell Servo A "If side B isn't in position, movinf FORWARD, you stay in Neutral". Once the magnet/white stripe/whatever passes the sensor (into Zero Position) then Servo B can put the other side in action.

Can the Basic Stamp do this?

Here's an .avi of a test to help envision what I'm doing. It's of one leg, it will have six, and move a LOT slower...


Thanks for any help!

11-30-2006, 09:20 PM
It's not clear from your question what the "torquey Futaba Servos" do. One implication is that the "two large transmissions" are somehow 'shifted' ("controlled") by the servo's. Another implication is that the servo's are actually driving the transmission.

If the servo's are driving the transmission, then why do they have to 'sync up' at any point? Theoretically, you could start the 'second' tread at any point in a turn, and the tank would go forward from that point.

If you ARE using 'servo' control signals (a 1 to 2 mSec pulse, repeated every 20 mSec or so), then the BS2 can monitor the 'stripe' detecting sensor between generated pulses. So in that way it is do-able.

Paul Sherman
11-30-2006, 09:32 PM
Hi Allan-

I wanted to focus primarily what I wanted the servos to do, and not muck up the description with other stuff!

The servos will control two hydraulic spool valves (see pic), which in turn control hyd. motors. They have a center neutral, a forward & a reverse, so the servos will control direction (and speed, depending on how far the throw is).

I posted the link to show that while i need it to skid steer like a tank, it does not have treads. The "sync" is to maintain the classic hexapod "double tripod" method of locomotion between the legs. Per side, the legs are in sync becasue of chain & sprockets (again, see pic)

Is this any clearer?

Thanks for the input

11-30-2006, 09:57 PM
Yes, much clearer. So the servo's are indeed to control the hydraulic valves. And since you have a hexapod, in order to go forward and have the correct legs off the ground at the correct times you do NEED to 'sync up' the left and right leg action. Understood.

The only risk you run with using the BS2 in this way is during the 1 to 2 mSec 'PULSOUT' to drive the moving side, the BS2 might miss the 'sync' mark on the chain. 1 mSec is a very small time in terms of how much chain can go past the sensor, so if you made the mark big enough you should be able to guarantee it would not be missed.

In pseudocode, the 'sync_up' routine would look something like:

· StepValue = 0
· GOSUB CheckSensor
· WHILE NOT SensorHit DO
··· IF StepValue = 0 THEN
······ PULSOUT LeftServo, 1· ' Send 1 mSec pulse
··· ELSE
······ PAUSE 1··· ' Else, pause 1 mSec
··· StepValue = StepValue + 1
··· IF StepValue = 20 THEN
····· StepValue = 0
·· GOSUB CheckSensor

The 'pause 1' and stepvalue up to 20 stuff is so you can check the sensor in the 20 mSec 'dead time' between pulsout commands.· Note that above code should probably be modified to have a 'timeout' value too.

Post Edited (allanlane5) : 11/30/2006 3:07:01 PM GMT

11-30-2006, 11:02 PM

Another possibility is to use a proportional hydraulic valve. I think the last ones I used were Vickers. Basically -8 to 0 to +8 volts gave 0 to perhaps 10 gpm . Very clean setup and no mechanical linkages.

For bigger stuff, the prop valve feeds a big pilot operated spool valve.


Tom Sisk


Paul Sherman
11-30-2006, 11:10 PM
Hi Tom-

This is a description of the valve; Sound like whe you're talking about?

"The variable displacement pump features a
cradle swashplate with a direct-proportional dis-
placement control. These pumps
provide an infinitely variable speed range be-
tween zero and full displacement in both forward
and reverse modes of operation."