Go Down

Topic: Replace relay with mosfet? (Read 2190 times) previous topic - next topic

steve_1988

#30
Jul 09, 2020, 10:28 am Last Edit: Jul 09, 2020, 11:53 am by steve_1988
The motor has brushes and a commutator in it, when the motor runs they cause electrical noise.
The capacitor prevents the commutator noise from getting out into the rest of the circuit.
Usually 0.1uF cap is enough to do the job.
Tom... :)
Hi Tom!

Thanks for the explanation!  :)

Well, I have tested the circuit below on the breadboard. But the LED doesn't light up at all. Any idea??




Here is the sketch:

Code: [Select]

void setup() {
    Serial.begin(9600);
  pinMode(2, INPUT_PULLUP); //Jumper Wire
  pinMode(5, OUTPUT); // Mosfet pin
  digitalWrite(5, LOW);
}

void loop() {

int Jumper = digitalRead(2);
  
 if (Jumper == LOW) {
    digitalWrite(5, HIGH);
  } else {
    digitalWrite(5, LOW);
  }
}



Edit :

Ok. I think I have found the problem. The LED will ONLY light up without the pull-up resistor between the Gate and Source pin. Even lower the pull-up resistor to 220 ohm, it still doesn't light up.

Why....?



TomGeorge

Hi,
R1 is tool low, try 10K.

Do you have a DMM?

Tom... :)
Everything runs on smoke, let the smoke out, it stops running....

steve_1988

#32
Jul 09, 2020, 12:59 pm Last Edit: Jul 09, 2020, 01:11 pm by steve_1988
Hi,
R1 is tool low, try 10K.

Do you have a DMM?

Tom... :)
Hi Tom!

OK. Have tried 10k, still the same.

Yes! The Red probe to Mosfet Source, Black probe to Drain get 11.17V (with 10k ohm).

When I use probe to "touch" both Source and Drain pin, the LED lights up.

To add on:
I didn't connect the Mosfet gate to the BJT when measure the above voltage.

TomGeorge

Hi,
You should leave the gate connected.
Measure the gate voltage of the MOSFET, with respect to gnd,  when the output D5 is HIGH and when it is LOW.
Measure the drain voltage of the MOSFET, with respect to gnd,  when the output D5 is HIGH and when it is LOW.
Measure the collector voltage of the BJT, with respect to gnd,  when the output D5 is HIGH and when it is LOW.

Thanks.. Tom... :)
Everything runs on smoke, let the smoke out, it stops running....

steve_1988

Hi,
You should leave the gate connected.
Measure the gate voltage of the MOSFET, with respect to gnd,  when the output D5 is HIGH and when it is LOW.
Measure the drain voltage of the MOSFET, with respect to gnd,  when the output D5 is HIGH and when it is LOW.
Measure the collector voltage of the BJT, with respect to gnd,  when the output D5 is HIGH and when it is LOW.

Thanks.. Tom... :)
Hello Tom!

Wow! It's working now :D

I shouldn't disconnect the Gate wire in the previous test (facepalm)

Here are the numbers:

When D2 is LOW and D5 is HIGH, LED lights up.

--------------

Gate

Low
12.71V

High
1.30V


--------------

Drain

Low
0.00 / 0.01

High
12.84V

--------------

BJT (collector)

Low
12.71V

High
0.16V

--------------

Are these numbers looks "Healthy"??


larryd

No technical PMs.
If you are asked a question, please respond with an answer.
If you are asked for more information, please supply it.
If you need clarification, ask for help.

steve_1988

Hello again!

Here's an update for today. 

Tested the circuit today with the gasoline water pump.

Good news. I didnt fry my mosfet! YAY!!

Bad news:

Unfortunately, the circuit not working :(

Then I measured the voltage, and this is the result:

Collector
Low: -0.25
High: 0.01


Drain
Low: 0.01
High: 0.01


Gate
Low: -0.29
High: -0.06


I placed the mosfet between the cdi and plug coil.

Cdi signal wire to Mosfet source > Drain to plug coil.

I didnt add any Capacitor and Flyback diode to the plug coil / connect the plug coil ground to arduino as it will make the plug coil stop working, no spark.

The reason why i placed the mosfet there is because when the water in the tank has reach it highest level then  the arduino will stop the water pump cdi from sending signal to plug coil. Hence it will stop pumping water into the tank.

Any idea???

larryd

#37
Jul 10, 2020, 04:14 pm Last Edit: Jul 10, 2020, 04:14 pm by larryd
Show us a good image of your 'actual' wiring.   
Posting images:  https://forum.arduino.cc/index.php?topic=519037.0
No technical PMs.
If you are asked a question, please respond with an answer.
If you are asked for more information, please supply it.
If you need clarification, ask for help.

steve_1988

#38
Jul 10, 2020, 06:30 pm Last Edit: Jul 11, 2020, 04:47 pm by steve_1988
Removed old schematic.

larryd

#39
Jul 10, 2020, 09:55 pm Last Edit: Jul 10, 2020, 09:56 pm by larryd
Show us a good image of your 'actual' wiring.   


What are the part numbers for the BJT and MOSFET ?

Assume CDI is +12vdc, do you have the negative connected to the Arduino GND ?

BTW, what is the coil resistance ?

You did place a kickback diode across the coil ?








No technical PMs.
If you are asked a question, please respond with an answer.
If you are asked for more information, please supply it.
If you need clarification, ask for help.

detown

Is this a cdi on a single cylinder gas engine? If so the voltage going to the coil is somewhere in the 300 to400 volt range.
If the OP would give a little more detail on the engine that the pump uses I might be able to help.
Just a little hint. If the engine has a kill button or switch, why not just tap into that circuit to kill the engine?

steve_1988

#41
Jul 11, 2020, 05:02 pm Last Edit: Jul 11, 2020, 05:17 pm by steve_1988
Show us a good image of your 'actual' wiring.  



What are the part numbers for the BJT and MOSFET ?

Assume CDI is +12vdc, do you have the negative connected to the Arduino GND ?

BTW, what is the coil resistance ?

You did place a kickback diode across the coil ?
Hi Larryd!

Apologies! Forgot to include the part number. :P



HERE the mosfet datasheet.


Yes. It's a +12 cdi. and yes. I have connect the negative of the ignition coil to Arduino ground.

The coil resistance: 0.16 ohm

I couldn't place a diode across the coil as the coil will not make any spark to fire the gasoline water pump.

***********************

Forgot to mention in the previous reply:

I can start the water pump, but unable to stop it when D2 is LOW.

Code: [Select]

void setup() {
    Serial.begin(9600);
  pinMode(2, INPUT_PULLUP); // Push button switch will be replace with a water level sensor
  pinMode(5, OUTPUT); // Mosfet pin
  digitalWrite(5, HIGH);
}

void loop() {

int ButtonSwitch = digitalRead(2);
  
 if (ButtonSwitch == LOW) {
    digitalWrite(5, LOW);
  } else {
    digitalWrite(5, HIGH);
  }
}



*********************************

Measure when pump running:

Collector:
Low: -0.27
High: 0.01

Gate:
Low: -0.32
High: -0.06

Drain:
Low: 0.01
High: 0.01

Power on, Pump not running:

Collector:
Low: -0.40
High: 0.01

Gate:
Low: -0.40
High: -0.03

Drain:
Low: 0.01
High: 0.01

steve_1988

#42
Jul 11, 2020, 05:09 pm Last Edit: Jul 11, 2020, 05:10 pm by steve_1988
Is this a cdi on a single cylinder gas engine? If so the voltage going to the coil is somewhere in the 300 to400 volt range.
If the OP would give a little more detail on the engine that the pump uses I might be able to help.
Just a little hint. If the engine has a kill button or switch, why not just tap into that circuit to kill the engine?
Hi Detown!

Thanks for the reply!

Quote
Is this a cdi on a single cylinder gas engine?
Yes!

Quote
Is this a cdi on a single cylinder gas engine?
I believe the 300++ volt is the output voltage from secondary side not Primary side, right?

Quote
Just a little hint. If the engine has a kill button or switch, why not just tap into that circuit to kill the engine?
I will be using the water level sensor to kill the water pump. Let's say when the tank is full, it will stop pumping water into the tank. :)

detown

Do a little research on cdi ignitions. As I said the primary can be in the 300 to 400 volt range. The secondary would be in the KV range.
If you could supply a link to the pump or at least the engine that it uses I might be able to give a little more informed answer.

steve_1988

Hi Detown!

300v! I didn't know that  :smiley-eek-blue:

I googled. But can't find the pump. I only know it was a china product, and quite old model.

But it looks something like this





Go Up