<?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>Scurvyrat &#187; Solar</title>
	<atom:link href="http://scurvyrat.com/category/solar/feed/" rel="self" type="application/rss+xml" />
	<link>http://scurvyrat.com</link>
	<description>Ramblings on the Digital Sea</description>
	<lastBuildDate>Wed, 07 Dec 2011 00:39:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Solar Thermal Tube testing</title>
		<link>http://scurvyrat.com/2011/09/15/solar-thermal-tube-testing/</link>
		<comments>http://scurvyrat.com/2011/09/15/solar-thermal-tube-testing/#comments</comments>
		<pubDate>Fri, 16 Sep 2011 05:46:02 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[Solar]]></category>

		<guid isPermaLink="false">http://www.scurvyrat.com/?p=239</guid>
		<description><![CDATA[I have 40 solar tubes on the roof of my house. I&#8217;ve always wondered how well each tube was functioning. I wrote a monitoring system built around Zigbee for my...]]></description>
			<content:encoded><![CDATA[<p>I have 40 solar tubes on the roof of my house. I&#8217;ve always wondered how well each tube was functioning. I wrote a monitoring system built around Zigbee for my company, <a href="http://www.bejouled.com">Bejouled</a>. I wanted to see if I could build an open-source monitor or even a full controller around the Arduino platform and the cheaper RF12B wireless modules.</p>
<p>I took one of the new Ruby v1.0b boards and connected it up to a simple PCB I made for one-wire devices. Actually, I connected to a stack of four of them. It looks like this:</p>
<p style="text-align: center;"><a href="http://www.scurvyrat.com/wp/wp-content/uploads/2011/09/sensor_all.png"><img class="aligncenter size-full wp-image-242" title="20 temp sensors" src="http://www.scurvyrat.com/wp/wp-content/uploads/2011/09/sensor_all.png" alt="" width="560" height="599" /></a></p>
<p style="text-align: left;">That is 20 DS18B20 temperature sensors with 2m of cabling connected up to 4 of my little one-wire bus PCBs.</p>
<p style="text-align: left;">The head unit looks like this:</p>
<p style="text-align: center;"><a href="http://www.scurvyrat.com/wp/wp-content/uploads/2011/09/temp_array.png"><img class="size-full wp-image-240" title="temp_array" src="http://www.scurvyrat.com/wp/wp-content/uploads/2011/09/temp_array.png" alt="" width="560" height="296" /></a></p>
<p style="text-align: left;">As you can see, it is a simple board that allows you to build a linear network of 1-wire devices. At each end are simple 0.1&#8243; pin holes to make spacers between the boards and to provide some rigidity when they are stacked as they are above. An interesting side note, I had a 4.7k resistor for the pull-up for the one-wire network. It worked fine for 10 sensors. When I stacked on the next 5, it didn&#8217;t work at all. As suggested <a href="http://www.scurvyrat.com/2011/05/20/reading-dallas-ds18b20s-from-the-jeenode/#comment-61">here</a>, I changed it to a 2k resistor and now all is good. Cleanly reads all 20 sensors, once per minute and sends the data to the net.</p>
<p style="text-align: left;">Incidentally, the DS18B20 chips are epoxied into a stainless steel hood to make them waterproof. They are sweet:</p>
<p style="text-align: center;"><a href="http://www.scurvyrat.com/wp/wp-content/uploads/2011/09/sensors.png"><img class="aligncenter size-full wp-image-241" title="sensors" src="http://www.scurvyrat.com/wp/wp-content/uploads/2011/09/sensors.png" alt="" width="560" height="559" /></a></p>
<p style="text-align: left;">I have tweaked my code and am now receiving all the data. I already knew that there was some variability between tubes, but it can be &gt; 10°F which was surprising. Here is an early graph of this afternoon.</p>
<p style="text-align: left;"><a href="http://www.scurvyrat.com/wp/wp-content/uploads/2011/09/Screen-shot-2011-09-15-at-10.43.41-PM.png"><img class="aligncenter size-full wp-image-243" title="Early graph of 20 Thermal Tubes" src="http://www.scurvyrat.com/wp/wp-content/uploads/2011/09/Screen-shot-2011-09-15-at-10.43.41-PM.png" alt="" width="627" height="413" /></a></p>
<p style="text-align: left;">Not too surprising, the first and last tube in the manifold get colder as they are near an opening in the manifold. When we get a nice sunny day, it will be interesting to track how the temperatures sync to the irradiance as well as to each other. Stay tuned&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://scurvyrat.com/2011/09/15/solar-thermal-tube-testing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Jeelabs Analog plug with the Apogee Pyranometer</title>
		<link>http://scurvyrat.com/2011/05/24/jeelabs-analogplug-with-the-apogee-pyranometer/</link>
		<comments>http://scurvyrat.com/2011/05/24/jeelabs-analogplug-with-the-apogee-pyranometer/#comments</comments>
		<pubDate>Tue, 24 May 2011 21:09:44 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[Digital]]></category>
		<category><![CDATA[Solar]]></category>
		<category><![CDATA[pyranometer]]></category>
		<category><![CDATA[solar]]></category>

		<guid isPermaLink="false">http://www.scurvyrat.com/wp/?p=42</guid>
		<description><![CDATA[The Jeelabs Analog Plug has the very cool MCP3424 4 channel 12-18 bit ADC. I&#8217;m going to connect it to the Apogee Pyranometer so I can can get a reading...]]></description>
			<content:encoded><![CDATA[<p>The Jeelabs Analog Plug has the very cool <a href="http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en536354" target="_blank">MCP3424</a> 4 channel 12-18 bit ADC. I&#8217;m going to connect it to the Apogee Pyranometer so I can can get a reading on the irradiance.</p>
<p>It looks like this:</p>
<div id="attachment_43" class="wp-caption alignnone" style="width: 310px"><a href="http://www.scurvyrat.com/wp/wp-content/uploads/2011/05/Screen-shot-2011-05-24-at-10.00.47-AM.png"><img class="size-medium wp-image-43" title="Apogee SP-110" src="http://www.scurvyrat.com/wp/wp-content/uploads/2011/05/Screen-shot-2011-05-24-at-10.00.47-AM-300x216.png" alt="" width="300" height="216" /></a><p class="wp-caption-text">Apogee SP-110</p></div>
<p>&nbsp;</p>
<p>and has 5m cable with three leads:</p>
<ul>
<li>Red: Positive from the Sensor</li>
<li>Black: Negative from the Sensor</li>
<li>Clear: GND</li>
</ul>
<p>The pyranometer SP-110 has an output of 0.20mV per W/m<sup>2</sup>. Full sunlight is 220mV (1100 W/m<sup>2</sup>).The full range is 0-350mV or 1.75 full sun. The SP-110 is self-powered. The ADC has an internal 2.048V V<sub>REF</sub> so no need to mess with A<sub>REF</sub>.</p>
<p>Since full sun output is 220mV if we multiplied it by 8x we would get a range of 0-1.76V which is below V<sub>REF</sub>. The ADC has a configuration register where we can set the sample bit depth as well as the gain. Check the datasheet for all the config options.</p>
<p>To setup channel 1, one-shot conversion, 18-bits, x8 gain the binary would be: 10001111 or 0x8F. One-short conversion puts the ADC into standby mode. Or for the same with continuous mode it would be 0x1F.</p>
<p>In 18-bit sample mode, the ADC returns 4 bytes. The first 3 are data bytes, the last is the configuration. In 12,14 or 16-bit modes, the ADC returns 2 data bytes and 1 config byte.</p>
<p>One-shot conversion allows the ADC to go to low-power mode between conversion requests. For a 18-bit conversion, the ADC will draw ~ 36μA per conversion as &lt; 1μA in standby (300nA). Doing 18-bit conversions continually draws about 138μA.</p>
<p>Using this little sketch I can get the desired output:</p>
<pre>#include &lt;Ports.h&gt;
#include &lt;RF12.h&gt;

PortI2C p4I2C(4);
DeviceI2C adc(p4I2C, 0x68); // 0x68 address for the Analog plug with the pads unsoldered

byte Config;
int ack;

void setup() {
 ack = 0;
 // Serial
 Serial.begin(57600);
 Serial.println("\n[Bejouled MCP3424 Pyranometer]");
 ack = adc.send();
 if(ack)
     Serial.println("Got Ack");
 //adc.write(0x8F); // channel 1, 18 bit, 8x gain, one-shot conversion
 adc.stop();
}

void loop() {
 long raw;

 ack = adc.send();
 if(ack) {
   // Start new conversion
   adc.write(0x8F);

   adc.receive(); // Sets R/W bit high
   raw = (long) adc.read(0) &lt;&lt; 16;
   raw |= (word) adc.read(0) &lt;&lt; 8;
   raw |= adc.read(0);
   Config = adc.read(0);
   //Serial.print("Config: ");
   //Serial.println(Config,HEX);  // Configuration
   while(Config != 0x0F) {  // Loop waiting for the conversion to be finished
     Config = adc.read(0);
   }
   adc.read(1); // last poll

   adc.receive(); // Sets R/W bit high
   long data = adc.read(0);
   raw = data1 &lt;&lt; 16;
   // check for negative values
   if(!data1) {
     raw |= (word) adc.read(0) &lt;&lt; 8;
     raw |= adc.read(0);
   } else {
     raw = 0;
   }
   Serial.print("  Raw: ");
   Serial.print(raw);
   adc.read(1);
   adc.stop();

   long ir = (raw/8)*5; // Remove the 8x gain and multiply by 5W/m2 per mV
   Serial.print(" Irradiance: ");
   Serial.print(ir);
   Serial.println("W/m2");
 }
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://scurvyrat.com/2011/05/24/jeelabs-analogplug-with-the-apogee-pyranometer/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

