<?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>electronut</title>
	<atom:link href="http://electronut.in/feed/" rel="self" type="application/rss+xml" />
	<link>http://electronut.in</link>
	<description>Open Source Hardware Projects &#38; Kits</description>
	<lastBuildDate>Fri, 24 May 2013 10:50:23 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Plotting real-time data from Arduino using Python</title>
		<link>http://electronut.in/plotting-real-time-data-from-arduino-using-python/</link>
		<comments>http://electronut.in/plotting-real-time-data-from-arduino-using-python/#comments</comments>
		<pubDate>Fri, 24 May 2013 10:50:23 +0000</pubDate>
		<dc:creator>Chief Electronut</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[analog]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[LDR]]></category>
		<category><![CDATA[matplotlib]]></category>
		<category><![CDATA[plot]]></category>
		<category><![CDATA[real-time]]></category>

		<guid isPermaLink="false">http://electronut.in/?p=212</guid>
		<description><![CDATA[Arduino is fantastic as an intermediary between your computer and a raw electronic circuit. Using the serial interface, you can retrieve information from sensors attached to your Arduino. (You can also send information via the serial interface to actuate circuits and devices (LEDs, relays, servos, etc.) connected to your Arduino.) Once you have the data <a class="read-more-link" href="http://electronut.in/plotting-real-time-data-from-arduino-using-python/"><br />...read more</a>]]></description>
				<content:encoded><![CDATA[<p><iframe width="560" height="315" src="http://www.youtube.com/embed/LMr5UHJJPNk" frameborder="0" allowfullscreen></iframe></p>
<p><a href="http://www.arduino.cc/">Arduino </a> is fantastic as an intermediary between your computer and a raw electronic circuit. Using the serial interface, you can retrieve information from sensors attached to your Arduino. (You can also send information via the serial interface to actuate circuits and devices (LEDs, relays, servos, etc.) connected to your Arduino.) Once you have the data in your computer, you can do all sorts of things with it &#8211; analyze it, display it, or share it on the internet, for instance.</p>
<p>In this post, I will be reading and displaying analog data from a pair of LDRs connected to an Arduino. Here is the schematic:</p>
<p><a href="http://electronut.in/wp-content/uploads/2013/05/IMG_1443.jpg" rel="lightbox[212]"><img src="http://electronut.in/wp-content/uploads/2013/05/IMG_1443.jpg" alt="IMG_1443" width="800" height="434" class="alignnone size-full wp-image-227" /></a></p>
<p>Here is how you hook it up to the Arduino:</p>
<p><a href="http://electronut.in/wp-content/uploads/2013/05/IMG_1439.jpg" rel="lightbox[212]"><img src="http://electronut.in/wp-content/uploads/2013/05/IMG_1439.jpg" alt="IMG_1439" width="488" height="800" class="alignnone size-full wp-image-220" /></a></p>
<p>The Arduino sketch is very simple &#8211; it just reads the values from analog pins A0 and A1 (in the range [0, 1023]) and prints it to the serial port. Here is the code:</p>
<p><script src="https://gist.github.com/electronut/5641938.js"></script></p>
<p>The serial port sends values in the format:</p>
<p><code>512 300<br />
513 280<br />
400 200<br />
...<br />
</code></p>
<p>On the computer side, I need to read these values, and plot them as a function of time. I am using Python and the <a href="http://matplotlib.sourceforge.net/">Matplotlib </a>library for this. I wanted to display this as a scrolling graph that moves to the right as data keeps coming in. For that, I am using the Python <code>deque</code> class to keep and update a fixed number of data points for each time frame. </p>
<p>You can see the full implementation here:</p>
<p><script src="https://gist.github.com/electronut/5641933.js"></script></p>
<p>And here is what the plot looks like. It scrolls to the right as data keeps coming in.</p>
<p><a href="http://electronut.in/wp-content/uploads/2013/05/plot.png" rel="lightbox[212]"><img src="http://electronut.in/wp-content/uploads/2013/05/plot.png" alt="plot" width="638" height="531" class="alignnone size-full wp-image-221" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://electronut.in/plotting-real-time-data-from-arduino-using-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ambient Light sensor using an Op-Amp Comparator</title>
		<link>http://electronut.in/ambient-light-sensor-using-an-op-amp-comparator/</link>
		<comments>http://electronut.in/ambient-light-sensor-using-an-op-amp-comparator/#comments</comments>
		<pubDate>Wed, 22 May 2013 03:15:09 +0000</pubDate>
		<dc:creator>Chief Electronut</dc:creator>
				<category><![CDATA[Circuits]]></category>
		<category><![CDATA[comparator]]></category>
		<category><![CDATA[LDR]]></category>
		<category><![CDATA[LM358]]></category>
		<category><![CDATA[op-amp]]></category>

		<guid isPermaLink="false">http://electronut.in/?p=188</guid>
		<description><![CDATA[Say you have a microcontroller circuit that does something when it goes dark. To save power, you want to put the chip to sleep when the ambient light drops below a certain level. One way to do this is using an LDR and an op-amp comparator. Here is the schematic: In the above circuit, the <a class="read-more-link" href="http://electronut.in/ambient-light-sensor-using-an-op-amp-comparator/"><br />...read more</a>]]></description>
				<content:encoded><![CDATA[<p>Say you have a microcontroller circuit that does something when it goes dark. To save power, you want to put the chip to sleep when the ambient light drops below a certain level. One way to do this is using an <a href="http://en.wikipedia.org/wiki/Photoresistor">LDR </a>and an op-amp <a href="http://en.wikipedia.org/wiki/Comparator">comparator</a>. </p>
<p>Here is the schematic:</p>
<p><a href="http://electronut.in/wp-content/uploads/2013/05/IMG_1415.jpg" rel="lightbox[188]"><img src="http://electronut.in/wp-content/uploads/2013/05/IMG_1415.jpg" alt="IMG_1415" width="800" height="560" class="alignnone size-full wp-image-189" /></a></p>
<p>In the above circuit, the reference voltage at the non-inverting terminal of the op-amp is VCC/2. When it&#8217;s dark, the LDR has a high resistance (over 20K), and the voltage at the inverting terminal (pin 3) is going to be less than VCC/2. Hence, the output of the op-amp will go to high when it is dark. When sufficient light falls on the LDR, its resistance falls, and the voltage at the inverting terminal (pin 2) exceeds VCC/2. At this point, the op-amp output goes low. We can control the threshold at which it goes from low to high by adjusting the potentiometer R1.</p>
<p>Here is what the circuit looks like on a breadboard. The supply is 5V regulated.</p>
<p><a href="http://electronut.in/wp-content/uploads/2013/05/IMG_1416.jpg" rel="lightbox[188]"><img src="http://electronut.in/wp-content/uploads/2013/05/IMG_1416.jpg" alt="IMG_1416" width="800" height="665" class="alignnone size-full wp-image-190" /></a></p>
<p>In this case, I am using the LM358 &#8211; a very popular general-purpose <a href="http://en.wikipedia.org/wiki/Operational_amplifier">Op-Amp</a> IC. This works fine for our purpose, but do note that there are dedicated comparator ICs with better switching characteristics for critical applications.</p>
<p>In my next post, I will describe how to hook this up to an ATmega168 and wake it up from power-save mode.</p>
]]></content:encoded>
			<wfw:commentRss>http://electronut.in/ambient-light-sensor-using-an-op-amp-comparator/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Serial Communications with the ATmega168</title>
		<link>http://electronut.in/serial-communications-with-the-atmega168/</link>
		<comments>http://electronut.in/serial-communications-with-the-atmega168/#comments</comments>
		<pubDate>Mon, 20 May 2013 05:03:28 +0000</pubDate>
		<dc:creator>Chief Electronut</dc:creator>
				<category><![CDATA[Circuits]]></category>
		<category><![CDATA[ATmega168]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[Serial Communication]]></category>

		<guid isPermaLink="false">http://electronut.in/?p=129</guid>
		<description><![CDATA[The first thing you do when you learn a new programming language or platform is to write a &#8220;hello world&#8221; application. This requires something like a &#8220;printf&#8221; function. That&#8217;s not so straightforward when it comes to microcontrollers &#8211; where will the output of the &#8220;printf&#8221; go? That&#8217;s where serial communications come in. Arduino users have <a class="read-more-link" href="http://electronut.in/serial-communications-with-the-atmega168/"><br />...read more</a>]]></description>
				<content:encoded><![CDATA[<p>The first thing you do when you learn a new programming language or platform is to write a &#8220;hello world&#8221; application. This requires something like a &#8220;printf&#8221; function. That&#8217;s not so straightforward when it comes to microcontrollers &#8211; where will the output of the &#8220;printf&#8221; go? That&#8217;s where serial communications come in. Arduino users have it easy &#8211; they just need to use Serial.print(). But the situation is not so bad if you are using a standalone microcontroller &#8211; just choose a chip like ATmega168 which has <a href="http://en.wikipedia.org/wiki/Universal_asynchronous_receiver/transmitter">USART </a>- hardware support for serial communications.</p>
<p>The code needed to transmit serial data is very simple, and the datasheet has most of what you need:</p>
<p><script src="https://gist.github.com/electronut/5610483.js"></script></p>
<p>Here is the schematic of a simple setup that will let you send debug data (strings) from an ATmega168 to your computer. If you are completely new to AVR programming, I recommend that you read <a href="http://hackaday.com/2010/10/23/avr-programming-introduction/">Hackaday&#8217;s tutorial</a> on the subject. Note how the TX/RX lines are flipped when you connect it from the ATmega168 to the FTDI adapter.</p>
<p>A few things to remember in order to for this to work correctly (the Makefile in the GitHub link below takes care of all this):</p>
<ul>
<li>For getting a 9600 baud rate, the chip needs to run at 8 MHz, and for this, you need to unset the  CKDIV8 fuse.</li>
<li>For full sprintf formatting support, some additional flags are needed in the linker.</li>
</ul>
<p>&nbsp;</p>
<p><a href="http://electronut.in/wp-content/uploads/2013/05/IMG_1412.jpg" rel="lightbox[129]"><img class="alignnone size-full wp-image-131" alt="IMG_1412" src="http://electronut.in/wp-content/uploads/2013/05/IMG_1412.jpg" width="800" height="733" /></a></p>
<div title="Page 199">
<div>
<div>
<p>&nbsp;</p>
<p>Here is a photo of the setup that I used:</p>
<p>&nbsp;</p>
<p><a href="http://electronut.in/wp-content/uploads/2013/05/IMG_1411.jpg" rel="lightbox[129]"><img class="alignnone size-full wp-image-130" alt="IMG_1411" src="http://electronut.in/wp-content/uploads/2013/05/IMG_1411.jpg" width="800" height="543" /></a></p>
</div>
</div>
</div>
<p>&nbsp;</p>
<p>Here is what the output looks like on CoolTerm, a serial monitor that I use on my Mac:</p>
<p>&nbsp;</p>
<p><a href="http://electronut.in/wp-content/uploads/2013/05/coolterm.png" rel="lightbox[129]"><img class="alignnone size-full wp-image-137" style="border: 2px solid black;" alt="coolterm" src="http://electronut.in/wp-content/uploads/2013/05/coolterm.png" width="686" height="552" /></a></p>
<p>&nbsp;</p>
<p>Having a &#8220;printf&#8221; function is very handy for debugging your projects &#8211; so choose a chip that will let you support this functionality without too much pain.</p>
<h2>Downloads</h2>
<p>Here is all the code used in this project &#8211; do pay attention to the flags in the Makefile.</p>
<p><a href="https://github.com/electronut/atmega168-serial-hello">https://github.com/electronut/atmega168-serial-hello</a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://electronut.in/serial-communications-with-the-atmega168/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Motion Sensing Night Lamp</title>
		<link>http://electronut.in/motion-sensing-night-lamp/</link>
		<comments>http://electronut.in/motion-sensing-night-lamp/#comments</comments>
		<pubDate>Fri, 17 May 2013 08:08:56 +0000</pubDate>
		<dc:creator>Chief Electronut</dc:creator>
				<category><![CDATA[Kit]]></category>
		<category><![CDATA[555]]></category>
		<category><![CDATA[kit]]></category>
		<category><![CDATA[laser cutting]]></category>
		<category><![CDATA[LED]]></category>
		<category><![CDATA[PIR sensor]]></category>

		<guid isPermaLink="false">http://electronut.in/?p=124</guid>
		<description><![CDATA[Just put together the new laser-cut enclosure with all parts and it&#8217;s working great&#8230;]]></description>
				<content:encoded><![CDATA[<p>Just put together the new laser-cut enclosure with all parts and it&#8217;s working great&#8230;</p>
<p><a href="http://electronut.in/wp-content/uploads/2013/05/IMG_1402.jpg" rel="lightbox[124]"><img class="alignnone size-full wp-image-125" alt="IMG_1402" src="http://electronut.in/wp-content/uploads/2013/05/IMG_1402.jpg" width="800" height="800" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://electronut.in/motion-sensing-night-lamp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Laser Cut Enclosure</title>
		<link>http://electronut.in/laser-cut-enclosure/</link>
		<comments>http://electronut.in/laser-cut-enclosure/#comments</comments>
		<pubDate>Thu, 16 May 2013 16:54:48 +0000</pubDate>
		<dc:creator>Chief Electronut</dc:creator>
				<category><![CDATA[Enclosure]]></category>
		<category><![CDATA[enclosure]]></category>
		<category><![CDATA[kit]]></category>
		<category><![CDATA[Laser cuttting]]></category>

		<guid isPermaLink="false">http://electronut.in/?p=120</guid>
		<description><![CDATA[I am getting my first kit ready, and this is the fourth iteration of the laser-cut enclosure. I think it&#8217;s 98% there. It&#8217;s all a learning experience&#8230;]]></description>
				<content:encoded><![CDATA[<p>I am getting my first kit ready, and this is the fourth iteration of the laser-cut enclosure. I think it&#8217;s 98% there. It&#8217;s all a learning experience&#8230;</p>
<p><a href="http://electronut.in/wp-content/uploads/2013/05/IMG_1375.jpg" rel="lightbox[120]"><img class="alignnone size-full wp-image-121" alt="Night Lamp Laser Cut Enclosure" src="http://electronut.in/wp-content/uploads/2013/05/IMG_1375.jpg" width="800" height="589" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://electronut.in/laser-cut-enclosure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using the LM317 Voltage Regulator</title>
		<link>http://electronut.in/using-the-lm317-voltage-regulator/</link>
		<comments>http://electronut.in/using-the-lm317-voltage-regulator/#comments</comments>
		<pubDate>Thu, 16 May 2013 03:50:49 +0000</pubDate>
		<dc:creator>Chief Electronut</dc:creator>
				<category><![CDATA[Circuits]]></category>
		<category><![CDATA[3.3V]]></category>
		<category><![CDATA[LM317]]></category>
		<category><![CDATA[voltage regulator]]></category>

		<guid isPermaLink="false">http://electronut.in/?p=112</guid>
		<description><![CDATA[I was used to the 7805 series of voltage regulators, but recently for a project that used the MMA7660 accelerometer chip which takes only a max of 3.6 V, I needed a different regulator. Here is the schematic for the supply. You need to adjust the 1k pot while checking Vout with a multimeter or <a class="read-more-link" href="http://electronut.in/using-the-lm317-voltage-regulator/"><br />...read more</a>]]></description>
				<content:encoded><![CDATA[<p>I was used to the 7805 series of voltage regulators, but recently for a project that used the MMA7660 accelerometer chip which takes only a max of 3.6 V, I needed a different regulator.</p>
<p>Here is the schematic for the supply. You need to adjust the 1k pot while checking Vout with a multimeter or oscilloscope, till you get the exact voltage you are looking for.</p>
<p>Nothing fancy, but I try to practice a little pen &amp; ink drawing when I can. <img src='http://electronut.in/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>&nbsp;</p>
<p><a href="http://electronut.in/wp-content/uploads/2013/05/LM317.jpg" rel="lightbox[112]"><img class="size-large wp-image-113 aligncenter" alt="LM317" src="http://electronut.in/wp-content/uploads/2013/05/LM317-1024x697.jpg" width="670" height="456" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://electronut.in/using-the-lm317-voltage-regulator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>nocte lux &#8211; A low cost motion activated night lamp</title>
		<link>http://electronut.in/nocte-lux-a-low-cost-motion-activated-night-lamp/</link>
		<comments>http://electronut.in/nocte-lux-a-low-cost-motion-activated-night-lamp/#comments</comments>
		<pubDate>Wed, 15 May 2013 16:48:09 +0000</pubDate>
		<dc:creator>Chief Electronut</dc:creator>
				<category><![CDATA[DIY]]></category>
		<category><![CDATA[555]]></category>
		<category><![CDATA[LED]]></category>
		<category><![CDATA[low cost]]></category>
		<category><![CDATA[SMD]]></category>

		<guid isPermaLink="false">http://electronut.in/?p=93</guid>
		<description><![CDATA[No, it&#8217;s not the $10000 Leica lens of similar name. For this project, I wanted to try and make a simple night lamp – something that you can put under your cot and use it simply by picking it up. Useful in case you get up in the middle of the night and need a <a class="read-more-link" href="http://electronut.in/nocte-lux-a-low-cost-motion-activated-night-lamp/"><br />...read more</a>]]></description>
				<content:encoded><![CDATA[<p>No, it&#8217;s not the $10000 Leica lens of similar name. <img src='http://electronut.in/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>For this project, I wanted to try and make a simple night lamp – something that you can put under your cot and use it simply by picking it up. Useful in case you get up in the middle of the night and need a quick light. So I used a tilt switch and a 555 IC to design the circuit.</p>
<p>I used SMD components for this project for compactness. If you haven&#8217;t done any SMD soldering before, don&#8217;t be intimidated by it. You can solder many types of SMD packages (SOT23, TQFP, 1206, etc) using just a soldering iron with a small chisel tip, and a pair of tweezers. If you add a hot air rework station to your tools, you can even solder tiny QFN packages which have all leads under the device. </p>
<p>Here is a very informative and entertaining <a href="http://www.siliconfarmers.com/smtmanga/">cartoon guide to SMD soldering</a>.</p>
<p>Here is a video of the project:</p>
<p><iframe src="http://www.youtube.com/embed/CXvwA_-ZndU?rel=0" height="315" width="420" allowfullscreen="" frameborder="0"></iframe></p>
<p>You can find all relevant files at our GitHub link below:</p>
<p><a href="https://github.com/electronut/nocte-lux">https://github.com/electronut/nocte-lux</a></p>
]]></content:encoded>
			<wfw:commentRss>http://electronut.in/nocte-lux-a-low-cost-motion-activated-night-lamp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Automatic Lights for Desk Interior</title>
		<link>http://electronut.in/automatic-lights-for-desk-interior/</link>
		<comments>http://electronut.in/automatic-lights-for-desk-interior/#comments</comments>
		<pubDate>Wed, 15 May 2013 12:35:06 +0000</pubDate>
		<dc:creator>Chief Electronut</dc:creator>
				<category><![CDATA[DIY]]></category>
		<category><![CDATA[LED]]></category>
		<category><![CDATA[MOSFET]]></category>
		<category><![CDATA[Reed Switch]]></category>

		<guid isPermaLink="false">http://electronut.in/?p=71</guid>
		<description><![CDATA[This is a small project that I worked on last year. I have a desk made of dark wood, and it was very difficult to see what was inside the bottom draw. I put together a simple circuit with the schematic below &#8211; something which lit up a few strips of LEDs using a magnet <a class="read-more-link" href="http://electronut.in/automatic-lights-for-desk-interior/"><br />...read more</a>]]></description>
				<content:encoded><![CDATA[<p>This is a small project that I worked on last year. I have a desk made of dark wood, and it was very difficult to see what was inside the bottom draw. I put together a simple circuit with the schematic below &#8211; something which lit up a few strips of LEDs using a magnet stuck to the side of the door to switch a transistor on/off.</p>
<p><a href="http://electronut.in/wp-content/uploads/2013/05/Automatic-lights.jpg" rel="lightbox[71]"><img class="size-large wp-image-73 aligncenter" alt="Automatic lights" src="http://electronut.in/wp-content/uploads/2013/05/Automatic-lights-1024x795.jpg" width="670" height="520" /></a></p>
<p>&nbsp;</p>
<p>I also made a video with my old iPhone 3GS and uploaded it to youtube.</p>
<p><iframe src="http://www.youtube.com/embed/wFeQDVLr_9k" height="315" width="420" allowfullscreen="" frameborder="0"></iframe></p>
<p>What blew my mind was the popularity of the post &#8211; in a few weeks, over 15000 people had seen the video, and the project was picked up by <a href="http://hackaday.com/2012/12/21/adding-task-lighting-inside-a-desk/">Hackaday</a> and <a href="http://lifehacker.com/5973589/add-automatic-led-lights-for-desk-drawers">LifeHacker</a>.</p>
<p>This has been a great inspiration for me to share the projects I am working on.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://electronut.in/automatic-lights-for-desk-interior/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
