Smallest PWM

Discussion in 'General Electronics Chat' started by R!f@@, Nov 29, 2011.

  1. R!f@@

    Thread Starter AAC Fanatic!

    Apr 2, 2009
    8,728
    758
    Hey Buds.

    I have something big commin' or going to make me infamous. :D

    So for a start. I like to know a way to make the smallest or the tiniest PWM circuit that could drive just one LED.

    It has to be as small as possible. I guess I have to use SMD. So this is not a problem.

    The feature it got to have is that once powered ON the led need to turn on with maximum brightness the LED can achieve and fade to OFF with in a second or two. LED remains off until the next power cycle.

    So, it does not need a reset or on switch. Circuit turns on when power is applied and off after the delay.

    Any Ideas on how to achieve this ?
     
    Last edited: Nov 29, 2011
  2. Markd77

    Senior Member

    Sep 7, 2009
    2,803
    594
    Probably a microcontroller, PIC10F200 would be fine, available in SOT-23 package (3.2X3.1mm) or if you have crazy soldering skills in 2X3mm DFN package.
    You would only need a resistor for the LED and a 100nF capacitor (if the LED is less than 20mA).
     
  3. R!f@@

    Thread Starter AAC Fanatic!

    Apr 2, 2009
    8,728
    758
    I am crazy and heck yes I can solder anything....

    Mark Show me the freakin thing
     
  4. Markd77

    Senior Member

    Sep 7, 2009
    2,803
    594
    <ed>Forgot to ask the voltage, these things are OK from 2-5.5V, otherwise there will be more components.</ed>

    I'm pretty sure you need to use solder paste and a hot plate or possibly heat gun to solder these because the pins aren't very accessable.
    [​IMG]

    The SOT-23 is easy to solder with an iron and not much bigger.

    [​IMG]
     
    • dfn.png
      dfn.png
      File size:
      53.3 KB
      Views:
      117
    • sot.png
      sot.png
      File size:
      45.8 KB
      Views:
      113
    Last edited: Nov 29, 2011
    R!f@@ likes this.
  5. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,386
    1,605
    I actually have a product nearing production that does something like this. Samples have passed qualification. Overall size is a tube .38" tall, .205" diameter, and the LED sits inside one end of the tube. The other end has a wire, and the tube itself is conductive so the power input terminals are the wire and the tube. It operates over a range of 9 to 28V (either polarity) (survives at 40V for a while too) and the luminescence matches an incandescent light over that range.

    The micro inside is a PIC12HV615 running at 5V. HV PICs have an internal shunt regulator to save a few parts. It sits inside a 3x3mm DFN package which has the solder pads completely under the device; other package styles such as SOIC are available, I needed the smallest package to fit within my tube. This device has both an internal oscillator and a PWM module. A2D also, and is under a buck in quantity.

    Devices such as the PIC10F200 would also work in this application. As you describe this, you only need a single output pin, so you could dedicate the programming pins to programming and still have a free pin as your output.

    It's always wise to have the ability to program the PIC in circuit even if you do not intend to use that feature. It can save your butt in some situations.

    You can find these devices on Microchips site.
     
    R!f@@ likes this.
  6. R!f@@

    Thread Starter AAC Fanatic!

    Apr 2, 2009
    8,728
    758
    Show me..:D
    Voltage is not an issue
     
  7. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,386
    1,605
    Voltage is ALWAYS an issue :p



    What is the input voltage min and max it runs off?

    How much current does the LED need?

    What is my commission or NRE? :eek:
     
  8. R!f@@

    Thread Starter AAC Fanatic!

    Apr 2, 2009
    8,728
    758
    Not for this App.

    NRE ?? :confused:
     
  9. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    The tiny-est has already been made in the form of self flickering/dimming LEDs where the IC is a 0.1mm square on the cathode inside the LED.

    For an external circuit, a PIC10 series would be the smallest, they range from 8 pin dip to SOT-23 size to tiny DFN size shown above, use fine magnet wire to attach leads to the pads.

    NRE- Non Recurring Expense - One time fee for the design, or commission - he gets a percentage of sales.
     
  10. R!f@@

    Thread Starter AAC Fanatic!

    Apr 2, 2009
    8,728
    758
    I do not need flickering.......flickering is bad.
    Standard LED dimming from max to min smoothly in a sec is what I want

    NRE Eh!.
    The thing is still in the design stage.

    Don't worry, you'll get what's commin ur way..
     
  11. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    They sell LEDs for tea lamps to simulate flame that use PWM to flicker.

    They sell RGB LEDs with only power leads and they automatically cycle through the colors and sometimes blink the 3 primary and 3 secondary light colors before going back to cycling through all the colors.

    They sell LEDs that go from bright to dim and back to bright for model train sets.

    All of them have the tiny uC chip sitting on the relatively huge cathode inside the lens encapsulation to control it all.
     
  12. R!f@@

    Thread Starter AAC Fanatic!

    Apr 2, 2009
    8,728
    758
    Ya ..but do they sell any for my app?
     
  13. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,386
    1,605
    R!f@@: Seriously, you need to tell me these two things:

    What is the input voltage min and max it runs off?

    How much current does the LED need?

    (I'm assuming the voltage input is large enough to run the LED.)
     
  14. R!f@@

    Thread Starter AAC Fanatic!

    Apr 2, 2009
    8,728
    758
    Seriously...

    My Vcc is 12V. But the Driver voltage can be regulated by simple zener
    The LED is max at 50mA.

    I just need a smallest PWM circuit with active high logic.
     
  15. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,386
    1,605
    [​IMG]

    Here is a 12V powered LED control. This PIC has the current shunt regulator built in so it can regulate it's own supply voltage.

    R1 drops the 12V to 5V for the PIC, giving it about 7mA to run on. Q1 is connected to act as a constant current sink so R2 is sized to sink the 50mA.

    Just about any NPN will work for Q1, there is about .25W loss on it. Only 50mW in R1 but R2 does have .22 watts in it. J1 should just be some holes in your PCB to accept pins from a PICkit or such programmer.
     
  16. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    Shouldn't MCLR be tied high through 10k as well?

    ETA: HV device, nevermind.
     
  17. R!f@@

    Thread Starter AAC Fanatic!

    Apr 2, 2009
    8,728
    758
    Nice.
    Is it that the PIC mark suggested ?

    I guess I will need a some thingy made to program the tiny chip if I want to remove the ICSP from the circuit
     
  18. Markd77

    Senior Member

    Sep 7, 2009
    2,803
    594
    This one's better than the PIC10F200 (that I suggested) for 12V because the PIC10F200 would need a voltage regulator in addition to ErnieM's part list.
     
  19. R!f@@

    Thread Starter AAC Fanatic!

    Apr 2, 2009
    8,728
    758
    hmmm. I see why he insisted on Voltage. Never thought of that.

    Like to ask that is the PIC that only way to make this thing small.
     
  20. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    What about the circuit posted do you not like? What is your intended working voltage range?
     
Loading...