Light Meter

Light dependent resistor is a sensor which is commonly used to detect presence of light. It is used in many experiments for detection purpose, as a burglar alarm. Its value depends on light intensity. It is a type of resistor whose resistance whose value increases when intensity of light increases. Resistance means oppose to any thing. In electronics it indicates oppose to flow of electron. The component or device which has this quality is called as resistor. In Light Dependent resistor, resistance is depend upon amount of light falling onto it.

  • Facebook
  • Twitter
  • Pinterest
  • LinkedIn

Working: When there is poor light or no light Resistance of LDR will be maximum. It will strongly oppose to current flow. When there is sufficient light then resistance will be minimum and current flow will be maximum.

  • Facebook
  • Twitter
  • Pinterest
  • LinkedIn

In this we are going to measure Light intensity through program.

  • Goto mblock software and open it.
  • Goto edit menu and select Arduino mode.

  • Facebook
  • Twitter
  • Pinterest
  • LinkedIn

 

 

 

 

 

 

 

 

 

 

 

  • Facebook
  • Twitter
  • Pinterest
  • LinkedIn

 

 

 

 

Playme Robot Program is a Header file for Robot programming. It makes programming simple. By using this we can access all blocks easily and smoothly. If we are not using this then it may give us errors in program. So put this at start of program.

  • Facebook
  • Twitter
  • Pinterest
  • LinkedIn

 

 

 

 

Figure 8: Loop Selection

Here we are using loop. Loop is area which will be repeated for certain times depending upon its type. If we write anything inside loop then it will be repeated along with loop. Forever loop means program will run continuously. For example if we write a program to run motor in forward direction with forever loop then it will run until we remove power applied to it.

Select block Send to Computer and drag it in programming window.

  • Facebook
  • Twitter
  • Pinterest
  • LinkedIn

Put it in forever loop. Here we are writing Hello for message printing. You can write any message instead of Hello.

  • Facebook
  • Twitter
  • Pinterest
  • LinkedIn

To get distance of obstacle from playme select Light Value block.

  • Facebook
  • Twitter
  • Pinterest
  • LinkedIn

Connect that block to Send to computer .

  • Facebook
  • Twitter
  • Pinterest
  • LinkedIn

  • Facebook
  • Twitter
  • Pinterest
  • LinkedIn

Connect wait statement of 1second below this.

  • Facebook
  • Twitter
  • Pinterest
  • LinkedIn

Now save program.

  • Facebook
  • Twitter
  • Pinterest
  • LinkedIn

Give name to program.

  • Facebook
  • Twitter
  • Pinterest
  • LinkedIn

Select COM port

  • Facebook
  • Twitter
  • Pinterest
  • LinkedIn

Click on Upload Arduino option

  • Facebook
  • Twitter
  • Pinterest
  • LinkedIn

After uploading is done you will get this message.

  • Facebook
  • Twitter
  • Pinterest
  • LinkedIn

 

 

 

Click on close option.

Again go to Serial port and select COM port

  • Facebook
  • Twitter
  • Pinterest
  • LinkedIn

And see output of your program

  • Facebook
  • Twitter
  • Pinterest
  • LinkedIn

 

 

 

 

 

 

You can see this response which is not distance. To get proper message select Char mode for both send encode mode, recv encode mode.

  • Facebook
  • Twitter
  • Pinterest
  • LinkedIn

And see light sensor value on your screen. It will be displayed on screen after every one second.

    

  • Facebook
  • Twitter
  • Pinterest
  • LinkedIn

Amit is an engineer and Electronics Specialist, Online and Corporate Trainer. Amit has trained over 50000 students from 147 Countries in past decade. He's a avid reader and also love cooking. He loves to spend his spare time writing something new or cooking with family

Pin It on Pinterest

Share This