Arduino cutting 12V wire with PMOS

Hello!

I'm making arduino motorcycle quickshifter. I need to cut 12V wire going to coils for 50-100ms.

There is my motorcycle wiring diagram at page 456.

I would like to cut red-black wire going from 10 (starting circuit cut-off relay) to 15-18 (coils). I have used IRF9Z34N P-Mosfet as a high side switch with no success.

I've tried several things:

  1. I've connected drain to cut-off relay side and source to coils side. I left gate with nothing. I started motorcycle and it was running like crap. I couldn't get more than 3k RPM.

  2. I've connected drain and source as before, but I've touched gate terminal to - in motorcycle battery. After that engine was running fine.

Then I've decided to try cutting wire with arduino and button.

I have used a simple button program:

const int buttonPin = 12;     // the number of the pushbutton pin
const int ledPin =  13;      // the number of the LED pin where IRF9Z34N gate is connected

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

void setup() {
  // initialize the LED pin as an output:
  pinMode(ledPin, OUTPUT);
  // initialize the pushbutton pin as an input:
  pinMode(buttonPin, INPUT);
}

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

  // check if the pushbutton is pressed.
  // if it is, the buttonState is HIGH then PMOS should stop conducting
  if (buttonState == HIGH) {
    // turn LED on:
    digitalWrite(ledPin, HIGH);
  } else {
    // turn LED off:
    digitalWrite(ledPin, LOW);
  }
}

Its not working at all. When I press button for the first time bike begins to run like crap, then after releasing after like 2s it runs again fine, but after several presses it won't go back to normal operation.

Anyone know possible solution?

Should i put Pulldown resistor between gate pin (13) and GDN? like 10kOhms?

@EDIT

Now i have checked that:
After cutting red-black wire bike still starts up, but runs like crap. May that happen because two wires are going to each coil? One 12V and one from ECU?

I think i should try cutting injectors, because only one possitive wire connects to each.

@@EDIT

Still nothing. I've even tried connecting directly to killswitch wire to cut ignition, but nothing happened. I've connected it that way:
http://scr.hu/0a3o/dy2m7

The P-MOS transistor requires a gate signal swing between 12V and Gnd, too much voltage for an Arduino output. You need another transistor to switch the gate. Some NPN transistor plus base and collector resistors can do that.

Hi,
Welcome to the forum.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Thanks.. Tom... :slight_smile:

Go to the upper right corner of the forum and you will see a search function. Type in motorcycle quickshifter and you will see a lengthy thread by member "rickerman" that covers the exact thing tat you are trying to accomplish.

DrDiettrich:
The P-MOS transistor requires a gate signal swing between 12V and Gnd, too much voltage for an Arduino output. You need another transistor to switch the gate. Some NPN transistor plus base and collector resistors can do that.

But IRF9Z34N has Vgs = 2-4V, then it should be enough for Arduino? When i tough gate terminal to battery + it stil doesn't cut.

I've connected it the way shown in attachment.

"rickerman" had a different case. He said that after he disconnect 12V wire his coild stops from firing, but in mine bike they still fire, but very poorly.

The threshold voltage Vgs is -2 to -4V, counting from source (+12V). If you short gate and source, the FET will be definitely off.

But you seem to operate the FET in reverse polarity, where the Avalanche diode always conducts. A P channel FET must have source positive and drain negative.

Hmm.. Then i'll try that on thursday.

I've connected it basing on that video:

Then in Your opinion I should connect drain to coils side and source to relay side?

The video uses logic level FETS and a 5V supply, what's within the range of the Arduino outputs. Your FET is neither logic level nor is it driving a 5V load.

I guess that the relay goes to +12V, then the source must go there.

All you need to know about mosfet switching here.

Diagram#3 is for high-side switching.
Leo..

I've send link to my motorcycle service where is wiring diagram on mine google drive in first post.

Yeah, relay goes to +12V.

There is a problem with #3 Diagram, because if my Arduino will fail and there won't be voltage at transistor base, then mosfet wont conduct any by engine won't. Will using PNP instead of NPN transistor be a solution?

It depends on the kind of Arduino failure. If the output pin is tied low, or becomes a high impedance input (after reset), the FET will be off. If the output pin is tied high, the FET will be on. The same for a failing FET, it may become shorted or high impedance.

By "tied high" you mean that I should put 10kOhms resistor betweem arduino output pin and 5V pin?

How about using LM358 to convert 5V to 12V?

I have a friend who has won the UK kart championship several times. He only uses the clutch for the start - then just rams the gears through for every change.

He's mad, of course.

But succesful....

regards

Allan

Hmm... Gratulations :)? What does it bring to the topic?

Anyone opinion on using LM358?

Instead of a transistor, an opamp circuit requires more resistors and other components.

Hmm... Gratulations :)? What does it bring to the topic?

well .... you could try crashing the box rather than clever electronics....

regards

Allan

allanhurst:
well .... you could try crashing the box rather than clever electronics....

regards

Allan

I'm not full time racer, just visiting race track like 10 times a year. I'm trying to make quickshifter just for fun and to see if it's possible to make something working better than branded ones with way less money.

I've attached opamp circuit in attachment. Won't it work that way?

Done! I've osed op-amp and non-inverting circuit with 10kOhms, 15kOhms resistors and 12V input voltage. Now thats working great!