<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Home Appliance | Learn with Edwin Robotics</title>
	<atom:link href="https://learn.edwinrobotics.com/category/home-appliance/feed/" rel="self" type="application/rss+xml" />
	<link>https://learn.edwinrobotics.com</link>
	<description>Tutorials on basics of electronics, etc.</description>
	<lastBuildDate>Sun, 30 Dec 2018 11:17:58 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.2</generator>
	<item>
		<title>230v/110v AC Mains Detection Module Hookup Guide</title>
		<link>https://learn.edwinrobotics.com/230v110v-ac-mains-detection-using-arduino-raspberry-pi-and-esp8266-thing/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=230v110v-ac-mains-detection-using-arduino-raspberry-pi-and-esp8266-thing</link>
					<comments>https://learn.edwinrobotics.com/230v110v-ac-mains-detection-using-arduino-raspberry-pi-and-esp8266-thing/#comments</comments>
		
		<dc:creator><![CDATA[Abhishek Nair]]></dc:creator>
		<pubDate>Mon, 29 Aug 2016 14:43:22 +0000</pubDate>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[ESP8266]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Home Appliance]]></category>
		<category><![CDATA[IOT]]></category>
		<category><![CDATA[Particle Photon]]></category>
		<category><![CDATA[Raspberry Pi]]></category>
		<category><![CDATA[Wireless]]></category>
		<guid isPermaLink="false">http://learn.edwinrobotics.com/?p=692</guid>

					<description><![CDATA[<img width="6000" height="4000" src="https://learn.edwinrobotics.com/wp-content/uploads/Isometric-2.jpg" class="attachment- size- wp-post-image" alt="AC Line detector using optocoupler" style="float:left; margin:0 15px 15px 0;" decoding="async" fetchpriority="high" srcset="https://learn.edwinrobotics.com/wp-content/uploads/Isometric-2.jpg 6000w, https://learn.edwinrobotics.com/wp-content/uploads/Isometric-2-300x200.jpg 300w, https://learn.edwinrobotics.com/wp-content/uploads/Isometric-2-1024x683.jpg 1024w, https://learn.edwinrobotics.com/wp-content/uploads/Isometric-2-1080x720.jpg 1080w, https://learn.edwinrobotics.com/wp-content/uploads/Isometric-2-140x94.jpg 140w" sizes="(max-width: 6000px) 100vw, 6000px" />Want to check if you left your lights ON remotely, need to detect the zero crossing point for your dimming circuit or do you just need to interface a 230V signal to your Arduino? The AC Mains Detector board simplifies interfacing high voltage signals by giving a digital output when an AC voltage is detected. [&#8230;]]]></description>
										<content:encoded><![CDATA[<img width="6000" height="4000" src="https://learn.edwinrobotics.com/wp-content/uploads/Isometric-2.jpg" class="attachment- size- wp-post-image" alt="AC Line detector using optocoupler" style="float:left; margin:0 15px 15px 0;" decoding="async" loading="lazy" srcset="https://learn.edwinrobotics.com/wp-content/uploads/Isometric-2.jpg 6000w, https://learn.edwinrobotics.com/wp-content/uploads/Isometric-2-300x200.jpg 300w, https://learn.edwinrobotics.com/wp-content/uploads/Isometric-2-1024x683.jpg 1024w, https://learn.edwinrobotics.com/wp-content/uploads/Isometric-2-1080x720.jpg 1080w, https://learn.edwinrobotics.com/wp-content/uploads/Isometric-2-140x94.jpg 140w" sizes="auto, (max-width: 6000px) 100vw, 6000px" /><p>Want to check if you left your lights ON remotely, need to detect the zero crossing point for your dimming circuit or do you just need to interface a 230V signal to your Arduino? The AC Mains Detector board simplifies interfacing high voltage signals by giving a digital output when an AC voltage is detected. By disabling the on board capacitor, zero crossing detection is possible as well.</p>
<div id="attachment_2054" style="width: 510px" class="wp-caption aligncenter"><a href="https://shop.edwinrobotics.com/sensors/960-ac-line-detection-module.html" target="_blank" rel="noopener"><img decoding="async" aria-describedby="caption-attachment-2054" class="wp-image-2054" src="http://learn.edwinrobotics.com/wp-content/uploads/Iso.jpg" alt="AC line detection using optocoupler, diode and rectifer" width="500" height="500" srcset="https://learn.edwinrobotics.com/wp-content/uploads/Iso.jpg 1500w, https://learn.edwinrobotics.com/wp-content/uploads/Iso-150x150.jpg 150w, https://learn.edwinrobotics.com/wp-content/uploads/Iso-300x300.jpg 300w, https://learn.edwinrobotics.com/wp-content/uploads/Iso-1024x1024.jpg 1024w, https://learn.edwinrobotics.com/wp-content/uploads/Iso-1080x1080.jpg 1080w, https://learn.edwinrobotics.com/wp-content/uploads/Iso-184x184.jpg 184w" sizes="(max-width: 500px) 100vw, 500px" /></a><p id="caption-attachment-2054" class="wp-caption-text"><em>AC Line detection Module</em></p></div>
<p>You can buy this item from the following links:</p>
<p><strong>Within GCC</strong>: <a href="https://shop.edwinrobotics.com/sensors/960-ac-mains-zero-crossing-detection-module.html" target="_blank" rel="noopener">Edwin Robotics</a></p>
<p><strong>International Order</strong>: <a href="https://www.tindie.com/products/edwinrobotics/ac-mains-zero-crossing-detector/" target="_blank" rel="noopener">Tindie</a></p>
<p><a href="https://www.tindie.com/stores/edwinrobotics/?ref=offsite_badges&amp;utm_source=sellers_edwinrobotics&amp;utm_medium=badges&amp;utm_campaign=badge_medium"><img decoding="async" src="https://d2ss6ovg47m0r5.cloudfront.net/badges/tindie-mediums.png" alt="I sell on Tindie" width="150" height="78" /></a></p>
<p>Let us have a look at the guide contents, refer to the list below:</p>
<ul>
<li>
<h4><a href="#Step1">Components</a></h4>
</li>
<li>
<h4><a href="#Step8">Board Pinouts</a></h4>
</li>
<li>
<h4><a href="#Step2">Circuit Schematics </a></h4>
</li>
<li>
<h4><a href="#Step4">Interfacing with Arduino</a></h4>
</li>
<li>
<h4><a href="#Step7">Zero Crossing detection using Arduino</a></h4>
</li>
</ul>
<p>&nbsp;</p>
<h1 id="Step1"><strong>Components</strong></h1>

<table id="tablepress-24" class="tablepress tablepress-id-24">
<tbody>
<tr class="row-1">
	<td class="column-1"><div id="attachment_2055" style="width: 160px" class="wp-caption aligncenter"><a href="https://shop.edwinrobotics.com/sensors/960-ac-line-detection-module.html"target="_blank"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2055" src="http://learn.edwinrobotics.com/wp-content/uploads/AC-Line-Detector_Side-150x150.jpg" alt="AC LINE MONITOR LOGIC-OUT MODULE" width="150" height="150" class="size-thumbnail wp-image-2055" srcset="https://learn.edwinrobotics.com/wp-content/uploads/AC-Line-Detector_Side-150x150.jpg 150w, https://learn.edwinrobotics.com/wp-content/uploads/AC-Line-Detector_Side-300x300.jpg 300w, https://learn.edwinrobotics.com/wp-content/uploads/AC-Line-Detector_Side-1024x1024.jpg 1024w, https://learn.edwinrobotics.com/wp-content/uploads/AC-Line-Detector_Side-1080x1080.jpg 1080w, https://learn.edwinrobotics.com/wp-content/uploads/AC-Line-Detector_Side-184x184.jpg 184w, https://learn.edwinrobotics.com/wp-content/uploads/AC-Line-Detector_Side.jpg 1300w" sizes="auto, (max-width: 150px) 100vw, 150px" /></a><p id="caption-attachment-2055" class="wp-caption-text">AC Line detection Module</p></div></td><td class="column-2"><div id="attachment_241" style="width: 160px" class="wp-caption aligncenter"><a href="https://shop.edwinrobotics.com/boards/75-arduino-uno-r3.html"target="_blank"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-241" src="http://learn.edwinrobotics.com/wp-content/uploads/2016/05/UNO-150x150.jpg" alt="Arduino UNO Microcontroller board" width="150" height="150" class="size-thumbnail wp-image-241" srcset="https://learn.edwinrobotics.com/wp-content/uploads/2016/05/UNO-150x150.jpg 150w, https://learn.edwinrobotics.com/wp-content/uploads/2016/05/UNO-184x184.jpg 184w" sizes="auto, (max-width: 150px) 100vw, 150px" /></a><p id="caption-attachment-241" class="wp-caption-text">Arduino UNO</p></div></td><td class="column-3"><div id="attachment_1571" style="width: 160px" class="wp-caption aligncenter"><a href="https://shop.edwinrobotics.com/prototyping/19-male-female-jumper-wires-pack-of-10.html"target="_blank"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1571" src="http://learn.edwinrobotics.com/wp-content/uploads/179-2-150x150.jpg" alt="Arduino Jumper wires" width="150" height="150" class="size-thumbnail wp-image-1571" srcset="https://learn.edwinrobotics.com/wp-content/uploads/179-2-150x150.jpg 150w, https://learn.edwinrobotics.com/wp-content/uploads/179-2-300x300.jpg 300w, https://learn.edwinrobotics.com/wp-content/uploads/179-2-184x184.jpg 184w, https://learn.edwinrobotics.com/wp-content/uploads/179-2.jpg 600w" sizes="auto, (max-width: 150px) 100vw, 150px" /></a><p id="caption-attachment-1571" class="wp-caption-text">Male-Female Jumper wires</p></div></td>
</tr>
</tbody>
</table>
<!-- #tablepress-24 from cache -->
<p>&nbsp;</p>
<h1 id="Step8"><strong>Board Pinouts</strong></h1>

<table id="tablepress-25" class="tablepress tablepress-id-25">
<tbody>
<tr class="row-1">
	<td class="column-1"><div id="attachment_2066" style="width: 310px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2066" src="http://learn.edwinrobotics.com/wp-content/uploads/PCB-TOP-Pins-300x300.jpg" alt="AC Detection Board for industrial application" width="300" height="300" class="size-medium wp-image-2066" srcset="https://learn.edwinrobotics.com/wp-content/uploads/PCB-TOP-Pins-300x300.jpg 300w, https://learn.edwinrobotics.com/wp-content/uploads/PCB-TOP-Pins-150x150.jpg 150w, https://learn.edwinrobotics.com/wp-content/uploads/PCB-TOP-Pins-184x184.jpg 184w, https://learn.edwinrobotics.com/wp-content/uploads/PCB-TOP-Pins.jpg 1000w" sizes="auto, (max-width: 300px) 100vw, 300px" /><p id="caption-attachment-2066" class="wp-caption-text">Top Side</p></div></td><td class="column-2"><div id="attachment_2092" style="width: 310px" class="wp-caption aligncenter"><a href="http://learn.edwinrobotics.com/wp-content/uploads/Bottom-jumper.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2092" src="http://learn.edwinrobotics.com/wp-content/uploads/Bottom-jumper-300x300.jpg" alt="AC mains zero crossing detection" width="300" height="300" class="size-medium wp-image-2092" srcset="https://learn.edwinrobotics.com/wp-content/uploads/Bottom-jumper-300x300.jpg 300w, https://learn.edwinrobotics.com/wp-content/uploads/Bottom-jumper-150x150.jpg 150w, https://learn.edwinrobotics.com/wp-content/uploads/Bottom-jumper-184x184.jpg 184w, https://learn.edwinrobotics.com/wp-content/uploads/Bottom-jumper.jpg 1000w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a><p id="caption-attachment-2092" class="wp-caption-text">Bottom Side</p></div></td>
</tr>
</tbody>
</table>
<!-- #tablepress-25 from cache -->
<ul>
<li><strong>AC-IN &#8211; </strong>Connect the AC line that needs to be detected here.</li>
<li><strong>&#8211;</strong> (negative sign) &#8211; Connect to ground of microcontroller</li>
<li><strong>+</strong> (positive sign) &#8211; Connect to VCC of microcontroller <strong>in case external pull-up is required</strong></li>
<li><strong>S</strong> &#8211; Connect to a digital/interrupt pin of microcontroller</li>
</ul>
<p><strong>Note: Working with AC voltages is DANGEROUS, care must be taken to prevent any short circuits or mistakes in connection. And as always, you are doing this project at your own risk and Edwin Robotics or the Author cannot be held liable for any damages.</strong></p>
<p>&nbsp;</p>
<h1 id="Step2"><strong>Circuit Schematics</strong></h1>
<p>The circuit consists of two main parts, first is the Bridge Rectifier (DB107) which converts the AC signal to DC and the second is the Optocoupler (LTV816), which provides isolation between High voltage(HV) side and Low Voltage (LV) Side.<a href="http://learn.edwinrobotics.com/wp-content/uploads/Schematics_LTV816_updated.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-2115" src="http://learn.edwinrobotics.com/wp-content/uploads/Schematics_LTV816_updated.png" alt="AC line Detection Schematics and Circuit" width="1121" height="275" srcset="https://learn.edwinrobotics.com/wp-content/uploads/Schematics_LTV816_updated.png 1121w, https://learn.edwinrobotics.com/wp-content/uploads/Schematics_LTV816_updated-300x74.png 300w, https://learn.edwinrobotics.com/wp-content/uploads/Schematics_LTV816_updated-1024x251.png 1024w, https://learn.edwinrobotics.com/wp-content/uploads/Schematics_LTV816_updated-1080x265.png 1080w" sizes="auto, (max-width: 1121px) 100vw, 1121px" /></a></p>
<p>&nbsp;</p>
<p>A pull-up resistor is provided for use with microcontrollers (e.g. ESP8266) that do not have an internal pullup resistor.</p>
<p>&nbsp;</p>
<h1 id="Step4"><strong>Interfacing with Arduino</strong></h1>
<p>The hardware connections are pretty straightforward. On the low voltage side the + (positive symbol) goes to VCC of microcontroller, &#8211; (negative symbol) goes to GND and S goes any digital/interrupt pin. On the high voltage side, the AC lines are connected.</p>
<div id="attachment_2078" style="width: 510px" class="wp-caption aligncenter"><a href="http://learn.edwinrobotics.com/wp-content/uploads/PCB_Arduino.jpg" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2078" class="wp-image-2078" src="http://learn.edwinrobotics.com/wp-content/uploads/PCB_Arduino.jpg" alt="AC Line detection using arduino" width="500" height="500" srcset="https://learn.edwinrobotics.com/wp-content/uploads/PCB_Arduino.jpg 1300w, https://learn.edwinrobotics.com/wp-content/uploads/PCB_Arduino-150x150.jpg 150w, https://learn.edwinrobotics.com/wp-content/uploads/PCB_Arduino-300x300.jpg 300w, https://learn.edwinrobotics.com/wp-content/uploads/PCB_Arduino-1024x1024.jpg 1024w, https://learn.edwinrobotics.com/wp-content/uploads/PCB_Arduino-1080x1080.jpg 1080w, https://learn.edwinrobotics.com/wp-content/uploads/PCB_Arduino-184x184.jpg 184w" sizes="auto, (max-width: 500px) 100vw, 500px" /></a><p id="caption-attachment-2078" class="wp-caption-text"><em>Arduino Connections</em></p></div>
<p>In this example, Pin 2 on the arduino is used in this example as it can be used as an interrupt pin as well.</p>
<p>Sample Code:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="c" data-enlighter-theme="atomic">#define Signal_Pin 2  // Modify this pin as per your connection

void setup() {
  pinMode(Signal_Pin , INPUT_PULLUP);
  Serial.begin(9600);
}

void loop() {
  if ( digitalRead(Signal_Pin) == 0 )
    Serial.println (" AC Mains 230v Detected ");
}
</pre>
<p>&nbsp;</p>
<p><strong>Note: Do not touch the PCB once powered, you can get electrocuted. Keep it away from reach of humans/Animals. Make sure that there are no shorted wires, when connecting the 230v AC mains supply.</strong></p>
<p>&nbsp;</p>
<h1 id="Step7"><strong>Zero Crossing Detection using Arduino</strong></h1>
<p>By default zero crossing detection is disabled by the use of a 2.2uF capacitor, in order to use the board for zero crossing detection the capacitor needs to be bypassed by cutting the trace shown below. It can be resoldered at any time later to disable zero crossing:</p>
<div id="attachment_2072" style="width: 510px" class="wp-caption aligncenter"><a href="http://learn.edwinrobotics.com/wp-content/uploads/zero-Crossing-PCB.jpg" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2072" class="wp-image-2072" src="http://learn.edwinrobotics.com/wp-content/uploads/zero-Crossing-PCB.jpg" alt="Zero crossing detection using AC line detector module" width="500" height="500" srcset="https://learn.edwinrobotics.com/wp-content/uploads/zero-Crossing-PCB.jpg 1000w, https://learn.edwinrobotics.com/wp-content/uploads/zero-Crossing-PCB-150x150.jpg 150w, https://learn.edwinrobotics.com/wp-content/uploads/zero-Crossing-PCB-300x300.jpg 300w, https://learn.edwinrobotics.com/wp-content/uploads/zero-Crossing-PCB-184x184.jpg 184w" sizes="auto, (max-width: 500px) 100vw, 500px" /></a><p id="caption-attachment-2072" class="wp-caption-text"><em>Modify the jumper</em></p></div>
<p>The Arduino connection will be same as before, upload the following code and view the output on Serial Monitor at 9600 baud rate:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="cpp" data-enlighter-theme="atomic">#define Signal_Pin 2 //Use Arduino Pin 2 or pin 3, both supports hardware interrupt
int counter=0;

void setup()
{
  pinMode(Signal_Pin , INPUT_PULLUP);
  Serial.begin(9600);
  attachInterrupt(0, zero_crosss_int, RISING);  // Choose the zero cross interrupt # from the table above
}

void zero_crosss_int()  // function to be fired at the zero crossing to dim the light
{
  counter++;
}

void loop()
{
  Serial.println(counter);
}
</pre>
<p>&nbsp;</p>
<p>You can see that the counter value increases with every cycle of AC line and the moment you turn off the AC line, the counter Stops as well.</p>
<p>&nbsp;</p>
<h1><strong>References:</strong></h1>
<ul>
<li><a href="http://www.rectron.com/data_sheets/db101-107.pdf" target="_blank" rel="noopener">DB107 Rectifier Datasheet</a></li>
<li><a href="http://datasheet.octopart.com/LTV-816S-Lite-On-datasheet-26684805.pdf" target="_blank" rel="noopener">LTV-816 Datasheet</a></li>
</ul>
]]></content:encoded>
					
					<wfw:commentRss>https://learn.edwinrobotics.com/230v110v-ac-mains-detection-using-arduino-raspberry-pi-and-esp8266-thing/feed/</wfw:commentRss>
			<slash:comments>54</slash:comments>
		
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/

Object Caching 81/107 objects using APC
Page Caching using Disk: Enhanced 
Lazy Loading (feed)
Database Caching 10/35 queries in 0.025 seconds using APC

Served from: learn.edwinrobotics.com @ 2025-07-21 13:57:16 by W3 Total Cache
-->