Procedure and Guideline-------------------------------------1) Gather the various components mentioned in the ‘components’ section. You can either use a breadboard to construct the circuit or for a more permanent model, a perf board can be used (provided you have the adequate soldering skills).---------------------2) Connect female jumper wires to the arduino so they can be detached easily for any modifications.---------------------3) Connect the wires to the relevant pins of the IC. For soldered connections, an IC stand must be used, otherwise the IC could undergo heat damage.---------------------4) Place the seven segment display close to the IC as it will make connections easier and save wire.---------------------5) The photodiodes should be connected in reverse bias (the longer of the two leads from the photodiode should be connected to ground).---------------------6) Two or three photodiodes are connected in parallel for better accuracy. If only one is used, any change in direction of the incoming light will drastically change the reading. Use of multiple photodiodes for measurement will make the system more independent of the direction of incoming light and hence will give a more accurate reading for the intensity.---------------------7) The photodiodes should be placed facing vertically upwards.---------------------8) Connect the resistor connected to the photodiodes to a 5v supply. If you are using arduino, the power supply can be found on the board itself. If you are using another microcontroller, a 5v or 6v battery can be used.---------------------9) Connect the leds to the appropriate pins on the arduino. The values of the resistors connected in series with the leds can be reduced in case the leds are too dim or not lighting at all.---------------------10) IC 7447 can be tested by grounding pin 3 of the IC. It is recommended to test the IC before making soldered connections to the 7 segment display.---------------------11) The anode of the CA 7 segment display can also be connected to the 5v power supply in series with a resistor.---------------------12) The arduino is connected to the PC using an A-B USB cable.---------------------13) Software used is open source and available on the arduino website.---------------------14) The code is written in C language.  

Code Algorithm

 

a) The pins connected to the leds and IC7447 are configured as output pins, and the analog pin A0 is configured as an input pin.

b) Three continuous readings are taken from A0 at 1ms delay. The highest of the 3 readings is taken as the true reading (since the photodiodes are highly directional, so A0 reading is not uncommon).

c) The absolute value of the reading is divided by 40, which gives the relative reading (can be divided by a lesser number if the sensitivity is to be increased).

d)  Based on the value of the relative reading, the binary data is given to the pins connected to IC7447 and the pins connected to the leds are switched on or off. For example, if the relative reading is 5, 0101(5 in binary) binary data is given to the IC pins, and the amount of leds switched on is 2.

e) The process is repeated to give continuous readings.