@omemanti BTW - That is a great looking design you've made there it looks very good.
Posts made by jimmyjames
-
RE: Question: FL5150 LED Dimmer - replace a analog potentiometer with a digital one
-
RE: Question: FL5150 LED Dimmer - replace a analog potentiometer with a digital one
@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. -
RE: Question: FL5150 LED Dimmer - replace a analog potentiometer with a digital one
@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.
-
RE: Question: FL5150 LED Dimmer - replace a analog potentiometer with a digital one
@rvendrame Thanks for the circuit reference, it not exactly what I was after but useful to check out, in my researching. I'm looking at using a digital isolation IC to isolate the i2c signal and a DC to DC as @boozz suggested to power the isolstor and the DAC on the dimmer side that way only 1 power supply is required. The only thing is the the DC DC convert is $3 for a cheapy and $6 for something my substantial.
-
RE: Question: FL5150 LED Dimmer - replace a analog potentiometer with a digital one
@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 -
RE: Question: FL5150 LED Dimmer - replace a analog potentiometer with a digital one
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.