EspositoWang: Difference between revisions

From Psych 221 Image Systems Engineering
Jump to navigation Jump to search
imported>Projects221
imported>Projects221
 
(169 intermediate revisions by the same user not shown)
Line 1: Line 1:
Back to [[Psych221-Projects-2013 |Psych 221 Projects 2013]]
Back to [[Psych221-Projects-2013 |Psych 221 Projects 2013]]


= LED Flicker Super Capacitor Design =
= LED Super Capacitor Design Test Light / Flash=


== Background ==
== Background ==


This projects builds upon the [[ChepkwonyChatterjee|2012 LED Flicker project]]. Instead of controlling the LEDs via PWMs, which has properties of flicking between OFF and ON states, the goal of this project is to design a system that provides a constant current through each LED. The design will mimic a camera flash with the use of super capacitors and a 9V battery (to make the design as compact and portable as possible) to flash each LED with 1 amp of current. There are 7 different LEDs on the LED array module and each LED must be flashed so that no two LEDs are on at the same time.
This projects builds upon the [[ChepkwonyChatterjee|2012 LED Flicker project]]. The goal is to build an ultra bright, multi-channel test light using extremely high power LEDs driven to their maximum rated current, and controlled precisely. By driving an array of 7 ultra bright LEDs, we aim to produce a world class LED flash.
 
Instead of controlling the LEDs via PWMs, which has properties of flicking between OFF and ON states, the goal of this project is to design a system that provides a constant current through each LED. The design mimics a camera flash with the use of super capacitors charged by a wall wart power adapter or benchtop supply. Each LED will be pulsed with a max of 1 amp of current. There are 7 different LEDs on the LED array module and each LED is flashed so that no two LEDs are on at the same time. The time duration that the LED is on and the time interval between LED flashes are adjustable to allow for ease of use. Modifications can be made so that this design can be charged with Alkaline or Lithium-Ion batteries to make the entire system compact and portable.


== High Level Device Specifications ==
== High Level Device Specifications ==
# Should have at least 7 channels for controlling each LED
# Should have at least 7 channels for controlling each LED
# The rate at which the LEDs flash should be adjustable
# The rate at which the LEDs flash should be adjustable
#:To adjust the interval time between each LED flash
#:To adjust the interval time between each LED flash and the duration that each LED is on for
# The light intensity shall be constant and be set with ~1A of current
# The light intensity shall be constant and be set with ~1A of current
#: Easy modifications can be made so that the light intensity can be adjustable
# System design should be modular to allow for quick modifications to system parameters
# System design should be modular to allow for quick modifications to system parameters
#: Amount of charge caps can hold and amount of current through LED
#: Amount of charge caps can hold the amount of current through LED
# Should incorporate the use of super capacitors and a 9V battery for a compact portable design
# Should incorporate the use of super capacitors for a quick discharge of energy to the load


== Device Overview ==
== Device Overview ==
The purpose of this system is to produce a controlled ultra bright LED based camera flash.
In order to achieve this goal, we built a system using one current driver circuit for each LED, an Arduino micro-controller to switch each channel, and a super-capacitor circuit to provide the necessary current. This system is charged by a high power, efficient charging circuit which keeps the capacitors charged and ready to drive the flash.


== Design ==
== Design ==
Line 23: Line 30:
# LED Array of primary lights
# LED Array of primary lights
#:For the final design : 7-in-1 round assembly [http://www.luxeonstar.com/Predefined-7-LED-Round-Assembly-p/sr-02-00015.htm LED Array]
#:For the final design : 7-in-1 round assembly [http://www.luxeonstar.com/Predefined-7-LED-Round-Assembly-p/sr-02-00015.htm LED Array]
# Arduino Nano microcontroller [http://arduino.cc/en/Main/ArduinoBoardNano]
# Arduino Uno microcontroller [http://arduino.cc/en/Main/arduinoBoardUno product]
# A circular flat top Heat Sink Diameter ~ 2 1/4th inches
# A circular flat top Heat Sink Diameter ~ 2 1/4th inches
# A perforated circuit board (for the intermediate design) and a breadboard (for making a prototype)
# A perforated circuit board (for the intermediate design) and a breadboard (for making a prototype)
# Circuit components
# Circuit components
## 10F and 50F super capacitors [http://www.digikey.com/product-detail/en/BCAP0050%20P270%20T01/1182-1011-ND/3079275]
## 50F super capacitors [http://www.digikey.com/product-detail/en/BCAP0050%20P270%20T01/1182-1011-ND/3079275 product]
## Fairchild Semiconductor FDS6912A: N-Channel MOSFET [http://www.fairchildsemi.com/ds/FD/FDS6912A.pdf]
## Fairchild Semiconductor FQP30N06L: N-Channel MOSFET [http://www.fairchildsemi.com/ds/FQ/FQP30N06L.pdf datasheet]
## Fairchild Semiconductor 2N3904 NPN BJT [http://www.fairchildsemi.com/ds/MM/MMBT3904.pdf]
## Fairchild Semiconductor 2N3904 NPN BJT [http://www.fairchildsemi.com/ds/MM/MMBT3904.pdf datasheet]
## TI LM317 Adjustable Linear Regulator [http://www.ti.com/lit/ds/symlink/lm317.pdf]
## TI LM317 Adjustable Linear Regulator [http://www.ti.com/lit/ds/symlink/lm317.pdf datasheet]
## 0.68 Ohm 7 Watt power resistors feedback resistances
## Ohmite RA-T2X-51E Heatsink, TO-220 [http://www.digikey.com/scripts/DkSearch/dksus.dll?WT.z_header=search_go&lang=en&keywords=RA-T2X-51E-ND%09&x=0&y=0&cur=USD product]
## 1.82 KOhm resistors to connect control signals from the Arduino to the circuit.
## Assmann WSW Heatsinks, TO-220 [http://www.digikey.com/product-detail/en/V7236A1/A10762-ND/3476149 product]
## Lever switches
## Kyoto Solid State Relay: In-32VDC max, Out-60VDC max, 4A max [http://www.jameco.com/Jameco/Products/ProdDS/175222.pdf datasheet]
## 9V battery
## 1.3 Ohm 5% 3 watt power resistors feedback resistances
## 2.7KOhm 5% 1/4 watt resistors to connect control signals from the Arduino to the circuit.
 
===LED Driver Circuit ===


=== Circuit ===
[[File: LED_Driver_Schematic.png|thumb|right|border|200x250px|Driver circuit for the LEDs]]
[[File: Ckt.png|thumb|right|border|200x250px|Driver circuit for the LEDs]]
To get a system that produces a stable light output, the LED must be driven by a constant current. An approach to get a constant current is using the circuit to the right. The way this circuit works is that the R<sub>feedback</sub> resistor and BJT combination sense the amount of current flowing though the LED and feed this signal back to the MOSFET gate controlling its voltage and hence the current flowing through it.


The key parameter that must be selected with caution is the R<sub>feedback</sub> resistance since that controls the maximum amount of current flowing through the circuit. [http://www.instructables.com/id/Circuits-for-using-High-Power-LED-s/step8/a-little-micro-makes-all-the-difference/ This page] mentions that an empirical estimate to the maximum current flowing through the circuit is 0.5/R<sub>feedback</sub>. We performed some circuit simulations in SPICE to get a sense of the appropriate parameter values.
To get a system that produces a stable light output, the LED must be driven by a constant current. An approach to get a constant current is using the circuit to the right. The way this circuit works is that the feedback resistor and BJT combination sense the amount of current flowing though the LED and feed this signal back to the MOSFET gate controlling its voltage and hence the current flowing through it. This design allows approximately ~1A of current to flow through the LED. The key idea was drive the LEDs and FETs with a constant current making their light output insensitive to supply voltage. Simulations were performed to analyze the behavior of the system with the proposed circuit parameters, and it was found that the LEDs in the Luxeon array have a relatively shallow turn on slope, introducing voltage sensitivity despite the constant current drive of the supply. In order to remedy this, we had to choose a supply voltage range that would keep the LEDs in their own 'saturation' region.


Seven copies of this circuit should be made to drive each LED, with the seven PWM output signals coming out from different channels of the Arduino microcontroller.
For current control, the key parameter that must be selected with caution is the feedback resistance since that controls the maximum current flowing through the circuit. Given that this is a high current (1Amp) design, multi-watt power resistors must be used for the current limiters ensure that the power dissipated in them does not damage the circuit.
 
To determine what feedback resistance we needed, we performed several simulations in LTSpice to verify that the circuit will work the way we expect it to and the optimal resistance parameters for the feedback and input resistors (at the gate of the FET).
 
Seven copies of this circuit will be assembled, one to drive each LED in the array, with the seven control signals routed to the gates of the FETs from the Arduino microcontroller.
 
===Super Capacitor Charging/Discharging Circuit===
 
[[File: Charging_schematic.png|thumb|right|border|200x250px|Capacitor Charging/Discharging Circuit]]
 
Ideally, the system should be able to drive more than one LED in the array at once. In order to support a much higher (multi-amp) drive current, caused by triggering 7 or more 1A LEDs at once, we had to build a supply circuit that was based around a collection of 50F super-capacitors.
 
These capacitors can be charged simply, using a conventional voltage regulator to approximate an ideal voltage source. This is problematic, however, as it will take an extremely long time to charge the capacitors fully. As a result, we designed a current controlled power supply.
 
The circuit is fairly straightforward -- an LM317 adjustable linear regulator acts as a regulated voltage supply. This supply could easily be replaced by a switch mode supply to improve system efficiency, however, one would have to carefully select a replacement supply capable of handling 7.5+ volts on the output and supplying >1.5A for the time it takes to charge the capacitors (about 1 minute)
 
The current drive is formed with a MOSFET is placed in series with the capacitors. Its gate is connected to the supply rail. Thus, the FET will drive as much current as it can into the capacitors until the voltage of the charged capacitors pushes the FET into cutoff. The result is that the capacitors will charge as quickly as possible and be voltage limited to the regulator's setting minus the (approximately) 2V Vgs of the FET.
 
Once the capacitors are fully charged, the voltage regulator can be disconnected (using the solid state relay) and the capacitors will retain their charge, ready to supply current to the LED array.
 
A simple resistive voltage divider has been included to allow our Arduino to sense when the capacitors are charged and then disconnect the regulator. This allows us to 'overdrive' the capacitors -- that is, set the linear regulator to drive the capacitors to a voltage higher than their design specification, and then use the Arduino to disconnect the supply before the capacitors actually exceed their specified rating. The advantage to this is that the FET does not approach cutoff as the capacitors are finishing charging, resulting in a higher current at the final stage of charging and thus a much shorter charging sequence.
 
Note that the Arduino is required for this configuration to work safely, and the circuit should not be connected without a powered and programmed Arduino. If an Arduino is unavailable, it is STRONGLY ADVISED that the circuit be readjusted to ensure that the super-capacitors to not exceed their rated voltage.
 
===Overall System Design===
 
The entire circuit design is shown below. Since there are 7 LEDs on the LED array module, each of the individual LED driver circuits is connected at the same node (in parallel).
 
[[File: Entire_circuit_schematic.png|thumb|center|border|500x600px|Complete circuit schematic]]


== Method ==
== Method ==


=== Simulations ===
=== Simulations ===
Various simulations in LTSpice was performed prior and in parallel with testing the prototype breadboarded version. The idea was to use the same circuit configuration as in the previous project since the MOSFET and BJT current limits the maximum amount of current through the LED.  
Various simulations in LTSpice were performed prior to and in parallel with testing the prototype breadboarded version. The idea was to use the same circuit configuration as in the previous project since the MOSFET and BJT current limits the maximum amount of current through the LED. The optimal feedback resistance (in series with MOSFET source) was found by adjusting the resistance so the current in the saturation region of the MOSFET was approximately 1A. The feedback resistor has to be rated for at least 3 watts to handle the 1A. Lower power rating resistors could be used since the LED flash system will not have a continuous 1A flowing through it, the flash duration will be within the range of ~10ms or less.  


The feedback resistor value is 0.68ohms, while the resistor on the collector side of the BJT was 51ohms. The MOSFET model used in the simulation was the FQP20N06L, but in the actual circuit we used the FQP30N06L. Fairchild Semiconductors did not make a FQP30N06L model so we used the closest model as possible. Although the values for the resistors were obtained through simulations, we knew that once we tested the actual circuit, we would have to modify the resistor on the collector side of the BJT to compensate for the difference in the MOSFET models.
As shown in the figures below, the circuit simulation for the LEDs only consisted of the LED driver current and not the charging/discharging unit. All the LEDs on the LED module were simulated except for the deep red and red LEDs because models were not available for those components. All simulation files can be found in the Appendix.
NOTE: The charging/discharging system was not simulated because models for the LM317 from Texas Instruments were not available and for some reason simulating capacitors in the Farad (1-50F) range does not simulate properly in LTSpice.


<center>
<center>
<gallery widths=200px heights=200px caption="Simulation waveforms">
<gallery widths=250px heights=250px caption="Simulation waveforms">
File:Current_and_voltage.png|Current and voltage waveforms <br>R<sub>feedback</sub> = 2 Ohm
File:Royal_Blue_LED_circuit_simulation.png|Royal Blue (447.5nm) LED circuit (without super caps)
File:Temperature_sweep.png|Effect of temperature sweep on current
File:Royal_Blue_LED_simulation.png|Royal Blue LED current waveform
File:Blue_LED_simulation.png|Blue (470nm) LED current waveform
</gallery>
</gallery>
</center>
</center>


===Initial Super Capacitor Testing===
===Characterization of LED Array Module===
Although simulations were performed of the LED driver circuit, we wanted to examine the performance characteristics of the super capacitors since we have not used them before. The schematic below shows how the super capacitors were analyzed. The super caps (10F @ 2.5V) were placed in series, which effectively creates a 5F cap with a 5V voltage rating. A lever switch (single pole double throw) was connected in such a way that the supply source (9V regulated to 5V with an LM317) would charge the caps. Once the caps charged to a voltage of 5V, the switch was pressed, which disconnected the supply source and connected it to a resistor in series with a white LED to allow for discharging. An initial load of 40mA was being drawn from the caps and decreasing while the caps were discharging.


With a benchtop power supply, the caps took ~37 seconds to charge fully to 5V. With a load of 40mA and less, it took about 19mins to discharge the caps to around 3V (which effectively turns off the LED). From these observations, we hoped for a 9V alkaline battery would charge in approximately around the same ballpark while discharge time for a 1A load would be a few seconds. There is a significant tradeoff between battery life/capacity and charge time. Charging the battery with a low current supply will increase the longevity of the battery charge capacity, but if charging at a very high current (i.e. 1A), the battery charge will drain exponentially. Videos of the charging and discharging of the caps can be found in the Appendix.
Although simulations were performed for the LED driver circuit with averaged models of the Luxeon LEDs, we wanted to fully characterize the LEDs ourselves to determine how much of a difference there was from the model to the actual product. To test each LED, we hooked each one within the LED driver circuit to a benchtop power supply with initially 0V. We stepped up the voltage by 0.1V and made note of what the current draw from the LED was. As you can see, the measured plot is very similar to the simulated plots (royal blue LED shown below). The major noticeable difference is from 2.7-3.6V range in which the shows a very weird effect from the LEDs. At around 3.5-3.6V (which is very close to the voltage drop of the LED), the LED suddenly kicks on and conducts hard. If the upper linear portion of the plot is extrapolated down, it would look more like the simulated.


[[File:XXXXX|center|thumb|Super Capacitor Testing Circuit]]
One difference between the simulated and measured plots is that the MOSFET was different. The actual MOSFET was an FQP30N06L while the simulated MOSFET was a FQP20N06L (fairchild semiconductor did not have a model for the FQP30N06L). From the simulation, the current in the saturation mode is ~1A, but when measured and due to the difference of the MOSFETs, the resistor value on the collector side of the BJT was 51 ohms in the simulation made the measured saturation current limit at 1.1-1.2A. To make sure that the limit of ~1A is strictly enforced, the resistor was changed to 2.7K. Tests were conducted and the LEDs were clamped to 1A within a +/-0.5% range.


From this test, we were able to observe that the average saturation cutoff region for all the LEDs is around 4.8V. For the flash sequence to run a few times before the capacitors have to be charged fully again, 2-3 volts + 4.8V across the capacitors should be sufficient. Data from all LED characterization can be found in the Appendix.


Once the super caps were tested with a bench top power supply, we decided to test the caps charging and discharging time in the same configuration but with a 9V alkaline battery. A 9V battery performance is characterized by milliamp-hours capacity. As shown in the characteristic graphs below, for an energizer max 9V alkaline battery, with a discharge of 500mA, the capacity of the battery is approximately 300mAh.  With the discharge trend, a discharge of 1A would have approximately 250mAh of capacity, giving the life of the battery to only 15 minutes for a continuous load of 1A. The 9V characteristic curves as shown below also indicate that the estimated 15 minutes of battery life for the system is an overestimation.
<center>
<gallery widths=300px heights=300px caption="Breadboard Circuits">
File:Royal_blue_LED_current_plot.png|Royal Blue LED current plot
File:Royal Blue LED simulation.png|Simulated results
</gallery>
</center>
 
===Super Capacitor Charging/Discharging Design Testing===
 
The super capacitor charge circuit was designed to charge the capacitors quickly in order to provide the current necessary to drive a flash.
 
Several approaches were considered for the charging circuit. Initially, we evaluated a simple voltage source system, but the current driven into the capacitors drops off exponentially, and charging a large capacitance like we have took a prohibitive amount of time (over half an hour). The solution was a current controlled charging system.
 
The controlled current source works by using a transistor (MOSFET) to drive current into the capacitors. Voltage regulation is delegated to the Arduino micro-controller, which senses the voltage across the capacitors using an analog input and then disconnects the charging circuitry once the capacitors have been charged to the desired voltage.
 
Testing was performed using a bench-top power supply for power, and a pair of digital multimeters measuring current through and voltage across the capacitors.  We found that the circuit will draw as much as 2.7 Amps when supplied with a 12V input and will charge the capacitors from 0V to a full 7V charge in under a minute. A partial recharge only takes a few seconds.
 
[[File: charging_circuit_sensing.JPG|thumb|center|border|300x400px|Charging circuit with voltage sensing from Arduino]]
 
====Capacitor discharge profile====
 
Prior to testing the charging and discharging subcomponents, we wanted to have an idea of how long the capacitors will last if 1A of current is being drawn. We were able to find a current discharge profile for the 50F, 2.7V Maxwell super capacitors that were used in the design. From the figure below, this specific capacitor can last 2-4 seconds with 1.5A draw without any voltage reduction. For a 1A draw, we could estimate that there is approximately 4-6 seconds without any voltage reduction. This factor is extremely important because the MOSFETs will be in the saturation region when turned on for current to flow through the LED. From the simulations, we measured that the saturation cutoff voltage was about 4.8V and we set our firmware code to detect the turn off the MOSFET at the 5V drain-source voltage (amount of voltage across the caps).
 
The Arduino currently sense the voltage across the capacitors to charge them up to 7V. Since the saturation region is about 5V, there is a 2V swing that can be utilized to discharge the caps with a constant 1A. If 3 - 50F capacitors are in series, approximately 3-10 seconds since the effective capacitance is 1/3 than what the discharge profile portrays.
 
[[File: Cap_discharge_profile.png|thumb|center|border|300x400px|Capacitor discharge profile]]
 
=== Prototype Circuit ===
 
Videos of LED driver circuit testing can be found in the Appendix.
 
<center>
<gallery widths=250px heights=250px caption="Breadboard Circuits">
File:LED_driver_breadboard1.JPG|LED driver circuit on breadboard
File:LED_Driver_test2.JPG|LED driver circuit testing
</gallery>
</center>
 
 
<center>
<gallery widths=250px heights=250px caption="Individual Subsystem Circuits">
File:LED_driver_complete_board.JPG|LED driver board on protoboard
File:Charging_circuit_complete.JPG|Charging circuit on protoboard
</gallery>
</center>
 
==Trade Offs==
 
There are several trades off that needed to be considered prior and during all the circuit testing. The option to run the system off a battery and the capacitor size becomes an issue when designing around charge time, portability, and accessibility.
 
===Battery Design Considerations===
Once the super caps were tested with a bench top power supply, we decided to test the caps charging and discharging time in the same configuration but with a 9V alkaline battery. A 9V battery performance is characterized by milliamp-hours capacity. As shown in the characteristic graphs below, for an energizer max 9V alkaline battery, with a discharge of 500mA, the capacity of the battery is approximately 300mAh.  With the discharge trend, a discharge of 1A would have approximately 250mAh of capacity, giving the life of the battery to less than 15 minutes for a continuous load of 1A. Realistically, the the 9V would probably only last less than a few minutes because the performance curves are for a continuous discharge to 4.8V. For our design, since we need at least a charge of 7V to fully charge the caps, a 9V would not be a feasible solution for long-term use.
 
Although a 9V battery makes the design more portable and compact for the user, there is a definite tradeoff between battery life and charge time. If the user wants to charge the system very quickly, then the battery will probably only last for a few full charge cycles. Charge time from a battery with the system capacitors would take a few hours because the current exponentially decreases as the cap reaches fully charged state. One possible solution is to pre-charge the capacitors with a wall adapter transformer and then finish the charge with batteries. Our system prohibits the execution of the flash sequence unless the capacitors have specific voltage across them. So a wall adapter or benchtop power supply could be used to initially charge them, and then a battery could be used to reenergize them to full capacity. Because of this tradeoff, we decided to implement the bench top supply since the user will be able to perform more flash sequences without having to wait for a long charge.


<center>
<center>
Line 74: Line 170:
</center>
</center>


=== Prototype Circuit ===
===Capacitor Size===
As a prototype for the final circuit, we designed the system on a breadboard. The circuits for each of the seven channels feeding the individual LEDs were small and compact. We modified the existing firmware to parametrize the number of output channels. Once the circuit was ready we connected it to the arduino and gave commmands to the Arduino through the USB port serial interface.
Super capacitor size is problematic because they are only rated to handle a very limited voltage drop. Most super capacitors have a voltage rating of 2.5-2.7V. Since the saturation region threshold is 5V, capacitors had to be stacked in series to utilize them more efficiently and effectively. As capacitors are stacked in series, the effective capacitance decreases. Another limiting factor is that charge time for capacitance increases as capacitance size increases, so depending on the application and time of use, determining what size cap and how many in series are needed in a design is a challenging task.
[[File:IMAG0516.jpg|center|thumb|Prototype circuit]]
 
==Arduino Code Development==
 
The system software allows for serial communication for triggering and system configuration, and also accepts a trigger signal as a rising edge interrupt on digital pin 2.
 
Although not fully implemented, there are settings that can be adjusted serially for the period in which each LED is on, delay between individual LED flashes, as well as the ability to set the PWM brightness of each LED.


=== Intermediate Design ===
The code was designed as a simple state machine. While idle, it continually checks for input on the serial port. On receiving a message, it will act appropriately, either storing a new value into the correct register or attempting to trigger the LED sequence. Note that the LED sequence will be aborted if the capacitors are not charged sufficiently to guarantee the expected LED response.
An intermediate version of the circuit was designed on a perforated circuit board using the 7 LED round-assembly configuration Luxeon LEDs. The purpose of this design was to run the system under actual operating conditions to verify that all the used circuit element ratings were appropriate for operation. Basically, check whether there were any faults like overheating in specific components.


The LED assembly was fastened with screws on to the flat round surface of the metallic heat sink, and separated by a thin layer of Heat Sink Paste. Wires were soldered onto the terminals of each LED. I color coded the wires as orange to represent positive and white to represent negative, for consistency. The perforated circuit board that I used had dimensions 7.5"x5.5" but this was larger than necessary. The heat sink average circular diameter was 2 5/16ths inch and so I used a hole saw of diameter 2 1/4ths inch to drill a hole in the middle of the circuit board to make the heat sink with the LED Assembly fit neatly through. I arranged and soldered all the circuit components in a circle around the central hole for compact connections to the LEDs.  
The LED sequence is a straightforward loop. The software disables the charger interrupt to guarantee table time response. It then turns each LED control pin on in sequence (the current value is 20ms) and then turns it off. After waiting a specified delay (currently 2ms) it turns on the next pin in the sequence. Once all the pins have been cycled, the system returns to the wait state.


All the individual circuit grounds were short-circuited and a common ground wire was exposed. Similarly all the positive terminals of the LEDs were short circuited and a common Vdd wire was exposed. The common ground and common Vdd were connected to a female Barrel connector terminal. The barrel connector was connected to the power supply using a standard power adapter. The Adapter specifications were Input: 100-240V 1A 50-60Hz, Output: 5V, 4A DC. The connector was a standard 2.5mm(ID)-5.5mm(OD) connector.
Capacitor charge is detected asynchronously by a timer based interrupt that periodically (every 100ms) checks the voltage on the capacitor sense pin. If the voltage reaches a set threshold (about 7V) it switches out the regulator, via a digital pin controlling the relay described above, and turns on the onboard LED on the Arduino to indicate charge is ready. It also sets a flag in the software which allows the flash sequence to be triggered.


For each individual circuit the PWM signal input port was connected to a wire obtained from stripping an Ethernet Coaxial cable. The reason for this choice was because they could be easily wound together and made to emerge from the unit as a compact collection. The ends of the wires were soldered onto the pins of DIP male connectors so that they could just be slid into the Arduino connection sockets. To prevent the soldered wires from short-circuiting Heat Shrink was used to insulate exposed connections.  
<center>
<gallery widths=200px heights=200px caption="Arduino Code Process Flow">
File:Psych_software_3.png|Overall program flow
File:Psych_software_2.png|Trigger sequence
File:Psych_software_1.png|Voltage Sense Interrupt
</gallery>
</center>


'''At this stage the Pins on the Arduino that were configured to provide the digital PWM output were (Digital) Pins 2,3,5,6,11,12,13.'''
[[File:Annotated_Top_View.jpg|center|thumb|Annotated Intermediate Design Top View]]


== Results ==
The commands that can be sent to the Arduino via the serial port are as follows:


=== Circuit Measurements ===
"TON_###" where ### is any integer number of milliseconds to turn on each LED.
We performed tests to measure and verify various aspects of our design. We wanted to verify that our circuit design did match the simulation, therefore part of the tests done were to verify the voltage and current. We also did tests to verify the stability of the output from the circuit over time. Finally we analyzed the spectral characteristics of the light emitted from the LEDs.


==== Circuit voltage and current measurements ====
"TINT_###" where ### is any integer number of milliseconds between turning on each LED.
We took voltage measurement across the LED and measured the current being drawn from our power supply, which in this case was the Arduino.
The results showed that we had a 1.1V drop across the LED and that the total current being drawn from our power supply was approximately 90mA.


We also measured the voltage that was generated from a solar cell that was placed directly over one of the LED's. The voltage measure across the solar cell was 0.2V.  
"TRIG" triggers all integers sequentially.


Note the PWM input from the Arduino was a square wave running at 2Khz and was modulated by a sinusoidal was that was at a 3Hz freq. See the following video to get a better idea of how the input wave looks like. [[http://white.stanford.edu/teach/index.php/File:PWM_modulated.zip]].
"TSIG" triggers all integers simultaneously.


==== Circuit temporal measurements ====
The system can also be triggered by a rising edge interrupt on pin 2.
The LED Flicker device was left to run for 1 hour after the initial measurements were taken. We then remeasured the voltages and currents. The goal of this test was to verify the stability of the circuit.  


After 1 hour the voltage drop across the LED was 1.1V and the maximum current drawn by the circuit was 90mA.  The measured voltage across the solar cell was still 0.2V. This results did show that the circuit was stable after a 1 hour period.
== Results of Complete System ==


=== LED Measurements ===
Overall, this project met its design goals. The system is capable of driving an array of 7 LEDs at 1 Amp each, either one at a time or simultaneously. (See video:[[File:LED_driver_testing.zip]]), with the drive current limited by the feedback circuit. The system is fully capable of being driven to lower output levels by simply lowering the input voltage on the gate of the MOSFET of each leg.
We obtained the LED spectral properties using a spectrophotometer. We got measurements for all the seven LED's that we were using. The graph below shows the spectral power distribution on the LED's. The second graph is the normalized version of the first graph. As you can see from the SPD curves the bandwidth of most of the LED's was narrow, apart from the white LED. Also the intesity of the blue and red  LED seemed to be the greatest as shown by their SPD curves. We were expecteing to get high intensities and narrow bandwidths with the shorter wavelength LED's and lower intensities and wider bandwidths with the larger wavegth LED's. Our results did not show this and we attribute this mainly to the fact that we were not using the Luxeon 7 pack LED module that we had planned to use. This module has well matched LED's that will give SPD's that would be similar to what we expected. Also another fact is that our resistance values were not matched well with our LED's and this can be attributed to the fact that we did not have the right circuit models for the LED's to do a simulation and get the right resistance values.


<center>
<center>
<gallery widths=200px heights=200px caption="Spectral power distribution">
<gallery widths=300px heights=300px caption="Final Design Test Setup">
File:spd.png|Spectral Power Distribution
File:Final_Design.JPG|Final Design
File:spd_norm.png|Normalized Spectral Power Distribution
</gallery>
</gallery>
</center>
</center>


The last set of spectral measurements we performed on the LED's was to capture the maximum intensity as we decreased the mean input voltage/power to the LED. We obtained a linear curve for all the LED's apart from one as shown in the curves below. We believe the curve that was not linear was as a result of that specific LED getting to it's saturation point before the peak power that was being provided.
The LEDs can be driven with our super capacitor charge system and when the LEDs are driven for short periods (~20ms each)
See Video: [[File:Flash_sequence_current.zip]]
 
The entire array can be flashed over 100 times, before the voltage drops below a threshold that will guarantee a full amp of current through the LEDs. This limitation is due to the shallow turn on voltage / current curve of the Luxeon super bright LEDs. A threshold voltage was chosen that will ensure that all LEDs are driven at nearly the full 1 Amp rating. Once the supply voltage drops too low, the system will prevent additional flashes until the capacitors have been recharged.
 
 
See Demonstatation: [[File:Arduino_sensing_cap_voltage.zip]]
 
The system is fully capable of supporting both short and long duration flashes, at a mere cost of additional energy expended:
 
Slow flash sequence duration (6 channels): [[File:Slow_flash_sequence.zip]]


[[File:Gamma_Resp.png|center|thumb|Gamma Response]]
Fast flash sequence (6 channels): [[File:Fast_flash_sequence.zip]]


== System Optics ''(Future work)'' ==
Testing voltage discharge from capacitors with 10 flash sequences: [[File:10_flash_sequences.zip]]
The electronic circuitry design and assembly has been completed, however the design and integration of the optics of the system is still pending. This is an interesting challenge. The requirement is a system that is capable of transporting the light from the assembly to a remote location (this will likely be to an fMRI machine).  


An idea is the use of a bundle of Optical fibers packed together and sheathed in a plastic tube coating. This would form a reliable and flexible transportation medium. A feature of this design is that bundles from the distinct 7 channel assemblies could be taken and combined in any pattern within the sheath for final delivery. A sample of something that might be possible to do is:
Testing how many flash sequences can be triggered within sensing range: [[File:20_flash_sequences.zip]]
[[File:Center-surround.jpg|center|thumb|border|'''Sample''' fiber bundle center surround pattern]]


== Conclusions ==
== Conclusions ==
Our system implements the existing LED flash lighting circuit and improves upon it in several ways. Most obviously, it scales everything "to the max" -- increasing the drive current of the LEDs to a full 1A per channel, while maintaining the supply voltage insensitivity of the previous circuit by actively sensing supply behavior.
The circuit further improves upon the previous design by completely redesigning the supply circuit to provide several amps of output current using a regulated super capacitor charger and super capacitors to drive the individual LEDs. This circuit provides for current needs (1A for one channel at a time) and future needs (8A simultaneous discharge should pose no problem).
Finally, the flexible software design should be easy to expand upon for future needs, thanks to its modular structure.
In the course of designing and developing this cirucuit, we discovered a number of things about high current LED lighting control and operation. This includes shallow current / voltage slope relationship found in ultrabright LEDs at high currents. We also faced a challenge in developing a circuit that could drive such high currents without self destructing, and one the could reliably be used to charge and supply these large discharge currents.
We saw that careful design yields a design the exceeds expectations and can produce a surprising amount of light. That said, our design does not maximize energy efficiency. Our use of a linear regulator leads to a fairly large waste of energy in charging the capacitors. Unfortunately, extremely high power, high efficiency switching regulators that meet our current and voltage specifications are hard to come by on shot notice and remain fairly pricy.
Additionally, the current control circuit wastes several WATTS in current limiting the LEDs. An alternative drive topology could likely yield a much more energy efficient drive circuit.
We did encounter a number of challenges in assembling the circuit as well. Sourcing the LED array took a fair amount of time, and it is advised that any future team pursuing this project place an order for the array the day they decide to undertake the project. Other design considerations can wait.
In the future, we envision several improvements to the system. As discussed above, we can see how power usage can be drastically reduced. We have also begun the process of implementing pulse width modulation to control the brightness of our LEDs, but our program is modularized to allow for other methods of control. Specifically, we sourced a 12 bit, 8 channel Texas Instruments Digital to Analog Converter (part number tlv5630) which we envision using to directly drive the gate our our current control circuit. This will allow extremely precise brightness control over each LED without imposing the flicker problems created by blindly pulse width modulating the drive circuitry. This was not prioritized because higher power was described as a more important feature in the project specification.
Our circuit design demonstrates that extremely high power, super bright LED drive systems are possible and can still be precisely controlled to make extremely flexible test lighting systems.


== References ==
== References ==


[[https://github.com/rfdougherty/ledFlicker Original Firmware(With 6 channel support)]]
[[ChepkwonyChatterjee|2012 LED Flicker project]]
 
== Appendix I - Code and Data ==
 
===Files===
LTSpice code for simulated circuit: [[File:LED_driver_simulations.zip]]
* Need to install MOSFET and LED models to work properly
 
Altium Designer schematics: [[File:Altium_Schematics.zip]]
 
LED characterization data tables: [[File:LED_characterization_data.zip]]
 
Arduino code for driving LED circuit: [[File:LED_Driver_2_2.zip]]


[[https://github.com/tirthankarc88/ledFlicker Forked and updated firmware with 12 channel support]]
===Videos===


== Appendix I - Code and Data ==
LED driver circuit test: [[File:LED_driver_testing.zip]]
 
Super capacitor charging/discharging with Arduino voltage sensing: [[File:Arduino_sensing_cap_voltage.zip]]
 
Observing current load while testing flash sequence (6 channels) : [[File:Flash_sequence_current.zip]]


===Code===
Slow flash sequence duration (6 channels): [[File:Slow_flash_sequence.zip]]
Spice code for simulated circuit: [[File:Circuit.sp.zip]]


Arduino code for driving LED circuit: [[File:LEDFlicker_12channel.zip]]
Fast flash sequence (6 channels): [[File:Fast_flash_sequence.zip]]


===Prototype Data===
Testing voltage discharge from capacitors with 10 flash sequences: [[File:10_flash_sequences.zip]]
Video of sinusoidal modulated PWM [[File:PWM modulated.zip]]


Video of test being run [[File:OneHourTest.zip]]
Testing how many flash sequences can be triggered within sensing range: [[File:20_flash_sequences.zip]]


== Appendix II - Work partition ==
== Appendix II - Work partition ==
Hardware assembly - Tirthankar Chatterjee
Simulation/characterization development - David Wang
<br>
Schematic and PCB Layout Design - Tirthankar Chatterjee
<br>
<br>
Firmware edits    - Isaac Chepkwony, Tirthankar Chatterjee
Hardware assembly - William Esposito, David Wang
<br>
<br>
Help and advice from Robert Dougherty, Research Director Stanford Center for Neurobiological Imaging.
Firmware development - William Esposito

Latest revision as of 00:53, 4 April 2013

Back to Psych 221 Projects 2013

LED Super Capacitor Design Test Light / Flash

Background

This projects builds upon the 2012 LED Flicker project. The goal is to build an ultra bright, multi-channel test light using extremely high power LEDs driven to their maximum rated current, and controlled precisely. By driving an array of 7 ultra bright LEDs, we aim to produce a world class LED flash.

Instead of controlling the LEDs via PWMs, which has properties of flicking between OFF and ON states, the goal of this project is to design a system that provides a constant current through each LED. The design mimics a camera flash with the use of super capacitors charged by a wall wart power adapter or benchtop supply. Each LED will be pulsed with a max of 1 amp of current. There are 7 different LEDs on the LED array module and each LED is flashed so that no two LEDs are on at the same time. The time duration that the LED is on and the time interval between LED flashes are adjustable to allow for ease of use. Modifications can be made so that this design can be charged with Alkaline or Lithium-Ion batteries to make the entire system compact and portable.

High Level Device Specifications

  1. Should have at least 7 channels for controlling each LED
  2. The rate at which the LEDs flash should be adjustable
    To adjust the interval time between each LED flash and the duration that each LED is on for
  3. The light intensity shall be constant and be set with ~1A of current
    Easy modifications can be made so that the light intensity can be adjustable
  4. System design should be modular to allow for quick modifications to system parameters
    Amount of charge caps can hold the amount of current through LED
  5. Should incorporate the use of super capacitors for a quick discharge of energy to the load

Device Overview

The purpose of this system is to produce a controlled ultra bright LED based camera flash.

In order to achieve this goal, we built a system using one current driver circuit for each LED, an Arduino micro-controller to switch each channel, and a super-capacitor circuit to provide the necessary current. This system is charged by a high power, efficient charging circuit which keeps the capacitors charged and ready to drive the flash.

Design

Components

  1. LED Array of primary lights
    For the final design : 7-in-1 round assembly LED Array
  2. Arduino Uno microcontroller product
  3. A circular flat top Heat Sink Diameter ~ 2 1/4th inches
  4. A perforated circuit board (for the intermediate design) and a breadboard (for making a prototype)
  5. Circuit components
    1. 50F super capacitors product
    2. Fairchild Semiconductor FQP30N06L: N-Channel MOSFET datasheet
    3. Fairchild Semiconductor 2N3904 NPN BJT datasheet
    4. TI LM317 Adjustable Linear Regulator datasheet
    5. Ohmite RA-T2X-51E Heatsink, TO-220 product
    6. Assmann WSW Heatsinks, TO-220 product
    7. Kyoto Solid State Relay: In-32VDC max, Out-60VDC max, 4A max datasheet
    8. 1.3 Ohm 5% 3 watt power resistors feedback resistances
    9. 2.7KOhm 5% 1/4 watt resistors to connect control signals from the Arduino to the circuit.

LED Driver Circuit

Driver circuit for the LEDs

To get a system that produces a stable light output, the LED must be driven by a constant current. An approach to get a constant current is using the circuit to the right. The way this circuit works is that the feedback resistor and BJT combination sense the amount of current flowing though the LED and feed this signal back to the MOSFET gate controlling its voltage and hence the current flowing through it. This design allows approximately ~1A of current to flow through the LED. The key idea was drive the LEDs and FETs with a constant current making their light output insensitive to supply voltage. Simulations were performed to analyze the behavior of the system with the proposed circuit parameters, and it was found that the LEDs in the Luxeon array have a relatively shallow turn on slope, introducing voltage sensitivity despite the constant current drive of the supply. In order to remedy this, we had to choose a supply voltage range that would keep the LEDs in their own 'saturation' region.

For current control, the key parameter that must be selected with caution is the feedback resistance since that controls the maximum current flowing through the circuit. Given that this is a high current (1Amp) design, multi-watt power resistors must be used for the current limiters ensure that the power dissipated in them does not damage the circuit.

To determine what feedback resistance we needed, we performed several simulations in LTSpice to verify that the circuit will work the way we expect it to and the optimal resistance parameters for the feedback and input resistors (at the gate of the FET).

Seven copies of this circuit will be assembled, one to drive each LED in the array, with the seven control signals routed to the gates of the FETs from the Arduino microcontroller.

Super Capacitor Charging/Discharging Circuit

Capacitor Charging/Discharging Circuit

Ideally, the system should be able to drive more than one LED in the array at once. In order to support a much higher (multi-amp) drive current, caused by triggering 7 or more 1A LEDs at once, we had to build a supply circuit that was based around a collection of 50F super-capacitors.

These capacitors can be charged simply, using a conventional voltage regulator to approximate an ideal voltage source. This is problematic, however, as it will take an extremely long time to charge the capacitors fully. As a result, we designed a current controlled power supply.

The circuit is fairly straightforward -- an LM317 adjustable linear regulator acts as a regulated voltage supply. This supply could easily be replaced by a switch mode supply to improve system efficiency, however, one would have to carefully select a replacement supply capable of handling 7.5+ volts on the output and supplying >1.5A for the time it takes to charge the capacitors (about 1 minute)

The current drive is formed with a MOSFET is placed in series with the capacitors. Its gate is connected to the supply rail. Thus, the FET will drive as much current as it can into the capacitors until the voltage of the charged capacitors pushes the FET into cutoff. The result is that the capacitors will charge as quickly as possible and be voltage limited to the regulator's setting minus the (approximately) 2V Vgs of the FET.

Once the capacitors are fully charged, the voltage regulator can be disconnected (using the solid state relay) and the capacitors will retain their charge, ready to supply current to the LED array.

A simple resistive voltage divider has been included to allow our Arduino to sense when the capacitors are charged and then disconnect the regulator. This allows us to 'overdrive' the capacitors -- that is, set the linear regulator to drive the capacitors to a voltage higher than their design specification, and then use the Arduino to disconnect the supply before the capacitors actually exceed their specified rating. The advantage to this is that the FET does not approach cutoff as the capacitors are finishing charging, resulting in a higher current at the final stage of charging and thus a much shorter charging sequence.

Note that the Arduino is required for this configuration to work safely, and the circuit should not be connected without a powered and programmed Arduino. If an Arduino is unavailable, it is STRONGLY ADVISED that the circuit be readjusted to ensure that the super-capacitors to not exceed their rated voltage.

Overall System Design

The entire circuit design is shown below. Since there are 7 LEDs on the LED array module, each of the individual LED driver circuits is connected at the same node (in parallel).

Complete circuit schematic

Method

Simulations

Various simulations in LTSpice were performed prior to and in parallel with testing the prototype breadboarded version. The idea was to use the same circuit configuration as in the previous project since the MOSFET and BJT current limits the maximum amount of current through the LED. The optimal feedback resistance (in series with MOSFET source) was found by adjusting the resistance so the current in the saturation region of the MOSFET was approximately 1A. The feedback resistor has to be rated for at least 3 watts to handle the 1A. Lower power rating resistors could be used since the LED flash system will not have a continuous 1A flowing through it, the flash duration will be within the range of ~10ms or less.

The feedback resistor value is 0.68ohms, while the resistor on the collector side of the BJT was 51ohms. The MOSFET model used in the simulation was the FQP20N06L, but in the actual circuit we used the FQP30N06L. Fairchild Semiconductors did not make a FQP30N06L model so we used the closest model as possible. Although the values for the resistors were obtained through simulations, we knew that once we tested the actual circuit, we would have to modify the resistor on the collector side of the BJT to compensate for the difference in the MOSFET models.

As shown in the figures below, the circuit simulation for the LEDs only consisted of the LED driver current and not the charging/discharging unit. All the LEDs on the LED module were simulated except for the deep red and red LEDs because models were not available for those components. All simulation files can be found in the Appendix.

NOTE: The charging/discharging system was not simulated because models for the LM317 from Texas Instruments were not available and for some reason simulating capacitors in the Farad (1-50F) range does not simulate properly in LTSpice.


Characterization of LED Array Module

Although simulations were performed for the LED driver circuit with averaged models of the Luxeon LEDs, we wanted to fully characterize the LEDs ourselves to determine how much of a difference there was from the model to the actual product. To test each LED, we hooked each one within the LED driver circuit to a benchtop power supply with initially 0V. We stepped up the voltage by 0.1V and made note of what the current draw from the LED was. As you can see, the measured plot is very similar to the simulated plots (royal blue LED shown below). The major noticeable difference is from 2.7-3.6V range in which the shows a very weird effect from the LEDs. At around 3.5-3.6V (which is very close to the voltage drop of the LED), the LED suddenly kicks on and conducts hard. If the upper linear portion of the plot is extrapolated down, it would look more like the simulated.

One difference between the simulated and measured plots is that the MOSFET was different. The actual MOSFET was an FQP30N06L while the simulated MOSFET was a FQP20N06L (fairchild semiconductor did not have a model for the FQP30N06L). From the simulation, the current in the saturation mode is ~1A, but when measured and due to the difference of the MOSFETs, the resistor value on the collector side of the BJT was 51 ohms in the simulation made the measured saturation current limit at 1.1-1.2A. To make sure that the limit of ~1A is strictly enforced, the resistor was changed to 2.7K. Tests were conducted and the LEDs were clamped to 1A within a +/-0.5% range.

From this test, we were able to observe that the average saturation cutoff region for all the LEDs is around 4.8V. For the flash sequence to run a few times before the capacitors have to be charged fully again, 2-3 volts + 4.8V across the capacitors should be sufficient. Data from all LED characterization can be found in the Appendix.

Super Capacitor Charging/Discharging Design Testing

The super capacitor charge circuit was designed to charge the capacitors quickly in order to provide the current necessary to drive a flash.

Several approaches were considered for the charging circuit. Initially, we evaluated a simple voltage source system, but the current driven into the capacitors drops off exponentially, and charging a large capacitance like we have took a prohibitive amount of time (over half an hour). The solution was a current controlled charging system.

The controlled current source works by using a transistor (MOSFET) to drive current into the capacitors. Voltage regulation is delegated to the Arduino micro-controller, which senses the voltage across the capacitors using an analog input and then disconnects the charging circuitry once the capacitors have been charged to the desired voltage.

Testing was performed using a bench-top power supply for power, and a pair of digital multimeters measuring current through and voltage across the capacitors. We found that the circuit will draw as much as 2.7 Amps when supplied with a 12V input and will charge the capacitors from 0V to a full 7V charge in under a minute. A partial recharge only takes a few seconds.

Charging circuit with voltage sensing from Arduino

Capacitor discharge profile

Prior to testing the charging and discharging subcomponents, we wanted to have an idea of how long the capacitors will last if 1A of current is being drawn. We were able to find a current discharge profile for the 50F, 2.7V Maxwell super capacitors that were used in the design. From the figure below, this specific capacitor can last 2-4 seconds with 1.5A draw without any voltage reduction. For a 1A draw, we could estimate that there is approximately 4-6 seconds without any voltage reduction. This factor is extremely important because the MOSFETs will be in the saturation region when turned on for current to flow through the LED. From the simulations, we measured that the saturation cutoff voltage was about 4.8V and we set our firmware code to detect the turn off the MOSFET at the 5V drain-source voltage (amount of voltage across the caps).

The Arduino currently sense the voltage across the capacitors to charge them up to 7V. Since the saturation region is about 5V, there is a 2V swing that can be utilized to discharge the caps with a constant 1A. If 3 - 50F capacitors are in series, approximately 3-10 seconds since the effective capacitance is 1/3 than what the discharge profile portrays.

Capacitor discharge profile

Prototype Circuit

Videos of LED driver circuit testing can be found in the Appendix.


Trade Offs

There are several trades off that needed to be considered prior and during all the circuit testing. The option to run the system off a battery and the capacitor size becomes an issue when designing around charge time, portability, and accessibility.

Battery Design Considerations

Once the super caps were tested with a bench top power supply, we decided to test the caps charging and discharging time in the same configuration but with a 9V alkaline battery. A 9V battery performance is characterized by milliamp-hours capacity. As shown in the characteristic graphs below, for an energizer max 9V alkaline battery, with a discharge of 500mA, the capacity of the battery is approximately 300mAh. With the discharge trend, a discharge of 1A would have approximately 250mAh of capacity, giving the life of the battery to less than 15 minutes for a continuous load of 1A. Realistically, the the 9V would probably only last less than a few minutes because the performance curves are for a continuous discharge to 4.8V. For our design, since we need at least a charge of 7V to fully charge the caps, a 9V would not be a feasible solution for long-term use.

Although a 9V battery makes the design more portable and compact for the user, there is a definite tradeoff between battery life and charge time. If the user wants to charge the system very quickly, then the battery will probably only last for a few full charge cycles. Charge time from a battery with the system capacitors would take a few hours because the current exponentially decreases as the cap reaches fully charged state. One possible solution is to pre-charge the capacitors with a wall adapter transformer and then finish the charge with batteries. Our system prohibits the execution of the flash sequence unless the capacitors have specific voltage across them. So a wall adapter or benchtop power supply could be used to initially charge them, and then a battery could be used to reenergize them to full capacity. Because of this tradeoff, we decided to implement the bench top supply since the user will be able to perform more flash sequences without having to wait for a long charge.

Capacitor Size

Super capacitor size is problematic because they are only rated to handle a very limited voltage drop. Most super capacitors have a voltage rating of 2.5-2.7V. Since the saturation region threshold is 5V, capacitors had to be stacked in series to utilize them more efficiently and effectively. As capacitors are stacked in series, the effective capacitance decreases. Another limiting factor is that charge time for capacitance increases as capacitance size increases, so depending on the application and time of use, determining what size cap and how many in series are needed in a design is a challenging task.

Arduino Code Development

The system software allows for serial communication for triggering and system configuration, and also accepts a trigger signal as a rising edge interrupt on digital pin 2.

Although not fully implemented, there are settings that can be adjusted serially for the period in which each LED is on, delay between individual LED flashes, as well as the ability to set the PWM brightness of each LED.

The code was designed as a simple state machine. While idle, it continually checks for input on the serial port. On receiving a message, it will act appropriately, either storing a new value into the correct register or attempting to trigger the LED sequence. Note that the LED sequence will be aborted if the capacitors are not charged sufficiently to guarantee the expected LED response.

The LED sequence is a straightforward loop. The software disables the charger interrupt to guarantee table time response. It then turns each LED control pin on in sequence (the current value is 20ms) and then turns it off. After waiting a specified delay (currently 2ms) it turns on the next pin in the sequence. Once all the pins have been cycled, the system returns to the wait state.

Capacitor charge is detected asynchronously by a timer based interrupt that periodically (every 100ms) checks the voltage on the capacitor sense pin. If the voltage reaches a set threshold (about 7V) it switches out the regulator, via a digital pin controlling the relay described above, and turns on the onboard LED on the Arduino to indicate charge is ready. It also sets a flag in the software which allows the flash sequence to be triggered.


The commands that can be sent to the Arduino via the serial port are as follows:

"TON_###" where ### is any integer number of milliseconds to turn on each LED.

"TINT_###" where ### is any integer number of milliseconds between turning on each LED.

"TRIG" triggers all integers sequentially.

"TSIG" triggers all integers simultaneously.

The system can also be triggered by a rising edge interrupt on pin 2.

Results of Complete System

Overall, this project met its design goals. The system is capable of driving an array of 7 LEDs at 1 Amp each, either one at a time or simultaneously. (See video:File:LED driver testing.zip), with the drive current limited by the feedback circuit. The system is fully capable of being driven to lower output levels by simply lowering the input voltage on the gate of the MOSFET of each leg.

The LEDs can be driven with our super capacitor charge system and when the LEDs are driven for short periods (~20ms each) See Video: File:Flash sequence current.zip

The entire array can be flashed over 100 times, before the voltage drops below a threshold that will guarantee a full amp of current through the LEDs. This limitation is due to the shallow turn on voltage / current curve of the Luxeon super bright LEDs. A threshold voltage was chosen that will ensure that all LEDs are driven at nearly the full 1 Amp rating. Once the supply voltage drops too low, the system will prevent additional flashes until the capacitors have been recharged.


See Demonstatation: File:Arduino sensing cap voltage.zip

The system is fully capable of supporting both short and long duration flashes, at a mere cost of additional energy expended:

Slow flash sequence duration (6 channels): File:Slow flash sequence.zip

Fast flash sequence (6 channels): File:Fast flash sequence.zip

Testing voltage discharge from capacitors with 10 flash sequences: File:10 flash sequences.zip

Testing how many flash sequences can be triggered within sensing range: File:20 flash sequences.zip

Conclusions

Our system implements the existing LED flash lighting circuit and improves upon it in several ways. Most obviously, it scales everything "to the max" -- increasing the drive current of the LEDs to a full 1A per channel, while maintaining the supply voltage insensitivity of the previous circuit by actively sensing supply behavior.

The circuit further improves upon the previous design by completely redesigning the supply circuit to provide several amps of output current using a regulated super capacitor charger and super capacitors to drive the individual LEDs. This circuit provides for current needs (1A for one channel at a time) and future needs (8A simultaneous discharge should pose no problem).

Finally, the flexible software design should be easy to expand upon for future needs, thanks to its modular structure.

In the course of designing and developing this cirucuit, we discovered a number of things about high current LED lighting control and operation. This includes shallow current / voltage slope relationship found in ultrabright LEDs at high currents. We also faced a challenge in developing a circuit that could drive such high currents without self destructing, and one the could reliably be used to charge and supply these large discharge currents.

We saw that careful design yields a design the exceeds expectations and can produce a surprising amount of light. That said, our design does not maximize energy efficiency. Our use of a linear regulator leads to a fairly large waste of energy in charging the capacitors. Unfortunately, extremely high power, high efficiency switching regulators that meet our current and voltage specifications are hard to come by on shot notice and remain fairly pricy.

Additionally, the current control circuit wastes several WATTS in current limiting the LEDs. An alternative drive topology could likely yield a much more energy efficient drive circuit.

We did encounter a number of challenges in assembling the circuit as well. Sourcing the LED array took a fair amount of time, and it is advised that any future team pursuing this project place an order for the array the day they decide to undertake the project. Other design considerations can wait.

In the future, we envision several improvements to the system. As discussed above, we can see how power usage can be drastically reduced. We have also begun the process of implementing pulse width modulation to control the brightness of our LEDs, but our program is modularized to allow for other methods of control. Specifically, we sourced a 12 bit, 8 channel Texas Instruments Digital to Analog Converter (part number tlv5630) which we envision using to directly drive the gate our our current control circuit. This will allow extremely precise brightness control over each LED without imposing the flicker problems created by blindly pulse width modulating the drive circuitry. This was not prioritized because higher power was described as a more important feature in the project specification.


Our circuit design demonstrates that extremely high power, super bright LED drive systems are possible and can still be precisely controlled to make extremely flexible test lighting systems.

References

2012 LED Flicker project

Appendix I - Code and Data

Files

LTSpice code for simulated circuit: File:LED driver simulations.zip

  • Need to install MOSFET and LED models to work properly

Altium Designer schematics: File:Altium Schematics.zip

LED characterization data tables: File:LED characterization data.zip

Arduino code for driving LED circuit: File:LED Driver 2 2.zip

Videos

LED driver circuit test: File:LED driver testing.zip

Super capacitor charging/discharging with Arduino voltage sensing: File:Arduino sensing cap voltage.zip

Observing current load while testing flash sequence (6 channels) : File:Flash sequence current.zip

Slow flash sequence duration (6 channels): File:Slow flash sequence.zip

Fast flash sequence (6 channels): File:Fast flash sequence.zip

Testing voltage discharge from capacitors with 10 flash sequences: File:10 flash sequences.zip

Testing how many flash sequences can be triggered within sensing range: File:20 flash sequences.zip

Appendix II - Work partition

Simulation/characterization development - David Wang
Hardware assembly - William Esposito, David Wang
Firmware development - William Esposito