High Voltage Converter And Flashtube (Part 2)

High Voltage Converter And Flashtube (Part 2) © GPL3+

Showing a simple way to use a flashtube with high voltage generated using Arduino.

  • 0 respects

Components and supplies

A000053 iso both1
Arduino Micro & Genuino Micro
Resistor 470 KiloOhm
Mfr 25frf52 1m sml
Resistor 1M ohm
Resistor 27 KiloOhm
Mfr 25frf52 100r sml
Resistor 100 ohm
Resistor 680 KiloOhm
Transistor BC 550 C
Transistor BC 560 C
Thyristor S 2516 MH
Flash-Tube FT 3234 S
Ignition Transformer C - E3E - 1.2
Capacitor 47 nF 350 V, Ceramic

About this project

In this project, the generation of high voltages (Part 1) and the use of an electronic flashtube (Part 2) is shown. The DC-to-DC converter shown in Part 1 is simple to build with a few components and can be used to generate a wide variety of voltages (selectable value in Arduino software). The flashtube in Part 2 is an example of how to use the high voltage and can also be adapted easily (Arduino software) to other purposes than shown below.

The intention for the publication of this project is two-fold:

  • If you are professionally developing microcontroller applications in a small company you sometimes do not have the capacity or time to develop a small DC-DC converter to support the need for high voltage generation: So please feel free to make use of the information in this project;
  • In education this project can be used to educate tightly integrated hardware and software solutions. Due to the risk introduced by high voltages, this project should be used, at the earliest, in an advanced class.

The project is based on the Arduino Micro using the ATmega32U4 microcontroller. However, you will find that the circuit and software can be easily moved to other pins (e.g. to be integrated into an existing design) or can be moved to a different microcontroller (Atmel ATmega series or different brand).


Electronic Flash-Tube used with ArduinoC/C++
This is an example (part 2) on how a flash-tube can use high voltages generated by the Arduino
  High-Voltage Converter and Flash-Light

  Control a DC-DC converter to generate High Voltage for Flash and trigger flashlight once the required 
  working-voltage is reached. This project uses an Arduino Micro (5V power) with Aref connected to a voltage 
  of 4.096 Volts. Pin numbers refer to the Arduino Micro Pin numbering

  Revision History
  2017-06-12 wasc High voltage generation code
  2017-07-09 wasc Added code for triggering flash-light 
  2017-07-28 wasc reformatted to fit with the published paper


// define constants and variables with global scope in this module

// Part 1: High Voltage boost converter
const int PWM11 = 11;                  // this PWM (Timer-Counter 0) can be configured to run quite fast, see setup()
const int HighVoltageInput = 6;        // Analog 6 input (A6) is used to read the high voltage value
const int MaxPulseWidth = 255;         // Maximum value for the pulse width setting (hardware determined)
const int BoostPulseWidth = 210;       // Pulse width to be used in PWM when HV is generated 
const int SleepPulseWidth = 3;         // Pulse width to be used in PWM when HV has reached working value
const int MaxHighVoltageValue = 445;   // this is the value to set the expected High Voltage 
                                       // 110 = approx. 50V
                                       // 220 = approx. 100V
                                       // 445 = approx. 200V
                                       // 560 = approx. 250V
const int HVhysteresis = 10;           // To ensure sufficient trigger pulse width for thyristor, trigger pulse will end 
                                       // only when high-voltage has decreased by hysteresis value

// part 2: electronic flash-tube
const int FlashPin = 7;                // Digital Pin 7 is used as output to fire the flash

// ----------------------------------------------SETUP-------------------------------------------------------------
// This function is executed one single time at the start of the microcontroller (HW&SW initialisation)
void setup() {

  // Set Arduino Micro Pin D11 as PWM-output and set the prescaler of Timer/Counter 0 to 1x to allow 65kHz
  pinMode( PWM11, OUTPUT);
  TCCR0B = 0x01;                // This will result in a frequency of about 65 kHz at PWM11
                                // This changes the predefined Arduino environment -- see hardware manual
                                // INFO: This changes also the delay() function which provides much shorter delays now!

  // use the 4.096 Volts reference at Aref pin
  analogReference( EXTERNAL );

  // set Digital Pin 7 as output
  pinMode( FlashPin, OUTPUT);
  digitalWrite(FlashPin, LOW);  // Just to be sure the Thyristor will not be triggered yet


// ------------------------------------------------------LOOP-------------------------------------------------------
// This function is executed repeatedly forever (make sure it can run through quickly and will not be stuck in a waiting loop)
void loop() {

  // define some variables to be used here
  int PulseWidth;                     // the pulse width to be set in the PWM, computed by algorithm below
  int HighVoltageValue;               // the ADC reading for the high voltage 0 = 0V to 1023 = 409.5V

  // This is the control section to control the generation of the high-voltage. A timer of the Arduino is used as PWM 
  // to generate the pulses for the simple boost converter. The microcontroller generates the pulses and controls the pulse 
  // width to generate the desired high voltage value.

  // measure the high voltage value with analog input
  HighVoltageValue = analogRead( HighVoltageInput );                  // will be used for setting the required pulse width of the PWM
                                                                      // as well as (in this sample code) to trigger the 
                                                                      // flash-light when working voltage is reached
  //now compute the required pulse width
  if (HighVoltageValue <= MaxHighVoltageValue) PulseWidth = BoostPulseWidth;  // Full Pulse width while high voltage is below target value.
  else PulseWidth =SleepPulseWidth;                                           // Once high voltage reaches target voltage, reduce 
                                                                              // pulse width so far as to disable the Power FET
  // now set the PWM to the desired pulse width
  analogWrite( PWM11, (MaxPulseWidth - PulseWidth) );         // Note: Pulse is inverted by hardware to ensure proper operation 
                                                              // when pin is tri-stated (e.g. at startup)

  // Trigger flash when expected high voltage is reached. This results in a 'traffic flashlight'. 
  // Here would be the place to trigger the flash for another reason, e.g. based on an photosensor signal, electrical contact etc.
  if (HighVoltageValue >= MaxHighVoltageValue )    digitalWrite(FlashPin, HIGH);                      // trigger flash when expected voltage is reached
  else if (HighVoltageValue < (MaxHighVoltageValue - HVhysteresis))  digitalWrite(FlashPin, LOW);     // stop trigger pulse only when the high voltage 
                                                                                                      // has decreased below the working voltage

Here we use Arduino's Digital Output 7 is used for the generation of the trigger pulse to fire the flash-tube. In this example code the pulse is started at the point in time when the expected working voltage of the flash-tube is reached. To ensure a sufficiently wide trigger pulse at the gate of the thyristor, the pulse will be turned off only at the point in time, where we can be sure, that the thyristor is fully conducting: This is the case, once the high voltage has been sinking by some volts (HVhysteresis):
if (HighVoltageValue >= MaxHighVoltageValue )    digitalWrite(FlashPin, HIGH);
else if (HighVoltageValue < (MaxHighVoltageValue - HVhysteresis))  digitalWrite(FlashPin, LOW);
This simple code results in a flash which is repeatedly firing (e.g. as you find it in traffic warning lights). By changing the code you can easily fire the flash under different circumstances, e.g. when an opto-coupler is activated etc.


High-Voltage electronic flash-tube
Simple Circuit for electronic flash-tube making use of high voltage generated with Arduino
Electronic flash-tube circuit
describes how the hardware of the electronic flash-tube works


Similar projects you might like

Autonomous High Altitude Glider

Project in progress by Abdullah Tarik Agcayazi and Kemal Ficici

  • 58 respects

Arduino UNO High Precision Counting Scale

Project showcase by Fedeasche

  • 43 respects
Add projectSign up / Login