LED Flash click: review and Arduino code

As its name suggests, the LED Flash click is a high power LED flash unit based on the 4-Amp very high-current integrated flash LED driver CAT3224 from On Semiconductor.

A dual cell capacitor can provide current pulses of up to 4A, with a duration up to 300ms, far beyond the current capability of today’s batteries. The CAT3224 features a 1x/2x charge pump which charges the stacked supercapacitor to a nominal voltage of 5.4V. The nominal charge current is determined via an external resistor, and an active balance circuit ensures that both capacitor cell voltages are balanced.

It sounds complicated, but in reality, this click board is deceptively simple to use. One has three control pins: CH-ENA is used to enable charging, TOR is used to enable flashlight functionality, while FLS fires the flash. The supercapacitor charging status is signaled via a FLAG pin.

Being a 5V-only click board, is a very good match for an Arduino Uno, using the Arduino Uno click shield in between. Below is a code example that works with the LED Flash click installed in the first mikroBUS socket:

// Pin definitions
#define FLG 2 //Flashcharged flag
#define TOR 6 //Torch mode
#define FLS A3 //Flash
#define CH_ENA A0 //Enable charging

float start_millis;
float chg_time;

void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
// Pin settings
pinMode(FLG, INPUT_PULLUP);
pinMode(6, OUTPUT);
pinMode(FLS, OUTPUT);
pinMode(CH_ENA, OUTPUT);

// first charge the capacitor
do_charge();

digitalWrite(TOR, LOW); // Init
digitalWrite(FLS, LOW); //
digitalWrite(CH_ENA, LOW); //

Serial.println("Torch mode on");
// Start torch mode
digitalWrite(TOR, HIGH); // Torch mode
digitalWrite(CH_ENA, HIGH); // Keep charging
delay(5000); // wait for five seconds
digitalWrite(TOR, LOW); //
digitalWrite(CH_ENA, LOW); // Keep
Serial.println("Torch mode off");
delay(2000);
}

void loop() {
// put your main code here, to run repeatedly:
do_charge();
flash_fire(300);
delay(5000);

}

void do_charge(void)
{
Serial.println("Charging");
start_millis = millis();
digitalWrite(CH_ENA, HIGH);
// wait for flag to go high
while(digitalRead(FLG) == 1);
digitalWrite(CH_ENA, LOW);
chg_time = millis() - start_millis;
Serial.print("Charging time ");
Serial.print(chg_time);
Serial.println(" ms");
}

void flash_fire(unsigned int flash_time)
{
Serial.println("Flash!");
digitalWrite(FLS, HIGH);
delay(flash_time);
digitalWrite(FLS, LOW);
}

A few notes regarding the code

One must charge the supercapacitor first, no matter if the torchlight or the flash functions is to be used. I have found that in torchlight mode the supercapacitor goes empty in about 10 seconds, and the light intensity diminishes. Keeping the charging circuit active by driving the CH_ENA pin high seems to extend the time for torchlight operation.

In flash mode, there is no control over the light intensity other than adjusting duration of the flash. With a flash duration of 300ms, there is no way to freeze motion as normal speedlights do. I have also found that the charging time between flashes is about four seconds, for a flash duration of 300ms.

And speaking of speedlights, I also tried to use the LED Flash click board as a trigger for my bigger flash units. The result: I can trigger my Yongnuo YN560 IV flash from a distance of up to 15 cm. That is, I have to keep the LED Flash click very close to the flash to optically trigger it. I would have liked to have more maneuvering space, but I can still think of some creative uses.

Bottom line: quite limited in possibilities as a flash unit. Gets very hot after many flashes fired.
Name

Air quality,2,Arduino code library,2,Arduino projects,23,Buggy,1,Casual stuff,1,ESP8266,2,MikroElektronika,3,PIC projects,7,Review,26,Robots,1,Tutorial,20,
ltr
item
Electronza: LED Flash click: review and Arduino code
LED Flash click: review and Arduino code
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiClAwZUg4tNlrIC3orLXsW7dP53GVDSXY58LJq4C6rmqJhBGFu3ZThiu9grqU473K8i5g1sv0S_r93khWSBitz6qFLFzGdA8dOc6aSk1pBBU_6g135QdaOJxA6pf9u_o2IbFR85hdR1lg6Cw8ScgfOElFkpFZ1YWVwlX2F9W2QXib59wXIhbR8anNa/s16000/led-flash-click-arduino.jpg
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiClAwZUg4tNlrIC3orLXsW7dP53GVDSXY58LJq4C6rmqJhBGFu3ZThiu9grqU473K8i5g1sv0S_r93khWSBitz6qFLFzGdA8dOc6aSk1pBBU_6g135QdaOJxA6pf9u_o2IbFR85hdR1lg6Cw8ScgfOElFkpFZ1YWVwlX2F9W2QXib59wXIhbR8anNa/s72-c/led-flash-click-arduino.jpg
Electronza
https://www.electronza.com/2017/12/mikroe-led-flash-click-arduino-code.html
https://www.electronza.com/
https://www.electronza.com/
https://www.electronza.com/2017/12/mikroe-led-flash-click-arduino-code.html
true
4275662725798500575
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share to a social network STEP 2: Click the link on your social network Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy Table of Content