Motivated by a school project, we wanted to use modern technology to reinvent how voice controlled objects work. This set up could be easily adapted to control more than one device at a time or to control a different device than used in this project.
The second photon is intended to control it own separate relay shield however one multi channel relay and an LED where used to demonstrate the operational circuit,
The code monitors the analog voltage coming from the output node of the microphone. when the threshold value for the analog voltage is broken the relay shield is triggered and activates the light. This trigger also causes an event to be published through IFTTT that is monitored by the second photon this event triggers the code of the second photon to activate its own relay shield activating both lights. This system can be used to regulate the amount of energy that a home may use by turning the lights off if there is no audible people near. This type of light control system is ideal for high traffic rooms like living rooms that normally have people coming and going.
This circuit gives the user the ability to activate his or her lights with an audio input. the relay shield controlling the light will again deactivate after a set amount of time. this time is set by the delay function in the photons code after which it it re-evaluates the audio levels and determines if the system should remain on or to deactivate.
A webhook was used to relay data of how much energy the lights had consumed since the control circuit was activated. This data was calculated from the duration of the activated light and the power consumed by the lamps.
Comments