+ Post New Thread
Results 1 to 17 of 17
  1. #1
    Banned
    Points: 598, Level: 5

    Join Date
    Sep 2013
    Location
    Ahmedabad
    Posts
    104
    Helped
    0 / 0
    Points
    598
    Level
    5

    MOSFET IRF540 using as a switch

    Hello Everyone

    Click image for larger version. 

Name:	single valve circuit.JPG 
Views:	18 
Size:	24.2 KB 
ID:	100398
    I have used above circuit to start solenoid valve(24V and 1A) ON and OFF but when I have done for 6 solenoid valve its not working as my controller's pin get ON and OFF as per delay. so, what could be the problem. is the above circuit right or below circuit?

    Click image for larger version. 

Name:	Captur123e.JPG 
Views:	16 
Size:	25.0 KB 
ID:	100399

  2. #2
    Newbie level 6
    Points: 269, Level: 3

    Join Date
    Dec 2013
    Posts
    12
    Helped
    0 / 0
    Points
    269
    Level
    3

    Re: MOSFET IRF540 using as a switch

    you can use above topology. but for 1 amp load, you may change 1N4148 diode.
    how much voltage given at controller pin.?



    •   Alt30th December 2013, 12:39

      advertising

        
       

  3. #3
    Super Moderator
    Points: 70,919, Level: 64
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    11,617
    Helped
    3830 / 3830
    Points
    70,919
    Level
    64

    Re: MOSFET IRF540 using as a switch

    The diode may be OK but I would have used something like a 1N400x personally.
    The most likely problem is that you are not fully driving the MOSFET. With some conduction it may be able to handle a single solenoid but with the extra current demanded by 6 of them it may not be coping. To allow it to pass enough current you need a voltage of at least 6.6V on the controller pin, somethng like 10V would be better.

    Brian.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.



  4. #4
    Newbie level 6
    Points: 269, Level: 3

    Join Date
    Dec 2013
    Posts
    12
    Helped
    0 / 0
    Points
    269
    Level
    3

    Re: MOSFET IRF540 using as a switch

    Something like 1N4001 prefer than 1N4148. set your mosfet driving at saturation region for this purpose.



  5. #5
    Banned
    Points: 598, Level: 5

    Join Date
    Sep 2013
    Location
    Ahmedabad
    Posts
    104
    Helped
    0 / 0
    Points
    598
    Level
    5

    Re: MOSFET IRF540 using as a switch

    Quote Originally Posted by dwcookiemonster View Post
    you can use above topology. but for 1 amp load, you may change 1N4148 diode.
    how much voltage given at controller pin.?
    ok I am using 1N4007 and at controller pin output is 5V but I am not getting 5V exactly rather I am getting only 2V or 3V. again my solenoid valve not get ON that I don't know what's the problem. I am using above circuit.

    - - - Updated - - -

    Quote Originally Posted by betwixt View Post
    The diode may be OK but I would have used something like a 1N400x personally.
    The most likely problem is that you are not fully driving the MOSFET. With some conduction it may be able to handle a single solenoid but with the extra current demanded by 6 of them it may not be coping. To allow it to pass enough current you need a voltage of at least 6.6V on the controller pin, somethng like 10V would be better.

    Brian.
    how could I give more voltage at tht point with same controller(89C51). and again as per IRF540 Datasheet gate threshold voltage is only between 2V to 4V.

    - - - Updated - - -

    Quote Originally Posted by dwcookiemonster View Post
    Something like 1N4001 prefer than 1N4148. set your mosfet driving at saturation region for this purpose.
    will you please elaborate that "set your mosfet driving at saturation region for this purpose".



  6. #6
    Super Moderator
    Points: 243,208, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    42,242
    Helped
    12859 / 12859
    Points
    243,208
    Level
    100

    Re: MOSFET IRF540 using as a switch

    You didn't yet mention 8051. It has open drain outputs with weak pull-ups instead of regular push-pull outputs. As a simple solution, you can place strong (e.g. 1k) pull-ups. If you also want safe reset behaviour, an inverting driver (like 74HC04) between 8051 and MOSFET is suggested.



  7. #7
    Full Member level 5
    Points: 2,741, Level: 12

    Join Date
    Jan 2011
    Posts
    317
    Helped
    92 / 92
    Points
    2,741
    Level
    12

    Re: MOSFET IRF540 using as a switch

    Quote Originally Posted by jay_3189 View Post
    and again as per IRF540 Datasheet gate threshold voltage is only between 2V to 4V
    This is not good enough. Threshold voltage means it just starts to conduct at that gate voltage. This MOSFET does not fully turn on until 10v. You need a "logic level FET", like the Fairchild FQP30N06L. Plus you still need to get the gate drive up to 5v as FvM said.


    1 members found this post helpful.

    •   Alt30th December 2013, 13:43

      advertising

        
       

  8. #8
    Banned
    Points: 598, Level: 5

    Join Date
    Sep 2013
    Location
    Ahmedabad
    Posts
    104
    Helped
    0 / 0
    Points
    598
    Level
    5

    Re: MOSFET IRF540 using as a switch

    Quote Originally Posted by FvM View Post
    You didn't yet mention 8051. It has open drain outputs with weak pull-ups instead of regular push-pull outputs. As a simple solution, you can place strong (e.g. 1k) pull-ups. If you also want safe reset behaviour, an inverting driver (like 74HC04) between 8051 and MOSFET is suggested.
    is 8051 not have internal pull ups in port - 2? I have read it in at89c51 datasheet.



    •   Alt31st December 2013, 06:17

      advertising

        
       

  9. #9
    Full Member level 5
    Points: 2,741, Level: 12

    Join Date
    Jan 2011
    Posts
    317
    Helped
    92 / 92
    Points
    2,741
    Level
    12

    Re: MOSFET IRF540 using as a switch

    Quote Originally Posted by jay_3189 View Post
    is 8051 not have internal pull ups in port - 2? I have read it in at89c51 datasheet.
    You are pulling down with 11k. That forms a voltage divider with any internal pullups. Why Is R1= 10k? Are you worried about slow turnoff?



  10. #10
    Banned
    Points: 598, Level: 5

    Join Date
    Sep 2013
    Location
    Ahmedabad
    Posts
    104
    Helped
    0 / 0
    Points
    598
    Level
    5

    Re: MOSFET IRF540 using as a switch

    Quote Originally Posted by Tunelabguy View Post
    You are pulling down with 11k. That forms a voltage divider with any internal pullups. Why Is R1= 10k? Are you worried about slow turnoff?
    yes for fast response I have kept 10k. but now I am thinking to keep it as 100kOhms.
    Last edited by jay_3189; 31st December 2013 at 08:42.



  11. #11
    Super Moderator
    Points: 243,208, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    42,242
    Helped
    12859 / 12859
    Points
    243,208
    Level
    100

    Re: MOSFET IRF540 using as a switch

    is 8051 not have internal pull ups in port - 2? I have read it in at89c51 datasheet.
    You should read the datasheet completely. Not only about existence of pull-up resistors, also the expectable resistance value. Then calculate.

    Internal pull-ups can turn the MOSFET on, but only quite slowly.

    There's by the way no reasonable function of the pull-down resistor at the gate. Instead of changing it to 100k, you can just omit it. During power-up and processor reset, the internal pull-up resistor will override the pull-down resistor and turn the MOSFET on. Placing an inverter is the only way to avoid this probably unwanted behaviour.
    Last edited by FvM; 31st December 2013 at 10:32.



  12. #12
    Banned
    Points: 598, Level: 5

    Join Date
    Sep 2013
    Location
    Ahmedabad
    Posts
    104
    Helped
    0 / 0
    Points
    598
    Level
    5

    Re: MOSFET IRF540 using as a switch

    Quote Originally Posted by FvM View Post
    You should read the datasheet completely. Not only about existence of pull-up resistors, also the expectable resistance value. Then calculate.

    Internal pull-ups can turn the MOSFET on, but only quite slowly.

    There's by the way no reasonable function of the pull-down resistor at the gate. Instead of changing it to 100k, you can just omit it. During power-up and processor reset, the internal pull-up resistor will override the pull-down resistor and turn the MOSFET on. Placing an inverter is the only way to avoid this probably unwanted behaviour.
    ok can i use 10k as pullup resistor?
    could there any problem or damage with MOSFET or controller's pin if i will remove both 1k and 10k resistors?
    what is the need for inverter ic (74HC04)?



  13. #13
    Full Member level 3
    Points: 1,831, Level: 9
    irfan ahmad's Avatar
    Join Date
    Feb 2012
    Location
    LAHORE PAKISTAN
    Posts
    181
    Helped
    53 / 53
    Points
    1,831
    Level
    9

    Re: MOSFET IRF540 using as a switch

    http://tahmidmc.blogspot.com/2012/12...ts-and_23.html
    here are best examples for fet switch.
    if you are using atmel 8051 series microcontroller then you shuld isolate your microcontroller from solenoid using optocoupler.
    more pullup your microcontroller with 330 ohm resistor if you are using atmel 8051.



    •   Alt31st December 2013, 11:30

      advertising

        
       

  14. #14
    Super Moderator
    Points: 243,208, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    42,242
    Helped
    12859 / 12859
    Points
    243,208
    Level
    100

    Re: MOSFET IRF540 using as a switch

    could there any problem or damage with MOSFET or controller's pin if i will remove both 1k and 10k resistors?
    what is the need for inverter ic (74HC04)?
    I would keep the series resistor.

    If a short activation of solenoid valve during power-on isn't a problem you don't need an inverter.

    if you are using atmel 8051 series microcontroller then you shuld isolate your microcontroller from solenoid using optocoupler.
    Why particularly?



  15. #15
    Banned
    Points: 598, Level: 5

    Join Date
    Sep 2013
    Location
    Ahmedabad
    Posts
    104
    Helped
    0 / 0
    Points
    598
    Level
    5

    Re: MOSFET IRF540 using as a switch

    ok thank you all as I solved problem by connecting 5V supply externally to my circuit and its working fine now.

    but now problem is microcontroller will give only 2 to 3V output at all pin of port 2. so, how could I increase it to 5V. is pullup is right solution or other thing?



  16. #16
    Full Member level 3
    Points: 1,831, Level: 9
    irfan ahmad's Avatar
    Join Date
    Feb 2012
    Location
    LAHORE PAKISTAN
    Posts
    181
    Helped
    53 / 53
    Points
    1,831
    Level
    9

    Re: MOSFET IRF540 using as a switch

    use external pullup resistors to increase voltage .
    you can yse 4.7 resistors sip



    1 members found this post helpful.

  17. #17
    Full Member level 5
    Points: 2,741, Level: 12

    Join Date
    Jan 2011
    Posts
    317
    Helped
    92 / 92
    Points
    2,741
    Level
    12

    Re: MOSFET IRF540 using as a switch

    Quote Originally Posted by jay_3189 View Post
    ok thank you all as I solved problem by connecting 5V supply externally to my circuit and its working fine now.
    It may be working with one IRF540, but if you are designing for mass production, the IRF540 is not guaranteed to switch fully on at 5 volts of gate drive. You need a logic level FET.


    1 members found this post helpful.

--[[ ]]--