Hey Guys! Any clues how to control high power LEDs with an Arduino controller? Given it has an output ~5V, I am guessing it would be dancing around a buck-boost converter? Cheers!
If you are talking about a converter then you are likely referring to driving the LEDs rather than controlling them. Many LED modules can be controlled directly from the Arduino using a serial protocol such as SPI or I2C, or in some cases from a single GPIO pin. For instance:
That link also includes a video that covers many aspects of using LEDs with a MCU.
Driving your LEDs will require a power supply. The 5v supply you are using for the Arduino might be enough for small modules, but if you are using high-power LEDS then you will likely need a separate power supply. A separate power supply means that you are not limited to modules powered at 5V. You should not try to use the 5v regulator on the Arduino, but if you are using a 9-12V supply for the Arduino that might also be usable at 9-12V for the LEDs. There are many different options available, and the most suitable power supply will depend on the LEDs that you are trying to power. Do you have a link to the type of LEDs that you are intending to use?
Thanks, Jeff! I was hoping to use PWM to alter the output of three LEDs of a unit such as linked below. I have done it with a low power version just driven by the Arduino. Cree XLamp XHP35 High Density LEDs
If you are looking to power those LEDs you will likely need an alternate power source with a bit more current. The best way to control them then with your arduino would be to use relays to toggle them on and off.
A device like that should have a constant current driver. You first need to select the current you want to drive them at - higher current means more light but a shorter life (and may require heatsinking) and of course you must not exceed the maximum rated current.
Here is an example of a custom constant current driver:
There are constant current drivers available with DC sources ranging from 2V upwards, or 240VAC units as used in household lighting. 350mA is a very common standard for large LED arrays.
The LED you are using does not have a built-in controller. The simplest controller is just as switch. You can get an inexpensive switch that will cope with almost any possible LED setup. For instance:
The Arduino supports hardware PWM so using that as a controller is just a matter of of wiring it to the switch.
Does the following look sensible - my understanding is each high-power LED would require a resistor, buck-boost converter, and MOSFET to keep them happy?
Please ignore the Arduino bit - it has been a while since I have used one.
I think you are looking at this from the wrong direction. You don’t need a ‘buck-boost converter’ as such. What you need is a constant current source. The constant current source will work by monitoring the current and adjusting the output voltage to maintain the current at the desired level. This voltage adjustment might be via a boost converter (if the input voltage is always below the voltage required to maintain the current) or a buck converter (if the input voltage is always above the voltage required to maintain the output current), or a buck/boost converter for the maximum range of usable input voltage. So a buck and/or boost converter is involved, but it’s only incidental to the principal function of providing a constant current.
There is no reason to go with a separate device for each LED. If you wire them in series then the voltage required for the constant current source could be above 12V (depending on the current you select) in which case you would use a device that incorporates a boost converter. If you wire them in parallel then the required input voltage is likely to be below 12V and the device will use a simpler buck converter. Here is an example of a 12-24V 900mA driver.
1 pcs 10W 12V - 24V DC LED Constant Current Driver Power 900mA High Power LED | eBay
This is an example, not a suggestion. Note that this is described as a 3S3P arrangement, so either 3S or 3P would also work. 900mA is quite suitable for the XHP35 although good heatsinking will be required.
To control it a MOSFET would be suitable, although when dealing with current at this level opto-isolation would be worthwhile.
@Tim259708 This is a typical way to drive a mosfet.
The 2N7000 is a low current N-Channel mosfet, it can be replaced with a high current one such as the one linked below.
Other LEDs can be wired in parallel with the one shown or with their own resistor. The common point is the connection between the 2N7000 and the LED. You only need individual drive if you want them ON at different times. The value and wattage of the resistor would have to be calculate so the current does not exceed the LED or mosfet rating.
VCC is whatever power source you need for the LED.
The microcontroller GPIO pin connects to the 3K3 resistor. This resistor may need to be lower in value if the mosfet does not turn ON quick enough.
As @Jeff105671 mentioned, connection through an opto isolator would be best in this case to protect the microcontroller. Opto Link below. Some more design thought would be necessary to get the drive signal correct.
The circuit you have drawn is not correct.
PS the circuit above I used to drive a LED similar to the one linked by @Jeff105671 from a Pi Zero GPIO pin. VCC was 5V.
Thanks guys, I’ve some learning to do!