Iasonas Christoulakis
Published © GPL3+

Light Control with Automated Control Systems

We will see how easily can control a parameter (light, sound) using Operation Amplifiers. It is an introductional example to PID controller.

IntermediateFull instructions provided10 hours2,142
Light Control with Automated Control Systems

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
9V 1A Switching Wall Power Supply
9V 1A Switching Wall Power Supply
×1
Photodiode, 12 °
Photodiode, 12 °
×1
High Brightness LED, White
High Brightness LED, White
×1
Jumper wires (generic)
Jumper wires (generic)
×1
Trimmer Potentiometer, w/ Knob
Trimmer Potentiometer, w/ Knob
×1
General Purpose Dual Op-Amp
Texas Instruments General Purpose Dual Op-Amp
×2
Resistor 10k ohm
Resistor 10k ohm
×1
Resistor 1k ohm
Resistor 1k ohm
×1
Through Hole Resistor, 274 ohm
Through Hole Resistor, 274 ohm
×1
DC POWER JACK 2.1MM BARREL-TYPE PCB MOUNT
TaydaElectronics DC POWER JACK 2.1MM BARREL-TYPE PCB MOUNT
×1
Breadboard (generic)
Breadboard (generic)
×1

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Tape, Barricade
Tape, Barricade

Story

Read more

Schematics

Schematic for light control

BE CAREFUL TO THE OP AMPS JUCTIONS

Video about function

Watch the function of light control system!

Code

CODE FOR VOLTAGE METER

C/C++
CHECK FOR RESISTORS AND PINS
int analogInput = 1;
float Vout = 0.00;
float Vin = 0.00;
float R1 = 100000.00; // resistance of R1 (100K) 
float R2 = 10000.00; // resistance of R2 (10K) 
int val = 0;
void setup(){
   pinMode(analogInput, INPUT); //assigning the input port
   Serial.begin(9600); //BaudRate
}
void loop(){
   
   val = analogRead(analogInput);//reads the analog input
   Vout = (val * 5.00) / 1024.00; // formula for calculating voltage out i.e. V+, here 5.00
   Vin = Vout / (R2/(R1+R2)); // formula for calculating voltage in i.e. GND
   if (Vin<0.09)//condition 
   {
     Vin=0.00;//statement to quash undesired reading !
  } 
Serial.print("\t Voltage of the given source = ");
Serial.print(Vin);
delay(1000); //for maintaining the speed of the output in serial moniter
}

Credits

Iasonas Christoulakis

Iasonas Christoulakis

9 projects • 31 followers
Biomedical Engineer MedispLab Instructor Former General Manager at IEEE NTUA Student Branch
Thanks to Michail Kalakos.

Comments