Question: FL5150 LED Dimmer - replace a analog potentiometer with a digital one
I need some help,
I'm trying to figure out how to build a remote led dimmer.
Now I saw great Scott, and he build one with an FL5150.
- datasheet FL5150 : https://nl.mouser.com/datasheet/2/308/FL5150-1306143.pdf
- youtube link: https://www.youtube.com/watch?v=BhQWOv10Oag
I thought this would be a chance to combine it with an nrf52 module that I use for my other nodes.
The question is, can I replace the potentiometer with a digital one.
I looked at a AD5241BRZ1M it has 256 steps from 0 to 1mio (it only needs 0 to 250 though, but the 200ohm seems to be too little, correct me if I'm wrong and the 250ohm are too expensive to my liking.
Or is there another way of doing this?
@omemanti i did some digging, looks like a DAC will solve my problem. If it works I'll close this request. Fingers crossed.
nagelc last edited by
Please report the results. I thought this dimmer chip looked interesting, but it seems to be optimized for manual control with a pot. Like you, I want something to control with MySensors.
@nagelc just bought some things to get me started, I have a fallback, just use digital resistors, in series, if needed.
After reading the datasheet again, im not so sure the DAC will do the trick, it's the pull-down resistors that determine the voltage, so I think a DAC won't work.
Since the dimmerpin needs a resistor to ground. I placed a 1M ohm digital potentiometer and used it to controll the dimmer. so far it works (a bit).
1M ohm is to much, so maybe I can get is working with just one or two 100k ohm.
I solderen together a very rough setup, and I can dim the light using a pro-mini 3,3v.
It still has some flickering, and I think I need to get a MOSFET or something to pull it to ground to turn the light off.
But so far so good.
it's been a while. A short status update. I made a PCB and I'm testing the principals, but since I lack the time it will take a couple of months more .
First impressions, I can control the chip with a digital potentiometer. I use a 100K for dimming, and pull it to ground for shutdown.
The 100K pot cost a couple of cents. Preferably you would use a 250K but those cost around 9 euros.
I made some new PCB's for testing, I made some booboos with the first tests. But as I said, I'll be busy the next couple of months.
zarat Banned last edited by zarat
This post is deleted!
jimmyjames last edited by
I have been playing around with these Fl5150 with success. I've been using the DAC on ESP32 and an Op Amp and I can dim it up and down with an arduino sketch and also with home assistant via ESPhome. It's a work in progress at the moment but here is the Schematic https://easyeda.com/james_6977/fl5150-dimming-with-dac
I intend on improving it to a more usable and safer point. In this version only 1 dimmer will work properly(it works good though, will turn off and you have good control over the level) if you try and use both there is some interference that makes them both not work properly.
I've ordered a I2C DAC which would need a Op amp as it can sink to ground unlike the ESP32 DAC (I think??) and a I2C digital isolator so that I can try separating the 240v from the MCU and then 1 x MCU could potential control a number of dimmers, in my case 4 inside a control box I've made up.
The Dual Op amp in this board I've made up, sinks the current that the FL5150 puts out of the DIM control pin to ground and ensures that the voltage at the DIM control pin remains at what ever the ESP32 DAC is producing on GPIO 26 and feeding into the OPamp non-inverting input.
boozz last edited by
@jimmyjames said in [Question:
I intend on improving it to a more usable and safer point.
Could you elaborate a bit on the last part, the safety issue; I think you mean that it is not a very safe circuit at the moment: No isolation between 230VAC and the microprocessor part or am I missing something?
jimmyjames last edited by
@boozz Basically it comes down to the final application, and was just letting others know that, it is important to consider what will go where, how it will get used.
With the schematic in it current form, 240v and the 5v side is not galvanically isolated, which is ok, as long as everything remains inside an insulated or earthed enclosure, and only 240v wires go in and out. That means you should not add external sensors or switches to the ESP32, which although they will work will be referenced to neutral or possibly line, which could create a potential hazard. I was considering using a I2c isolator to keep the ESP32 galvanically isolated from the FL5150 dimmer circuit, I have ordered the parts to try it too, the only downside is then you need a power supply for the ESP32 and isolated one and another power supply for the I2C isolator on the FL5150dimmer side as it uses upto 6mA 5vdc and the DAC use 1mA so that is inconvenient.
I have a video of the lasted dimmer i've tried: https://youtu.be/bXHvo86CJp4
boozz last edited by
..., the only downside is then you need a power supply for the ESP32 and isolated one and another power supply for the I2C isolator on the FL5150dimmer side as it uses upto 6mA 5vdc and the DAC use 1mA so that is inconvenient.
Have you considered using isolated DC-DC converters? Then you may be able to keep all in the concept of "only 240v wires go in and out".
Will take a look at the video within short