<?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>Fiz-ix</title>
	<atom:link href="http://www.fiz-ix.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.fiz-ix.com</link>
	<description>(Physics)</description>
	<lastBuildDate>Sun, 19 Feb 2017 14:25:19 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.6.8</generator>
	<item>
		<title>Arduino on a Rocket</title>
		<link>http://www.fiz-ix.com/2017/02/arduino-on-a-rocket/</link>
					<comments>http://www.fiz-ix.com/2017/02/arduino-on-a-rocket/#respond</comments>
		
		<dc:creator><![CDATA[Jeff]]></dc:creator>
		<pubDate>Thu, 16 Feb 2017 23:00:47 +0000</pubDate>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Dynamics]]></category>
		<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Kinematics]]></category>
		<category><![CDATA[Labs]]></category>
		<category><![CDATA[Physics Labs]]></category>
		<category><![CDATA[Physics]]></category>
		<guid isPermaLink="false">http://www.fiz-ix.com/?p=1603</guid>

					<description><![CDATA[For the past few years, students in my first semester calculus physics laboratory have explored kinematics (and also a little dynamics) by building and launching model rockets. Working in groups, the students build Estes Big Bertha or Baby Bertha rockets from kits. Then, we travel to a local park to launch the rockets. The rockets<div class="more-link"><a href="http://www.fiz-ix.com/2017/02/arduino-on-a-rocket/">Read More</a></div>]]></description>
										<content:encoded><![CDATA[<p><a href="http://www.fiz-ix.com/wp-content/uploads/2017/02/studentswithrockets.jpg"><img loading="lazy" src="http://www.fiz-ix.com/wp-content/uploads/2017/02/studentswithrockets-1024x697.jpg" alt="studentswithrockets" width="1024" height="697" class="aligncenter size-large wp-image-1608" srcset="http://www.fiz-ix.com/wp-content/uploads/2017/02/studentswithrockets-1024x697.jpg 1024w, http://www.fiz-ix.com/wp-content/uploads/2017/02/studentswithrockets-300x204.jpg 300w, http://www.fiz-ix.com/wp-content/uploads/2017/02/studentswithrockets-768x523.jpg 768w, http://www.fiz-ix.com/wp-content/uploads/2017/02/studentswithrockets-352x240.jpg 352w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></p>
<p>For the past few years, students in my first semester calculus physics laboratory have explored kinematics (and also a little dynamics) by building and launching model rockets. Working in groups, the students build <a href="https://www.amazon.com/Estes-1948-Bertha-Flying-Rocket/dp/B0006NAMUO" target="_blank">Estes Big Bertha</a> or <a href="https://www.amazon.com/Estes-1261-Bertha-Flying-Rocket/dp/B0006MZTJO" target="_blank">Baby Bertha</a> rockets from kits. Then, we travel to a local park to launch the rockets. The rockets carry an Arduino-based payload that samples and records the rocket&#8217;s (approximately) vertical acceleration during the launch. This data is then analyzed back in the lab using kinematic equations of motion to estimate the rockets velocity and position during the launch.</p>
<p>Here is a picture of a rocket with its payload attached via a short string to the nose cone. The payload fits in a film canister (remember those), which is small enough to fit inside the rocket. The payload is only 20.7 g. In comparison, a standard Arduino Uno R3 is 26.6 g. All together, the payload, a Big Bertha rocket, and an Estes C6-5 engine is about 110 g. This is just under the recommended maximum lift-off mass for the C6-5 engine (113 g).</p>
<p><a href="http://www.fiz-ix.com/wp-content/uploads/2017/02/IMAG0531.jpg"><img loading="lazy" src="http://www.fiz-ix.com/wp-content/uploads/2017/02/IMAG0531-1024x699.jpg" alt="IMAG0531" width="1024" height="699" class="aligncenter size-large wp-image-1609" srcset="http://www.fiz-ix.com/wp-content/uploads/2017/02/IMAG0531-1024x699.jpg 1024w, http://www.fiz-ix.com/wp-content/uploads/2017/02/IMAG0531-300x205.jpg 300w, http://www.fiz-ix.com/wp-content/uploads/2017/02/IMAG0531-768x524.jpg 768w, http://www.fiz-ix.com/wp-content/uploads/2017/02/IMAG0531-352x240.jpg 352w, http://www.fiz-ix.com/wp-content/uploads/2017/02/IMAG0531.jpg 1995w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></p>
<p>The payload is composed of an <a href="https://www.sparkfun.com/products/11114" target="_blank">Arduino Pro Mini</a>, a <a href="https://www.sparkfun.com/products/10345" target="_blank">SparkFun LIS331</a> accelerometer breakout board, a <a href="https://www.sparkfun.com/products/13712" target="_blank">SparkFun OpenLog</a> data logger, a small <a href="https://www.sparkfun.com/products/13112" target="_blank">110 mAh LiPo Battery</a>, and a switch to activate the device. </p>
<p><a href="http://www.fiz-ix.com/wp-content/uploads/2017/02/IMAG0530.jpg"><img loading="lazy" src="http://www.fiz-ix.com/wp-content/uploads/2017/02/IMAG0530-1024x618.jpg" alt="IMAG0530" width="1024" height="618" class="aligncenter size-large wp-image-1610" srcset="http://www.fiz-ix.com/wp-content/uploads/2017/02/IMAG0530-1024x618.jpg 1024w, http://www.fiz-ix.com/wp-content/uploads/2017/02/IMAG0530-300x181.jpg 300w, http://www.fiz-ix.com/wp-content/uploads/2017/02/IMAG0530-768x463.jpg 768w, http://www.fiz-ix.com/wp-content/uploads/2017/02/IMAG0530-398x240.jpg 398w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></p>
<p>The payload is running an Arduino sketch that incorporates <a href="https://github.com/sparkfun/Triple_Axis_Accelerometer_Breakout-LIS331/tree/V_1.2" target="_blank">SparkFun code</a> for the LIS331 accelerometer. The sketch can be downloaded using <a href="http://www.fiz-ix.com/wp-content/uploads/2017/02/rocketPayloadSketch.zip" target="_blank">this link</a>. Approximately 30 second after the payload is activated by the switch, the sketch starts sampling and logging timestamped (approximately) vertical acceleration data to a microSD card every 20-25 ms. </p>
<p>Here are some pictures from launch days at the park. Spending late afternoons in late September and early October outdoors launching rockets is the best. We utilized either Estes C6-5 or B6-4 engines. Here are links to <a href="https://www.amazon.com/Estes-C6-5-Engines-Bulk-Pack/dp/B0006N6UIW" target="_blank">C6-5</a> and <a href="https://www.amazon.com/Estes-B6-4-Engines-Bulk-Pack/dp/B0006N6UJ6" target="_blank">B6-4</a> bulk engine packs that include ignitors and wadding.  </p>
<p><a href="http://www.fiz-ix.com/wp-content/uploads/2017/02/students.jpg"><img loading="lazy" src="http://www.fiz-ix.com/wp-content/uploads/2017/02/students-1024x678.jpg" alt="students" width="1024" height="678" class="aligncenter size-large wp-image-1620" srcset="http://www.fiz-ix.com/wp-content/uploads/2017/02/students-1024x678.jpg 1024w, http://www.fiz-ix.com/wp-content/uploads/2017/02/students-300x199.jpg 300w, http://www.fiz-ix.com/wp-content/uploads/2017/02/students-768x509.jpg 768w, http://www.fiz-ix.com/wp-content/uploads/2017/02/students-362x240.jpg 362w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></p>
<p>The rocket is prepared for launch by installing an engine, an igniter, flame retardant wadding, and the parachute. </p>
<p><a href="http://www.fiz-ix.com/wp-content/uploads/2017/02/launchprep.jpg"><img loading="lazy" src="http://www.fiz-ix.com/wp-content/uploads/2017/02/launchprep-935x1024.jpg" alt="launchprep" width="935" height="1024" class="aligncenter size-large wp-image-1618" srcset="http://www.fiz-ix.com/wp-content/uploads/2017/02/launchprep-935x1024.jpg 935w, http://www.fiz-ix.com/wp-content/uploads/2017/02/launchprep-274x300.jpg 274w, http://www.fiz-ix.com/wp-content/uploads/2017/02/launchprep-768x841.jpg 768w, http://www.fiz-ix.com/wp-content/uploads/2017/02/launchprep-219x240.jpg 219w" sizes="(max-width: 935px) 100vw, 935px" /></a></p>
<p>The nose cone is put in place after the payload is loaded. This happens after the rocket is put on the launch pad.</p>
<p><a href="http://www.fiz-ix.com/wp-content/uploads/2017/02/rocketonpad.jpg"><img loading="lazy" src="http://www.fiz-ix.com/wp-content/uploads/2017/02/rocketonpad-962x1024.jpg" alt="rocketonpad" width="962" height="1024" class="aligncenter size-large wp-image-1619" srcset="http://www.fiz-ix.com/wp-content/uploads/2017/02/rocketonpad-962x1024.jpg 962w, http://www.fiz-ix.com/wp-content/uploads/2017/02/rocketonpad-282x300.jpg 282w, http://www.fiz-ix.com/wp-content/uploads/2017/02/rocketonpad-768x818.jpg 768w, http://www.fiz-ix.com/wp-content/uploads/2017/02/rocketonpad-225x240.jpg 225w" sizes="(max-width: 962px) 100vw, 962px" /></a></p>
<p>You can see the payload next to the nose cone in this close up of the rocket after its parachute deployed. </p>
<p><a href="http://www.fiz-ix.com/wp-content/uploads/2017/02/Recovery.jpg"><img loading="lazy" src="http://www.fiz-ix.com/wp-content/uploads/2017/02/Recovery.jpg" alt="Recovery" width="271" height="421" class="aligncenter size-large wp-image-1621" srcset="http://www.fiz-ix.com/wp-content/uploads/2017/02/Recovery.jpg 271w, http://www.fiz-ix.com/wp-content/uploads/2017/02/Recovery-193x300.jpg 193w, http://www.fiz-ix.com/wp-content/uploads/2017/02/Recovery-154x240.jpg 154w" sizes="(max-width: 271px) 100vw, 271px" /></a></p>
<h3>Data Analysis</h3>
<p>The raw data stored on the microSD card after a launch is a time series of one-dimensional acceleration data. Students isolate and clean up the portion of the data set corresponding to the period of engine burn. The data is also scaled and shifted to convert from units of g&#8217;s to units of m/s<sup>2</sup>. Assuming the initial velocity (v<sub>0</sub>) and initial vertical position (y<sub>0</sub>) are zero and using the following definitions for average acceleration and average velocity, the acceleration time series is numerically integrated to yield velocity and potion. </p>
<p><a href="http://www.fiz-ix.com/wp-content/uploads/2017/02/acceleration.png"><img loading="lazy" src="http://www.fiz-ix.com/wp-content/uploads/2017/02/acceleration-300x209.png" alt="acceleration" width="300" height="209" class="aligncenter size-medium wp-image-1627" srcset="http://www.fiz-ix.com/wp-content/uploads/2017/02/acceleration-300x209.png 300w, http://www.fiz-ix.com/wp-content/uploads/2017/02/acceleration-345x240.png 345w, http://www.fiz-ix.com/wp-content/uploads/2017/02/acceleration.png 553w" sizes="(max-width: 300px) 100vw, 300px" /></a></p>
<p><a href="http://www.fiz-ix.com/wp-content/uploads/2017/02/velocity.png"><img loading="lazy" src="http://www.fiz-ix.com/wp-content/uploads/2017/02/velocity-300x214.png" alt="velocity" width="300" height="214" class="aligncenter size-medium wp-image-1628" srcset="http://www.fiz-ix.com/wp-content/uploads/2017/02/velocity-300x214.png 300w, http://www.fiz-ix.com/wp-content/uploads/2017/02/velocity-337x240.png 337w, http://www.fiz-ix.com/wp-content/uploads/2017/02/velocity.png 530w" sizes="(max-width: 300px) 100vw, 300px" /></a></p>
<p>When students do this, they are utilizing relationships between the kinematic quantities and the trapezoidal rule to numerically integrate, and they are also gaining experience with a real world data set which is discrete and somewhat messy. This is much better in my opinion than learning the calculus-based connections between acceleration, velocity, and position using the contrived polynomial descriptions of time-varying kinematic quantities often encountered in text books. </p>
<p>Below is an example data set from the launch of a Big Bertha with a C6-5 engine.</p>
<p><a href="http://www.fiz-ix.com/wp-content/uploads/2017/02/acceleration_graph.png"><img loading="lazy" src="http://www.fiz-ix.com/wp-content/uploads/2017/02/acceleration_graph.png" alt="acceleration_graph" width="645" height="468" class="aligncenter size-full wp-image-1633" srcset="http://www.fiz-ix.com/wp-content/uploads/2017/02/acceleration_graph.png 645w, http://www.fiz-ix.com/wp-content/uploads/2017/02/acceleration_graph-300x218.png 300w, http://www.fiz-ix.com/wp-content/uploads/2017/02/acceleration_graph-331x240.png 331w" sizes="(max-width: 645px) 100vw, 645px" /></a></p>
<p><a href="http://www.fiz-ix.com/wp-content/uploads/2017/02/velocity_graph.png"><img loading="lazy" src="http://www.fiz-ix.com/wp-content/uploads/2017/02/velocity_graph.png" alt="velocity_graph" width="689" height="468" class="aligncenter size-full wp-image-1632" srcset="http://www.fiz-ix.com/wp-content/uploads/2017/02/velocity_graph.png 689w, http://www.fiz-ix.com/wp-content/uploads/2017/02/velocity_graph-300x204.png 300w, http://www.fiz-ix.com/wp-content/uploads/2017/02/velocity_graph-353x240.png 353w" sizes="(max-width: 689px) 100vw, 689px" /></a></p>
<p><a href="http://www.fiz-ix.com/wp-content/uploads/2017/02/position_graph.png"><img loading="lazy" src="http://www.fiz-ix.com/wp-content/uploads/2017/02/position_graph.png" alt="position_graph" width="646" height="438" class="aligncenter size-full wp-image-1631" srcset="http://www.fiz-ix.com/wp-content/uploads/2017/02/position_graph.png 646w, http://www.fiz-ix.com/wp-content/uploads/2017/02/position_graph-300x203.png 300w, http://www.fiz-ix.com/wp-content/uploads/2017/02/position_graph-354x240.png 354w" sizes="(max-width: 646px) 100vw, 646px" /></a></p>
<p>Students can use this data to make estimates of the rocket&#8217;s velocity and height at engine cut-off. The slight decrease in acceleration and the slope of the velocity curve during the sustained burn phase of the launch is evidence of velocity-dependent drag.</p>
<p>Assuming the rocket&#8217;s mass is constant during the launch (its not, its a rocket), the acceleration can be used with Newton&#8217;s second law to find the net force on the rocket. Below is this estimated net force plus the launch weight plotted for the same data set above. In the absence of friction this is equal to the engine thrust. Also shown is the thrust curve for a C6-5 rocket measured using a Vernier force probe and a static ground-based test apparatus I made. </p>
<p><a href="http://www.fiz-ix.com/wp-content/uploads/2017/02/netforceplusweight.png"><img loading="lazy" src="http://www.fiz-ix.com/wp-content/uploads/2017/02/netforceplusweight.png" alt="netforceplusweight" width="718" height="539" class="aligncenter size-full wp-image-1648" srcset="http://www.fiz-ix.com/wp-content/uploads/2017/02/netforceplusweight.png 718w, http://www.fiz-ix.com/wp-content/uploads/2017/02/netforceplusweight-300x225.png 300w, http://www.fiz-ix.com/wp-content/uploads/2017/02/netforceplusweight-320x240.png 320w" sizes="(max-width: 718px) 100vw, 718px" /></a></p>
<p><a href="http://www.fiz-ix.com/wp-content/uploads/2017/02/trhustcurves.png"><img loading="lazy" src="http://www.fiz-ix.com/wp-content/uploads/2017/02/trhustcurves.png" alt="trhustcurves" width="745" height="539" class="aligncenter size-full wp-image-1639" srcset="http://www.fiz-ix.com/wp-content/uploads/2017/02/trhustcurves.png 745w, http://www.fiz-ix.com/wp-content/uploads/2017/02/trhustcurves-300x217.png 300w, http://www.fiz-ix.com/wp-content/uploads/2017/02/trhustcurves-332x240.png 332w" sizes="(max-width: 745px) 100vw, 745px" /></a></p>
<p>Notice that while there is good qualitative agreement between the two curves, there are notable differences. For one, the peak force is larger for the static thrust measurements. Why? Can the difference be attributed to drag? I doubt it. Also, the slight downward trend in the net force minus weight data is evidence that the drag increases as the velocity increases. The inset with the static thrust curve is a thrust curve for this engine provided by Estes. Notice that their peak thrust is larger than what we measured but the burn duration is shorter than what we measured. </p>
<p>Note that the total impulse of the engine can be calculated by numerically integrating the thrust curve. This can be compared to a value reported in the Estes documentation for this engine. </p>
<h3>One More Thing</h3>
<p>One interesting observation I made while reading student reports on this project this year is related to how students interpret &#8220;messy&#8221; data. Below are two quotes from two different student reports.</p>
<blockquote><p>… we noticed a large dip in the beginning of the [acceleration] graph, then it started accelerating. This could be due to a malfunction in the device that was measuring our data or it could be that the rocket stopped burning fuel for a moment, then started burning again.</p></blockquote>
<blockquote><p>Due to the unreliability of [the] &#8230; raw data, the accelerometer actually appears to fluctuate causing two separate peaks in thrust.</p></blockquote>
<p>Both of these statements show that students tend to think that &#8220;messy&#8221; data is due to some kind of malfunction instead of simply accepting that &#8220;messy&#8221; is part of reality. </p>
<p><a href="http://www.fiz-ix.com/wp-content/uploads/2017/02/IMAG0395.jpg"><img loading="lazy" src="http://www.fiz-ix.com/wp-content/uploads/2017/02/IMAG0395-1024x579.jpg" alt="IMAG0395" width="1024" height="579" class="aligncenter size-large wp-image-1643" srcset="http://www.fiz-ix.com/wp-content/uploads/2017/02/IMAG0395-1024x579.jpg 1024w, http://www.fiz-ix.com/wp-content/uploads/2017/02/IMAG0395-300x170.jpg 300w, http://www.fiz-ix.com/wp-content/uploads/2017/02/IMAG0395-768x434.jpg 768w, http://www.fiz-ix.com/wp-content/uploads/2017/02/IMAG0395-424x240.jpg 424w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></p>
<p><center><strong>THE END</strong></center></p>
]]></content:encoded>
					
					<wfw:commentRss>http://www.fiz-ix.com/2017/02/arduino-on-a-rocket/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Breadboard Wiring Diagram</title>
		<link>http://www.fiz-ix.com/2016/04/breadboard-wiring-diagram/</link>
					<comments>http://www.fiz-ix.com/2016/04/breadboard-wiring-diagram/#respond</comments>
		
		<dc:creator><![CDATA[Jeff]]></dc:creator>
		<pubDate>Thu, 07 Apr 2016 12:11:12 +0000</pubDate>
				<category><![CDATA[Basics]]></category>
		<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Guides]]></category>
		<guid isPermaLink="false">http://www.fiz-ix.com/?p=1526</guid>

					<description><![CDATA[]]></description>
										<content:encoded><![CDATA[<p><a href="http://www.fiz-ix.com/wp-content/uploads/2016/04/breadboardIllustration.png" rel="attachment wp-att-1527"><img loading="lazy" src="http://www.fiz-ix.com/wp-content/uploads/2016/04/breadboardIllustration-818x1024.png" alt="breadboardIllustration" width="818" height="1024" class="aligncenter size-large wp-image-1527" srcset="http://www.fiz-ix.com/wp-content/uploads/2016/04/breadboardIllustration-818x1024.png 818w, http://www.fiz-ix.com/wp-content/uploads/2016/04/breadboardIllustration-240x300.png 240w, http://www.fiz-ix.com/wp-content/uploads/2016/04/breadboardIllustration-768x962.png 768w, http://www.fiz-ix.com/wp-content/uploads/2016/04/breadboardIllustration.png 1083w" sizes="(max-width: 818px) 100vw, 818px" /></a></p>
]]></content:encoded>
					
					<wfw:commentRss>http://www.fiz-ix.com/2016/04/breadboard-wiring-diagram/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Heat Engines and Heat Pump Videos</title>
		<link>http://www.fiz-ix.com/2016/03/heat-engines-and-heat-pump-videos/</link>
					<comments>http://www.fiz-ix.com/2016/03/heat-engines-and-heat-pump-videos/#respond</comments>
		
		<dc:creator><![CDATA[Jeff]]></dc:creator>
		<pubDate>Mon, 07 Mar 2016 15:19:40 +0000</pubDate>
				<category><![CDATA[Energy]]></category>
		<category><![CDATA[Everyday Physics]]></category>
		<category><![CDATA[Notebooks]]></category>
		<category><![CDATA[Heat Engine]]></category>
		<guid isPermaLink="false">http://www.fiz-ix.com/?p=1522</guid>

					<description><![CDATA[The following animations are good videos showing animations of how heat engines and heat pumps work. The Otto Cycle and internal combustion engines. The Diesel engine. A split-system air-source heat pump.]]></description>
										<content:encoded><![CDATA[<p>The following animations are good videos showing animations of how heat engines and heat pumps work.</p>
<p>The Otto Cycle and internal combustion engines.<br />
<iframe width="560" height="315" src="https://www.youtube.com/embed/fNcZDrfT498" frameborder="0" allowfullscreen></iframe></p>
<p>The Diesel engine.<br />
<iframe width="560" height="315" src="https://www.youtube.com/embed/s2WGFELXPNg" frameborder="0" allowfullscreen></iframe></p>
<p>A split-system air-source heat pump.<br />
<iframe width="420" height="315" src="https://www.youtube.com/embed/14MmsNPtn6U" frameborder="0" allowfullscreen></iframe></p>
]]></content:encoded>
					
					<wfw:commentRss>http://www.fiz-ix.com/2016/03/heat-engines-and-heat-pump-videos/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Brownian Motion Javascript Simulations</title>
		<link>http://www.fiz-ix.com/2014/01/brownian-motion-javascript-simulations/</link>
					<comments>http://www.fiz-ix.com/2014/01/brownian-motion-javascript-simulations/#respond</comments>
		
		<dc:creator><![CDATA[Jeff]]></dc:creator>
		<pubDate>Mon, 27 Jan 2014 14:57:39 +0000</pubDate>
				<category><![CDATA[Labs]]></category>
		<category><![CDATA[Physics Labs]]></category>
		<category><![CDATA[Physics]]></category>
		<guid isPermaLink="false">http://www.fiz-ix.com/?p=1498</guid>

					<description><![CDATA[In order to run the following simulations you need a web browser capable of running javascript and of interpreting HTML5. Brownian Particle Simulation in 2D A Simulated Time-Lapse Video of Brownian Particles in 2D]]></description>
										<content:encoded><![CDATA[<p>In order to run the following simulations you need a web browser capable of running javascript and of interpreting HTML5. </p>
<p><a href="http://www.fiz-ix.com/wp-content/uploads/2014/01/brownianParticles2DPeriodicBoundaries.html">Brownian Particle Simulation in 2D</a></p>
<p><a href="http://www.fiz-ix.com/wp-content/uploads/2014/01/brownianParticles2DWithDXOutput.html">A Simulated Time-Lapse Video of Brownian Particles in 2D</a></p>
]]></content:encoded>
					
					<wfw:commentRss>http://www.fiz-ix.com/2014/01/brownian-motion-javascript-simulations/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Making a PDF of a Microsoft Word Document</title>
		<link>http://www.fiz-ix.com/2014/01/making-a-pdf-of-a-microsoft-word-document/</link>
					<comments>http://www.fiz-ix.com/2014/01/making-a-pdf-of-a-microsoft-word-document/#respond</comments>
		
		<dc:creator><![CDATA[Jeff]]></dc:creator>
		<pubDate>Tue, 14 Jan 2014 15:26:41 +0000</pubDate>
				<category><![CDATA[Guides]]></category>
		<category><![CDATA[Microsoft Office]]></category>
		<guid isPermaLink="false">http://www.fiz-ix.com/?p=1492</guid>

					<description><![CDATA[Mac OS X Select File &#62; Print … Click PDF &#62; Save as PDF … Specify Save Location and Click Save Windows Click the Office Button Select Save As Select PDF or XPS Select Save Location and Save as Type &#62; PDF and Click Publish]]></description>
										<content:encoded><![CDATA[<h3>Mac OS X</h3>
<p>Select File &gt; Print …<br />
Click PDF &gt; Save as PDF …<br />
Specify Save Location and Click Save</p>
<h3>Windows</h3>
<p>Click the Office Button<br />
Select Save As<br />
Select PDF or XPS<br />
Select Save Location and Save as Type &gt; PDF and Click Publish </p>
<p></p>
]]></content:encoded>
					
					<wfw:commentRss>http://www.fiz-ix.com/2014/01/making-a-pdf-of-a-microsoft-word-document/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Simple Electret Microphone and Band-Pass Amplifier Circuit</title>
		<link>http://www.fiz-ix.com/2013/04/simple-electret-microphone-and-band-pass-amplifier-circuit/</link>
					<comments>http://www.fiz-ix.com/2013/04/simple-electret-microphone-and-band-pass-amplifier-circuit/#comments</comments>
		
		<dc:creator><![CDATA[Jeff]]></dc:creator>
		<pubDate>Sun, 07 Apr 2013 18:24:56 +0000</pubDate>
				<category><![CDATA[Basics]]></category>
		<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Guides]]></category>
		<guid isPermaLink="false">http://www.fiz-ix.com/?p=1464</guid>

					<description><![CDATA[If you are working on a project that responds to sounds, your circuit will require some type of microphone to transduce the sound into a modulated voltage and, most likely, some type of amplification of this modulated voltage. I like to use electret microphones to transduce sound because they require relatively simple circuits. For example,<div class="more-link"><a href="http://www.fiz-ix.com/2013/04/simple-electret-microphone-and-band-pass-amplifier-circuit/">Read More</a></div>]]></description>
										<content:encoded><![CDATA[<p>If you are working on a project that responds to sounds, your circuit will require some type of microphone to transduce the sound into a modulated voltage and, most likely, some type of amplification of this modulated voltage. I like to use electret microphones to transduce sound because they require relatively simple circuits. For example, the circuit below passes the output of an electret microphone (hooked up according to its datasheet) through a band-pass amplifier based on an LM358 operational amplifier. This circuit is suitable for a 5-V system. The op-amp circuit has both a high-pass portion (R1 and C1) and a low-pass portion (R2 and C2). Thus, the circuit attenuates frequencies below f = 1/(2&#960;R1C1) = 5.9 Hz and frequencies above f = 1/(2&#960;R2C2) = 15915 Hz. The op-amp acts like an inverting amplifier with a gain of -R2/R1=37. The voltage divider (R4 and R5) is used to give the output about a 1.6 V DC offset. This allows both the positive and negative portions of the input to be amplified and present in the output. After building this circuit, I discovered a very similar circuit is implemented by <a href="https://www.sparkfun.com/products/9964" title="electret breakout board" target="_blank">SparkFun&#8217;s electret microphone breakout board</a> but different resistor and capacitor values are used yielding a different gain and different band-pass characteristics, a different op amp is used, and a capacitor is placed in parallel with R4 presumably to stabilize the voltage to the non-inverting input of the op-amp. This additional capacitor may be a good idea, but I actually think my circuit is superior in that the voltage divider introduces a smaller DC offset that more closely matches the midpoint of the op-amp&#8217;s dynamic range when powered by 5 volts. Just my opinion.</p>
<p><a href="http://www.fiz-ix.com/wp-content/uploads/2013/04/MicAndAmp.png"><img loading="lazy" src="http://www.fiz-ix.com/wp-content/uploads/2013/04/MicAndAmp.png" alt="" title="MicAndAmp" width="500" height="269" class="aligncenter size-full wp-image-1465" srcset="http://www.fiz-ix.com/wp-content/uploads/2013/04/MicAndAmp.png 500w, http://www.fiz-ix.com/wp-content/uploads/2013/04/MicAndAmp-300x161.png 300w" sizes="(max-width: 500px) 100vw, 500px" /></a></p>
]]></content:encoded>
					
					<wfw:commentRss>http://www.fiz-ix.com/2013/04/simple-electret-microphone-and-band-pass-amplifier-circuit/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>IR Photodiode Circuit Schematic</title>
		<link>http://www.fiz-ix.com/2013/04/ir-photodiode-circuit-schematic/</link>
					<comments>http://www.fiz-ix.com/2013/04/ir-photodiode-circuit-schematic/#comments</comments>
		
		<dc:creator><![CDATA[Jeff]]></dc:creator>
		<pubDate>Thu, 04 Apr 2013 17:40:08 +0000</pubDate>
				<category><![CDATA[Basics]]></category>
		<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Guides]]></category>
		<guid isPermaLink="false">http://www.fiz-ix.com/?p=1458</guid>

					<description><![CDATA[The following schematic demonstrates a simple infrared (IR) photodiode circuit using a analog-to-digital converter (ADC) to monitor the photodiode. An analog pin on an Arduino used with the analogRead() function will do the job. Photodiodes are two-pin analog devices. This makes them relatively easy to use and makes their output graded. Some of my students<div class="more-link"><a href="http://www.fiz-ix.com/2013/04/ir-photodiode-circuit-schematic/">Read More</a></div>]]></description>
										<content:encoded><![CDATA[<p>The following schematic demonstrates a simple infrared (IR) photodiode circuit using a analog-to-digital converter (ADC) to monitor the photodiode. An analog pin on an Arduino used with the analogRead() function will do the job. Photodiodes are two-pin analog devices. This makes them relatively easy to use and makes their output graded. Some of my students are using one in a project along with an IR LED as an IR absorption meter. On the other hand, their output is relatively weak so they can&#8217;t detect extremely small or distant IR signals. Notice that the photodiode is reverse biased. Thus, when no light is present, no current flows through the diode and the 1 megaohm pull-up resistor ensures that the ADC monitoring the photodiode reads 5 V. When light, in this case IR light, strikes the photodiode, electron-hole pairs are created in the semiconductor which creates a small current causing the voltage at the ADC pin to drop. So the lower the voltage read by the ADC, the more IR light is being received. </p>
<p><a href="http://www.fiz-ix.com/wp-content/uploads/2013/04/IRPhotodiode.png"><img loading="lazy" src="http://www.fiz-ix.com/wp-content/uploads/2013/04/IRPhotodiode.png" alt="" title="IRPhotodiode" width="390" height="319" class="aligncenter size-full wp-image-1459" srcset="http://www.fiz-ix.com/wp-content/uploads/2013/04/IRPhotodiode.png 390w, http://www.fiz-ix.com/wp-content/uploads/2013/04/IRPhotodiode-300x245.png 300w" sizes="(max-width: 390px) 100vw, 390px" /></a></p>
]]></content:encoded>
					
					<wfw:commentRss>http://www.fiz-ix.com/2013/04/ir-photodiode-circuit-schematic/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Direct Control of Arduino Uno Digital Input/Output Pins Using Port Registers</title>
		<link>http://www.fiz-ix.com/2013/02/direct-control-of-arduino-uno-digital-inputoutput-pins-using-port-registers/</link>
					<comments>http://www.fiz-ix.com/2013/02/direct-control-of-arduino-uno-digital-inputoutput-pins-using-port-registers/#comments</comments>
		
		<dc:creator><![CDATA[Jeff]]></dc:creator>
		<pubDate>Thu, 14 Feb 2013 19:33:25 +0000</pubDate>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Guides]]></category>
		<guid isPermaLink="false">http://www.fiz-ix.com/?p=1433</guid>

					<description><![CDATA[The ATmega328 has a total of three input/output ports, port B, port C, and port D. Two of these ports, namely port B and port D, are associated with the 14 digital input/output pins on the Arduino Uno. Port C is associated with the analog input pins which can also be used as digital input/output<div class="more-link"><a href="http://www.fiz-ix.com/2013/02/direct-control-of-arduino-uno-digital-inputoutput-pins-using-port-registers/">Read More</a></div>]]></description>
										<content:encoded><![CDATA[<p>The ATmega328 has a total of three input/output ports, port B, port C, and port D. Two of these ports, namely port B and port D, are associated with the 14 digital input/output pins on the Arduino Uno. Port C is associated with the analog input pins which can also be used as digital input/output pins if needed. The following table summarizes the mapping between the Arduino Uno digital pins and the ATmega328 port pins.</p>
<p><center></p>
<table border="1" bordercolor="#000000" style="background-color:#FFFFFF" width="200" cellpadding="2" cellspacing="0">
<tr>
<td>Arduino Digital Pin</td>
<td>Port Pin</td>
</tr>
<tr>
<td>0</td>
<td>PD0</td>
</tr>
<tr>
<td>1</td>
<td>PD1</td>
</tr>
<tr>
<td>2</td>
<td>PD2</td>
</tr>
<tr>
<td>3</td>
<td>PD3</td>
</tr>
<tr>
<td>4</td>
<td>PD4</td>
</tr>
<tr>
<td>5</td>
<td>PD5</td>
</tr>
<tr>
<td>6</td>
<td>PD6</td>
</tr>
<tr>
<td>7</td>
<td>PD7</td>
</tr>
<tr>
<td>8</td>
<td>PB0</td>
</tr>
<tr>
<td>9</td>
<td>PB1</td>
</tr>
<tr>
<td>10</td>
<td>PB2</td>
</tr>
<tr>
<td>11</td>
<td>PB3</td>
</tr>
<tr>
<td>12</td>
<td>PB4</td>
</tr>
<tr>
<td>13</td>
<td>PB5</td>
</tr>
</table>
<p></center><br />
&nbsp;</p>
<p>To turn on or off a Arduino digital pin, its mode is first set using <code>pinMode()</code> and then its state is set using <code>digitalWrite()</code>. For example, to turn on digital pin 5 for one second then turn if off for one second repeatedly, the following code could be used.</p>
<pre><code>
int myPin = 5;
void setup() {
   pinMode(myPin,OUTPUT);
}
void loop() {
   digitalWrite(myPin,HIGH);
   delay(1000);
   digitalWrite(myPin,LOW);
   delay(1000);
}</code></pre>
<p>It is also possible to control the digital pins by accessing the port registers directly. For example, the following achieves the same result as the above code. It is explained below.</p>
<pre><code>
void setup() {
   DDRD = DDRD | B00100000; 
}
void loop() {
   PORTD = PORTD | B00100000;
   delay(1000);
   PORTD = PORTD & B11011111;
   delay(1000);
}</code></pre>
<p>Each port has a one byte register defining the direction of the associated pins. This register is called DDRD for port D and DDRB for port B. From zero to seven, each bit in this register corresponds to the comparably numbered pin of that port. For example, the fifth bit of DDRD controls port pin D5 or Arduino digital pin 5. If this bit is set to zero, the pin is an input. If this bit is set to one, the pin is an output pin. Thus, the line of code in the setup function above sets Arduino digital pin 5 to an output pin using a bitwise or operator. Each port also has a one byte register defining the state of the associated pins. This register is called PORTD for port D and PORTB for port B. Just like the DDRx registers, each bit in these registers from zero to seven corresponds to the comparably numbered pin of that port. For example, the fifth bit of PORTD controls the state of pin D5 or Arduino digital pin 5. If this bit is set to zero, the pin is set to 0 V. If this bit is set to one, the pin is set to 5 V (on the Arduino Uno). Thus the lines of code in the loop function above first turns on Arduino digital pin 5 using a bitwise or and then turns this pin off using a bitwise and.</p>
<p>Controlling digital i/o pins at the register level is incredibly powerful. For example, you could turn all 8 pins of port D using a single line of code if you wanted to. However, with great power comes great responsibility. Manipulating registers can be tricky and may yield unexpected results. For example, buried in the ATmega328 data sheet is a warning that one can not change a pin from the high impedance input off state to the output on state in one step. You must first go to an intermediate state of output low or input high before going to output high. </p>
]]></content:encoded>
					
					<wfw:commentRss>http://www.fiz-ix.com/2013/02/direct-control-of-arduino-uno-digital-inputoutput-pins-using-port-registers/feed/</wfw:commentRss>
			<slash:comments>8</slash:comments>
		
		
			</item>
		<item>
		<title>Introduction to Arduino Serial Communication</title>
		<link>http://www.fiz-ix.com/2013/02/introduction-to-arduino-serial-communication/</link>
					<comments>http://www.fiz-ix.com/2013/02/introduction-to-arduino-serial-communication/#comments</comments>
		
		<dc:creator><![CDATA[Jeff]]></dc:creator>
		<pubDate>Wed, 13 Feb 2013 00:36:47 +0000</pubDate>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Guides]]></category>
		<guid isPermaLink="false">http://www.fiz-ix.com/?p=1427</guid>

					<description><![CDATA[Serial communication is a method for two computers or microcontrollers (or one computer and a microcontroller) to talk to one another. Arduino uses the transistor-transistor logic (TTL) serial protocol. This protocol sends bits using voltages of zero (for a zero bit) and five (for a one bit). Another popular serial protocol is RS-232 which uses<div class="more-link"><a href="http://www.fiz-ix.com/2013/02/introduction-to-arduino-serial-communication/">Read More</a></div>]]></description>
										<content:encoded><![CDATA[<p>Serial communication is a method for two computers or microcontrollers (or one computer and a microcontroller) to talk to one another. Arduino uses the transistor-transistor logic (TTL) serial protocol. This protocol sends bits using voltages of zero (for a zero bit) and five (for a one bit). Another popular serial protocol is RS-232 which uses +13 V to represent zeros and -13 V to represent ones. In both cases, serial communication involves sending bytes one bit at a time starting with the least significant bit (LSB). Each bit is preceded by a start bit (0 V for TTL serial communication) and immediately followed by a stop bit (5 V for TTL serial communication). Therefore, the figure below shows the signals that would be generated if the bytes 11011001 (top) and 00010010 (bottom) where sent via a serial channel. </p>
<p><a href="http://www.fiz-ix.com/wp-content/uploads/2013/02/SerialCommunication.png"><img loading="lazy" src="http://www.fiz-ix.com/wp-content/uploads/2013/02/SerialCommunication-300x164.png" alt="" title="SerialCommunication" width="300" height="164" class="aligncenter size-medium wp-image-1428" srcset="http://www.fiz-ix.com/wp-content/uploads/2013/02/SerialCommunication-300x164.png 300w, http://www.fiz-ix.com/wp-content/uploads/2013/02/SerialCommunication-1024x562.png 1024w, http://www.fiz-ix.com/wp-content/uploads/2013/02/SerialCommunication.png 1330w" sizes="(max-width: 300px) 100vw, 300px" /></a><br />
<strong>The figure above incorrectly shows the stop bit as 0V (low). It should be 5V (high).</strong></p>
<p>In order for two devices to communicate via a serial signal, both must be configured with the same baud rate or bits per second (bps) rate. This tells both machines the interval of time between individual bits so they can synchronize. The most common baud rate for Arduino is 9600. In fact, this is the default baud rate when a new serial monitor is opened from the Arduino IDE. Other baud rates are sometimes necessary. For example, communication with GPS modules often uses a baud rate of 4800.</p>
<p>The following sketch demonstrates serial communication between an Arduino Uno and a the serial monitor on a computer. When a character is sent to the Arduino from the serial monitor on a computer, the Arduino reads this byte and immediately will send it back. The <code>Serial.begin()</code>, <code>Serial.available()</code>, <code>Serial.read()</code>, <code>Serial.print()</code>, and <code>Serial.write()</code> commands are used to start serial communication, test to see if any bytes are available in the serial buffer, read in the next byte in the serial buffer, print a decimal number to the serial monitor, and print the ASCII character corresponding to this decimal number, respectively. The comments in the code should help you figure out what each component does.</p>
<pre><code>// Program Name: Serial Echo

// note: serial bytes are read as ASCII 
// (American Standard Code for Information Interchange) 
// characters

byte myByte; // a variable to store a byte read from the serial 
// buffer

void setup() {
  Serial.begin(9600); // begin serial communications at 9600 bps
}

void loop() {
 if (Serial.available()&gt;0) {
  while(Serial.available()&gt;0){ // while bytes remain in the serial 
  // buffer
  myByte = Serial.read(); // read in the current byte
  // = is ASCII character 61
  // 0-9 are ASCII characters 48 to 57
  // - is ASCII character 45
  // + is ASCII character 43
  }
  Serial.print("ASCII Character Value of Byte Read: \n");
  Serial.write(myByte);
  Serial.print('\n');
  Serial.print("ASCII Decimal Value of Byte Read: \n");
  Serial.print(myByte); // prints ASCII character corresponding 
  // to myByte
  Serial.print('\n');
 }
}</code></pre>
<p>One important concept to understand is that serial information is sent out of and read into the Arduino one byte at a time. Moreover, each byte that is read into memory corresponds to the decimal ASCII encoding for the ASCII character being received. So, if the character <code>A</code> is sent, the value stored in <code>myByte</code> would be <code>65</code> since this is the decimal code for the ASCII character <code>A</code>. For more on ASCII characters and serial communications see <a href="http://www.fiz-ix.com/2012/11/arduino-serial-communication-bytes-bases-and-ascii-characters/" target="_blank">this post</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>http://www.fiz-ix.com/2013/02/introduction-to-arduino-serial-communication/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
		<item>
		<title>Controlling Common-Cathode RGB LEDs with Arduino</title>
		<link>http://www.fiz-ix.com/2013/02/controlling-common-cathode-rgb-leds-with-arduino/</link>
					<comments>http://www.fiz-ix.com/2013/02/controlling-common-cathode-rgb-leds-with-arduino/#respond</comments>
		
		<dc:creator><![CDATA[Jeff]]></dc:creator>
		<pubDate>Fri, 08 Feb 2013 15:02:51 +0000</pubDate>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Guides]]></category>
		<guid isPermaLink="false">http://www.fiz-ix.com/?p=1416</guid>

					<description><![CDATA[A common-cathode RGB LED has a total of four pins. One of the pins is the cathode which must be connected to ground and the others each control a color. The pinout shown below is for a typical RGB LED. Notice that each of the pins is a slightly different length; the cathode is the<div class="more-link"><a href="http://www.fiz-ix.com/2013/02/controlling-common-cathode-rgb-leds-with-arduino/">Read More</a></div>]]></description>
										<content:encoded><![CDATA[<p>A common-cathode RGB LED has a total of four pins. One of the pins is the cathode which must be connected to ground and the others each control a color. The pinout shown below is for a typical RGB LED. Notice that each of the pins is a slightly different length; the cathode is the longest. </p>
<p><a href="http://www.fiz-ix.com/wp-content/uploads/2013/02/Screen-shot-2013-02-08-at-9.53.07-AM.png"><img loading="lazy" src="http://www.fiz-ix.com/wp-content/uploads/2013/02/Screen-shot-2013-02-08-at-9.53.07-AM-300x252.png" alt="" title="RGBLED" width="300" height="252" class="aligncenter size-medium wp-image-1417" srcset="http://www.fiz-ix.com/wp-content/uploads/2013/02/Screen-shot-2013-02-08-at-9.53.07-AM-300x252.png 300w, http://www.fiz-ix.com/wp-content/uploads/2013/02/Screen-shot-2013-02-08-at-9.53.07-AM.png 765w" sizes="(max-width: 300px) 100vw, 300px" /></a></p>
<p>Since there are three colors, controlling a common-cathode RGB LED with an Arduino requires three digital output pins (and three <a href="http://www.fiz-ix.com/2012/05/the-voltage-divider-circuit-and-led-current-limiting/" target="_blank">current limiting resistors</a>). You could turn these pins off and on one at a time using <code>digitalWrite()</code> commands. You could also use a byte (of which one bit controls each of the colors so five bits would be unused) and a bit-mask. See <a href="http://www.fiz-ix.com/2013/02/using-bytes-and-bitmasks-to-control-multiple-arduino-digital-outputs/" target="_blank">this post</a> for more details. This would result in more compact code. </p>
<p>When lights of different colors are combined, new colors result. But unlike pigment mixing, which is subtractive color mixing, light mixing results in additive color mixing. Red and green makes yellow, red and blue makes magenta, and green and blue makes cyan. If red, green, and blue are simultaneously turned on, white light is produced. In order to obtain more fine grained control over the color produced by an RGB LED, you can use PWM and <code>analogWrite()</code> (see <a href="http://www.fiz-ix.com/2012/11/using-pulse-width-modification-to-simulate-analog-outputs-with-digital-signals/" target="_blank">this post</a> for more details).</p>
]]></content:encoded>
					
					<wfw:commentRss>http://www.fiz-ix.com/2013/02/controlling-common-cathode-rgb-leds-with-arduino/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Using A Mechanical Relay to Switch Large AC or DC Currents with a Small DC Current</title>
		<link>http://www.fiz-ix.com/2013/02/using-a-mechanical-relay-to-switch-large-ac-or-dc-currents-with-a-small-dc-current/</link>
					<comments>http://www.fiz-ix.com/2013/02/using-a-mechanical-relay-to-switch-large-ac-or-dc-currents-with-a-small-dc-current/#respond</comments>
		
		<dc:creator><![CDATA[Jeff]]></dc:creator>
		<pubDate>Thu, 07 Feb 2013 18:57:06 +0000</pubDate>
				<category><![CDATA[Basics]]></category>
		<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Guides]]></category>
		<guid isPermaLink="false">http://www.fiz-ix.com/?p=1406</guid>

					<description><![CDATA[Let&#8217;s say you are working on a project that requires you to turn on an appliance plugged into a household main (115-ish V AC) using an Arduino (3.3-5 V DC). What would you use as a switch. For some applications you can use a bipolar junction transistor as a switch (see this post). However, such<div class="more-link"><a href="http://www.fiz-ix.com/2013/02/using-a-mechanical-relay-to-switch-large-ac-or-dc-currents-with-a-small-dc-current/">Read More</a></div>]]></description>
										<content:encoded><![CDATA[<p>Let&#8217;s say you are working on a project that requires you to turn on an appliance plugged into a household main (115-ish V AC) using an Arduino (3.3-5 V DC). What would you use as a switch. For some applications you can use a bipolar junction transistor as a switch (see <a href="http://www.fiz-ix.com/2012/11/how-to-use-an-npn-transistor-as-a-switch/" title="NPNSwitch" target="_blank">this post</a>). However, such applications require that both the circuit controlling the switch and the circuit being switch have the same common ground. When the circuit doing the switching and the circuit being switched are at vastly different voltages and will carry vastly different currents a better solution is a mechanical relay. Relays have a small electromagnet that when supplied with a small DC current closes a switch through which a much larger DC or AC current can flow. The switch closing is accompanied by a satisfying clicking noise. The picture below is a typical relay. This one is manufactured by OMRON and has 5 pins. The pinout is also shown. </p>
<p><a href="http://www.fiz-ix.com/wp-content/uploads/2013/02/Screen-shot-2013-02-07-at-1.45.32-PM.png"><img loading="lazy" src="http://www.fiz-ix.com/wp-content/uploads/2013/02/Screen-shot-2013-02-07-at-1.45.32-PM-300x224.png" alt="" title="Screen shot 2013-02-07 at 1.45.32 PM" width="300" height="224" class="aligncenter size-medium wp-image-1408" srcset="http://www.fiz-ix.com/wp-content/uploads/2013/02/Screen-shot-2013-02-07-at-1.45.32-PM-300x224.png 300w, http://www.fiz-ix.com/wp-content/uploads/2013/02/Screen-shot-2013-02-07-at-1.45.32-PM.png 439w" sizes="(max-width: 300px) 100vw, 300px" /></a></p>
<p><a href="http://www.fiz-ix.com/wp-content/uploads/2013/02/Screen-shot-2013-02-07-at-1.45.46-PM.png"><img loading="lazy" src="http://www.fiz-ix.com/wp-content/uploads/2013/02/Screen-shot-2013-02-07-at-1.45.46-PM-296x300.png" alt="" title="Screen shot 2013-02-07 at 1.45.46 PM" width="296" height="300" class="aligncenter size-medium wp-image-1409" srcset="http://www.fiz-ix.com/wp-content/uploads/2013/02/Screen-shot-2013-02-07-at-1.45.46-PM-296x300.png 296w, http://www.fiz-ix.com/wp-content/uploads/2013/02/Screen-shot-2013-02-07-at-1.45.46-PM.png 318w" sizes="(max-width: 296px) 100vw, 296px" /></a></p>
<p>This particular relay is a single pole, double throw (SPDT) switch. If you were controlling a switch like this with an Arduino you would hook an Arduino digital pin up to pin 2 (or pin 5) then hook pin 5 (or pin 2) up to ground. Then setting the Arduino digital pin high will throw the switch. The device being switched should be hooked up across pins 1 and 3. Notice that a SPDT switch connects pins 1 and 4 when no current is supplied across pins 2 and 5. A single pole, single throw (SPST) switch like the one shown below (also made by OMRON) lacks this alternative path. An SPST switch will be specified to be normally open (NO) or normally closed (NC). This particular relay is normally open. </p>
<p><a href="http://www.fiz-ix.com/wp-content/uploads/2013/02/Screen-shot-2013-02-07-at-1.45.56-PM.png"><img loading="lazy" src="http://www.fiz-ix.com/wp-content/uploads/2013/02/Screen-shot-2013-02-07-at-1.45.56-PM-284x300.png" alt="" title="Screen shot 2013-02-07 at 1.45.56 PM" width="284" height="300" class="aligncenter size-medium wp-image-1410" srcset="http://www.fiz-ix.com/wp-content/uploads/2013/02/Screen-shot-2013-02-07-at-1.45.56-PM-284x300.png 284w, http://www.fiz-ix.com/wp-content/uploads/2013/02/Screen-shot-2013-02-07-at-1.45.56-PM.png 320w" sizes="(max-width: 284px) 100vw, 284px" /></a></p>
]]></content:encoded>
					
					<wfw:commentRss>http://www.fiz-ix.com/2013/02/using-a-mechanical-relay-to-switch-large-ac-or-dc-currents-with-a-small-dc-current/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Using Bytes and Bitmasks to Control Multiple Arduino Digital Outputs</title>
		<link>http://www.fiz-ix.com/2013/02/using-bytes-and-bitmasks-to-control-multiple-arduino-digital-outputs/</link>
					<comments>http://www.fiz-ix.com/2013/02/using-bytes-and-bitmasks-to-control-multiple-arduino-digital-outputs/#respond</comments>
		
		<dc:creator><![CDATA[Jeff]]></dc:creator>
		<pubDate>Tue, 05 Feb 2013 01:28:13 +0000</pubDate>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Guides]]></category>
		<category><![CDATA[Ardunio]]></category>
		<guid isPermaLink="false">http://www.fiz-ix.com/?p=1394</guid>

					<description><![CDATA[A fine way to compactly control multiple Arduino digital output pins is to use a byte in conjunction with a bitmap. The byte provides the structure (eight bits) to compactly specify which digital pins are turned on and which are turned off. Let&#8217;s consider an example. Suppose you have eight digital output pins to control,<div class="more-link"><a href="http://www.fiz-ix.com/2013/02/using-bytes-and-bitmasks-to-control-multiple-arduino-digital-outputs/">Read More</a></div>]]></description>
										<content:encoded><![CDATA[<p>A fine way to compactly control multiple Arduino digital output pins is to use a byte in conjunction with a bitmap. The byte provides the structure (eight bits) to compactly specify which digital pins are turned on and which are turned off. Let&#8217;s consider an example. Suppose you have eight digital output pins to control, Arduiono pins 2, 3, 4, 5, 6, 7, 8, and 9 for example. More specifically, let&#8217;s say you want pins 2, 3, 5, and 8 to be turned on (high) and pins 4, 6, 7, and 9 to be turned off (low). The following code will accomplish this.</p>
<pre><code>int myPins[] = {2, 3, 4, 5, 6, 7, 8, 9};
int onPins = B11010010; 

void setup() {
   for (int ii = 0; ii <= 7; ii++) {
      pinMode(myPins[ii],OUTPUT);
      digitalWrite(myPins[ii],LOW);
   }
}

void loop() {
   for (int ii = 0; ii <= 7; ii++) {
      if (onPins &#038; (B10000000 >> ii)) {
         digitalWrite(myPins[ii],HIGH);
      }
      else {
         digitalWrite(myPins[ii],LOW);
      }
   }
}</code></pre>
<p>The <code>B10000000 >> ii</code> portion of the code uses a right bit shift operator to shift each bit in <code>B10000000</code> exactly <code>ii</code> places to the right. For each rightward shift, the least significant bit falls off and the most significant bit is replaced by a zero. For example <code>B10000000 >> 4</code> would yield <code>B00001000</code>.</p>
<p>The conditional part of the <code>if</code> statement uses the bitwise <code>AND</code> compare. Each bit of the byte contained by <code>onPins</code> is compared to the corresponding bit of the byte resulting after the bit shift operator (what is often referred to as the bitmask). If any of the bitwise compares evaluates true then the entire <code>if</code> statement evaluates true and the <code>if</code> statement code is executed. If none of the bitwise compares evaluate true then the <code>if</code> statement evaluates false and the code in the <code>else</code> statement is executed. </p>
<p>Note that the result of the bitmask is to turn on all of the pins corresponding to the <code>1</code>s in <code>onPins</code> and turn off all the other pins.</p>
<p>I hope you found this quick tutorial helpful. Happy programming. </p>
]]></content:encoded>
					
					<wfw:commentRss>http://www.fiz-ix.com/2013/02/using-bytes-and-bitmasks-to-control-multiple-arduino-digital-outputs/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Mapping Arduino Analog-to-Digital Converter (ADC) Output to Voltage</title>
		<link>http://www.fiz-ix.com/2013/01/mapping-arduino-analog-to-digital-converter-adc-output-to-voltage/</link>
					<comments>http://www.fiz-ix.com/2013/01/mapping-arduino-analog-to-digital-converter-adc-output-to-voltage/#respond</comments>
		
		<dc:creator><![CDATA[Jeff]]></dc:creator>
		<pubDate>Thu, 17 Jan 2013 02:38:01 +0000</pubDate>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Guides]]></category>
		<category><![CDATA[Programming]]></category>
		<guid isPermaLink="false">http://www.fiz-ix.com/?p=1388</guid>

					<description><![CDATA[The Arduino Uno is a digital device, but it has an analog-to-digital converter (ADC) to allow us to probe the analog signals that permeating our analog world. The ADC is a 10-bit device that can map an analog signal consisting of a voltage ranging from 0 to 5 volts to a decimal value between 0<div class="more-link"><a href="http://www.fiz-ix.com/2013/01/mapping-arduino-analog-to-digital-converter-adc-output-to-voltage/">Read More</a></div>]]></description>
										<content:encoded><![CDATA[<p>The Arduino Uno is a digital device, but it has an analog-to-digital converter (ADC) to allow us to probe the analog signals that permeating our analog world. The ADC is a 10-bit device that can map an analog signal consisting of a voltage ranging from 0 to 5 volts to a decimal value between 0 and 1023 (2<sup>10</sup>-1). The sketch below prototypes how to take the decimal value supplied by the ADC and map it back to voltage. Conceptually, the idea of mapping a number from one range to another involves selecting the number on the destination range that has the same location relative to the end points as the original number had to the end points on the original range. If that sentence makes no sense to you, let me give a simple example. If I gave you the number 7 on the range 0 to 10 and told you to map the 7 to a number on the range 0 to 1000, you should pick 700 because 700 has the same position relative to 1000 as 7 has relative to 10. In other words, 7 is to 10 as 700 is to 1000. With a little thought, you can convince yourself that if both the original and destination ranges start at zero, then the mapping is accomplished as follows.</p>
<pre><code>newNumber = orignialNumber*maxValueOnNewRange/maxValueOnOriginalRange</code></pre>
<p>The following is the prototype Arduino sketch promised above. </p>
<pre><code>int analogValue; // a place to hold the decimal value produced by 
// the ADC
float analogVolts; // a place to hold the analogValue mapped back 
// to voltage
byte analogPin = 5; // the analog pin connected to the analog 
// signal we wish to read (pin A5)

void setup() {
// nothing
}

void loop() {
analogValue = analogRead(analogPin);
analogVolts = (float)analogValue*5/1023; // must convert int to float 
// to perform floating point math
}</code></pre>
]]></content:encoded>
					
					<wfw:commentRss>http://www.fiz-ix.com/2013/01/mapping-arduino-analog-to-digital-converter-adc-output-to-voltage/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Finding Standard Error of Slope and Y-Intercept using LINEST in Excel (Linear Regression in Physics Lab)</title>
		<link>http://www.fiz-ix.com/2013/01/finding-standard-error-of-slope-and-y-intercept-using-linest-in-excel-linear-regression-in-physics-lab/</link>
					<comments>http://www.fiz-ix.com/2013/01/finding-standard-error-of-slope-and-y-intercept-using-linest-in-excel-linear-regression-in-physics-lab/#comments</comments>
		
		<dc:creator><![CDATA[Jeff]]></dc:creator>
		<pubDate>Fri, 04 Jan 2013 18:06:51 +0000</pubDate>
				<category><![CDATA[Labs]]></category>
		<category><![CDATA[Physics Labs]]></category>
		<category><![CDATA[Physics]]></category>
		<guid isPermaLink="false">http://www.fiz-ix.com/?p=1366</guid>

					<description><![CDATA[In Excel, you can apply a line-of-best fit to any scatterplot. The equation for the fit can be displayed but the standard error of the slope and y-intercept are not give. To find these statistics, use the LINEST function instead. The LINEST function performs linear regression calculations and is an array function, which means that<div class="more-link"><a href="http://www.fiz-ix.com/2013/01/finding-standard-error-of-slope-and-y-intercept-using-linest-in-excel-linear-regression-in-physics-lab/">Read More</a></div>]]></description>
										<content:encoded><![CDATA[<p>In Excel, you can apply a line-of-best fit to any scatterplot. The equation for the fit can be displayed but the standard error of the slope and y-intercept are not give. To find these statistics, use the LINEST function instead. The LINEST function performs linear regression calculations and is an array function, which means that it returns more than one value. Let&#8217;s do an example to see how it works.</p>
<p>Let&#8217;s say you did an experiment to measure the spring constant of a spring. You systematically varied the force exerted on the spring (F) and measured the amount the spring stretched (s). Hooke&#8217;s law states the F=-ks (let&#8217;s ignore the negative sign since it only tells us that the direction of F is opposite the direction of s). Because linear regression aims to minimize the total squared error in the vertical direction, it assumes that all of the error is in the y-variable. Let&#8217;s assume that since you control the force used, there is no error in this quantity. That makes F the independent value and it should be plotted on the x-axis. Therefore, s is the dependent variable and should be plotted on the y-axis. Notice that the slope of the fit will be equal to 1/k and we expect the y-intercept to be zero. (As an aside, in physics we would rarely force the y-intercept to be zero in the fit even if we expect it to be zero because if the y-intercept is not zero, it may reveal a systematic error in our experiment.)</p>
<p>The images below and the following text summarize the mechanics of using LINEST in Excel. Since it is an array function, select 6 cells (2 columns, 3 rows). You can select up to 5 rows (10 cells) and get even more statistics, but we usually only need the first six. Hit the equal sign key to tell Excel you are about to enter a function. Type <code>LINEST(</code>, use the mouse to select your y-data, type a comma, use the mouse to select your x-data, type another comma, then type <code>true</code> twice separated by a comma and close the parentheses. <strong>DON&#8217;T HIT ENTER</strong>. Instead, <strong>hold down shift and control and then press enter</strong>. This is the way to execute an array function. The second image below shows the results of the function. From left to right, the first row displays the slope and y-intercept, the second row displays the standard error of the slope and y-intercept. The first element in the third row displays the correlation coefficient. I actually don&#8217;t know what the second element is. Look it up if you are interested. By the way, you might wonder what the <code>true</code> arguments do. The first <code>true</code> tells LINEST not to force the y-intercept to be zero and the second <code>true</code> tells LINEST to return additional regression stats besides just the slope and y-intercept.</p>
<p><a href="http://www.fiz-ix.com/wp-content/uploads/2013/01/LINEST1.png"><img loading="lazy" src="http://www.fiz-ix.com/wp-content/uploads/2013/01/LINEST1.png" alt="" title="LINEST1" width="392" height="175" class="aligncenter size-full wp-image-1368" srcset="http://www.fiz-ix.com/wp-content/uploads/2013/01/LINEST1.png 392w, http://www.fiz-ix.com/wp-content/uploads/2013/01/LINEST1-300x133.png 300w" sizes="(max-width: 392px) 100vw, 392px" /></a></p>
<p><a href="http://www.fiz-ix.com/wp-content/uploads/2013/01/LINEST2.png"><img loading="lazy" src="http://www.fiz-ix.com/wp-content/uploads/2013/01/LINEST2.png" alt="" title="LINEST2" width="355" height="156" class="aligncenter size-full wp-image-1369" srcset="http://www.fiz-ix.com/wp-content/uploads/2013/01/LINEST2.png 355w, http://www.fiz-ix.com/wp-content/uploads/2013/01/LINEST2-300x131.png 300w" sizes="(max-width: 355px) 100vw, 355px" /></a></p>
]]></content:encoded>
					
					<wfw:commentRss>http://www.fiz-ix.com/2013/01/finding-standard-error-of-slope-and-y-intercept-using-linest-in-excel-linear-regression-in-physics-lab/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Making a Movie in MATLAB</title>
		<link>http://www.fiz-ix.com/2013/01/making-a-movie-in-matlab/</link>
					<comments>http://www.fiz-ix.com/2013/01/making-a-movie-in-matlab/#comments</comments>
		
		<dc:creator><![CDATA[Jeff]]></dc:creator>
		<pubDate>Fri, 04 Jan 2013 02:10:54 +0000</pubDate>
				<category><![CDATA[Guides]]></category>
		<category><![CDATA[MATLAB]]></category>
		<category><![CDATA[Programming]]></category>
		<guid isPermaLink="false">http://www.fiz-ix.com/?p=1362</guid>

					<description><![CDATA[Although it creates bulky AVI files, MATLAB can relatively easily make movies of animated figures. The code below prototypes how this is done. % define the number of frames in your movie numberOfFrames = 1200; % use a loop to generate frames of the movie for ii = 1:numberOfFrames % insert code to update data<div class="more-link"><a href="http://www.fiz-ix.com/2013/01/making-a-movie-in-matlab/">Read More</a></div>]]></description>
										<content:encoded><![CDATA[<p>Although it creates bulky AVI files, MATLAB can relatively easily make movies of animated figures. The code below prototypes how this is done.</p>
<pre><code>% define the number of frames in your movie
numberOfFrames = 1200;
% use a loop to generate frames of the movie
for ii = 1:numberOfFrames
    % insert code to update data to be plotted
    % plot data
    figure(1); clf;
    plot(x,y);
    % insert code to format plot any way you want
    drawnow; % force the plot to be displayed
    M(ii) = getframe(1); % save figure 1 as an element of
    % a movie object called M
end

% use the movie2avi function to save the movie
% there are several parameters you can specify
% the only one usually worth messing with is 
% frames per second (fps)
% 20 fps will make this 1200 frame movie 60 s long
movie2avi(M, 'filename', 'fps', 20);</code></pre>
<p>I hope this helps. The AVI will probably be over a GB in size. Use handbrake or ffmpeg to convert the movie made by MATLAB to a more compressed format like MP4.</p>
]]></content:encoded>
					
					<wfw:commentRss>http://www.fiz-ix.com/2013/01/making-a-movie-in-matlab/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>Explanation of Insulation R-Value</title>
		<link>http://www.fiz-ix.com/2012/12/explanation-of-insulation-r-value/</link>
					<comments>http://www.fiz-ix.com/2012/12/explanation-of-insulation-r-value/#respond</comments>
		
		<dc:creator><![CDATA[Jeff]]></dc:creator>
		<pubDate>Sat, 29 Dec 2012 03:05:44 +0000</pubDate>
				<category><![CDATA[Energy]]></category>
		<category><![CDATA[Notebooks]]></category>
		<guid isPermaLink="false">http://www.fiz-ix.com/?p=1351</guid>

					<description><![CDATA[The second laws of thermodynamics states that heat spontaneously flows from bodies at higher temperature to bodies at lower temperature. Thus, it is an inevitable outcome of all systems left to their own devices to eventually reach thermal equilibrium. The purpose of insulation is to reduce the speed at which equilibrium is reached. Insulation reduces<div class="more-link"><a href="http://www.fiz-ix.com/2012/12/explanation-of-insulation-r-value/">Read More</a></div>]]></description>
										<content:encoded><![CDATA[<p>The second laws of thermodynamics states that heat spontaneously flows from bodies at higher temperature to bodies at lower temperature. Thus, it is an inevitable outcome of all systems left to their own devices to eventually reach thermal equilibrium. The purpose of insulation is to reduce the speed at which equilibrium is reached. Insulation reduces the rate at which heat is conducted between two bodies. The &#8220;quality&#8221; of insulation is often rated using a ratio called R-value which is defined as the ratio of the temperature difference between the bodies between which the insulation is placed over the rate of heat flow across the insulation per unit area. More compactly,</p>
<pre><code>R = &#916;T/[(dQ/dt)/A]</code></pre>
<p>where <code>T</code> is temperature, <code>Q</code> is heat, <code>t</code> is time, and <code>A</code> is surface area. The SI units for <code>R</code> are <code>K m<sup>2</sup> s/J</code> or <code>K m<sup>2</sup>/W</code> however, most insulations sold in the US use the convoluted units of <code><sup>o</sup>F ft<sup>2</sup> h/BTU</code>. </p>
<p>The larger an insulations R-value, the better it is at slowing the flow of heat. </p>
<p>More insight into the meaning of R-value can be had by considering a different but equivalent definition. R-value is also the ratio of an insulations thickness over the thermal conductivity of the material from which it is made. More compactly,</p>
<pre><code>R = L/k</code></pre>
<p>where <code>L</code> is thickness and the thermal conductivity <code>k</code> has SI units of <code>W/(K m)</code> and Imperial units of  <code>BTU/(hr ft <sup>o</sup>F)</code>.</p>
<p>In this form, it can be seen that the thicker the insulation, the higher its R-value and the better it is at slowing the flow of heat. Two different insulations may have different R-values even if they are made out of the same material if they have different thicknesses. For this reason, R-value, like weight, is an extrinsic property of insulation. On the other hand, insulation&#8217;s thermal conductivity is an intrinsic property of the material from which it is made. </p>
<p>Since R-value depends only on thickness and thermal conductivity, it is additive if two or more pieces of insulation are combined. For example, if one were to sandwich two pieces of foam insulation with R-values of 5 and 8, respectively, the combination would have an R-value of 13.</p>
]]></content:encoded>
					
					<wfw:commentRss>http://www.fiz-ix.com/2012/12/explanation-of-insulation-r-value/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Explanation of Heat Pump HSPF Rating</title>
		<link>http://www.fiz-ix.com/2012/12/explanation-of-heat-pump-hspf-rating/</link>
					<comments>http://www.fiz-ix.com/2012/12/explanation-of-heat-pump-hspf-rating/#comments</comments>
		
		<dc:creator><![CDATA[Jeff]]></dc:creator>
		<pubDate>Thu, 27 Dec 2012 22:39:20 +0000</pubDate>
				<category><![CDATA[Energy]]></category>
		<category><![CDATA[Notebooks]]></category>
		<guid isPermaLink="false">http://www.fiz-ix.com/?p=1338</guid>

					<description><![CDATA[HSPF stands for Heating Seasonal Performance Factor. It is a measure defined by the Air Conditioning, Heating, and Refrigeration Institute to rate the heating efficiency of air conditioner or heat pump. Let me emphasis that again, the HSFP rating only reflects the heating efficiency of a heat pump, not its cooling efficiency. Cooling efficiency is<div class="more-link"><a href="http://www.fiz-ix.com/2012/12/explanation-of-heat-pump-hspf-rating/">Read More</a></div>]]></description>
										<content:encoded><![CDATA[<p>HSPF stands for Heating Seasonal Performance Factor. It is a measure defined by the Air Conditioning, Heating, and Refrigeration Institute to rate the heating efficiency of air conditioner or heat pump. Let me emphasis that again, the HSFP rating only reflects the heating efficiency of a heat pump, not its cooling efficiency. Cooling efficiency is rated using a different metric called SEER. <a href="http://www.fiz-ix.com/2012/12/explanation-of-heat-pump-seer-rating/" target="_blank">See this post for more information about SEER</a>. </p>
<p>The efficiency of a heat pump is highest when the difference between the indoor and outdoor temperature is the least. For this reason, air-source heat pumps are much more efficient in the spring and fall then in the winter and summer. The HSPF rating attempts to take seasonal variations in heat pump efficiency into account. For this reason, it can be thought of as an average heating efficiency over the course of a year. </p>
<p>HSPF is defined as the ratio of the thermal energy transferred into your home per heating season in British thermal units (BTU) divided by the electrical energy consumed by the heat pump in watt-hours (Wh) per heating season. More compactly,</p>
<pre><code>HSPF = (thermal energy transfered, BTU)/(electrical energy used, Wh)</code></pre>
<p>As a physicist, it doesn&#8217;t make much sense to mix two units of energy (BTU and Wh) in the same formula. It makes understanding the formula more complicated. If one notes that <code>1 Wh = 3.412 BTU</code>, then</p>
<pre><code>HSPF = 3.412 (thermal energy transfered)/(electrical energy used)</code></pre>
<p>where the energies can be in any units so long as they are the same units. In this form, you can see that a 100% efficient electric resistive heater has a HSPF rating of 3.412. Thus a heat pump with a HSPF rating of 6.8 would pump about twice as much thermal energy into your home as it consumes in electricity. </p>
<p>Although the HSPF rating you will actual achieve depends on your climate (hotter climates will achieve higher real-life HSPF ratings than cooler climates) replacing a 6 HSPF heat pump with a 9 HSPF heat pump will decrease the amount of electricity needed to heat your home by about 33.3%. In general, you can calculate the percent reduction in electricity used by a new heat pump to heat your home using the following formula.</p>
<pre><code>Percent Energy Savings = 1 - (Old System HSPF)/(New System HSPF)</pre>
<p></code></p>
]]></content:encoded>
					
					<wfw:commentRss>http://www.fiz-ix.com/2012/12/explanation-of-heat-pump-hspf-rating/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Explanation of Heat Pump SEER Rating</title>
		<link>http://www.fiz-ix.com/2012/12/explanation-of-heat-pump-seer-rating/</link>
					<comments>http://www.fiz-ix.com/2012/12/explanation-of-heat-pump-seer-rating/#respond</comments>
		
		<dc:creator><![CDATA[Jeff]]></dc:creator>
		<pubDate>Thu, 27 Dec 2012 21:44:03 +0000</pubDate>
				<category><![CDATA[Energy]]></category>
		<category><![CDATA[Notebooks]]></category>
		<guid isPermaLink="false">http://www.fiz-ix.com/?p=1328</guid>

					<description><![CDATA[SEER stands for Seasonal Energy Efficiency Ratio. It is a measure defined by the Air Conditioning, Heating, and Refrigeration Institute to rate the cooling efficiency of air conditioner or heat pump. Let me emphasis that again, the SEER rating only reflects the cooling efficiency of a heat pump, not its heating efficiency. Heating efficiency is<div class="more-link"><a href="http://www.fiz-ix.com/2012/12/explanation-of-heat-pump-seer-rating/">Read More</a></div>]]></description>
										<content:encoded><![CDATA[<p>SEER stands for Seasonal Energy Efficiency Ratio. It is a measure defined by the Air Conditioning, Heating, and Refrigeration Institute to rate the cooling efficiency of air conditioner or heat pump. Let me emphasis that again, the SEER rating only reflects the cooling efficiency of a heat pump, not its heating efficiency. Heating efficiency is rated using a different metric called HSPF. <a href="http://www.fiz-ix.com/2012/12/explanation-of-heat-pump-hspf-rating/" target="_blank">See this post for more information about HSPF</a>.</p>
<p>The efficiency of a heat pump is highest when the difference between the indoor and outdoor temperature is the least. For this reason, air-source heat pumps are much more efficient in the spring and fall then in the winter and summer. The SEER rating attempts to take seasonal variations in heat pump efficiency into account. For this reason, it can be thought of as an average efficiency over the course of a year. </p>
<p>SEER is defined as the ratio of the thermal energy transfered out of your home per cooling season in British thermal units (BTU) divided by the electrical energy consumed by the heat pump in watt-hours (Wh) per cooling season. More compactly,</p>
<pre><code>SEER = (thermal energy transfered, BTU)/(electrical energy used, Wh)</code></pre>
<p>As a physicist, it doesn&#8217;t make much sense to mix two units of energy (BTU and Wh) in the same formula. It makes understanding the formula more complicated. If one notes that <code>1 Wh = 3.412 BTU</code>, then</p>
<pre><code>SEER = 3.412 (thermal energy transfered)/(electrical energy used)</code></pre>
<p>where the energies can be in any units so long as they are the same units. In this form, you can see that a 100% efficient air conditioner has a SEER rating of 3.412. Thus a heat pump with a SEER rating of 6.8 would remove about twice as much thermal energy from your home as it consumes in electricity. </p>
<p>Although the SEER rating you will actual achieve depends on your climate (hotter climates will achieve lower real-life SEER ratings than cooler climates) replacing a 10 SEER heat pump with a 16 SEER heat pump will decrease the amount of electricity needed to cool your home by about 37.5%. Replacing a 10 SEER heat pump with a 22 SEER model will reduce the electricity used by your heat pump by about 54.5%. So there is diminishing returns to energy savings with increasing SEER rating. In general, you can calculate the percent reduction in electricity used by a new heat pump to cool your home using the following formula.</p>
<pre><code>Percent Energy Savings = 1 - (Old System SEER)/(New System SEER)</pre>
<p></code></p>
]]></content:encoded>
					
					<wfw:commentRss>http://www.fiz-ix.com/2012/12/explanation-of-heat-pump-seer-rating/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Ubuntu DNS BIND Master Server Setup</title>
		<link>http://www.fiz-ix.com/2012/12/ubuntu-dns-server-guide-bind-master-server-setup/</link>
					<comments>http://www.fiz-ix.com/2012/12/ubuntu-dns-server-guide-bind-master-server-setup/#comments</comments>
		
		<dc:creator><![CDATA[Jeff]]></dc:creator>
		<pubDate>Thu, 27 Dec 2012 18:57:57 +0000</pubDate>
				<category><![CDATA[Guides]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<guid isPermaLink="false">http://www.fiz-ix.com/?p=1245</guid>

					<description><![CDATA[In a previous post I walked you through the installation of BIND9 (Berkley Internet Name Daemon Version 9) on Ubuntu and configuring the installation to function as a caching name server on your local area network (LAN). Caching DNS records on a local server will hopefully boost your network&#8217;s performance. That is great, but you<div class="more-link"><a href="http://www.fiz-ix.com/2012/12/ubuntu-dns-server-guide-bind-master-server-setup/">Read More</a></div>]]></description>
										<content:encoded><![CDATA[<p><a href="http://www.fiz-ix.com/wp-content/uploads/2012/11/ubuntuLogo.png"><img loading="lazy" src="http://www.fiz-ix.com/wp-content/uploads/2012/11/ubuntuLogo-300x135.png" alt="" title="ubuntuLogo" width="300" height="135" class="alignleft size-medium wp-image-723" srcset="http://www.fiz-ix.com/wp-content/uploads/2012/11/ubuntuLogo-300x135.png 300w, http://www.fiz-ix.com/wp-content/uploads/2012/11/ubuntuLogo.png 540w" sizes="(max-width: 300px) 100vw, 300px" /></a>In a <a href="http://www.fiz-ix.com/2012/12/set-up-an-ubuntu-bind-dns-caching-name-server/" target="_blank">previous post</a> I walked you through the installation of BIND9 (Berkley Internet Name Daemon Version 9) on Ubuntu and configuring the installation to function as a caching name server on your local area network (LAN). Caching DNS records on a local server will hopefully boost your network&#8217;s performance. That is great, but you probably want your private DNS server to actually help manage the machines on your LAN by maintaining host records and serving those records. Here I show you how to setup a BIND master server to do just that. </p>
<h3>Makeup of A Fictional Domain</h3>
<p>Here we will consider the set up of a fictional domain named <code>mydomain.lan</code> on a restricted network (i.e., a LAN located behind a firewall) and the <code>192.168.1.0</code> subnet. The domain will have have 4 hosts with the following addresses, names, and roles.</p>
<pre><code>IP Address  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hostname &nbsp;&nbsp;&nbsp; role &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; alias
192.168.1.99 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; john &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DNS/mail server
192.168.1.50 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; paul &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; web server &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; www
192.168.1.51 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; george  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; workstation
192.168.1.52 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ringo &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; workstation</code></pre>
<p>Note that the web server is configured with the alias (canonical name) <code>www</code> so that one can navigate to it using <code>www.mydomain.lan</code> in addition to <code>paul</code> and <code>paul.mydomain.lan</code>. Of course your domain will vary in makeup and function to the one considered here, but you should be able to modify the following code to suit your needs.</p>
<h3>Configure Zones on BIND</h3>
<p>Ubuntu installs BIND with a configuration file <code>/etc/bind/named.conf</code> that suits most home office and small business needs and does not need to be modified. Instead you will create your local DNS &#8220;zone&#8221; by editing <code>/etc/bind/named.conf.local</code>, which is sourced by <code>named.conf</code>. Open this file with a text editor of your choice (I use <code>vi</code> here).</p>
<pre><code>sudo vi /etc/bind/named.conf.local</code></pre>
<p>Ignore the commented areas and add a zone definition for your domain to this file.</p>
<pre><code>zone "mydomain.lan" IN {
&nbsp;&nbsp;&nbsp; type master;
&nbsp;&nbsp;&nbsp; file "/etc/bind/zones/mydomain.lan.db";
};</code></pre>
<p>Add a reverse DNS zone definition as well. This will allow the server to map IP addresses to domain names.</p>
<pre><code>zone "1.168.192.in-addr.arpa" {
&nbsp;&nbsp;&nbsp; type master;
&nbsp;&nbsp;&nbsp; file "/etc/bind/zones/rev.1.168.192.in-addr.arpa";
};</code></pre>
<h3>Create DNS Records</h3>
<p>The zone definitions in the previous section refer to files that will contain details about our network mapping. The <code>mydomain.lan.db</code> file will contain records of the hostname-to-IP address mappings of your domain. The <code>rev.1.168.192.in-addr.arpa</code> file will contain &#8220;reverse&#8221; IP address-to-hostname records. Make a directory to hold these files and open <code>mydomain.lan.db</code>.</p>
<pre><code>sudo mkdir /etc/bind/zones
sudo vi /etc/bind/zones/mydomain.lan.db</code></pre>
<p>For the fictitious domain considered here <code>mydomain.lan.db</code> is edited to look like the following.</p>
<pre><code>; Use semicolons to add comments.
; Host-to-IP Address DNS Pointers for mydomain.lan
; Note: The extra "." at the end of addresses are important.
; The following parameters set when DNS records will expire, etc.
; Importantly, the serial number must always be iterated upward to prevent
; undesirable consequences. A good format to use is YYYYMMDDI where
; the I index is in case you make more that one change in the same day.
mydomain.lan. IN SOA john.mydomain.lan. hostmaster.mydomain.lan. (
&nbsp;&nbsp;&nbsp; 200709131 ; serial
&nbsp;&nbsp;&nbsp; 8H ; refresh
&nbsp;&nbsp;&nbsp; 4H ; retry
&nbsp;&nbsp;&nbsp; 4W ; expire
&nbsp;&nbsp;&nbsp; 1D ; minimum
)
; NS indicates that john is the name server on mydomain.lan
; MX indicates that john is (also) the mail server on mydomain.lan
mydomain.lan.    IN NS  john.mydomain.lan.
mydomain.lan. IN MX 10 john.mydomain.lan.
; Set an alias (canonical name) for paul
www   IN  CNAME  paul.mydomain.lan.
; Set the address for localhost.mydomain.lan
localhost &nbsp;&nbsp; IN A 127.0.0.1
; Set the hostnames in alphabetical order
george &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN A 192.168.1.51
john &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN A 192.168.1.99
paul &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN A 192.168.1.50
ringo &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN A 192.168.1.52</code></pre>
<p>After creating the reverse DNS record file</p>
<pre><code>sudo vi /etc/bind/zones/rev.1.168.192.in-addr.arpa</code></pre>
<p>it is edited to look like the following.</p>
<pre><code>; IP Address-to-Host DNS Pointers for 192.168.1.0 subnet
@ IN SOA  john.mydomain.lan. hostmaster.mydomain.lan. (
&nbsp;&nbsp;&nbsp; 200709131 ; serial
&nbsp;&nbsp;&nbsp; 8H ; refresh
&nbsp;&nbsp;&nbsp; 4H ; retry
&nbsp;&nbsp;&nbsp; 4W ; expire
&nbsp;&nbsp;&nbsp; 1D ; minimum
)
; define the authoritative name server
IN  NS   john.mydomain.lan.
; our hosts, in numeric order
99 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN PTR john.mydomain.lan.
50 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN PTR paul.mydomain.lan.
51 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN PTR george.mydomain.lan.
52 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN PTR ringo.mydomain.lan.</code></pre>
<p>Of course, your DNS records will look different then those above but hopefully by using these configurations as templates you can customize the files to your domain. To initiate your authoritative DNS server restart BIND.</p>
<pre><code>sudo /etc/init.d/bind9 restart</code></pre>
<p>Test your DNS server by typing <code>dig mydomain.lan</code> at the command prompt. All of the hosts on your local network should appear under <code>AUTHORITY SECTION</code> in the output of this command. </p>
]]></content:encoded>
					
					<wfw:commentRss>http://www.fiz-ix.com/2012/12/ubuntu-dns-server-guide-bind-master-server-setup/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
		<item>
		<title>Set Up an Ubuntu BIND DNS Caching Name Server</title>
		<link>http://www.fiz-ix.com/2012/12/set-up-an-ubuntu-bind-dns-caching-name-server/</link>
					<comments>http://www.fiz-ix.com/2012/12/set-up-an-ubuntu-bind-dns-caching-name-server/#comments</comments>
		
		<dc:creator><![CDATA[Jeff]]></dc:creator>
		<pubDate>Thu, 27 Dec 2012 18:50:53 +0000</pubDate>
				<category><![CDATA[Guides]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<guid isPermaLink="false">http://www.fiz-ix.com/?p=1243</guid>

					<description><![CDATA[In previous posts, I shared instructions for setting up a Ubuntu LAMP (Linux, Apache, mySQL, PHP) server and configuring Apache and mySQL to host new sites complete with phpmyadmin and cgi-bin access. I thought it would be useful to write a follow-up guide on setting up of an Ubuntu DNS (Domain Name Service) server on<div class="more-link"><a href="http://www.fiz-ix.com/2012/12/set-up-an-ubuntu-bind-dns-caching-name-server/">Read More</a></div>]]></description>
										<content:encoded><![CDATA[<p><a href="http://www.fiz-ix.com/wp-content/uploads/2012/11/ubuntuLogo.png"><img loading="lazy" src="http://www.fiz-ix.com/wp-content/uploads/2012/11/ubuntuLogo-300x135.png" alt="" title="ubuntuLogo" width="300" height="135" class="alignleft size-medium wp-image-723" srcset="http://www.fiz-ix.com/wp-content/uploads/2012/11/ubuntuLogo-300x135.png 300w, http://www.fiz-ix.com/wp-content/uploads/2012/11/ubuntuLogo.png 540w" sizes="(max-width: 300px) 100vw, 300px" /></a>In previous posts, I shared instructions for <a href="http://www.fiz-ix.com/2012/11/how-to-setup-an-ubuntu-lamp-server-with-a-desktop-gui/" target="_blank">setting up a Ubuntu LAMP (Linux, Apache, mySQL, PHP) server</a> and <a href="http://www.fiz-ix.com/2012/12/configure-apache-mysql-and-cgi-bin-on-an-ubuntu-lamp-server/" target="_blank">configuring Apache and mySQL</a> to host new sites complete with phpmyadmin and cgi-bin access. I thought it would be useful to write a follow-up guide on setting up of an Ubuntu DNS (Domain Name Service) server on your LAN (local area network). For newcomers, DNS is a service that maps IP addresses to domain names (e.g., a public DNS server is responsible for mapping <code>www.google.com</code> to <code>173.194.75.104</code> and vise versa). There are several reasons why you may want to set up a private DNS server on you LAN. If your LAN includes more than a few machines, a private DNS server may be a more convenient way to map client host names to IP addresses then having to maintain a hosts configuration files on each client. A private DNS server can also help increase network performance by caching IP addresses of commonly visited websites instead of retrieving them from the public DNS servers maintained by ISPs at each request. This post describes how to set up a caching DNS server using BIND9 (Berkley Internet Naming Daemon Version 9), the most widely used DNS program and the DNS server that ships with Ubuntu. In a <a href="http://www.fiz-ix.com/2012/12/ubuntu-dns-server-guide-bind-master-server-setup/" target="_blank">follow-up post</a> I describe how to set up a master DNS server to serve DNS records for an imaginary domain (i.e., your LAN).</p>
<h3>Step 1: Install BIND DNS server on Ubuntu</h3>
<p>There are two ways to install BIND on Ubuntu. If you are performing a fresh installation of Ubuntu Server Edition as per <a href="http://www.fiz-ix.com/2012/11/how-to-setup-an-ubuntu-lamp-server-with-a-desktop-gui/" target="_blank">this post</a>, at some point the install shell will ask if you wish to install a DNS and/or LAMP server. Select DNS (and LAMP if you so desire using the arrow keys and spacebar) and continue (using tab and enter). On the other hand, if you have already completed the installation of your LAMP server then use Ubuntu&#8217;s built in package management program <code>apt-get</code> to install BIND. Open a terminal and type</p>
<pre><code>sudo apt-get update
sudo apt-get install bind9</code></pre>
<p>You may need to insert the Ubuntu install CD to perform this installation.</p>
<h3>Step 2: Configure BIND Caching DNS server</h3>
<p>By default, BIND installs on Ubuntu configured to act as a caching DNS server. However, you need to edit the configuration options file <code>/etc/bind/named.conf.options</code> to specify a public DNS server operating on the wide area network (WAN) to which un-cached domain names should be forwarded. Open this file with the text editor of your choice (I use <code>vi</code> here).</p>
<pre><code>sudo vi /etc/bind/named.conf.options</code></pre>
<p>Uncomment and edit the <code>forwarders</code> section of this file to point to your internet service provider&#8217;s DNS server. You may enter multiple DNS server addresses (separated by semicolons) if you desire. When finished, the <code>forwarders</code> section should look like the following with the <code>xxx.xxx.xxx.xxx</code> replaced with the appropriate IP address(es).</p>
<pre><code>forwarders {
xxx.xxx.xxx.xxx;
xxx.xxx.xxx.xxx;
};</code></pre>
<p>You must also edit the <code>/etc/resolv.conf</code> configuration file of all machines on your LAN (including the DNS server itself) to point to your new DNS server. Open this file</p>
<pre><code>vi /etc/resolv.conf</code></pre>
<p>and add</p>
<pre><code>nameserver xxx.xxx.xxx.xxx</code></pre>
<p>to the top of the file where <code>xxx.xxx.xxx.xxx</code> is the IP address of your new DNS server. When configuring the DNS server itself, change the <code>nameserver</code> address to <code>127.0.0.1</code>, which points to <code>localhost</code>. You may delete any additional <code>nameserver</code> lines appearing in the <code>resolv.conf</code> file although it may be prudent to leave lines in place that point to your ISP&#8217;s DNS server so that client machines continue to function in the event of your server going offline (just make sure your DNS server is listed first). To implement the changes to your DNS server, restart BIND.</p>
<pre><code>sudo /etc/init.d/bind9 restart</code></pre>
<p>Finally, test your server by typing the following command in a terminal on any machine on your LAN configured to use your new DNS server.</p>
<pre><code>dig www.fiz-ix.com</code></pre>
<p>Near the end of the output of this command there should be a line that reads <code>Query time: 24 ms</code> (of course the actual time may be different). Execute the <code>dig www.fiz-ix.com</code> command again and you should notice that the query time significantly decreased indicating that your DNS server is caching DNS information for <code>www.fiz-ix.com</code>. Note that BIND caches DNS information to RAM and not disk. In most cases this will not be a problem since most machines have plenty of memory and old records are purged from memory after a period of time. However, if you expect your server to get a lot of traffic you may want to periodically flush the cache using</p>
<pre><code>sudo rndc -s localhost flush</code></pre>
<p>or set the maximum amount of memory to use (in essence forcing overflow data to be deleted before it expires) by setting the <code>max-cache-size</code> option in the configuration file.</p>
<p><strong>Congratulations!</strong> you are finished setting up your Ubuntu caching name server.  See my next <a href="http://www.fiz-ix.com/2012/12/ubuntu-dns-server-guide-bind-master-server-setup/" target="_blank">post</a> where I discuss configuring a master DNS server to serve hostnames to machines on your LAN.</p>
]]></content:encoded>
					
					<wfw:commentRss>http://www.fiz-ix.com/2012/12/set-up-an-ubuntu-bind-dns-caching-name-server/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
