Using an optocoupler ( MOC3021 ) to sense the On/Off state of an electrial appliance using a microcontroller ATmega16L. How do i go about doing this My mains supply specs are 230V, 50Hz. How do I design the surrounding circuit and select component values, like the resistors Referring to the above schematic. The idea is to use this circuit to
Click here to download the full size of the above Circuit.
determine whether the load is on or off. The output pin from the optocoupler connects to an external interrupt of the Microcontroller I`m using which is ATmega16L. The interrupt will Monitor the state of the load. After monitoring I can toggle the state of the load using a relay (relay acts as a Control mechanism) which connects to the same microcontroller. Now, I tried calculating the resistor values for R1, R2 and Rc. Note, microcontroller`s VIL(max) = 0. 2xVcc = 660mV and VIH(min) = 0. 6xVcc = 1. 98V and VIH(max) = Vcc+0. 5 = 3. 8V. To calculate Rc is quite easy. When the transistor is not conducting the output is high (at 3. 3V). When the transistor conducts the output is pulled low. so from microcontroller`s point of view, output high means load is switched OFF and output low means load is switched ON. Looking at the datasheet for SFH621A-3, using 34% minimum CTR at IF = 1mA. Therefore, at 1mA input, the output is going to be 340uA. So in order for the microcontroller to detect low voltage from the output of the optocoupler can I use resistor value of 1Kohm So that the output from the optocoupler will have a voltage of 340mV (which is below VIL(max) Aim: the aim is to keep the LEDs ON* for maximum period of time in a 10mS half period (20mS full period of 50Hz). Lets say LEDs have to be ON for 90% of the time, that means LEDs require at least 1mA of current for 90% of the time for that half period which means LEDs will...
This project fits more for custom made battery casing that can have more space to hide things inside. This switch with few alterations can be used for any other project as well but is designed based on e-bike needs! This project use a clever functionality of....
The circuit described here uses ultrasonic oscillations and operates based on the propagation velocity of these oscillations in the air. Thus, we can easily determine the distance of two points if the time within which the wave travels this distance is....
Sometimes the precious metals are hidden too deep and are not detected except with complicated devices. In many cases, however, small pieces of precious metal buried near the surface can be detected by relatively simple means. Everyone is very attractive to....
Many times for various reasons we forget or can not water the plants that we have in our homes. And many humidity sensors units just notify us with a beeping sound or with a flashing light, that the pot needs watering. But what if we are away from home? This....
The principle behind a metal detector is really very simple. Proof of this is the circuit that follows, in which it proves that the construction of a metal detector can be done in the minute, with few components that we find very easily everywhere. With the....
The sub-harmonic bass generator is a sound producing unit for guitars. The sound it produces looks very much like that of the bass guitar. The octave generator is sometimes quite unusual since it does not produce any of the usual ways of coloring the sound,....
In the past the sounding (sea bottom measurement) was done with the "bullet", that is, with a heavy lead object that the seamen plucked into the sea hung from a calibrated rope. As soon as the "bullet" reached the bottom, the depth appeared directly from the....
This Amplifier was designed to have the following specifications: Distortion less than 0.1% at full power of 100W even at 20KHz. Power has to be attributed to an extended bandwidth. The output transistors must be protected against short circuits. The power....
A series of LEDs serve to alert the gardener when plants need water. Using two conventional digital integrated LEDs and a series of LEDs, we make a very useful device for gardening. The device detects the amount of water in the pot and alerts the grower.....
characters left: