Controlling A Device Over The Internet
Created: Nov 04, 2015
No description available.
The popularity of controlling things anytime and anywhere has been increasing greatly in recent years. This is due to the fact that smartphones and tablets are now really affordable. The advantage of controlling things over the internet is that it helps the owner turn ON or turn OFF his devices even he is far away from home. The owner may no longer need to worry if he has forgotten to turn things OFF since he can access his devices anywhere and anytime he needs to.
In this reference design, a device (lights, appliances, etc.) is controlled (turned ON or OFF) over the internet through an ethernet module. The device is turned ON or OFF by a relay, driven by the ATmega328P-PU microcontroller through the TLP383 optocoupler and transistor Q1. The optocoupler isolates the microcontroller from the high voltage and large alternating current that is flowing through the device and the contacts of the relay to avoid damaging the microcontroller. The transistor Q1 was used to drive the relay since the collector current of the optocoupler is not sufficient to drive it. The ENC28J60-H ethernet module connects the microcontroller to the network via SPI protocol. The microcontroller can be programmed to have its own web server and local IP address accessible using a browser. In order to access the web server outside the network, the microcontroller local IP address must be port forwarded.
The power supply for this circuit is a typical linear design plugged to the 220VAC mains. The transformer T1 changes the voltage level of the 220VAC source running across the FN9260-1-06 power entry inlet and switch S3 to 12VAC and the MDB6S diode bridge rectifies it. The pulsating DC voltage across the output of the MDB6S rectifier will be smoothened the filtering capacitors (C7 and C8) and regulated by the L78S05CV voltage regulator. The 5VDC output from the L78S05CV voltage regulator is used to power up the microcontroller and to energize the coil of the relay. The 5VDC supply is also regulated by the LM1117MPX-3.3/NOPB voltage regulator to serve as a power source for the ENC28J60-H ethernet module.