Here's the Arduino code for PWM control. Pot is on analog A0, PWM output is on digital output D3. void setup() { pinMode (3,OUTPUT); } void loop() { int sensorValue = analogRead(A0); analogWrite (3,sensorValue/4); }
If used for mood lighting, maybe leave all the electronics out on the beautiful workbench so she could see all the hard work that went into creating a romantic atmosphere.
Julian, thanks. Did you ever find a better LED driver with a PWM input pin?I have the same requirements for controlling flash rate from an Arduino or Raspberry. Thanks. You must be a solar home I'm guessing. I'm just 60Hz AC power.
Hi Julian, Thanks for your post- I've found it very interesting, along with everything else on your channel! I've tried the same project with exactly the same driver, but using a 12watt Cree LED. As you expertienced I found that the dimmer switched off completely at low settings and at high settings the LED pulses at around 2Hz. Do you have any ideas on how this could be fixed? Many thanks, Dom
Would it be possible to control the brightness by using a pwm dc motor controller? I know it works on small leds. Great channel you have here by the way! You have inspired me to build my own 10w led flashlight, when all my parcels get here from China it will be like Christmas again ;)
Hi Julian, the reason for your strange behaviour is the way the PWM input is wired up internally. When the voltage is too high, the LED in the optocoupler is turned permanently off, so the power LED is on permanently.
Julian, first thanks for doing the videos! Super helpful! Quick question: why is it not possible to simply use a P-channel MOSFET? I've watched the section about the Optoisolator multiple times, but I'm still trying to understand... Thanks!
I would like to build a low-voltage LED lighting system for my home, similar to this product: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-iqHU7x6xh1U.html I wonder what will be required to home-build this from scratch. Do you recognize that driver board?
store.sure-electronics.com/led/led-lighting/45mil-high-power-led/2pcs-45mil-chips-high-power-led-10-series-in-5-parallel Can annyone explain what is the meaning of: "45mil"?, "2pcs"=you get 2 pieces? 38mil Red? I am intrested in warmwhite so what is 38mil Red? 34 volt x 900mA=30,6W so is 50W the max tolerance? Thanks for great videos Juilan.