Announcement

Collapse
No announcement yet.

PWM LED Driver DIY - looking for comments and criticism

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #21
    Re: PWM LED Driver DIY - looking for comments and criticism

    if the mosfet is on the ground-side then the gate only needs to swing from ground to it's freshhold,
    if it's on the positive rail you will need to bias the gate with a pullup resistor to the positive voltage and hope it doesnt fuck the mcu.

    thats why most switching circuits switch the negative side

    Comment


      #22
      Re: PWM LED Driver DIY - looking for comments and criticism

      Based on the schematic with the 555, I thought the negative end of the LED string was being switched already. If there was 3V dropped across the FET, I would think it's getting hot.

      You can get higher resolution PWM on Arduino pins 9 and 10, but the libraries are 8-bit only. The libraries also don't give you access to the clock divider to change the PWM frequency, although there aren't enough divider steps to be very useful.

      Comment


        #23
        Re: PWM LED Driver DIY - looking for comments and criticism

        Originally posted by lti View Post
        Based on the schematic with the 555, I thought the negative end of the LED string was being switched already. If there was 3V dropped across the FET, I would think it's getting hot.
        Yeah, the arduino is connected just like in the 555 schematic I posted, only instead of an 8k resistor, I'm using a 200Ω resistor. And the MOSFET isn't getting hot at all ... it's not even getting warm.

        Originally posted by lti View Post
        You can get higher resolution PWM on Arduino pins 9 and 10, but the libraries are 8-bit only. The libraries also don't give you access to the clock divider to change the PWM frequency, although there aren't enough divider steps to be very useful.
        Yeah the ADC resolution in these older Arduino chips are pretty much shit in my opinion. I won't waste a Teensy on this project but I have several Raspberry Pi Pico's that have much higher resolution that I won't mind burning on this project. I bought a few of them when they first came out at only $4 each.

        Comment


          #24
          Re: PWM LED Driver DIY - looking for comments and criticism

          I have no troubles with Arduino Uno ADC, getting 10 bits resolution out of them. But some Arduino boards have no VREF filter or it's run with noisy power or missing 0.1uF input cap, switching the mux carelessly can also give you wandering readings. Firmware or hardware can be to blame.

          RPi Pico has a not so great A/D, in the errata some codes it freaks out:
          "The RP2040 ADC has a DNL that is mostly flat, and below 1 LSB. However at four values — 512, 1,536, 2,560, and 3,584 — the ADC's DNL error peaks above this value. The ENOB for the ADC has been reduced from 9-bits (simulated) to 8.7-bits (measured), see Section 4.9.3. The DNL errors will somewhat limit the performance of the ADC dependent on use case."
          from: https://forums.raspberrypi.com/viewtopic.php?t=301620

          If your DC power is sagging, you can use a second A/D channel to read the 19V and correct brightness a little bit by adding a multiplier factor to the PWM.

          Comment


            #25
            Re: PWM LED Driver DIY - looking for comments and criticism

            remember the pico is a 3.3v only device
            choose the fet carefully

            bluepill is better than pico for i/o
            Last edited by stj; 07-23-2022, 02:51 PM.

            Comment


              #26
              Re: PWM LED Driver DIY - looking for comments and criticism

              watch this:
              https://www.youtube.com/watch?v=Kvl-mR5gldw

              Comment


                #27
                Re: PWM LED Driver DIY - looking for comments and criticism

                Originally posted by EasyGoing1 View Post
                Yeah the ADC resolution in these older Arduino chips are pretty much shit in my opinion.
                What I meant was that you could set the PWM resolution to match (or even exceed) the ADC resolution. I actually feel like using a microcontroller just to dim LEDs based on an analog input is kind of a waste, but it's an easy way to get all the way down to 0% duty cycle.

                Is your power supply still holding 19V? It seems weird that there would be 3V dropped across the FET at this current level and it's still at room temperature.

                Also, what is the cap on the LED board for? For PWM dimming, I don't think you would want a cap across the LED string.
                Last edited by lti; 07-23-2022, 06:21 PM.

                Comment

                Working...
                X