Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Hardware
  3. Question: FL5150 LED Dimmer - replace a analog potentiometer with a digital one

Question: FL5150 LED Dimmer - replace a analog potentiometer with a digital one

Scheduled Pinned Locked Moved Hardware
32 Posts 15 Posters 2.7k Views 16 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B berton

    @jimmyjames

    Hi,
    Hi everyone,

    I'm creating a project that will dim light circuits from a esp32 in trailing edge . I am very cautious about 240vac mixed in with low voltage.
    So im thinking about using this FL5150.
    FL5150 5 volts PS will be supplied from a 5 volt regulator circuit designed to be on the AC side with FL5150. Should be straight forward.
    Next use 4 opto couplers across a series R network to produce a DAC. So you have 4 bit to analog out. This gives me galvanic isolation from AC.
    4 bits gives 16 steps of voltage to Dim control line on FL5150.
    Would be very cheap in parts and piece of mind with separation on esp32 and AC.
    Any ideas if I'm on the right track ?

    J Offline
    J Offline
    jimmyjames
    wrote on last edited by
    #21

    @berton Hi, That is actually not a bad idea, in reality you don't really need 256 steps of dimming. Keep in mind that with the FL5150/60 that DIM control needs 0v (no resistance to ground, to put the FL5150 into low power mode or turn it off) . Also in the data sheet resistor R1which supplies power to the VS pin on the FL5150 needs to be greater than 0.125w as I found that the 1206 that I had connected was over heating, I'm not 100% sure why or if maybe a 1/4 resistor may be better.

    1 Reply Last reply
    0
    • M mmgross

      I just registered here for this topic.
      I am planning to build a dimmer and I want it to be based on the FL5150 as the dimming controller and an arduino/atmega328 to control the FL5150

      I am not very confident in my understanding of this chip, so here's what I assume (btw: It would be nice if someone could :

      • DIM Control has an internal pullup resistor (otherwise the potentiometers would have to be used as a voltage divider between VDD and GND instead of just being connected to GND).
      • VDD can source at least some current for external components (otherwise it would be useless, since DIM Mode has a pullup resistor according to the datasheet so to choose between trailing and leading edge, you just have to either short DIM Mode to ground or leave it floating)

      Under those assumptions, my first idea was to drive a reasonably fast optocoupler with a PMW signal from my MCU and put that optocoupler between GND and DIM Control pins. Unfortunately, DIM Control is not suited for receiving a PMW signal (as per https://www.onsemi.com/PowerSolutions/faq.do?method=faqs&wpn=FL5150).

      Then I thought about adding a low pass filter between the optocoupler and DIM Control, but I'm worried I will end up with my signal being either too slow or too unsteady.

      So using a DAC or digital potentiometer sounds good, thanks for the idea. But since I have no knowledge of these components whatsoever, can anyone point me to the right one? I would like to have a DAC or digital pot that works with PWM instead of a serial connection, so I can still keep my optocoupler and have galvanic seperation between the high voltage AC and the low voltage DC parts of my circuit.

      J Offline
      J Offline
      jimmyjames
      wrote on last edited by
      #22

      @mmgross A digipot is not a bad idea, I found the DAC pretty easy via i2c but not all DACs will work on their own. The very first attempt I use the ESP32 DAC and blew it up, I tried again with the ESP32 DAC that powered an op-amp. That work pretty well. I tried a PWM with a low pass filter and an OP-amp but that wasn't easier and not vey accurate in setting the light level. Probably the best I idea is @berton using an optocouple an a resistor network/resistor ladder of sorts to make a 4 bit signal. The DIM control sources current a very small amount at 5v if you short it directly to ground at the dim control pin you will get 0v which is off, at various resistance you will get different dim levels, or you can use an op-amp which is always trying to make the output the same as it's input, that works too.
      VDD can't source anything worth using I have tried and also asked SemiON, you need to provide a power supply for any components you want to add, that is way so far a 4bit resistor network wins as that needs no power to operate on the isolated side.
      I have always been looking at the problem thinking that it need isolation, it doesn't, if all the components are safely kept away from human touch, there are MCUs that run at 3.3v in an environment that is not galvanically isolated.

      1 Reply Last reply
      0
      • O Omemanti

        @jimmyjames Cool, I tried a DAC, but since my inexperience, I didn't get it to work with the FL5150.

        I just received the PCB's I ordered and use a 50K digi-Pot. But now I want to use the DAC.. :)
        Sofar:
        3_1570260264539_20191005_083919.jpg 2_1570260264539_20191005_083833.jpg 1_1570260264538_20191005_083824.jpg 0_1570260264538_20191005_083819.jpg

        J Offline
        J Offline
        jimmyjames
        wrote on last edited by
        #23

        @omemanti BTW - That is a great looking design you've made there it looks very good.:+1:

        O 1 Reply Last reply
        0
        • J jimmyjames

          @omemanti BTW - That is a great looking design you've made there it looks very good.:+1:

          O Offline
          O Offline
          Omemanti
          wrote on last edited by
          #24

          @jimmyjames said in Question: FL5150 LED Dimmer - replace a analog potentiometer with a digital one:

          a great looking design you've made there it looks very g

          Thnx, :)

          yesterday I finally installed my things after 2 months of moving. Going to try and make a new PCB using a NRF52 and the DAC you used. hopefully it will finally succeed to make a safe inwall socket.

          1 Reply Last reply
          0
          • M Offline
            M Offline
            mriksman
            wrote on last edited by
            #25

            If anyone else ends up here like I did.

            To drive the DIM Control pin without pulling from Vdd, try this.

            faee2e57-e139-4488-be99-5ddd468df708-image.png

            This will keep the micro isolated. This assumes that you use a dual optoisolator, and that the CTR is the same. To ensure they ARE equally matched, you can buy the more expensive IL300 or LOC110 - built especially for this purpose.

            Also do note: if you are going to make a DUAL dimmer, then do NOT connect the 'GND' between dimmer A and dimmer B. They must be separate.

            1 Reply Last reply
            0
            • P Offline
              P Offline
              ptr727
              wrote on last edited by
              #26

              Hi, I found this post after trying to find designs for building a configurable forward/reverse phase dimmer controlled by ESP32.
              Has anybody by chance put the previous post in production, i.e. allowing for fully isolated use?
              Alternatively, are there other controllers like the FL5150 that can be controlled deterministically via e.g. I2C, PWM, etc.?

              F M 2 Replies Last reply
              0
              • P ptr727

                Hi, I found this post after trying to find designs for building a configurable forward/reverse phase dimmer controlled by ESP32.
                Has anybody by chance put the previous post in production, i.e. allowing for fully isolated use?
                Alternatively, are there other controllers like the FL5150 that can be controlled deterministically via e.g. I2C, PWM, etc.?

                F Offline
                F Offline
                fastbike
                wrote on last edited by
                #27

                @ptr727 This chip will work for a single channel dimmer, but has trouble operating as part of a multi channel dimmer. I prototyped a one channel design and had it working but gave up as I could not get a workable design for a 4 channel unit.

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  mriksman
                  wrote on last edited by
                  #28

                  The important thing to remember when making more than 1 channel - you cannot tie those GNDs together; they are NOT 0V and are NOT equal to each other. Call one GND_A and one GND_B. Or Bob and Greg. Each FL5150 must be separate. Which then means your microcontroller needs to be totally isolated. Which is where a digital potentiometer becomes very handy.

                  1 Reply Last reply
                  2
                  • P ptr727

                    Hi, I found this post after trying to find designs for building a configurable forward/reverse phase dimmer controlled by ESP32.
                    Has anybody by chance put the previous post in production, i.e. allowing for fully isolated use?
                    Alternatively, are there other controllers like the FL5150 that can be controlled deterministically via e.g. I2C, PWM, etc.?

                    M Offline
                    M Offline
                    mriksman
                    wrote on last edited by
                    #29

                    @ptr727 My design above did work. And it was 2 channel. But it did flicker a little. I'm going to try a digital potentiometer.

                    B 1 Reply Last reply
                    0
                    • M mriksman

                      @ptr727 My design above did work. And it was 2 channel. But it did flicker a little. I'm going to try a digital potentiometer.

                      B Offline
                      B Offline
                      brg
                      wrote on last edited by
                      #30
                      This post is deleted!
                      1 Reply Last reply
                      0
                      • Edwin De BockE Offline
                        Edwin De BockE Offline
                        Edwin De Bock
                        wrote on last edited by
                        #31

                        Hi @jimmyjames , I try to make a multi channel dimmer by myself based on your circuit.
                        2022-12-22_11-54-15.png

                        So I want to use a shared 12V power supply that galvanic separated from mains for my dimmers and also a shared ESP32. But when I read these comments I can not use a common gnd for both channels? Is there a solution for this. So I don't need to have for every channel a different power supply?

                        With the attiny84 I have a dimmer as well. With this design I can make multi channel dimmers because the mains is completely isolated from the DC part.
                        See picture:
                        2022-12-22_12-01-10.png
                        Another advantage is that the I2C addresses can be programmed in the attiny so I am not limited in the number of addresses.
                        But when testing this approach I have not that good results in the low dimming , my led bulbs are flickering. So I want to try if the fl5150 is doing a better job.
                        The flickering starts if I am dimming at 15% .
                        See the oscilloscope pictures:
                        flickering.jpg
                        not flickering.jpg

                        First one is if I dim at low percentage then the flickering starts.
                        The second one is at a level when flickering stops.

                        Do you think the FL5150 will do here a better job, or can my circuit of the attiny84 being improved to get the dimming correct at the lower levels?

                        BR,
                        Edwin

                        1 Reply Last reply
                        0
                        • Edwin De BockE Offline
                          Edwin De BockE Offline
                          Edwin De Bock
                          wrote on last edited by
                          #32

                          I just tested 2 led types with no flicker on my attiny circuit.
                          It is funny, the expensive leds like from philips: Dimmable 3.8W Warm White have a flickering behavior .
                          A cheap one available in Action from LSC 6.3W, Dim to Warm and 460 Lumen has no flickering behavior.
                          Another one from Osram Par 1650: 5.5W Dimmable Warm White, 350 Lumen also has no flickering.
                          The philips has the best Energy savings though : 4kWh compared to 7kWh for the LSC one.
                          Is there a relation between energy savings and dim quality ?

                          1 Reply Last reply
                          0
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          22

                          Online

                          11.7k

                          Users

                          11.2k

                          Topics

                          113.1k

                          Posts


                          Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                          • Login

                          • Don't have an account? Register

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • MySensors
                          • OpenHardware.io
                          • Categories
                          • Recent
                          • Tags
                          • Popular