To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.technicOpen lugnet.technic in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Technic / 14757
14756  |  14758
Subject: 
Re: Gray code vs. Binary
Newsgroups: 
lugnet.technic
Date: 
Thu, 20 Oct 2005 20:47:17 GMT
Viewed: 
3734 times
  
In lugnet.technic, Kevin L. Clague wrote:
To all those pneumatic gurus.....

The classic pneumatic timing circuit made with one switch per piston changes
state following gray code (i.e. only one piston changes at a time).  This means
that a two piston timer goes through these states:

00-10-11-10  vs. a binary sequence of:
00-01-10-11

For three pistons we get

000-100-110-111-011-001 a sequence length of 6 vs. binary that gets this:
000-001-010-011-100-101-110-111 a seqeunce of length 8.

To get a gray code of length 8 takes four pistons:

0000-1000-1100-1110-1111-0111-0011-0001

Has anyone spent time creating a binary sequencer for two or more pistons?  I
have not, and could use one if it was cheaper than gray code, either in time or
in parts.

Kevin

Hi Kev,

I think the cheapest way to do 3 or 4-bit binary with pneumatics would be to use
gray code and convert it.  Gray code always changes the least significant bit
possible in order to achieve a change to a new state, so there will always be
2^n states, just like binary.

I have a scheme for a gray code sequence of length 8, using 3 variables A, B and
C.

According to your way of drawing schematics (a row of boxes for each piston with
a box for each switch), connections are as follows:

A has 1 switch, B has 2 switches and C has 7 switches.

Piston connections, X = extend nozzle, C = contract nozzle
AX to C4 centre
AC to C3 centre
BX to C7 centre
BC to C6 centre
CX to B1 left
CC to B1 right

Switch connections:
A1 left to C5 centre
A1 centre to supply
A1 right to B1 centre

B1 is finished
B2 left to C1 centre
B2 centre to supply
B2 right to C2 centre

C1 left to C4 left
C1 right to C3 right
C2 left to C3 left
C2 right to C4 right  These 4 connections form a polarity reverser.

C3 and C4 are finished
C5 left to C6 left
C5 right to C7 right
C6 right leaks
C7 left leaks

The total is 6 pistons and 10 switches plus gray to binary converter.  This
circuit would require buffering if A, B or C drove non-locking load bearing
legs.

Conversion between gray code and binary can be done with a daisy chain of
4-switch polarity reversors used as XOR gates.  Since each output feeds another
input as well as the following circuit, I suggest that the daisy chain use the
reversor piston input rather than the pressure input.  That way there is less
risk of pressure loss.

Conversion from n-bit gray code to n-bit binary or vice versa requires n-1
polarity reversors of 1-2 pistons and 4 switches each, in this case added to A
and B with extra pistons to suit.  The grand total for 3-bit is 8 pistons and 18
switches - not cheap!  Another one I could draw up sometime - I'll add it to the
queue!

A scheme for a gray code sequence of length 16 with four variables would rely on
the fact that in the gray code sequence, the first two variables go 00,01,11,10
and then 10,11,01,00 once the next bit has changed.  The sequence then repeats
when the 4th bit changes.

This means you can have a traditional pneumatic loop A and B, with the
connections from A's switch to B's cylinder and vice versa fed through polarity
reversers.  The reversers are reversed by C and D, pushed one way by a change in
C and the other by a change in D.

C and D are in a traditional loop but the supplies to the centres of the
switches are each interrupted by a single switch AND gate at A and a selector
switch at B.  When BA is 00, C's switch is supplied to change D and when BA is
10, D's switch is supplied to change C.

A and B each have 2 switches and one piston.  C and D can either each have two
cylinders and 6 switches or one can have 3P and 9S and the other 1P and 3S.
There are another 2 cylinders and 8 switches in 2 polarity reversers driven by
(C XOR D). Total 8 pistons and 24 switches plus decoder.  Grand total 14 pistons
and 36 switches.

8P + 18S for 3-bit and 14P + 36S for 4-bit.  I'm sure I can save a few on the
4-bit!  Is it cheaper to use 4 variables for an 8-step sequence and decode from
there?

Mark



Message has 1 Reply:
  Re: Gray code vs. Binary
 
(...) Hi Mark, You are right. I've had the wrong term in my head all this time. Gray code is not what I was thinking about I guess...... I'll have to go study Gray code better, and then study your descriptions. Man I wish you had a scanner and could (...) (19 years ago, 20-Oct-05, to lugnet.technic)

Message is in Reply To:
  Gray code vs. Binary
 
To all those pneumatic gurus..... The classic pneumatic timing circuit made with one switch per piston changes state following gray code (i.e. only one piston changes at a time). This means that a two piston timer goes through these states: (...) (19 years ago, 20-Oct-05, to lugnet.technic)

4 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR