<?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>[protofusion] &#187; AVR</title> <atom:link href="http://protofusion.org/wordpress/category/projects/avr/feed/" rel="self" type="application/rss+xml" /><link>http://protofusion.org/wordpress</link> <description>Generally Interesting</description> <lastBuildDate>Sat, 19 May 2012 17:48:20 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.2</generator> <item><title>MNL: Networked LED Lighting</title><link>http://protofusion.org/wordpress/2011/08/mnl-networked-led-lighting/</link> <comments>http://protofusion.org/wordpress/2011/08/mnl-networked-led-lighting/#comments</comments> <pubDate>Mon, 29 Aug 2011 00:13:52 +0000</pubDate> <dc:creator>Ethan Zonca</dc:creator> <category><![CDATA[AVR]]></category> <category><![CDATA[MNL]]></category> <category><![CDATA[ATTiny]]></category> <category><![CDATA[Lighting]]></category> <category><![CDATA[RGB]]></category> <category><![CDATA[RS485]]></category><guid
isPermaLink="false">http://protofusion.org/wordpress/?p=1037</guid> <description><![CDATA[MNL is a multi-node high-power RGB lighting system. It consists of a controller (PC or embedded system) and multiple light ]]></description> <content:encoded><![CDATA[<p><a
href="http://pf-wordpress.s3.amazonaws.com/wordpress/wp-content/uploads/2011/08/2011-08-28_17-01-56.jpg" rel="lightbox[1037]"><img
class="alignnone size-large wp-image-1060" title="MNL Node and 10W RGB LED" src="http://pf-wordpress.s3.amazonaws.com/wordpress/wp-content/uploads/2011/08/2011-08-28_17-01-56-500x276.jpg" alt="" width="500" height="276" /></a></p><p>MNL is a multi-node high-power RGB lighting system. It consists of a controller (PC or embedded system) and multiple light nodes networked with RS485. The first prototype nodes are up and running, and we will be developing the second revision of prototypes in the coming months. Read on past the break for more information.</p><p><span
id="more-1037"></span></p><h3></h3><h2>Node Hardware</h2><p><a
href="http://pf-wordpress.s3.amazonaws.com/wordpress/wp-content/uploads/2011/08/2011-08-28_16-33-18.jpg" rel="lightbox[1037]"><img
class="alignnone size-large wp-image-1058" title="MNL Light Controller Node" src="http://pf-wordpress.s3.amazonaws.com/wordpress/wp-content/uploads/2011/08/2011-08-28_16-33-18-500x292.jpg" alt="" width="500" height="292" /></a></p><p>The node board is a small PCB with two RJ-45 ports and a power terminal strip, along with an ICSP header for flashing firmware. The nodes are designed for daisy-chaining both data and power.</p><p>Current features:</p><ul><li>RS485 communication</li><li>Supports LEDs of up to 1.2A per channel</li><li>Upgradeable firmware for additional features</li><li>TBD: Firmware updates over RS485</li><li>Multiple fade types, dwell modes, etc.</li><li>Hardware-agnostic network supports different types of nodes (e.g., strobe, motor driver, etc)</li></ul><h3></h3><h2>LED Circuit</h2><p><a
href="http://pf-wordpress.s3.amazonaws.com/wordpress/wp-content/uploads/2011/08/2011-08-28_16-33-00.jpg" rel="lightbox[1037]"><img
class="alignnone size-large wp-image-1057" title="10W RGB LED" src="http://pf-wordpress.s3.amazonaws.com/wordpress/wp-content/uploads/2011/08/2011-08-28_16-33-00-500x279.jpg" alt="" width="500" height="279" /></a></p><p>The LED used for prototyping is a 10W RGB LED from DealExtreme, which provides a generous amount of light with low cost per lumen. Although the heatsink is a bit small, forced-air cooling keeps things at a reasonable temperature.  The PCB includes a fan output which is PWMed according to the average instantaneous luminosity of the node. Forced-air cooling could be helpful for installation in compromising environments, such as can lighting fixtures.</p><p><a
href="http://pf-wordpress.s3.amazonaws.com/wordpress/wp-content/uploads/2011/08/2011-08-28_16-34-15.jpg" rel="lightbox[1037]"><img
class="alignnone size-large wp-image-1059" title="Current-Limiting Resistors" src="http://pf-wordpress.s3.amazonaws.com/wordpress/wp-content/uploads/2011/08/2011-08-28_16-34-15-500x302.jpg" alt="" width="500" height="302" /></a></p><p>The current design incorporates 3 current-limiting resistors for each channel of the LED. Although this is less efficient than current-regulated supplies, it allows flexibility in LED choice without requiring extensive PCB modifications.</p><h3></h3><h2>Prototype Software</h2><p><a
href="http://pf-wordpress.s3.amazonaws.com/wordpress/wp-content/uploads/2011/08/Test-Controller-App.png" rel="lightbox[1037]"><img
class="alignnone size-large wp-image-1052" title="MNL Test Application (Processing/Wiring)" src="http://pf-wordpress.s3.amazonaws.com/wordpress/wp-content/uploads/2011/08/Test-Controller-App-500x414.png" alt="" width="500" height="414" /></a></p><p>I developed a quick Processing sketch for testing purposes. It creates a FFT of the stereo mix and uses the lowest three bins to determine R/G/B brightness. If the largest of the three values is over the threshold specified by the slider, then an update command is sent to the node. The processing sketch also has an Open Sound Control (OSC) interface, allowing easy control from the TouchOSC app for iPhone or Android over WIFI as well as any software package that supports OSC.</p><p>This project is still under heavy development, and is still in the prototype phase. We are adding additional features to the software and hardware, so expect significant updates in the coming months.</p> ]]></content:encoded> <wfw:commentRss>http://protofusion.org/wordpress/2011/08/mnl-networked-led-lighting/feed/</wfw:commentRss> <slash:comments>5</slash:comments> </item> <item><title>tinyRGB &#8211; an i2c LED driver</title><link>http://protofusion.org/wordpress/2011/06/tinyrgb-an-i2c-led-driver/</link> <comments>http://protofusion.org/wordpress/2011/06/tinyrgb-an-i2c-led-driver/#comments</comments> <pubDate>Wed, 22 Jun 2011 23:33:34 +0000</pubDate> <dc:creator>Ethan Zonca</dc:creator> <category><![CDATA[AVR]]></category> <category><![CDATA[BlinkM]]></category> <category><![CDATA[LED]]></category> <category><![CDATA[RGB]]></category><guid
isPermaLink="false">http://protofusion.org/wordpress/?p=964</guid> <description><![CDATA[tinyRGB is a minimalist blinkM-compatible high-current i2c RGB LED controller consisting of only 10 basic components. The board is small ]]></description> <content:encoded><![CDATA[<p
style="text-align: center;"><a
href="http://pf-wordpress.s3.amazonaws.com/wordpress/wp-content/uploads/2011/05/tinyRGB-NPN.png" rel="lightbox[964]"><br
/> </a><a
href="http://pf-wordpress.s3.amazonaws.com/wordpress/wp-content/uploads/2011/06/tinyRGB-bottom1.jpg" rel="lightbox[964]"><img
class="alignnone size-large wp-image-999" title="tinyRGB (bottom)" src="http://pf-wordpress.s3.amazonaws.com/wordpress/wp-content/uploads/2011/06/tinyRGB-bottom1-500x375.jpg" alt="" width="500" height="375" /></a></p><p>tinyRGB is a minimalist blinkM-compatible high-current i2c RGB LED controller consisting of only 10 basic components. The board is small and inexpensive, can be fabricated for as little as $1/board, and can easily be assembled by hand with a total component cost of around $3.</p><p><span
id="more-964"></span><a
href="http://pf-wordpress.s3.amazonaws.com/wordpress/wp-content/uploads/2011/05/tinyRGB-NPN.png" rel="lightbox[964]"><img
class="alignnone size-full wp-image-965" title="tinyRGB Low-side i2c led driver" src="http://pf-wordpress.s3.amazonaws.com/wordpress/wp-content/uploads/2011/05/tinyRGB-NPN.png" alt="" width="409" height="499" /></a></p><p>tinyRGB runs the cyz_rgb firmware, providing a simple interface that is completely compatible with blinkM commands.</p><p>This board is designed to run on 5v, which is also exposed on the LED output header. However, this board can easily be used to drive LEDs at higher voltages by providing a higher voltage to the common cathode of the LED.</p><h3>Parts:</h3><ul><li>PCB [$1]</li><li>Pin Headers (if desired)</li><li>3x 2N6427 1.2A / 40V NPN Transistor [$.04, <a
href="http://www.mouser.com/Search/ProductDetail.aspx?R=2N6427_Qvirtualkey51210000virtualkey512-2N6427_Q" target="_blank">mouser</a>]</li><li>ATTINY85 PDIP [$1.82, <a
href="http://www.mouser.com/ProductDetail/Atmel/ATtiny85-20PU/?qs=sGAEpiMZZMvu0Nwh4cA1wUVlLgw9m2DP8LpB74D%2fcic%3d" target="_blank">mouser</a>]</li><li>.1uF 0805 decoupling capacitor (optional) [$.06, <a
href="http://www.mouser.com/ProductDetail/TDK/C2012Y5V1H104Z-060/?qs=sGAEpiMZZMsh%252b1woXyUXj31jWbx3TwxGQKizzdEtIfU%3d" target="_blank">mouser</a>]</li><li>3x 0805 Surface-mount 1k resistors [$.04, <a
href="http://www.mouser.com/ProductDetail/Xicon/292-511K-RC/?qs=sGAEpiMZZMvdGkrng054twBcVY5WwHH3NxfuCETL6jc%3d">mouser</a>] (yes, you really can solder them with a fat wedge tip!)</li><li>3x current-limiting resistors matched to your LEDs</li></ul><p>Total cost: ~$3, plus the cost of your LED and current-limiting resistors.</p><p>For firmware installation and setup instructions see the &#8220;build&#8221; section of <a
title="RGB Multi-Node Lighting" href="http://protofusion.org/wordpress/2011/04/diy-audio-reactive-lighting/" target="_blank">Multi-Node Lighting</a>.</p><p>Board and schematic downloads are included below. Note that the board is a bit rough around the edges (figuratively), and could use some improvement. Drop comments below if you have any suggestions.</p><h3>Downloads:</h3><ul><li><a
href="http://protofusion.org/hg/mnl-hardware/raw-file/00088432df10/i2c-node/MNLC-Node-NPN.sch" target="_blank">EAGLE Schematic</a></li><li><a
href="http://protofusion.org/hg/mnl-hardware/raw-file/00088432df10/i2c-node/MNLC-Node-NPN.brd" target="_blank">EAGLE Board</a></li></ul> ]]></content:encoded> <wfw:commentRss>http://protofusion.org/wordpress/2011/06/tinyrgb-an-i2c-led-driver/feed/</wfw:commentRss> <slash:comments>5</slash:comments> </item> <item><title>The OSRAM SLG2016 and AVR</title><link>http://protofusion.org/wordpress/2010/10/the-osram-slg2016-and-avr/</link> <comments>http://protofusion.org/wordpress/2010/10/the-osram-slg2016-and-avr/#comments</comments> <pubDate>Sun, 17 Oct 2010 21:33:39 +0000</pubDate> <dc:creator>Ethan Zonca</dc:creator> <category><![CDATA[AVR]]></category> <category><![CDATA[attiny88]]></category> <category><![CDATA[osram]]></category> <category><![CDATA[slg 2016]]></category> <category><![CDATA[slg2016]]></category> <category><![CDATA[tiny88]]></category><guid
isPermaLink="false">http://protofusion.org/wordpress/?p=531</guid> <description><![CDATA[I happened to scavenge a couple of SLG2016&#8242;s from some old workstation debug displays. After finally locating a datasheet, I ]]></description> <content:encoded><![CDATA[<p><a
href="http://pf-wordpress.s3.amazonaws.com/wordpress/wp-content/uploads/2010/07/slg2016-macro.jpg" rel="lightbox[531]"><img
class="alignnone size-large wp-image-545" title="SLG2016 LED Display" src="http://pf-wordpress.s3.amazonaws.com/wordpress/wp-content/uploads/2010/07/slg2016-macro-500x375.jpg" alt="" width="500" height="375" /></a></p><p>I happened to scavenge a couple of SLG2016&#8242;s from some old workstation debug displays. After finally locating a datasheet, I realized that they used the standard ASCII charset, so they are extremely easy to drive. <em>Note: The SLG2016 differs from the SLR2016, SLO2016, and SLY2016 only by LED color.</em></p><p><em><span
id="more-531"></span></em></p><p><a
href="http://pf-wordpress.s3.amazonaws.com/wordpress/wp-content/uploads/2010/07/attiny88-macro.jpg" rel="lightbox[531]"><img
class="alignnone size-large wp-image-542" title="ATTINY88 on solderless breadboard" src="http://pf-wordpress.s3.amazonaws.com/wordpress/wp-content/uploads/2010/07/attiny88-macro-500x375.jpg" alt="" width="500" height="375" /></a></p><p>The only downside to these displays is that they use quite a few pins (7 data lines, 2 digit select lines, write line, and optional blanking line). For now, I&#8217;m driving the display with all pins in parallel on a tiny88 which has plenty of pins; however I plan on using a shift register to cut down on data bus pin usage in the future. The displays only need the data lines to be held stable during a write cycle, making shift registers well-suited to this task.</p><p><a
href="http://pf-wordpress.s3.amazonaws.com/wordpress/wp-content/uploads/2010/07/buspirate-macro.jpg" rel="lightbox[531]"><img
class="size-large wp-image-544 alignnone" title="The Bus Pirate with probe cable attached" src="http://pf-wordpress.s3.amazonaws.com/wordpress/wp-content/uploads/2010/07/buspirate-macro-500x375.jpg" alt="" width="500" height="375" /></a></p><p>To flash the attiny88, I&#8217;m using a <a
href="http://dangerousprototypes.com/category/bus-pirate/" target="_blank">Bus Pirate</a> (pictured above) flashed with the STK500v2 emulation firmware. This allows me to use avr-gcc with AVR Studio to program the chip.</p><p>Here is some code I used to test the displays, using PORTD for data lines, and the 2 LSB&#8217;s of PORTC for digit select lines. This is the first time I&#8217;ve worked with AVRs outside of the Arduino environment, so pardon any flagrant errors and drop me a comment if you have any suggestions.</p><pre class="brush: cpp; title: ; notranslate">
#define F_CPU 1000000UL

#include &lt;avr/io.h&gt;
#include &lt;util/delay.h&gt;
#include &lt;string.h&gt;
#include &lt;stdlib.h&gt;

void wr();
void wrChar(char toWrite, int dig);
void wrWord(char *word);
void scrollWord(char *word);
void delay_ms(uint16_t ms);

int main (void){
  DDRC=0xFF;
  DDRD=0xFF;
  PORTD=0x00;
  PORTC=0x00;

  // Loop through a few strings for testing
  while(1){
    wrWord(&quot;Helo&quot;);
    delay_ms(500);
    wrWord(&quot;*?%$&quot;);
    delay_ms(500);
  }
}

// Toggle write pin (PC0)
void wr() {
  PORTD &amp;= ~(1&lt;&lt;7);
  delay_ms(1);
  PORTD |= (1&lt;&lt;7);
}

// Write char to position
void wrChar(char toWrite, int pos){
  PORTC = pos;  // Set digit select lines
  PORTD = toWrite;  // Set data lines
  wr();  // Toggle write pin
}

// Write 4-char word
void wrWord(char *word){
  for(int i=3; i&gt;=0; i--){
    wrChar(word[i], 3-i);
  }
}

// Generic delay function
void delay_ms(uint16_t ms) {
  while (ms) {
    _delay_ms(1);
    ms--;
  }
}
</pre>]]></content:encoded> <wfw:commentRss>http://protofusion.org/wordpress/2010/10/the-osram-slg2016-and-avr/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Object Caching 449/449 objects using disk: basic
Content Delivery Network via Amazon Web Services: S3: pf-wordpress.s3.amazonaws.com

Served from: protofusion.org @ 2012-05-22 08:08:01 -->
