Back to Parent

Outcome


Outcome

    • simple 2-inputs (sensors or inputs) 1-output (LED) device - representing automatic lights on/off (and dimming) system based on the natural light intensity in a room
    • Inputs: Photosensor (photo-resistor), Toggle Switch
    • Output: Led
    • Overall idea: to implement an automatic light on/off system using natural light intensity. Here the photosensor will sense the intensity of natural light in the room. As the intensity of natural light changes, the LED output intensity will change. The master toggle switch will provide overall control of the system. It provides an option to keep the system automatic or manual. When the toggle switch is ON, then only, output LED can be controlled using this system.  

Process

1. Initially connected an LED to the argon board and connected it at D2 pin.

2. Next wired photo sensor on the board using a pull-down resistor of 10 K ohm and connected it to A4 pin.

3. Developed the sketch (program ) to simply control the LED intensity with the corresponding change in the intensity of light falling on the photosensor.

4. Shared the value of photosensor online using 'particle.variable'.

Img 8590.jpg.thumb
Show Advanced Options
Img 8589.jpg.thumb
Show Advanced Options
Img 8592.jpg.thumb
Show Advanced Options

Code for : photo-resistor as sensor input and LED as output

Show Advanced Options
Show Advanced Options
5.  Added third component - toggle switch to the circuit. It controls the overall functionality, that is when the switch is ON then only, LED can be switched ON. Aalso published the switch ON/OFF events on the particle cloud.
Img 8599 2.jpg.thumb
Show Advanced Options

Code after adding second input - toggle switch:

Show Advanced Options
Show Advanced Options

Reflection

  1. While doing this skill development, I learned about different sensors by reading through the available material. It gave me an opportunity to implement a sensor on a real circuit and control the behavior of output. This was an amazing experience for me.
  2. Another achievement was to publish the events and values on the cloud. 
  3. I learned about the pull-down resistor and how to design circuits for analog inputs. like photo-resistor.
  4. I had trouble synchronizing the intensity change in photocell to the corresponding intensity of LED light as a viewable (tangible) component. So I had to change the delay (milliseconds) in the code and come up with the appropriate value (200ms) that can allow to see the visible change.
  5. Right now, the photoresistor values and LED output are directly proportional. I would like to change this situation to inversely proportional. That is when the intensity of light on the photoresistor reduces then the LED should glow more, and vice-versa. This will represent an actual scenario of automatic light ON/OFF system in a room. 


Drop files here or click to select

You can upload files of up to 20MB using this form.