Little help needed to understand Dimmer for DC lamp?


Closed Thread
Results 1 to 15 of 15

Hybrid View

  1. #1
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default

    Can 16F877A do the job? and also how many of these lamps can I control with one PIC
    Yes. you can control two indipendent lamps, since you have two pwm channels per chip.

    There is a typo in the schematic First command duty cycle = 255 (full power)

    Al.
    Attached Images Attached Images  
    Last edited by aratti; - 7th April 2010 at 22:43.
    All progress began with an idea

  2. #2
    Join Date
    Nov 2009
    Location
    London
    Posts
    251


    Did you find this post helpful? Yes | No

    Red face Thanks

    Quote Originally Posted by aratti View Post
    Yes. you can control two indipendent lamps, since you have two pwm channels per chip.

    There is a typo in the schematic First command duty cycle = 255 (full power)

    Al.
    Thanks. I looked in the PBP Manual - it asks for Channel, Dutycycle,Frequency.

    From what you said, Duty cycle value should be from 0-255 (255 Full power)
    Channel will be the Port on which the lamp will be connected.
    What will be the frequency?

    Also the circuit you mentioned, can it work on 12V as well? Thanks

  3. #3
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default

    From what you said, Duty cycle value should be from 0-255 (255 Full power)
    Yes.

    Channel will be the Port on which the lamp will be connected.
    Where you connect the interface, that drives that lamp.


    What will be the frequency?
    I have indicated 20 KHz (20000) but you should experiment variuos frequency and choose the one that gives you the best result. Remember that frequency must be the same for both channels. Refer to the table @ page 74 of PBP manual for max & min frequency available.


    Also the circuit you mentioned, can it work on 12V as well? Thanks
    Yes, but you should change the 10 K pullup resistor with a 4.7 K one. (On both channels)

    Edited: I have posted a new schematic with the correct pullup value for 12 volts and correctly wired, since in my previous post, schematic shows resistor wrongly connected (see the two schematics and note the mistake)
    Attached Images Attached Images  
    Last edited by aratti; - 9th April 2010 at 19:04.
    All progress began with an idea

  4. #4
    Join Date
    Jan 2009
    Location
    California, USA
    Posts
    323


    Did you find this post helpful? Yes | No

    Default

    Wouldn't it be easier just to use a single MOSFET as a low side driver?



    steve

  5. #5
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default

    steve, the answer is yes, but you should use mosfet with logic level capability. These devices, anyway are not capable of high current as the normal mosfet, and you will end up to pay more than a normal mosfet plus a small NPN transistor.

    Al.
    Last edited by aratti; - 9th April 2010 at 22:41.
    All progress began with an idea

  6. #6
    Join Date
    Jan 2009
    Location
    California, USA
    Posts
    323


    Did you find this post helpful? Yes | No

    Default

    Hmmm. Well, it seems like there's an awful lot of < $2 N-channel MOSFETS that will easily switch 10 or more amps with gate voltages well under 5 volts. You've got P-channel MOSFETS cheaper than that? Plus a NPN?

    I use a 16F684 and N-channel MOSFET to PWM control power to a 50 watt 12 volt heater element @ 100Hz with no issues.
    I suppose the question is how much current is Megahertz talking about? Small 25-50W halogens, or 250 watt driving lights?

    As long as the frequency isn't too high there shouldn't be any trouble driving an N-channel MOSFET directly from a PIC. For driving a halogen lamp there's probably no need for more than about 100 Hz.

    If your PIC is running at 3 volts or less, then the choice of logic level high current FETs does diminish greatly and a driver circuit may be necessary.

    I suppose it might be worth mentioning that dimming a halogen bulb reduces the operating temperature and disrupts the halogen cycle which can lead to premature envelope blackening and early death. For cheap garden variety bulbs, you may not care. But if you're playing with expensive photography bulbs or something like that, then it might be worth mentioning...

    Steve

  7. #7
    Join Date
    Nov 2009
    Location
    London
    Posts
    251


    Did you find this post helpful? Yes | No

    Question

    Easily available MOSFET I found out is IRF540 -
    This is link is to the datasheet:
    http://www.irf.com/product-info/data...ta/irf540n.pdf

    Since I am not familier with most of the terms in the datasheet, can you please advise if I can use this Mosfet and If I can use the same circuit?

    Also, I need to control lamps upto 100W, which I believe can be done using Heatsink on this Mosfet. Thanks for the help.

  8. #8
    Join Date
    Nov 2009
    Location
    London
    Posts
    251


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Byte_Butcher View Post
    I use a 16F684 and N-channel MOSFET to PWM control power to a 50 watt 12 volt heater element @ 100Hz with no issues.
    I suppose the question is how much current is Megahertz talking about? Small 25-50W halogens, or 250 watt driving lights?

    As long as the frequency isn't too high there shouldn't be any trouble driving an N-channel MOSFET directly from a PIC. For driving a halogen lamp there's probably no need for more than about 100 Hz.

    If your PIC is running at 3 volts or less, then the choice of logic level high current FETs does diminish greatly and a driver circuit may be necessary.

    Steve
    Hi Steve, this is the only mosfet I could find locally, I am in India currently and I have to develop this using easily available components. Though I will try once again to find P-Channel, but I would like to request you if you can upload the circuit here for N-Channel mosfet you use for 12V - 50W heater.

    I need it for 50W @ 12V halogen.
    My PIC is running on 5V.
    Widely available mosfet is IRF540 (N-Channel)

    All help is much appreciated. Thanks

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts