SharmaRavichandran: Difference between revisions

From Psych 221 Image Systems Engineering
Jump to navigation Jump to search
imported>Projects221
No edit summary
imported>Projects221
No edit summary
Line 33: Line 33:
'''Methods'''
'''Methods'''


Arduino Microcontroller, a digital device, can provide feeble currents up to 40mA, which is unsuitable to drive a high power LED. So, we must use the voltage output as a control variable. But, a microcontroller’s analog output is a Pulse Width modulated digital signal, and using this would defeat the whole purpose.
Arduino Microcontroller, a digital device, can provide feeble currents up to 40mA, which is unsuitable to drive a high power LED. So, we must use the voltage output as a control variable. But, a microcontroller’s analog output is a Pulse Width modulated digital signal, and using this would defeat the whole purpose.So, the digital output of the microcontroller must be interfaced to control the analog components that follow. Hence, a digital potentiometer is used to provide an analog output voltage. This digital pot would be serially interfaced with the Arduino microcontroller and the control variable is the potentiometer level that decides the output voltage, which is a controlled fraction of the total voltage at one end of the potentiometer.Conclusively, the digital pot level is the control variable. This can be controlled on an Arduino Microcontroller’s computer interface. A sophisticated firmware can be written to enable internet control of these levels, which was implemented in this work as well.
 
So, the digital output of the microcontroller must be interfaced to control the analog components that follow. Hence, a digital potentiometer is used to provide an analog output voltage. This digital pot would be serially interfaced with the Arduino microcontroller and the control variable is the potentiometer level that decides the output voltage, which is a controlled fraction of the total voltage at one end of the potentiometer.
 
Conclusively, the digital pot level is the control variable. This can be controlled on an Arduino Microcontroller’s computer interface. A sophisticated firmware can be written to enable internet control of these levels, which was implemented in this work as well.
===Digital Potentiometer===
===Digital Potentiometer===
'''Requirement'''
'''Requirement'''
Line 45: Line 41:
'''Methods'''
'''Methods'''


The digital potentiometer used in this work is AAAAAA and this uses a 10K Ohm total resistance and 256 steps/ levels. The Microcontroller transmits one of the 256 levels (0-255) and the resistance ratio '''(<math>R_{frac-pot}</math>)''' is controlled. This ratio also signifies the fraction of the voltage supplied to the total resistance. This voltage fraction is the analog output that can be used to control the next stage.
The digital potentiometer used in this work is AAAAAA and this uses a 10K Ohm total resistance and 256 steps/ levels. The Microcontroller transmits one of the 256 levels (0-255) and the resistance ratio '''(<math>R_{frac-pot}</math>)''' is controlled. This ratio also signifies the fraction of the voltage supplied to the total resistance. This voltage fraction is the analog output that can be used to control the next stage.Total resistance is insignificant to us, as the voltage fraction is more important to us. However, the total resistance must be large enough to reduce static power dissipation from the voltage supplied. The resolution of the potentiometer is significant as this decides the resolution of the output voltage. Better resolution provides smoother output voltage range.A limitation of most digital potentiometers is the limit on the voltage supplied to the total resistance (mostly 0-5V). This limits the voltage output of the pot.
 
Total resistance is insignificant to us, as the voltage fraction is more important to us. However, the total resistance must be large enough to reduce static power dissipation from the voltage supplied. The resolution of the potentiometer is significant as this decides the resolution of the output voltage. Better resolution provides smoother output voltage range.A limitation of most digital potentiometers is the limit on the voltage supplied to the total resistance (mostly 0-5V). This limits the voltage output of the pot.
===Voltage controlled Current Source (VCCS)===
===Voltage controlled Current Source (VCCS)===
'''Requirement'''
'''Requirement'''
Line 77: Line 71:
<math> \frac{V_{R1}}{R1}=\frac{V_{in}}{R1}=I_{LED}</math>
<math> \frac{V_{R1}}{R1}=\frac{V_{in}}{R1}=I_{LED}</math>


Thereby a linear V-I characteristics is observed. And, as the LEDs intensity is a linear function of its current. the linearity is preserved.
Thereby a linear V-I characteristics is observed. And, as the LEDs intensity is a linear function of its current. the linearity is preserved. A significant non-ideality of the mosfet is the non-infinite gain and thereby a significant input offset voltage between the input terminals. this leads to a dark voltage at the output and thereby a dark-current through the LED. This limitation is mitigated by providing a negative voltage supply to the op-amp's VSS terminal, instead of simply grounding it. This trivializes the offset voltage bringing it very close to zero.
 
A significant non-ideality of the mosfet is the non-infinite gain and thereby a significant input offset voltage between the input terminals. this leads to a dark voltage at the output and thereby a dark-current through the LED. This limitation is mitigated by providing a negative voltage supply to the op-amp's VSS terminal, instead of simply grounding it. This trivializes the offset voltage bringing it very close to zero.


===MOSFET===
===MOSFET===
Line 87: Line 79:
===Feedback Resistance R1===
===Feedback Resistance R1===


This is the very crucial element of the design, and it defines the slope of the transfer function as described earlier. This is typically around 10 Ohm, so as to get 500mA maximum current with 5V input, with a modest supply to op-amp and MOSFET. This can be changed as per need. This work concentrates on establishing the linearity and illumination control. So, the circuit uses a 10 Ohm resistor.
This is the very crucial element of the design, and it defines the slope of the transfer function as described earlier. This is typically around 10 Ohm, so as to get 500mA maximum current with 5V input, with a modest supply to op-amp and MOSFET. This can be changed as per need. This work concentrates on establishing the linearity and illumination control. So, the circuit uses a 10 Ohm resistor. Although it is possible to reach better currents by decreasing R1, it is important to understand that, as R1 decreases, the slope increases, and it will not be practical to meet lower current values, rather lower LED intensities at a given voltage resolution.. But, this can be overcome by increasing the output Voltage range of the pot, from 5V. Unfortunately most digital pots do not support higher voltages.
 
Although it is possible to reach better currents by decreasing R1, it is important to understand that, as R1 decreases, the slope increases, and it will not be practical to meet lower current values, rather lower LED intensities at a given voltage resolution.. But, this can be overcome by increasing the output Voltage range of the pot, from 5V. Unfortunately most digital pots do not support higher voltages.


===Current Limiting Resistance R2===
===Current Limiting Resistance R2===

Revision as of 02:25, 19 March 2013


Active LED based Illumination control

Motivation

Illumination control of LEDs dominantly uses Pulse Width Modulation using a Microcontroller. The major drawback of this method is the discreteness of the illumination, i.e. the LEDs are continuously toggled. This creates high frequency flicker and is disturbing in situations that demand high temporal resolution. The goal of this work is to prototype a device that controls the LED intensities more directly, rather than switching it on/off.

Device Specifications

An ideal device should

  1. Control the LED intensities directly without toggling.
  2. Provide a Linear response between LED illumination and Control variable
  3. Support multiple channels or easily be duplicable, often to control multiple colour LEDs together or separately.
  4. Utilise the entire intensity range of the LED and provide high dynamic range
  5. Provide options to be compact and portable.

Circuit

Components

Design Methods

LED array

Requirement

We require high intensity LEDs with well defined Spectral properties. The LEDs must provide high dynamic range and must be suitable to operate in portable conditions with limited current. Multiple LEDs are required in different colours to help in various vision experiments. Each LED must have its own channel to be controlled independently.

Methods

A Light Emitting Diode is a Current Controlled Device. The intensity of the LED is defined by the current flowing through it. So, controlling the LED intensity is equivalent to controlling the current through the LED. This work uses a Luxeon LED Array that has 7 high intensity LEDs in different colours. These colours are chosen such that the effective spectrum of the array covers the entire visible spectrum. This array can be operated to use the LEDs independently or serially. Each LED is rated at 700mA-1A maximum currents, and operates at a 20mA minimum current as well.

Microcontroller and Control Variable

Requirement

This project requires a control of illumination using an Arduino Microcontroller. Typically, it’s required that the microcontroller provide a voltage/current output, which can be used to control the illumination of LEDs.

Methods

Arduino Microcontroller, a digital device, can provide feeble currents up to 40mA, which is unsuitable to drive a high power LED. So, we must use the voltage output as a control variable. But, a microcontroller’s analog output is a Pulse Width modulated digital signal, and using this would defeat the whole purpose.So, the digital output of the microcontroller must be interfaced to control the analog components that follow. Hence, a digital potentiometer is used to provide an analog output voltage. This digital pot would be serially interfaced with the Arduino microcontroller and the control variable is the potentiometer level that decides the output voltage, which is a controlled fraction of the total voltage at one end of the potentiometer.Conclusively, the digital pot level is the control variable. This can be controlled on an Arduino Microcontroller’s computer interface. A sophisticated firmware can be written to enable internet control of these levels, which was implemented in this work as well.

Digital Potentiometer

Requirement

A digital potentiometer is a device whose resistance ratio is controlled by the microcontroller. A digital pot is characterized by its total resistance, and the resolution of the resistance ratio. This resolution is the ratio of the total resistance and the total number of levels (steps) that the device can be operated on. This level is chosen through the Microcontroller and serially transmitted through I2C Protocol.

Methods

The digital potentiometer used in this work is AAAAAA and this uses a 10K Ohm total resistance and 256 steps/ levels. The Microcontroller transmits one of the 256 levels (0-255) and the resistance ratio (Rfracpot) is controlled. This ratio also signifies the fraction of the voltage supplied to the total resistance. This voltage fraction is the analog output that can be used to control the next stage.Total resistance is insignificant to us, as the voltage fraction is more important to us. However, the total resistance must be large enough to reduce static power dissipation from the voltage supplied. The resolution of the potentiometer is significant as this decides the resolution of the output voltage. Better resolution provides smoother output voltage range.A limitation of most digital potentiometers is the limit on the voltage supplied to the total resistance (mostly 0-5V). This limits the voltage output of the pot.

Voltage controlled Current Source (VCCS)

Requirement

A voltage controlled current source that drives a controllable current through the LED. The voltage will be provided by the digital potentiometer must be converted into suitable current that drives the LED.

Methods

This can be implemented using any famous VCCS active device such as a MOSFET or a BJT. These provide, respectively, quadratic and exponential voltage to current functions. That is, the current grows faster than the control voltage. Hence, it’s not possible to achieve desired linear intensity response with these devices.After exploring several options, a circuit was designed to provide a voltage follower response. This involved using an operational amplifier, a MOSFET and a couple of resistors. This implements a voltage follower circuit, where the current through the MOSFET follows the voltage input to the op-amp.

Final Design

Operation

The circuit takes in the voltage from the potentiometer as the input and provides a current that is a linear function of the input voltage. The input voltage is given to op-amp’s non-inverting terminal (3) and the output terminal (1) drives the gate (G) of the MOSFET. The MOSFET obviously produces a quadratic current response. The LED is connected in the current loop of the MOSFET, either in the drain or the source. The resistor R1 in the MOSFET source acts as a feedback element, and the voltage across R1 is fed back to the op-amp’s inverting terminal (2). This acts as a feedback and this makes the response linear. The slope of this linear response can be is the resistance R1 directly. This is a Voltage Follower characteristic.

Linear Response

Eventually, the Output current through the LED is VinR1, where Vin is the input voltage to the op-amp. The resistance R2 in the current loop of the MOSFET limits the maximum current that can flow in the loop and saves the LED from very high currents.

ILED=VinR1

ILED=RfracpotVtotalR1

So, the LED current is linearly proportional to the Digital Pot level that is controlled on Arduino microcontroller, with R1 deciding the slope of the linearity.

Operational Amplifier

An op-amp is a differential amplifier which is a basic comparator when used without a feedback, and as an amplifier with a feedback. An ideal op-amp has an infinite differential gain and hence tries to establish a short between the input terminals. This is exploited in this design. An When an input voltage is given to one of those input terminals and if the other terminal feeds back from the output,VR1 in this case, and tried to make

VR1R1=VinR1=ILED

Thereby a linear V-I characteristics is observed. And, as the LEDs intensity is a linear function of its current. the linearity is preserved. A significant non-ideality of the mosfet is the non-infinite gain and thereby a significant input offset voltage between the input terminals. this leads to a dark voltage at the output and thereby a dark-current through the LED. This limitation is mitigated by providing a negative voltage supply to the op-amp's VSS terminal, instead of simply grounding it. This trivializes the offset voltage bringing it very close to zero.

MOSFET

A N-channel MOSFET is used in the design to convert the op-amp's output voltage to LED current. Op-amp provides a Voltage sampled voltage feedback around the MOS. This transistor must be chosen to have a low threshold voltage to support low currents and not limit the performance, and must be capable of withstanding up to 1 A current.So, this project uses a IRF530 Power NMOS that meets all the requirements.

Feedback Resistance R1

This is the very crucial element of the design, and it defines the slope of the transfer function as described earlier. This is typically around 10 Ohm, so as to get 500mA maximum current with 5V input, with a modest supply to op-amp and MOSFET. This can be changed as per need. This work concentrates on establishing the linearity and illumination control. So, the circuit uses a 10 Ohm resistor. Although it is possible to reach better currents by decreasing R1, it is important to understand that, as R1 decreases, the slope increases, and it will not be practical to meet lower current values, rather lower LED intensities at a given voltage resolution.. But, this can be overcome by increasing the output Voltage range of the pot, from 5V. Unfortunately most digital pots do not support higher voltages.

Current Limiting Resistance R2

Another resistor is essential in the design to limit the current flowing through the LEDs, for all practical purposes. This current limiting resistor is chosen so as the limiting current is below the maximum current rating of the LED. This resistance is chosen as 1 Ohm in the practical design. For instance, the limiting current is 550mA and 350mA for Voltage Supplies 12V and 9V respectively. This is far below the rating of the LEDs which is around 700mA.

Trade-offs and Decisions