Sequential shifter circuit design.

Thread Starter

Jonni Molyneux

Joined Dec 14, 2016
9
Hi, I'm currently trying to design a circuit for a sequential gearbox operation. I will be controlling two sets of solenoids each set controlling a gearbox cable.

I will have 2 main inputs:

Input 1 - Gear up
Input 2 - Gear down

I will have 12 outputs each output operating the solenoids in a certain pattern to mimic a gear change. E.g. output 1 operates solenoid a & b, output 2 operates solenoid a&c... etc

My issue is i am currently having is working out how to create such a circuit, i've driven myself mad messing with flipflops and logic gates trying too find a solution. I'm not even sure a digital circuit is the easiest way and maybe i should use a PLC or a another form of control module?

Any help would be hugely appreciated, please go easy as i'm a bit of a noob. I have attached a flow chart of the whole operation.

I have lots more drawings and tables so i can upload those too if needs be.

Thanks Jonni
 

Attachments

Last edited:

WBahn

Joined Mar 31, 2012
26,398
If someone gave you the flow chart you attached, could you make heads or tails of it? What does a diamond represent? What does it mean to have two paths leading out of a symbol?
 

Thread Starter

Jonni Molyneux

Joined Dec 14, 2016
9
If someone gave you the flow chart you attached, could you make heads or tails of it? What does a diamond represent? What does it mean to have two paths leading out of a symbol?
An input, its fairly clear from that flow chart what i want to happen surely, genuine question not be sarcastic :)
 

djsfantasi

Joined Apr 11, 2010
7,843
Umm, yah... No!

I am not being sarcastic. Simply stating a fact that I clearly cannot understand the flowchart. It may be clear to you, but truly it is not clear to all.

The symbols do not appear to be used as they are defined to be used. This causes confusion. Have you seen something similar to this?
 

nerdegutta

Joined Dec 15, 2009
2,682
To clarify:

Are you building a circuit to operate a gearbox on a motorcycle? And you want the solenoids to shift between gears?

Try to break your project into the tiniest pieces and blocks.
 

Thread Starter

Jonni Molyneux

Joined Dec 14, 2016
9
Sorry guys i've never really used flow charts either just seemed the simplest way to describe what i need.

The project is to use solenoids to control the gearbox cables on my car (Mitsubishi GTO if anyone is a car fan on here).

Ill upload some photos of my drawings and tables to see if that can help. I've just been chatting to a flat mate at uni doing computing and he liked the idea of using an Ardunio board and programming that?

The replies are much appreciated
 

Thread Starter

Jonni Molyneux

Joined Dec 14, 2016
9
Have you allowed for feed back ?
Have you allowed for missing a gear ?

How many cables do have you running from the stick to the box ?
How many solenoids have you allowed for ?

Seems like a good project ?
Thanks. Could you explain what you mean by feedback and missing a gear. Do you mean as in the solenoid being unable to complete its action and not engaging the gear? If so thats a good point but this should leave it in neutral thanks to the layout of the solenoids. then a quick up and down shift would reset it.

I will be using the standard 2 cable arrangement that leads into the cabin, each cable having 3 positions, one controlling up and down movement of the gear selector (back 1,2 middle 3,4 forward 5, R) and one controlling the rotation (back 1,3,5 middle Neutral forward 2,4,R) and therefore gear engagement, of the gear selector.

May have to double up solenoids on the array that actually engages the gears to get the desired force, eventually moving on to pneumatic actuators operated by solenoid valves with a small compressor when funds allow :)
 

Thread Starter

Jonni Molyneux

Joined Dec 14, 2016
9
Currently studying motorsport at uni so i'm happy to learn anything :)

Ah i see what you mean, say 4th to 5th the down or up one fails, if the the horizontal now fired id be going into 3rd and well all hell would break loose... I can fix this by having the horizontal solenoids routed through relays which are connected to contact switches on each of the up down settings. Doesnt matter is the horizontal one fails that just means ill be stuck in Neutral which causes no danger.

Thanks for that though i hadn't thought of that :)

And yes my tables basically show that the main thing is that the whole setup knows what gear it's in and then reacts to input based on that.

As for the gearbox i've just rebuilt it, the cables are flexible and my whole system is just mimicking what position the gear lever sets them in each gear. A better way to do it would be to attach this whole system directly to the gearbox casing operating the selector directly but then where do you stop i've already converted the car from an Auto/NA/Awd to Manual/Twin Turbo/RWD.
 

Sensacell

Joined Jun 19, 2012
2,893
In general I think you will find that solenoids are ill suited for this application.

Before you invest in an elaborate system to control all these solenoids, I suggest you rig up ONE solenoid to do the simplest single gear change, say 1 to 2, and evaluate the results.

Until you perform this test, you will have an insufficient understanding of the electro-mechanical nuances of the task.
It will require a monster solenoid, the force curve of which will be highly non-linear, very harsh and abrupt- causing all sorts on nasty problems, none of which are easily solved.

If it must be all electric, a closed loop DC motor servo system would be the way to go, then you can finely craft the movement via software, allowing you to optimize the shifting to a great degree, instead of hammering the shifter forks to pieces with solenoids.
 

Thread Starter

Jonni Molyneux

Joined Dec 14, 2016
9
In general I think you will find that solenoids are ill suited for this application.

Before you invest in an elaborate system to control all these solenoids, I suggest you rig up ONE solenoid to do the simplest single gear change, say 1 to 2, and evaluate the results.

Until you perform this test, you will have an insufficient understanding of the electro-mechanical nuances of the task.
It will require a monster solenoid, the force curve of which will be highly non-linear, very harsh and abrupt- causing all sorts on nasty problems, none of which are easily solved.

If it must be all electric, a closed loop DC motor servo system would be the way to go, then you can finely craft the movement via software, allowing you to optimize the shifting to a great degree, instead of hammering the shifter forks to pieces with solenoids.
Hi i have redesigned the system somewhat so it now only consists of 4 solenoids with returns controlled by springs. I have been struggling to find appropriate solenoids.

The gear cable that selects which fork to move E.G 1or2 3or4 5orR. Is very easy to move requiring little force so most solenoids would be fine for this operation. As for the solenoids that move it into gear that's currently a problem, i could double up solenoids to increase power, i can avoid shearing shift forks by fine tuning my solenoid selection to provide just enough force to move the fork. I will be measuring the force it takes to engage a gear somehow then working from that. That way the solenoid will activate pulling at x force therefore if the gear doesnt want to go in then i wont until the force required comes down to x force. I guess the same way you feel the force in your hand. I am considering using valve solenoids, pneumatic actuators and a small compressor to control the actual gear selection though if required

Thanks for the input, much appreciated.
 

Thread Starter

Jonni Molyneux

Joined Dec 14, 2016
9
I was waiting for you to mention reducing the amount of solenoids, looks like you're giving this a lot of thought. Well done mate.
Thanks man, yes 4 solenoids was the logical way to go, now the push solenoids have been replaced by springs, this requires a much stronger solenoid required for the actual gear engagement cable but i can cross that bridge when i come to it :)

Oh and i used your idea of feedback, now the program checks to see if the gearshift was successful using microswitches on each gear cable position, if it wasn't then it resets back to the original gear. I though abut resetting it to neutral but issues with going 3>4 that being unsuccessful so it goes 3>N, i don't check the gear for some reason and pull the gear up again now i'm going N>1 at 5000rpm in third gear at 90mph......

I could use a speed input and lockout gear changes based on that i guess but that seems to be going in the direction of the car doing the driving which i hate the idea of there is a reason i convert all my auto cars to manual :)

Its coming along now, i have written a code to control my microproccesor and designed the circuit. Now i just need to buy all the hardware for a small scale test and go from there, here's my program:

Code:
const int Solenoid1 = 13;

const int Solenoid2 = 12;

const int Solenoid3 = 11;

const int Solenoid4 = 10;

const int GearUP = 9;

const int GearDown = 8;

const int GearNeutral = 7;

const int SEGA = 6;

const int SEGB = 5;

const int SEGC = 4;

const int SEGD = 3;

const int SEGE = 2;

const int SEGF = 15;

const int SEGG = 14;

const int W = 16;

const int X = 17;

const int Y = 18;

const int Z = 19;

const int R = 20;

int Gearstate;

void setup() {
  // put your setup code here, to run once:

pinMode(Solenoid1, OUTPUT);

pinMode(Solenoid2, OUTPUT);

pinMode(Solenoid3, OUTPUT);

pinMode(Solenoid4, OUTPUT);

pinMode(SEGA, OUTPUT);

pinMode(SEGB, OUTPUT);

pinMode(SEGC, OUTPUT);

pinMode(SEGD, OUTPUT);

pinMode(SEGE, OUTPUT);

pinMode(SEGF, OUTPUT);

pinMode(SEGG, OUTPUT);

pinMode(GearUP, INPUT);

pinMode(GearDown, INPUT);

pinMode(GearNeutral, INPUT);

pinMode(W, INPUT);

pinMode(X, INPUT);

pinMode(Y, INPUT);

pinMode(Z, INPUT);

pinMode(R, INPUT);

//Set Gearstate as 1 to start, sets gearbox to neutral every startup

Gearstate = 1;

}

void loop() {

// Neutral -----------------------------------------------------------------------------------------

if (Gearstate == 1)

//Set 7 SEG

{ digitalWrite(SEGA, LOW);
  digitalWrite(SEGB, HIGH);
  digitalWrite(SEGC, HIGH);
  digitalWrite(SEGD, HIGH);
  digitalWrite(SEGE, HIGH);
  digitalWrite(SEGF, HIGH);
  digitalWrite(SEGG, LOW);}

  //Commence Neutral setup

{ if (digitalRead(GearUP) == HIGH) {
 
    digitalWrite(Solenoid1, HIGH);

    delay(100);

    digitalWrite(Solenoid4, HIGH);

    digitalWrite(Solenoid3, LOW);

    digitalWrite(Solenoid2, LOW);

    delay(300);  {

    if ((digitalRead(X) == HIGH) && (digitalRead(Z) == HIGH))

   {Gearstate = 2;}
 
   else {Gearstate = 1;}}
}
    else {
 
    digitalWrite(Solenoid1, LOW);

    digitalWrite(Solenoid4, LOW);

    digitalWrite(Solenoid3, LOW);

    digitalWrite(Solenoid2, LOW);

    Gearstate = 1;

    }

    if ((digitalRead(GearDown) == HIGH) && (digitalRead(R) == HIGH)) {
 
    digitalWrite(Solenoid3, HIGH);

    delay(200);

    digitalWrite(Solenoid2, HIGH);

    digitalWrite(Solenoid1, LOW);

    digitalWrite(Solenoid4, LOW);

    delay(300);

    {

    if ((digitalRead(Y) == HIGH) && (digitalRead(W) == HIGH))

   {Gearstate = 0;}
 
   else {Gearstate = 1;}}
 
   }
 
   else {
 
    digitalWrite(Solenoid1, LOW);

    digitalWrite(Solenoid4, LOW);

    digitalWrite(Solenoid3, LOW);

    digitalWrite(Solenoid2, LOW);

    Gearstate = 1;
  }}


// First GEAR -----------------------------------------------------------------------------------------------------

if (Gearstate == 2)

//Set 7 SEG

{ digitalWrite(SEGA, LOW);
  digitalWrite(SEGB, HIGH);
  digitalWrite(SEGC, HIGH);
  digitalWrite(SEGD, LOW);
  digitalWrite(SEGE, LOW);
  digitalWrite(SEGF, LOW);
  digitalWrite(SEGG, LOW);}

  //Commence First setup

{ if (digitalRead(GearUP) == HIGH) {
 
    digitalWrite(Solenoid1, HIGH);

    digitalWrite(Solenoid4, LOW);

    digitalWrite(Solenoid2, HIGH);

    digitalWrite(Solenoid3, LOW);

    delay(200);

    { if ((digitalRead(X) == HIGH) && (digitalRead(Y) == HIGH))

   {Gearstate = 3;}
 
   else {Gearstate = 2;}}
 
  } else {
 
    digitalWrite(Solenoid1, HIGH);

    digitalWrite(Solenoid4, HIGH);

    digitalWrite(Solenoid3, LOW);

    digitalWrite(Solenoid2, LOW);

    Gearstate = 2;

    }

    if (digitalRead(GearDown) == HIGH) {
 
    digitalWrite(Solenoid4, LOW);

    delay(100);

    digitalWrite(Solenoid1, LOW);

    digitalWrite(Solenoid2, LOW);

    digitalWrite(Solenoid3, LOW);

    delay(300);

    Gearstate = 1;
 
  } else {
 
    digitalWrite(Solenoid1, HIGH);

    digitalWrite(Solenoid4, HIGH);

    digitalWrite(Solenoid3, LOW);

    digitalWrite(Solenoid2, LOW);

    Gearstate = 2;
  }
}// Second GEAR -----------------------------------------------------------------------------------------------------

if (Gearstate == 3)

//Set 7 SEG

{ digitalWrite(SEGA, HIGH);
  digitalWrite(SEGB, HIGH);
  digitalWrite(SEGC, LOW);
  digitalWrite(SEGD, HIGH);
  digitalWrite(SEGE, HIGH);
  digitalWrite(SEGF, LOW);
  digitalWrite(SEGG, HIGH);}

  //Commence Second setup

{ if (digitalRead(GearUP) == HIGH) {
 
    digitalWrite(Solenoid2, LOW);

    delay(100);

    digitalWrite(Solenoid1, LOW);

    delay(100);

    digitalWrite(Solenoid4, HIGH);

    digitalWrite(Solenoid3, LOW);

    delay(300);

    {if ((digitalRead(Z) == HIGH) && (digitalRead(X) == LOW) && (digitalRead(W) == LOW))

   {Gearstate = 4;}
 
   else {Gearstate = 3;}}
 
  } else {
 
    digitalWrite(Solenoid1, HIGH);

    digitalWrite(Solenoid4, LOW);

    digitalWrite(Solenoid3, LOW);

    digitalWrite(Solenoid2, HIGH);

    Gearstate = 3;

    }

    if (digitalRead(GearDown) == HIGH) {
 
    digitalWrite(Solenoid1, HIGH);

    digitalWrite(Solenoid2, LOW);

    digitalWrite(Solenoid4, HIGH);

    digitalWrite(Solenoid3, LOW);

    delay(300);

    {if ((digitalRead(X) == HIGH) && (digitalRead(Z) == HIGH))

   {Gearstate = 2;}
 
   else {Gearstate = 3;}}
 
  } else {
 
    digitalWrite(Solenoid1, HIGH);

    digitalWrite(Solenoid4, LOW);

    digitalWrite(Solenoid3, LOW);

    digitalWrite(Solenoid2, HIGH);

    Gearstate = 3;
  }
}// Third GEAR -----------------------------------------------------------------------------------------------------

if (Gearstate == 4)

//Set 7 SEG

{ digitalWrite(SEGA, HIGH);
  digitalWrite(SEGB, HIGH);
  digitalWrite(SEGC, HIGH);
  digitalWrite(SEGD, HIGH);
  digitalWrite(SEGE, LOW);
  digitalWrite(SEGF, LOW);
  digitalWrite(SEGG, HIGH);}

  //Commence Third setup

{ if (digitalRead(GearUP) == HIGH) {
 
    digitalWrite(Solenoid1, LOW);

    digitalWrite(Solenoid3, LOW);

    digitalWrite(Solenoid4, LOW);

    digitalWrite(Solenoid2, HIGH);

    delay(300);

    {if ((digitalRead(Y) == HIGH) && (digitalRead(X) == LOW) && (digitalRead(Y) == LOW))

   {Gearstate = 5;}
 
   else {Gearstate = 4;}}
 
  } else {
 
    digitalWrite(Solenoid4, HIGH);

    digitalWrite(Solenoid1, LOW);

    digitalWrite(Solenoid3, LOW);

    digitalWrite(Solenoid2, LOW);

    Gearstate = 4;

    }

    if (digitalRead(GearDown) == HIGH) {
 
    digitalWrite(Solenoid4, LOW);

    delay(100);

    digitalWrite(Solenoid1, HIGH);

    delay(100);

    digitalWrite(Solenoid2, HIGH);

    digitalWrite(Solenoid3, LOW);

    delay(300);

    {if ((digitalRead(X) == HIGH) && (digitalRead(Y) == HIGH))

   {Gearstate = 3;}
 
   else {Gearstate = 4;}}
 
  } else {
 
    digitalWrite(Solenoid4, LOW);

    digitalWrite(Solenoid1, LOW);

    digitalWrite(Solenoid3, LOW);

    digitalWrite(Solenoid2, HIGH);

    Gearstate = 4;
  }
}
// Fourth GEAR -----------------------------------------------------------------------------------------------------

if (Gearstate == 5)

//Set 7 SEG

{ digitalWrite(SEGA, LOW);
  digitalWrite(SEGB, HIGH);
  digitalWrite(SEGC, HIGH);
  digitalWrite(SEGD, LOW);
  digitalWrite(SEGE, LOW);
  digitalWrite(SEGF, HIGH);
  digitalWrite(SEGG, HIGH);}

  //Commence Fourth Setup

{ if (digitalRead(GearUP) == HIGH) {
 
    digitalWrite(Solenoid2, LOW);

    delay(100);

    digitalWrite(Solenoid3, HIGH);

    delay(100);

    digitalWrite(Solenoid4, HIGH);

    digitalWrite(Solenoid1, LOW);

    delay(300);

    {if ((digitalRead(W) == HIGH) && (digitalRead(Z) == HIGH))

   {Gearstate = 6;}
 
   else {Gearstate = 5;}}
 
  } else {
 
    digitalWrite(Solenoid4, HIGH);

    digitalWrite(Solenoid1, LOW);

    digitalWrite(Solenoid3, LOW);

    digitalWrite(Solenoid2, LOW);

    Gearstate = 5;

    }

    if (digitalRead(GearDown) == HIGH) {
 
    digitalWrite(Solenoid2, LOW);

    digitalWrite(Solenoid4, HIGH);

    digitalWrite(Solenoid1, LOW);

    digitalWrite(Solenoid3, LOW);

    delay(300);

    {if ((digitalRead(Z) == HIGH) && (digitalRead(W) == LOW) && (digitalRead(X) == LOW))

   {Gearstate = 4;}
 
   else {Gearstate = 5;}}
 
  } else {
 
    digitalWrite(Solenoid4, LOW);

    digitalWrite(Solenoid1, LOW);

    digitalWrite(Solenoid3, LOW);

    digitalWrite(Solenoid2, HIGH);

    Gearstate = 5;
  }
}

// Fifth GEAR -----------------------------------------------------------------------------------------------------

if (Gearstate == 6)

//Set 7 SEG

{ digitalWrite(SEGA, HIGH);
  digitalWrite(SEGB, HIGH);
  digitalWrite(SEGC, HIGH);
  digitalWrite(SEGD, LOW);
  digitalWrite(SEGE, LOW);
  digitalWrite(SEGF, HIGH);
  digitalWrite(SEGG, HIGH);}

//Commence Fifth setup

{ if (digitalRead(GearDown) == HIGH) {
 
    digitalWrite(Solenoid4, LOW);

    delay(100);

    digitalWrite(Solenoid3, LOW);

    delay(100);

    digitalWrite(Solenoid2, HIGH);

    digitalWrite(Solenoid1, LOW);

    delay(300);

    {if ((digitalRead(Y) == HIGH) && (digitalRead(W) == LOW) && (digitalRead(X) == LOW))

   {Gearstate = 5;}
 
   else {Gearstate = 6;}}
 
  } else {
 
    digitalWrite(Solenoid4, HIGH);

    digitalWrite(Solenoid1, LOW);

    digitalWrite(Solenoid3, HIGH);

    digitalWrite(Solenoid2, LOW);

    Gearstate = 6;
  }
}
// Reverse -----------------------------------------------------------------------------------------------------

if (Gearstate == 0)

//Setting 7 SEG

{ digitalWrite(SEGA, HIGH);
  digitalWrite(SEGB, HIGH);
  digitalWrite(SEGC, HIGH);
  digitalWrite(SEGD, HIGH);
  digitalWrite(SEGE, HIGH);
  digitalWrite(SEGF, HIGH);
  digitalWrite(SEGG, LOW);}

  //Commence reverse setup

{ if (digitalRead(GearUP) == HIGH) {
 
    digitalWrite(Solenoid2, LOW);

    delay(100);

    digitalWrite(Solenoid3, LOW);

    digitalWrite(Solenoid4, LOW);

    digitalWrite(Solenoid1, LOW);

    delay(300);

    Gearstate = 1;
 
  } else {
 
    digitalWrite(Solenoid3, HIGH);

    digitalWrite(Solenoid1, LOW);

    digitalWrite(Solenoid4, LOW);

    digitalWrite(Solenoid2, HIGH);

    Gearstate = 0;

    }
  }

  //Neutral instant switch, if switch is on then gear changes to neutral

  if (digitalRead(GearNeutral) == HIGH) {

    digitalWrite(Solenoid2, LOW);

    digitalWrite(Solenoid4, LOW);

    delay(100);

    digitalWrite(Solenoid3, LOW);

    digitalWrite(Solenoid1, LOW);

    Gearstate = 1;
  }
}
 
Last edited:

Sensacell

Joined Jun 19, 2012
2,893
If you are willing to suffer an air compressor- the pneumatic cylinder option is a far better choice than solenoids.

You can control the speed and force of air cylinders to a great degree.
 

Thread Starter

Jonni Molyneux

Joined Dec 14, 2016
9
If you are willing to suffer an air compressor- the pneumatic cylinder option is a far better choice than solenoids.

You can control the speed and force of air cylinders to a great degree.
The car has a straight 3 inch uninterrupted exhaust so probably wouldn't even hear a compressor, plus i have a large fuel pump buzzing away constantly in the background too hah :)

Any chance you could point me in the direction of the basics of the system, i haven't used pneumatic actuators before and the only ones i could find were silly prices :/ I could control the easy cable direct with solenoids and the hard cable with solenoid valves connected to the pneumatic system right?
 

dannyf

Joined Sep 13, 2015
2,197
Code:
  if (digitalRead(GearUP) == HIGH) {
you can greatly improve its readability by rewriting it as:

Code:
  if (readGear() == GearUp) {
that is obvious to the reader what's going on immediately.
 
Top