Quickshifter project

Hello everyone,
i just started to use arduino uno hoping it would be a fun hobby and to make some useful projects, but its being a lot more difficult than i imagined :-[
I ve been trying to program it so i can make a quickshifter for my motorcycle and just cant make it work. The goal is something like this: Arduino Quick Shifter - Pt 1 - YouTube

The red led would be the the motorcycle ignition coils.

Can anyone help me with programing and connections before my brain fry?

Thank you

What have you done towards the project?
Where is your attempt at programming?
What experience do you have at programming and electronics?

We are happy to help but you need to do something for yourself.

Weedpharma

For sure, i dont want someone to do the job for me, just point me in the right direction.
My experience with program and electronics is very small, i am welder and for the past years have been doing maintenance on supermarkets.
I have managed to connect the switch and the Led so it changes blink speed when the switch is pressed. I just cant make it blink for 70 ms when i press the button, coudnt find the what program code does that.
I have searched and i want to learn but its hard when you start from zero.
Sorry about my writting, english is not my native language.
Thank you for everything.

Hi Nuno,

You can use the delayMicroseconds(); function to make a delay of 70us.

Best,
Jakob

Take a look at the "blink without delay" example. You'll be using the exact same technique, so its good to understand that one first. After that, theres an example "many things at once", that'll come in useful too (its here: http://forum.arduino.cc/index.php?topic=223286.0)

You will also need to know how to make it blink once per button press. To do this you need to trigger on the edge of the pulse created when you press the button.

.......
If button pressed
Send a pulse
If button still pressed loop around until it is not

Here after button released.

Weedpharma

Thank you very much for all your help and quick replies.
I will look into it and let you know how it went.
Thank you

I have the led connected to pin 13 and GND and the button to pin 2 and when i press the button the led turns off.
I have used

delayMicroseconds();

but it doesnt blink, it stays off.
Am i missing a code?

Greensprings:
HealTech QuickShifter Easy Install & Setup - YouTube

Greensprings the one on the video uses a pressure sensor, I think the switch will be more reliable and more easy to tune

nuno_v:
I have the led connected to pin 13 and GND and the button to pin 2 and when i press the button the led turns off.
I have used

delayMicroseconds();

but it doesnt blink, it stays off.
Am i missing a code?

delayMicroseconds() Requires the number of micro second in the brackets. Any number of microseconds less than around 10,000 will be to short to see.

Use delay() for longer short delays. For longer delays use millis().

Weedpharma

Sorry about the micro and miliseconds mistake, i need miliseconds
So i now have this:

const int buttonPin = 2;    // the number of the pushbutton pin
const int ledPin = 8;      // the number of the LED pin

// Variables will change:
int ledState = HIGH;         // the current state of the output pin
int buttonState;             // the current reading from the input pin
int lastButtonState = LOW;   // the previous reading from the input pin
int jaPiscou = 0;

// the following variables are long's because the time, measured in miliseconds,
// will quickly become a bigger number than can be stored in an int.
long lastDebounceTime = 0;  // the last time the output pin was toggled
long debounceDelay = 50;    // the debounce time; increase if the output flickers

void setup() {
  pinMode(buttonPin, INPUT);
  pinMode(ledPin, OUTPUT);

  // set initial LED state
  digitalWrite(ledPin, ledState);
}

void loop() {
  // read the state of the switch into a local variable:
  int reading = digitalRead(buttonPin);  

  // check to see if you just pressed the button 
  // (i.e. the input went from LOW to HIGH),  and you've waited 
  // long enough since the last press to ignore any noise:  

  // If the switch changed, due to noise or pressing:
  if (reading != lastButtonState) {
    // reset the debouncing timer
    lastDebounceTime = millis();
  } 
  
  if ((millis() - lastDebounceTime) > debounceDelay) {
    // whatever the reading is at, it's been there for longer
    // than the debounce delay, so take it as the actual current state:

    // if the button state has changed:
    if (reading != buttonState) {
      buttonState = reading;}      

      // only toggle the LED if the new button state is HIGH
     if (buttonState == HIGH && jaPiscou == 0) {     
       
    digitalWrite(ledPin, LOW);   //apaga o led
    delay(70); //aguarda 1000 ms
    digitalWrite(ledPin, HIGH); //acende o led 
    jaPiscou = 1; //altera o valor da variável jaPiscou para evitar que entre nesse if novamente
  } 
  else {
    if(buttonState == LOW) {   
        // Deixa o led ligado:
        digitalWrite(ledPin, HIGH); 
        jaPiscou = 0; //quando o botão deixar de ser pressionado eu deixo a variavel jaPiscou na condição inicial que é = 0
  
    }  
  }
  }
  
  // set the LED:
  digitalWrite(ledPin, ledState);

  // save the reading.  Next time through the loop,
  // it'll be the lastButtonState:
  lastButtonState = reading;
}

The issue is that the arduino fails every 30 seconds even if i dont touch anything. Is this the program restarting? What can i do to change it?
Thank you very much for all your help.

Define “failing every 30secs”.

Use

Serial.print(" I am at this point and variable value is. ");
Serial.println(variable value); //print the value of the variable here so you can see what it is.

At various points to output a message to the serial terminal of the IDE so you can see what is happening at various points. You may need to to put a delay of a couple of hundred millisecond after it if it is too fast to see.

Weedpharma

A dozen years ago or so, we built circuit boards for people doing just what you are doing. They changed from killing the ignition to killing the fuel injection. Killing the ignition for a few milliseconds and then turning it back on did remove the transmission torque, but quite often caused the engine to back fire and explode.

Killing the fuel injection system accomplished the same results with out needing to replace the engine.

Just a thought.

Paul

So the cause of the arduino failing every 30 seconds problem was the connection to the USB port, plugged the 12v adapter and it works fine.
Thank you Paul for the tip, i had thought about that and i guess i will follow you advice.
Thanks for all your help, i ll let you know how it went

Hi nuno,

I am also working on this project , on a '03 cbr 600rr, and it's going well so far.
I used the side stand input to cut ignition off. If you have any questions let me know if I can help.

Here is a video of the first test ride.

Good luck with your project, let us know how it went.

Hi!
I know, i know… a year has passed since the last reply here.

I just read this, and i was wondering if anyone succeeded on this project.
I finished mine two weeks ago, and i’m using and loving it!

Hope to hear from someone!

I am beginning to take on this project as well. Let me know what method you used to cut ignition; I’m told relays are too slow and the ignition coils tend to generate several thousands of volts spike back-emf which can damage simple transistors…

I am thinking of using a MOSFET to ground the ignition coils for the set time interval, hoping to get close to or lower than 50ms ignition cut time throughout all gears and all RPM (won’t really be quick shifting without clutch at lower than 8k rpm, what’s the point of quick shifting without being quick in the first place lol).

I am going to be using a custom shift pedal linkage which will house a simple on-off switch. The way the linkage is designed, the switch will be actuated when the shift linkage is under compression and applying a minor amount of spring loaded pressure on the gear shift drum via a coil spring inside the linkage housing and a simple mechanical mechanism (similar to a piston in cylinder). I think this will be a great way to ensure consistent shifting with even the lightest pressure on the pedal (but enough to actuate the switch).

Although I’ve never worked with Arduino I assume the logic skill level will be similar to C / MATLAB which I am familiar with.

My initial idea is that it will go something like this (general case, no idea on the details yet);


//Continuous scanning for 5v from pedal switch (when un-actuated, 0V)

if 3 =< switch voltage =< 6 //closed circuit from pedal switch

MOSFET gate voltage HIGH //completes circuit from ignition primary coil POSITIVE to chassis ground, cutting ignition

wait (XX)ms //ignition kill time, the transmission dog clutches engage new gearing while transmission “floats” under no torque

MOSFET gate voltage LOW //open switch, coil charges and fires as normal

wait (XXX)ms //prevent multiple ignition cuts at once, fastest possible shifting will be at least with 0.5s interval

end

continue scanning for pedal switch inputs


Some things i’m considering and would appreciate any info on;

  1. what type of power switch or transistor to use, whether a FET or not (I’m not familiar with these types of components and their pros/cons/requirements, unless logic MOSFET they typically seem to require more than 5v for gate voltage)

  2. how to do a continuous scan for a switch input and what frequency is each Arduino model capable of? Most likely the difference is negligible and for this project the speed of the system is not a significant detail anyways, it is all happening far faster than could be done manually

  3. is it even possible to take a current flow through the pedal switch as a signal to the Arduino, what pin to use digital / analog?, i assume it needs a resistor in series to prevent short damage

  4. what type of delays are there between receiving signals, processing them, applying logic, applying power to pins, etc? to get a general idea

  5. I think the kill time can be fine tuned by trial and error starting from a slow kill time 100ms+, moving to faster until there is impact of the dog clutches or mis-shifts or other symptoms of being too quick, then easing off the kill time by a safety factor

  6. The double shift wait time can be fine tuned but probably a set and forget value of 500ms or 750ms should be fine

  7. what is the simplest way to power the Arduino via vehicle rectifier voltage? Fluctuates between ~12 and ~14v

  8. When the Arduino powers up, if it is installed in the vehicle and no connection to a pc, will it start running the script for continuous input scanning on its own, is there any kind of time delay? no idea what sequence is followed

  9. what impact does power interruption have on the arduino, should there be some sort of capacitance in the supplied voltage, any other power safety nets to consider

  10. Should this system be sensitive to engine EMI?

  11. What is the smallest or most appropriate platform for this type of project, is an Arduino Nano sufficient, any considerations that come to mind?

I am not aware of any issues with the engine being damaged as someone previously posted… in my experience ignition kill can cause a small qty of un-burnt AF mixture to enter the exhaust manifold causing a small pop, exhaust flames at worst (awesome) nothing that doesn’t already happen on my 2006 SV650N which is running slightly lean at ~12.75 AFR due to slip-on muffler without ECM tuning. I’m not concerned with either and will be trying to match ports, polish the heads, increase compression via reduced head gaskets, swapping exhaust cam for more aggressive cam profile over the winter and adjusting valve clearances, perhaps do another dyno run to see what all the adjustments yield, all assuming the engine doesn’t explode.

Although I’ve never touched an Arduino in my life the opportunities seem endless especially on such a cheap little platform. Another easy feature to implement on the motorcycle is wheelie control via similar power cut (ignition cut) based on gyroscopic sensor input on pitching angle. Don’t know if current systems on the market use this type of power cut for wheelie control, but i assume not, would have to look into the possible issues.

Thanks for any help, I think the quick-shifter is easily one of the best performance modifications to any motorcycle for faster lap times or more consistent shifting and reduced clutch wear & transmission damage.

The code I've got together so far is this.

//variables will not change:
const int shift = 2;     // the number of the pedal shift button pin
const int mos =  13;      // the number of the MOSFET gate pin

// variable will change:
int buttonState = 0;         // variable for reading the pushbutton status

void setup() {
  // put your setup code here, to run once:
  // initialize the MOSFET gate pin as an output:
  pinMode(mos, OUTPUT);
  // initialize the pedal shift button pin as an input:
  pinMode(shift, INPUT);
}

void loop() {
  // read the state of the pushbutton value:
  buttonState = digitalRead(shift);

  // check if the pushbutton is pressed.
  // if it is, the buttonState is HIGH:
  if (buttonState == HIGH) {
    // turn MOSFET gate on:
    digitalWrite(mos, HIGH);
    //wait for ignition cut duration
    delay(100);
    //end ignition cut 
    digitalWrite(mos, LOW);
    //wait to prevent double ignition cut for 1 shift
    delay(650);
  }
}

Hello Alex

I watched your video and I want to make it to my motorcycle
how can you tell me what you use and how you do it
please please pleaseeeeeeee

instagram:burak.ozzturk

whatsapp:+905524520055