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
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.
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'.
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.
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.
Another achievement was to publish the events and values on the cloud.
I learned about the pull-down resistor and how to design circuits for analog inputs. like photo-resistor.
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.
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.
You can upload files of up to 20MB using this form.