Controlling 12/24V DC motor - mosfet circuit

I thought any Logic level mosfet should be fine. Perhaps the the RFP30N06LE is not the best choice?

:hushed:

This could be happening because?

Can't be because all mosfet are turned on but some of them are stuck in one position or another

Hi,
Can you please post images of your project please?
The controller and specifically the solenoid circuits.

What gauge wire are you using and what is the distance between controller/mosfets/solenoids?

Thanks Tom.. :smiley: :+1: :coffee: :australia:

Will do asap.

22AWG .

controller(arduino) is around 20 cm apart of the first board which containing the optocoupler and the 470R resistor to the arduino GND1.

the second board which including the MOSFET, the 6k8 Resistor to GND2 and the diodes is another 20cm apart from the first board .

from the second board there is a 22AWG wire of around 2.5Meter to each solenoid.

here is a picture of the project:

and the solenoid is connected with ts 3.55mm audio cable using 3.55mm audio jack

my code is set in a way that the on state is only 20ms. Can I just apply a +5V at the gate and check if there is 12V difference between drain and source?

You can write a short diagnostic sketch that slowly toggles a MOSFET pin.

Or, you can disconnect the MOSFET input and momentarily add 5v to this input.

Your choice.

That's a very odd way to connect the transistor of an opto-isolator, with the resistor in the emitter. This is because the emitter voltage is always about 0.7v below the base. You should really put the resistor in the collector with one end to Vcc, and ground the emitter. This way you should better saturate the transistor and get maximum voltage swing driving the MOSFETs. You will though have to invert the logic of the drive from the processor. It may be that with your configuration the MOSFETs aren't getting enough gate drive.

Also if you are concerned to release a solenoid quickly, connecting the flywheel diode directly across the coil actually delays the turn-off as the diode just forward biases when the FET turns off and the solenoid current just keeps flowing while the energy stored in the magnetic field dissipates. If you put a resistor in series with the diode it dissipates the energy quicker and the solenoid can release more quickly as the time constant L/R is shorter. You can make the resistor quite high as long as you respect the peak Vdd of the FETs. For 300mA and 12v, a 100R resistor would allow the drain voltage to peak at 42v, so as long as the FET can stand that you're OK. If not reduce the resistor - if you made it the same as the solenoid coil resistance you would double the voltage on the FET momentarily.

I did not know it. I might try it for net projects. For this one I won't.
In the configuration you suggested there is no resistor at the Mosfet Gate to ground?

I did the above - I put a 5V from the Arduino 5V pin at the anode pin of the optocoupler (I was reading 4.75V which make sense as there is the diode voltage drop)

I then placed the red prob of the DMM at the Drain of the Mosfet and the black prob on the Mosfet Source. I read only 2V. Those it make sense?

Hi,

No it isn't odd, that 6K8 resistor keeps the gate of the MOSFET connected to the source when the opto transistor is open.
Otherwise the gate will not turn OFF.

It has nothing to do with the opto transistor volt drop.

Tom.... :smiley: :+1: :coffee: :australia:

2V Vds means the MOSFET is not turning ON fully.

Hi,

  1. What voltage have you got on pin 1 of the opto to the GND1 connection?
  2. What voltage is on pin 6 of the opto with respect to GND2?

Tom... :smiley: :+1: :coffee: :australia:

Hi,
How many MOSFET gates and their 6K8 resistors have you got connected to EACH opto.
It looks like three MOSFETS.

Please draw an accurate schematic.

All those 6K8 = 3 in parallel = 2K6 load on the output of the opto.

Pull all the 6K8 resistors out and use ONLY ONE 10K resistor per OPTO, not per MOSFET.

Tom.. :smiley: :+1: :coffee: :australia:

In the common emitter connection, provided the LED is being sufficiently driven, the transistor will saturate with a collector load of 6k8 or 10k. Its collector voltage would then be about +0.3v. The minimum gate threshold voltage of the FET is 1v for 250 microamps IDS according to its data sheet so it would be turned well off at this voltage. When the LED is not being driven the collector voltage will go to Vcc2 - if that is 5v say then the FET will be well turned on. The only benefit I can see of the common collector config is that the FET is off if the Arduino is disconnected.

For each Mosfet gate there is only one 6k8 resistor to ground

They are not in parallel.

each mosfet is completely separated from the other. this is the schematic for each solenoid driver

What could be the case for that?

I have 4.75V between pin 1 of the Otto (when GPIO is HIGH) to GND1(arduino ground)

What is pin 6?

Sorry pin4.

@jhaine
When the opto led is ON, the opto transistor is ON and the gate of the MOSFET is pulled to VCC2.
The MOSFET turns ON.
When the opto led is OFF, the opto transistor is OFF and the gate of the MOSFET is pulled to GND2.
The MOSFET turns OFF.

Tom... :smiley: :+1: :coffee: :australia:

When no HIGH voltage is applied to the optocoupler pin 1 I'm reading 14V at the optocoupler pin 4 in respect to GND2.

When a HIGH voltage is applied to the optocoupler pin 1 I'm reading 11.82V at the optocoupler pin 4 in respect to GND2

Okay, what do you read on pin3 of the opto with respect to GND2, when apply voltage to the optocoupler pin 1?

Tom.. :smiley: :+1: :coffee: :australia: