Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Using MOSFET as switch

Status
Not open for further replies.

Rambo

Member level 3
Joined
Nov 25, 2004
Messages
55
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Activity points
811
mosfet as a switch

I am making a board to fire a solenoid which is going to in turn fire a painball gun. I am having a problem with the solenoid not getting enough current though. I was wondering if I was using the MOSFET right. I am using the IRF540 MOSFET to switch on the solenoid. I am using a 10v battery. Coming from the 555 timing chip is 9volts. I hooked the output of the 555 up to the gate of the MOSFET. I hooked the source up to ground. And I hooked the drain up to one side of the solenoid. I can't understand why the solenoid isn't getting enough current because the stock electronics for the paintball gun use a MOSFET just like mine which is rated for almost the same current. The only thing that I can think of is that I'm using the MOSFET wrong. Any help appreciated. Thanks.
 

epp

Full Member level 5
Joined
Mar 4, 2004
Messages
243
Helped
12
Reputation
24
Reaction score
4
Trophy points
1,298
Activity points
1,847
using mosfet as a switch

Check firing voltage of mosfet. I think that 9V at gate is not enough. It should be 15V continuous. You can use zener diode 15V at gate in order to protect mosfet from overvoltage and keep this voltage stable. You turn off mosfet when you bring 0 to -15V continuous voltage to its gate.
 

Rambo

Member level 3
Joined
Nov 25, 2004
Messages
55
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Activity points
811
irf540 switch

So you're saying I'm in trouble with only a 10v battery?
 

e_eja

Full Member level 2
Joined
Nov 15, 2003
Messages
141
Helped
4
Reputation
8
Reaction score
0
Trophy points
1,296
Activity points
1,079
mosfet switch

connect the gate eith darlington transistor such as BC517, mine work with such configuration
best regards
 

XNOX_Rambo

Advanced Member level 1
Joined
Jul 13, 2002
Messages
435
Helped
90
Reputation
180
Reaction score
2
Trophy points
1,298
Location
Far out, man!
Activity points
3,568
using mosfets as switches

Hi Rambo,

Don't give up yet! :wink:

The gate of the mosfet i quite capacitive, almost 2nF.
The 555 is probably having trouble charging it quickly, turning on the mosfet,
so you could try e_eja's suggestion with a transistor to boost the output from
the 555.

/Rambo
 

    Rambo

    Points: 2
    Helpful Answer Positive Rating

Rambo

Member level 3
Joined
Nov 25, 2004
Messages
55
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Activity points
811
mosfet as switch

That idea makes sense, thank you. Wouldn't I need a P-channel transistor to do it though?
 

Rambo

Member level 3
Joined
Nov 25, 2004
Messages
55
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Activity points
811
mosfet switch biasing

That site had a lot of useful information but I still can't really figure out what to do. The 555 examples were kind of hard to understand. But the transistor at the base sounds like a good idea. Because I need a positive voltage at the gate, wouldn't I need a P-type transistor to switch the positive voltage to the gate?? I cannot wait to get this to work.....
 

IanP

Advanced Member level 5
Joined
Oct 5, 2004
Messages
7,942
Helped
2,310
Reputation
4,622
Reaction score
531
Trophy points
1,393
Location
West Coast
Activity points
66,416
555 timer mosfet

LM/NE555 should easily control MOSFET's gate. Output current is rated: sink 200mA, source 200mA. There are some 555, such as TLC555, which are rated 100mA and 10mA respectively.
I don't think you need any additional transistor.
Athough the switching time of the 555 is somewhere in µs range it still should be suffitient to drive the MOSFET.
If you have problems with MOSFET use BJT rated for similar current. In fact most of solenoid transistors in Pinball machines are Darlington BJTs similar to TIP122 (5A, 100V, hfe>1000).

Maybe battery voltage drops under load and there is not enough energy in the circuit to fire the solenoid...
 

Rambo

Member level 3
Joined
Nov 25, 2004
Messages
55
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Activity points
811
mosfet switch solenoid

I checked the battery voltage with the emitter on and the 555 in the "on" state, and the voltage on the battery only dropped .1V compared to with no load on the battery. So I don't think that's a problem. The only thing that I can think of is that I'm charging the gate wrong. I can hook the same battery and capacitor up to the stock electronics and it works perfect. The stock electronics use a HEXFET MOSFET just like mine which is rated for about the same drain current. I'm honestly stumped.
 

Mr.Cool

Advanced Member level 2
Joined
Jun 20, 2001
Messages
664
Helped
87
Reputation
178
Reaction score
60
Trophy points
1,308
Activity points
7,113
using mosfet switch

IRF540 is fine to use at 10V. you do not need a transistor front end.
first remove the 555 timer and see if you can at least turn the solenoid ON. what is the pull-in current of your solenoid? Size your current limiting resistor for this +20% and make sure resistor is rated for continuous power loss (even though you plan on pulsing the circuit). P = I^2*R

I am assuming the same 10V battery is powering your solenoid. be sure to put zener clamp at input to your digital section because your solenoid is going to ring like crazy. your solenoid is basically an electro-magnet which is basically an inductor. you need some place to disipate the stored energy during the OFF time of the mosfet. put a diode with brake down voltage at least 2x battery voltage (or more) and can handle current at least 2 the value you selected with your resistor.
diode goes between mosfet drain & battery +10V terminal.

now just try to turn the mosfet on, forget the 555 timer circuit for now. make sure you got that solenoid working... then play with the 555 timer. see attached for simple test circuit. the switch can just be a wire that you touch to the 10Ohm resistor. the mosfet need only be N-channel type. don't waste your time with p-channel.

watch your switching frequency. the faster teh frequency the tougher your design, so use the lowest possible. don't worry about switching losses... not important for such simple construction. don't worry about duty cycle, keep it 50% (you must give equal time to allow solenoid to discharge).

good luck!
Mr.Cool
 

XNOX_Rambo

Advanced Member level 1
Joined
Jul 13, 2002
Messages
435
Helped
90
Reputation
180
Reaction score
2
Trophy points
1,298
Location
Far out, man!
Activity points
3,568
mosfet som switch

This is a simple totem-pole driver that you could use to give the mosfet gate
some oomph! Just to make sure it works, I built it and it decreased the switching
time of a mosfet (a BUZ80A that I had) from 20µs to 500ns.

As IanP says, the 555 should be enough - but to make sure that you are driving
the gate properly you could add this totem-pole as a test. Any small signal
transistors will do.

If nothing improves, I think you should draw a circuit diagram and submit it to
our scrutiny so that we get the whole picture.
 

IanP

Advanced Member level 5
Joined
Oct 5, 2004
Messages
7,942
Helped
2,310
Reputation
4,622
Reaction score
531
Trophy points
1,393
Location
West Coast
Activity points
66,416
not using mosfet

Can you connect the gate to +Vbat trough a switch and, say, ≤1kΩ resistor and turn this switch on and off?
Maybe your 555 doesn't generate pulses or the width of the pulse is to short?
 

Rambo

Member level 3
Joined
Nov 25, 2004
Messages
55
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Activity points
811
mosfet como switch

Ok, the problem must lie in the way the 555 charges the gate. I removed the 555 and just used 10v from the battery to switch on the solenoid and it worked perfectly. I am already using a diode in parallel with the solenoid.

Added after 1 minutes:

I already have the whole circuit diagram drawn on paint so I might as well give it to you guys.....
final_schematic.JPG


Added after 5 minutes:

You guys might have to explain to me what all this frequency and switching time stuff is because I'm pretty clueless to it. Sorry, lol
 

SkyHigh

Advanced Member level 1
Joined
Jan 13, 2005
Messages
432
Helped
79
Reputation
158
Reaction score
27
Trophy points
1,308
Activity points
7,319
switch mosfet battery

MOS is not a current-driven device, so you do not need a Push-Pull Class B Biasing Totem-Pole to the Gate of a MOS Transistor (as proposed by someone earlier).

Also, never connect a resistor in series to the Gate to MOS Transistor. This serves no useful purpose at all. It's not even a current-driven device in the first place, so you don't need a current-limiting resistor to the Base. Such series resistance only causes unnecessary voltage drop across the resistor and RC delay to be imposed on connecting wire. This reduces the sensitivity of the optimal trigger voltage needed to switch the transistor.

The solenoid in parallel to the suppression diode in a Fly-Wheel circuit is definitely OK!

The polarity protection diode in series with the solonoid and the positive polarity of the battery is necessary and fine.

You need to understand some principles to tackle them accordingly.

1. The solonoid is an electromagnet in this application. It reacts very slowly to current change, due to Lenz's Law. The elevator door or a sliding door is a very good example. Collapsing the H-field too fast, it fails to work. Therefore you will need a optimal switching frequency. You need to adjust the pulse versus the period by adjusting the R1 and R2 resistors used in the 555 Timer. These resistors sert the duty cycle of the switching pulse. One resistor sets the duration of the charge phase, the other resistor sets the duration of the discharge phase.

2. An alternative method is to use a diode that can pass more current than usual, i.e. sinking less current either via MOS or a Darlington Pair. This slows down the collapse of the H-field when MOS is switched to sink the solonoid current, thus more current to pass the suppression diode and places your solonoid in Quasi-State (not fully turned off) i.e. such retention offers quick turn on of the solonoid again!

3. You have a choise of using MOS or a BJT or even Darlington Pairs. The aim is to switch the current and to sink them. Darlington Pair, preferably Sziklai's configuration is good because you can set the switching reference voltage lower than usual. Conventional Cascaded Darlington Pair would require two diode voltage drops across two PN junctions. However, Bipolar devices require current-limiting resistor at the Base. A MOS transistors do not require a current-limiting resistor at the Base. Most Power Electronics employs MOS instead of Bipolar simply because it offers high input impedance, low transistor resistance i.e. can sink more current, and more off-the-shelves options when you can choose various MOS transistors with different threshold voltage. More of your current is dedicated for your solonoid than the switching circuit if you use a MOS.
 

Rambo

Member level 3
Joined
Nov 25, 2004
Messages
55
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Activity points
811
lm555 irf540

Ok, I won't use a resistor to the gate, or use the other idea. I honestly can't reply to what you said in #2 and 3 because I almost didn't understand any of it (sorry, lol) In regards to #1, how can I change resistor values of R1 and R2? They both need to be those exact values other wise the paintball gun wont fire properly. R1 controls the solenoid on time. If it is too small the sear won't be tripped and the gun won't fire- and if it is too large, the sear could stay tripped too long and the gun would double fire because it is a blowback. R2 controls the Rate of fire of the gun and I am going to use different resistors for different rates of fire. The only way I could change either of these values is to change the value of the timing capacitor....
 

nicleo

Advanced Member level 2
Joined
Sep 6, 2004
Messages
661
Helped
66
Reputation
132
Reaction score
12
Trophy points
1,298
Activity points
7,153
mosfet to switch on solenoid

The operate/release time of solenoid or mechanical relay is usually around 1ms/1ms or more. If the switching signal from pin 3 is TOO HIGH, I don't think the solenoid will work.

Gate resistor is useful to limit the dVgs/dt. If your application requires low switching frequency, you can size the resistor is such a way that dt is larger so that the peak current required to charge the mosfet is low.

Cgate=1450pF (input capacitance of IRF540)
Vgs=10V

i = C dv/dt
i = 1450pF 10/dt

if dt = 10ns
i = 1.45A

if dt = 100ns
i = 0.145A (able to be supplied by 555 timer as claimed by some forumers)

if dt = 1000ns
i = 0.0145A
 

Rambo

Member level 3
Joined
Nov 25, 2004
Messages
55
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Activity points
811
555 with mosfet circuits

Well, the voltage going to the gate isn't the voltage of the battery. The output from the 555 drops to about 9v. So what do you reccomend I do?
 

IanP

Advanced Member level 5
Joined
Oct 5, 2004
Messages
7,942
Helped
2,310
Reputation
4,622
Reaction score
531
Trophy points
1,393
Location
West Coast
Activity points
66,416
mosfet switch solenoid coil

Use 68Ω resistor between 555 output (3) and the gate..
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top