<?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>tinkerish.com</title>
	<atom:link href="http://tinkerish.com/blog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://tinkerish.com/blog</link>
	<description>doing tinkerish things with microcontrollers and embedded electronics</description>
	<lastBuildDate>Tue, 05 Jan 2010 03:27:31 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>DIY Arduino Based Pulse Oximeter Part I (with video)</title>
		<link>http://tinkerish.com/blog/?p=181</link>
		<comments>http://tinkerish.com/blog/?p=181#comments</comments>
		<pubDate>Mon, 04 Jan 2010 02:19:22 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[AVR Projects]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[atmega168]]></category>
		<category><![CDATA[avr]]></category>
		<category><![CDATA[electronics]]></category>
		<category><![CDATA[heart rate]]></category>
		<category><![CDATA[libarduino]]></category>
		<category><![CDATA[pulse]]></category>
		<category><![CDATA[tsl230r]]></category>

		<guid isPermaLink="false">http://tinkerish.com/blog/?p=181</guid>
		<description><![CDATA[I recently completed the first half of my Pulse Oximeter.  Already, one can see some wonderful information about one&#8217;s heart and blood from just your finger tip.  So far, I&#8217;ve interfaced to the TSL230 light sensor, takinging readings, and displaying it in a Python based QT gui.  It sounds complicated but its [...]]]></description>
			<content:encoded><![CDATA[<p>I recently completed the first half of my Pulse Oximeter.  Already, one can see some wonderful information about one&#8217;s heart and blood from just your finger tip.  So far, I&#8217;ve interfaced to the TSL230 light sensor, takinging readings, and displaying it in a Python based QT gui.  It sounds complicated but its not.  Its lots of fun.  Check out the video to see the graph of my heart beating from light passing through my fingertip.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="560" height="340" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/GdN5IRVJOXI&amp;hl=en_US&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="560" height="340" src="http://www.youtube.com/v/GdN5IRVJOXI&amp;hl=en_US&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>Soon, I&#8217;ll post part II.  I hope to have the heart beats detected so that I can calculate the heart rate.  Also, I will be taking measurements from both LEDs and comparing them.  By doing this, I hope I can extract the oxygen saturation (amount of oxygen in my blood).</p>
<p><strong>Update:</strong>   Since filming the video above, I implemented the heartbeat detection and heart rate calculation.  In the image below, the heart rate is calculated and show in the upper right.  Also, the heart beats are automatically detected and annotated with little hearts.</p>
<div id="attachment_187" class="wp-caption aligncenter" style="width: 310px"><a href="http://tinkerish.com/blog/wp-content/uploads/2010/01/pulseoximeter-screenshot.png"><img src="http://tinkerish.com/blog/wp-content/uploads/2010/01/pulseoximeter-screenshot-300x143.png" alt="Screenshot showing automatic heartbeat detection and calculated heartrate (upper right corner)" title="pulseoximeter-screenshot" width="300" height="143" class="size-medium wp-image-187" /></a><p class="wp-caption-text">Screenshot showing automatic heartbeat detection and calculated heartrate (upper right corner)</p></div>
]]></content:encoded>
			<wfw:commentRss>http://tinkerish.com/blog/?feed=rss2&amp;p=181</wfw:commentRss>
		<slash:comments>42</slash:comments>
		</item>
		<item>
		<title>C library for Arduino &#8211; Preview</title>
		<link>http://tinkerish.com/blog/?p=173</link>
		<comments>http://tinkerish.com/blog/?p=173#comments</comments>
		<pubDate>Mon, 02 Nov 2009 01:54:33 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://tinkerish.com/blog/?p=173</guid>
		<description><![CDATA[I&#8217;m working on a C library for Arduino hardware.  The goal is to make it just as easy as the Arduino programming language but in plain standard C.  The Arduino language is halfway between C and C++.  While Arduino hardware uses the same Atmel atmega168 and atmega328 that I&#8217;ve come to love, [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m working on a C library for Arduino hardware.  The goal is to make it just as easy as the Arduino programming language but in plain standard C.  The Arduino language is halfway between C and C++.  While Arduino hardware uses the same Atmel atmega168 and atmega328 that I&#8217;ve come to love, the software does not allow me to code in standard C.  It prevents one from being able to borrow all of the standard C and assembly (easily) that is out there for AVR micros.  More importantly, it means that I have to load up a java IDE instead of just using the GNU command line tools such as avr-gcc, avr-libc, and make.  By using the Arduino hardware, we get access to mass produced hardware and the Arduino bootloader.  The Arduino hardware is handy because we can program it over the same interface as we use for printf() debugging.  Also, since it can get its power over USB, it bundles up lots of the initial hurdles of getting started with micros.</p>
<p>Already the library supports:<br />
serial &#8211; printf(), getchar(), etc<br />
standard I/O &#8211; easily make pins input or output, set pins high and low<br />
pwm &#8211; LED brightness, motor control<br />
pwm servo &#8211; control RC servos<br />
adc &#8211; read analog values</p>
<p>Here is a preview reading analog in with the ADC and controling the brightness of an LED using PWM:</p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/BjMIKd-wQRM&#038;hl=en&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/BjMIKd-wQRM&#038;hl=en&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p>I&#8217;m still working on making the wiki page match this blog and storing the code in SVN.  For an early preview, check out <a href="http://tinkerish.com/wiki/">http://tinkerish.com/wiki/</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://tinkerish.com/blog/?feed=rss2&amp;p=173</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Parts ordered &#8211; DIY pulse oximeter</title>
		<link>http://tinkerish.com/blog/?p=166</link>
		<comments>http://tinkerish.com/blog/?p=166#comments</comments>
		<pubDate>Sat, 31 Oct 2009 15:02:41 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[AVR Projects]]></category>
		<category><![CDATA[atmega128]]></category>
		<category><![CDATA[avr]]></category>
		<category><![CDATA[led]]></category>
		<category><![CDATA[oximeter]]></category>
		<category><![CDATA[parts]]></category>
		<category><![CDATA[pulse]]></category>
		<category><![CDATA[tsl230r]]></category>

		<guid isPermaLink="false">http://tinkerish.com/blog/?p=166</guid>
		<description><![CDATA[I just ordered the parts for my next project: to build my own pulse oximeter.  Ever seen those things at the hospital that they clip onto your finger?  It measures your pulse and how much oxygen you have in your blood.  It is considered one of the five vital signs that they [...]]]></description>
			<content:encoded><![CDATA[<p>I just ordered the parts for my next project: to build my own pulse oximeter.  Ever seen those things at the hospital that they clip onto your finger?  It measures your pulse and how much oxygen you have in your blood.  It is considered one of the five vital signs that they monitor when you are in the hosipital.  I wanted to explore how they work and end up with one that I can use at home.  In particular, I want to be able to log and store the results.  While off the shelf ones exist for just under $100, I figure I can build something for under $25 that could log to an SD card or display in real time on a PC.</p>
<p><strong>Background Reading</strong><br />
<a href="http://en.wikipedia.org/wiki/Pulse_oximeter">Wikipedia page on pulse oximetery</a><br />
<a href="http://www.oximetry.org/pulseox/principles.htm">principles of how pulse oximetery works</a><br />
<a href="http://www.taosinc.com/productdetail.aspx?product=36">a light intensity to digital frequency part I chose to work with.</a></p>
<p><strong>Parts Ordered So Far</strong><br />
(1) <a href="http://www.sparkfun.com/commerce/product_info.php?products_id=8940">a TSL230R IC</a> &#8211; chip to convert light intensity to something our AVR can read (in this case a digital frequency to measure with our timer counter)<br />
(2)<a href="http://www.sparkfun.com/commerce/product_info.php?products_id=9349"> an IR (infra-red) LED</a> &#8211; 940nm wavelength<br />
(3)<a href="http://www.sparkfun.com/commerce/product_info.php?products_id=533"> a red LED</a> &#8211; 660nm wavelength<br />
* note: all of the links above are to Sparkfun.com and should work great for this project.  The LEDs that I ordered will be slightly different because I purchased them from a different source (only because they were out of stock at the time).</p>
<p><strong>Quick Theory of Operation </strong><br />
As your heart circulates blood, your arteries constrict and expand.  Also, your lungs add oxygen to the blood making it more red in color.  By using a light intensity sensor and some LEDs we can get our pulse rate from the constricting and expanding and we can get the oxygen saturation from the amount of red in the blood.</p>
<p>Ever put a flash light against your cheek to see the light shine through the other side?  Just like that, we are going to place LEDs on one side of the finger and measure light on the other side.  As the heart beats we should see our output fluctuate with our heartbeat.  The IR from our IR led should be pretty uniform in how much it gets absorbed through the finger.  I am expecting to see the heartbeat from this with an AC component that changes as the capillaries constrict and expand.  The light from our red LED should get absorbed more when the blood is oxygen rich.  I am expecting to be able to contrast this with our waveform from the IR led to be able to figure out the oxygen saturation.</p>
<p><strong>Electronics</strong></p>
<p>The output from our TSL230R is a digital output in the form of a frequency.  Our AVR will look at this on one of its interrupt pins.  We can then use a 16bit timer counter to measure the pulses.  These measurements will be equal to the light intensity that the TSL230R sees.  The AVR will also control the red and IR leds.  This will allow us to turn then on one at a time as we make our measurements.</p>
<p>The first step will be to output to serial (/dev/ttyUSB0).  I can then graph the output to make since of it and debug.  After that, I will attempt to pull as much of the processing as possible into the AVR.  The goal will be to log the pulse rate and oxygen concentration to the SD card.  An LCD may also be added.  Last, I may add a peizo buzzer so that it can alert you when the measurements are not accurate or if there is a problem.</p>
<p>Anyone wishing to follow along at home should get some parts on order <img src='http://tinkerish.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://tinkerish.com/blog/?feed=rss2&amp;p=166</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Timelapse Aerogarden Video with AVR</title>
		<link>http://tinkerish.com/blog/?p=157</link>
		<comments>http://tinkerish.com/blog/?p=157#comments</comments>
		<pubDate>Thu, 02 Jul 2009 04:19:45 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[aerogarden]]></category>
		<category><![CDATA[atmega168]]></category>
		<category><![CDATA[avr]]></category>
		<category><![CDATA[electronics]]></category>
		<category><![CDATA[relay]]></category>

		<guid isPermaLink="false">http://tinkerish.com/blog/?p=157</guid>
		<description><![CDATA[Update:  this is the final 4 week version.  I just realized that I had forgotten to post it.
I have a Canon DSLR camera.  I wanted to take a timelapse video of my Aerogarden.The only way to do timelapse is to either connect a PC running Windows or to use the remote shutter [...]]]></description>
			<content:encoded><![CDATA[<p>Update:  this is the final 4 week version.  I just realized that I had forgotten to post it.</p>
<p>I have a Canon DSLR camera.  I wanted to take a timelapse video of my <a href="http://aerogrow.com">Aerogarden</a>.The only way to do timelapse is to either connect a PC running Windows or to use the remote shutter port.  It is basically a 2.5mm audio jack.  If you short one of the 2 conductors to ground it focuses.  If you short  the other to ground it takes a picture.  I rigged up an AVR and some relays to take a picture about every 30 minutes.  A script was written to look at the EXIF data in the pictures to overlay the days that have passed. </p>
<p><object width="560" height="340"><param name="movie" value="http://www.youtube.com/v/dcMIGQncmGg&#038;hl=en&#038;fs=1&#038;hd=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/dcMIGQncmGg&#038;hl=en&#038;fs=1&#038;hd=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://tinkerish.com/blog/?feed=rss2&amp;p=157</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting Started with AVRs: A Parts List</title>
		<link>http://tinkerish.com/blog/?p=150</link>
		<comments>http://tinkerish.com/blog/?p=150#comments</comments>
		<pubDate>Sun, 14 Jun 2009 22:27:10 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://tinkerish.com/blog/?p=150</guid>
		<description><![CDATA[People often ask me for my recommendation of what to get started with for programming AVRs or microcontrollers in general.  Below I&#8217;ll give a quick list of things that, if purchased, would make a great starting place for general AVR programming.
Many people have heard of Arduino.  It is an AVR based platform with [...]]]></description>
			<content:encoded><![CDATA[<p>People often ask me for my recommendation of what to get started with for programming AVRs or microcontrollers in general.  Below I&#8217;ll give a quick list of things that, if purchased, would make a great starting place for general AVR programming.</p>
<p>Many people have heard of Arduino.  It is an AVR based platform with standardized I/O and form factor.  It goes with a software stack on top that makes programing easy.  Too easy, IMHO.  The list that I provide below will include an Arduino base board.  This is because it can be used for generic AVR programing as well without using the extra software stack.  Because of its popularity, the economies of scale make it an inexpensive starting place.</p>
<p><a href="http://www.sparkfun.com/commerce/product_info.php?products_id=9221">Arduino Pro 3.3v/8mhz base board</a> &#8211; $19.95<br />
<a href="http://www.sparkfun.com/commerce/product_info.php?products_id=9231">USB Programmer </a>- $14.95<br />
<a href="http://www.sparkfun.com/commerce/product_info.php?products_id=8772">USB to TTL serial board 3.3v</a> &#8211; $13.95<br />
<a href="http://www.sparkfun.com/commerce/product_info.php?products_id=116">breakaway headers</a> &#8211; $2.50 (get a few of these)<br />
<a href="http://www.sparkfun.com/commerce/product_info.php?products_id=8430">colorful jumper wires</a> &#8211; $3.95<br />
breadboard &#8211; hopefully you already have one of these &#8230; the arduino pro will plug right into one</p>
<p><strong>Total &#8211; about $55</strong></p>
<p>The parts I&#8217;ve chosen are for 3.3v.  This is because most of the things that I interface with are 3.3v and I like to run my stuff off of 3.6-7v lipos directly.  5v versions are available also.</p>
]]></content:encoded>
			<wfw:commentRss>http://tinkerish.com/blog/?feed=rss2&amp;p=150</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Logging Heartrate with an AVR and microSD Card</title>
		<link>http://tinkerish.com/blog/?p=130</link>
		<comments>http://tinkerish.com/blog/?p=130#comments</comments>
		<pubDate>Tue, 07 Apr 2009 07:16:25 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[AVR Projects]]></category>
		<category><![CDATA[atmega168]]></category>
		<category><![CDATA[atmega8]]></category>
		<category><![CDATA[avr]]></category>
		<category><![CDATA[electronics]]></category>
		<category><![CDATA[fat]]></category>
		<category><![CDATA[heart rate]]></category>
		<category><![CDATA[sd card]]></category>
		<category><![CDATA[sparkfun]]></category>

		<guid isPermaLink="false">http://tinkerish.com/blog/?p=130</guid>
		<description><![CDATA[Summary
The objective of this project is to log one&#8217;s heart rate to an SD card.  This could be done for extended periods, including during sleep, for some pretty interesting investigation.  What is shown in the video is the logging of a treadmill session with periods of jogging and walking to see the fluctuations [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Summary</strong></p>
<p>The objective of this project is to log one&#8217;s heart rate to an SD card.  This could be done for extended periods, including during sleep, for some pretty interesting investigation.  What is shown in the video is the logging of a treadmill session with periods of jogging and walking to see the fluctuations in heart rate.</p>
<p><strong>Details</strong></p>
<p>As a baseboard, we continue to use our custom Atmega8 / Atmega168 through hole board.  Attached to this, we have a custom SD breakout since it is a little cleaner than soldering to the SD card adapter sleeve.  For power, we simply use a 3 AA battery holder (provides 3.3-3.8v).  Most importantly, we use the <a href="http://www.sparkfun.com/commerce/product_info.php?products_id=8660">Poler OEM module</a> from Sparkfun.com to receive the heart rate.  Typically, Polar sells chest strap and watch combos.  The chest strap goes on your chest (duh) and the signal is picked up by and displayed on the watch.  We simply use the OEM receiver module to also listen to the signal.  </p>
<p>The <a href="http://www.sparkfun.com/commerce/product_info.php?products_id=8660">Polar OEM heartrate module</a> outputs a pulse each time it detects a heart beat.  We tie this signal to an interrupt pin on our AVR.  We use the duration between pulses to calculate the heart rate.  The F_CPU (frequency of the CPU) is used in the calculation of said heart beat.  From the factory, AVR internal oscillators are only accurate +/- 10%.  If one calibrates it with the calibration register, you can get it within +/- 1%.  Our heart rate is only going to be as accurate as our cpu frequency.</p>
<p>We also use a timer counter to detect when our signal goes away to alert the user they should go back in range.  </p>
<p><object width="560" height="340"><param name="movie" value="http://www.youtube.com/v/2jIFKiVzxhM&#038;hl=en&#038;fs=1&#038;ap=%2526fmt%3D18"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/2jIFKiVzxhM&#038;hl=en&#038;fs=1&#038;ap=%2526fmt%3D18" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object></p>
<p><strong>Schematic</strong></p>
<table>
<tr>
<td>
<div id="attachment_129" class="wp-caption alignnone" style="width: 160px"><a href="http://tinkerish.com/blog/wp-content/uploads/2009/04/heartrate-logger.png"><img src="http://tinkerish.com/blog/wp-content/uploads/2009/04/heartrate-logger-150x150.png" alt="Schematic for Heart Rate Logger" title="heartrate-logger" width="150" height="150" class="size-thumbnail wp-image-129" /></a><p class="wp-caption-text">Schematic for Heart Rate Logger</p></div>
</td>
<td>
<div id="attachment_142" class="wp-caption alignnone" style="width: 160px"><a href="http://tinkerish.com/blog/wp-content/uploads/2009/04/heartlog-jogging-week2-day1.png"><img src="http://tinkerish.com/blog/wp-content/uploads/2009/04/heartlog-jogging-week2-day1-150x150.png" alt="Graph:  heartrate log of jogging and walking" title="heartlog-jogging-week2-day1" width="150" height="150" class="size-thumbnail wp-image-142" /></a><p class="wp-caption-text">Graph:  heartrate log of jogging and walking</p></div>
</td>
</tr>
</table>
<p><strong>Source Code</strong></p>
<p>I&#8217;m more than happy to share the source code just don&#8217;t have time to clean it up and post it unless it is worth it for you guys.  There are no new core pieces here since I&#8217;ve already posted other projects that use interrupt pins, SD cards, fat filesystems, timer counters, etc.</p>
]]></content:encoded>
			<wfw:commentRss>http://tinkerish.com/blog/?feed=rss2&amp;p=130</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
		<item>
		<title>Logging GPS with an AVR and microSD Card</title>
		<link>http://tinkerish.com/blog/?p=123</link>
		<comments>http://tinkerish.com/blog/?p=123#comments</comments>
		<pubDate>Sun, 22 Mar 2009 01:49:17 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://tinkerish.com/blog/?p=123</guid>
		<description><![CDATA[* custom avr board, microSD breakout, and EM408 GPS breakout
* SD / MMC code from previous post
* FAT library from elm-chan.org
* parsing GPS sentences in software for status indications and space savings
* GPS data is logged to gpslog.txt on the SD card

Please install flash and visit our site to play this video.

var so = new [...]]]></description>
			<content:encoded><![CDATA[<p>* custom avr board, microSD breakout, and EM408 GPS breakout</p>
<p>* SD / MMC code from previous post</p>
<p>* FAT library from elm-chan.org</p>
<p>* parsing GPS sentences in software for status indications and space savings</p>
<p>* GPS data is logged to gpslog.txt on the SD card</p>
<p><script type="text/javascript" src="http://thespicelands.com/media/swfobject.js"></script></p>
<div id="gps-logger">Please install flash and visit our site to play this video.</div>
<p><script type="text/javascript">
var so = new SWFObject('/media/player.swf','mpl','480','288','9');
so.addParam('allowscriptaccess','always');
so.addParam('allowfullscreen','true');
so.addParam('flashvars','&#038;file=gps-logger-small-online.flv&#038;image=http://tinkerish.com/media/gps-logger.jpg');
so.write('gps-logger');
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://tinkerish.com/blog/?feed=rss2&amp;p=123</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>AVR Based Digital Thermometer with Nokia 3310 LCD and Thermistor</title>
		<link>http://tinkerish.com/blog/?p=88</link>
		<comments>http://tinkerish.com/blog/?p=88#comments</comments>
		<pubDate>Sun, 01 Feb 2009 03:03:14 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[AVR Projects]]></category>
		<category><![CDATA[avr]]></category>
		<category><![CDATA[electronics]]></category>
		<category><![CDATA[nokia 3310 lcd]]></category>
		<category><![CDATA[sparkfun]]></category>
		<category><![CDATA[thermistor]]></category>

		<guid isPermaLink="false">http://tinkerish.com/blog/?p=88</guid>
		<description><![CDATA[Summary
This project shows the user of a simple thermistor to measure temperature and display the temperature graphically on a Nokia 3310 LCD.  Thermistors are incredibly cheap (about 50 cents), and provide fraction of a degree accuracy.  The Nokia 3310 Library originally written by CC Darmini was modified yet again, this time to use [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Summary</strong></p>
<p>This project shows the user of a simple thermistor to measure temperature and display the temperature graphically on a Nokia 3310 LCD.  Thermistors are incredibly cheap (about 50 cents), and provide fraction of a degree accuracy.  The Nokia 3310 Library originally written by <a href="http://www.dharmanitech.com/" target="_blank">CC Darmini</a> was modified yet again, this time to use per pixel access while maintaining the ability to draw text.</p>
<table border="0">
<tbody>
<tr>
<td>
<p><div id="attachment_95" class="wp-caption alignnone" style="width: 160px"><a href="http://tinkerish.com/blog/wp-content/uploads/2009/01/thermistor-project-lcd.jpg"><img class="size-thumbnail wp-image-95" title="Thermistor Project LCD Screenshot" src="http://tinkerish.com/blog/wp-content/uploads/2009/01/thermistor-project-lcd-150x150.jpg" alt="Thermistor Project LCD Screenshot" width="150" height="150" /></a><p class="wp-caption-text">Thermistor Project LCD Screenshot</p></div></td>
<td>
<p><div id="attachment_96" class="wp-caption alignnone" style="width: 160px"><a href="http://tinkerish.com/blog/wp-content/uploads/2009/01/thermistor.jpg"><img class="size-thumbnail wp-image-96" title="Thermistor Up Close" src="http://tinkerish.com/blog/wp-content/uploads/2009/01/thermistor-150x150.jpg" alt="Thermistor Up Close" width="150" height="150" /></a><p class="wp-caption-text">Thermistor Up Close</p></div></td>
<td>
<p><div id="attachment_97" class="wp-caption alignnone" style="width: 160px"><a href="http://tinkerish.com/blog/wp-content/uploads/2009/01/devel-board.jpg"><img class="size-thumbnail wp-image-97" title="Development Board" src="http://tinkerish.com/blog/wp-content/uploads/2009/01/devel-board-150x150.jpg" alt="Custom Development Board (but anything can be used)" width="150" height="150" /></a><p class="wp-caption-text">Custom Development Board (but anything can be used)</p></div></td>
</tr>
</tbody>
</table>
<p><strong>Details</strong></p>
<p><object width="480" height="295" data="http://www.youtube.com/v/0yTLKgCJyPM&amp;hl=en&amp;fs=1&amp;ap=%2526fmt%3D18" type="application/x-shockwave-flash"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/0yTLKgCJyPM&amp;hl=en&amp;fs=1&amp;ap=%2526fmt%3D18" /><param name="allowfullscreen" value="true" /></object></p>
<p>The temperature sensing is achieved with a thermistor.  These are simple devices whose resistance changes based on temperature.  There is an equation, the Steinhart and Hart equation, that allows us to calculate the resistance using constants provided in the <a href="http://www.vishay.com/doc?29049" target="_blank">datasheet</a>.  In our case, we&#8217;ve used the <a href="http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&amp;name=BC2301-ND" target="_blank">Vishay thermistor NTCLE100E3103JB0</a> because Sparkfun.com sells it.  We make a simple resistor divider using a 10k resistor and read the resistance using an ADC pin on our AVR.  The accuracy of the resistor is extremely important.  Its value is used in our calculations.  If you choose a similar resistor but without this exact value, be sure you change the code to reflect the resistor you are using.</p>
<p>Our good ole&#8217; <a href="http://www.sparkfun.com/commerce/product_info.php?products_id=8629" target="_blank">Nokia 3310 LCD</a> is used again.  We&#8217;ve modified CC Darmini&#8217;s LCD library again.  Last time, we modified it to get per pixel access using a local pixel buffer.  This time we realized that we needed to be able to modify the pixels just as we did before but don&#8217;t want to actually update the display until we are completely done.  This is only a performance gain if you are writing a significant portion of the screen.  The modified library already only wrote to the bytes that had be modified.</p>
<p>Lastly, the current temp is sent out over the serial port at 9600 for logging.  The schematic does not reflect this because it is not necessary.  We recommend the super simple <a href="http://www.sparkfun.com/commerce/product_info.php?products_id=718" target="_blank">FTDI breakout board</a> to easily power and add serial over USB to any of your projects.</p>
<p><strong>Schematic</strong></p>
<table border="0">
<tbody>
<tr>
<td>
<p><div id="attachment_84" class="wp-caption alignnone" style="width: 160px"><a href="http://tinkerish.com/blog/wp-content/uploads/2009/01/schematic-atmega8-3310-thermistor.png"><img class="size-thumbnail wp-image-84" title="Schematic - atmega8 with 3310 LCD and thermistor" src="http://tinkerish.com/blog/wp-content/uploads/2009/01/schematic-atmega8-3310-thermistor-150x150.png" alt="Schematic - atmega8 with 3310 LCD and thermistor" width="150" height="150" /></a><p class="wp-caption-text">Schematic - atmega8 with 3310 LCD and thermistor</p></div></td>
<td>
<p><div id="attachment_82" class="wp-caption alignnone" style="width: 160px"><a href="http://tinkerish.com/blog/wp-content/uploads/2009/01/nokia_3310_lcd.jpg"><img class="size-thumbnail wp-image-82" title="Nokia 3310 LCD Pinout" src="http://tinkerish.com/blog/wp-content/uploads/2009/01/nokia_3310_lcd-150x150.jpg" alt="Nokia 3310 LCD Pinout" width="150" height="150" /></a><p class="wp-caption-text">Nokia 3310 LCD Pinout</p></div></td>
</tr>
</tbody>
</table>
<p><strong>Source Code and Firmware<br />
</strong></p>
<p><a href="http://tinkerish.com/code/avr-spiceduino-3310-thermistor.tar.gz">avr-spiceduino-3310-thermistor.tar.gz</a></p>
]]></content:encoded>
			<wfw:commentRss>http://tinkerish.com/blog/?feed=rss2&amp;p=88</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Dissection Microscope For Soldering</title>
		<link>http://tinkerish.com/blog/?p=103</link>
		<comments>http://tinkerish.com/blog/?p=103#comments</comments>
		<pubDate>Wed, 28 Jan 2009 18:18:23 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[electronics]]></category>
		<category><![CDATA[microscope]]></category>
		<category><![CDATA[soldering]]></category>

		<guid isPermaLink="false">http://tinkerish.com/blog/?p=103</guid>
		<description><![CDATA[Demonstration of a $94 dissection microscope for surface mount and other small soldering jobs.]]></description>
			<content:encoded><![CDATA[<p>I received a <a title="dissection microscope from walmart.com" href="http://www.walmart.com/catalog/product.do?product_id=8399191" target="_blank">dissection microscope </a>as a present for Christmas.  The video below demonstrates how well it works for inspecting small soldering jobs.  It has proven invaluable for troubleshooting soldering jobs <strong>and</strong> doing surface mount soldering.  It is mono (only one eyepiece) and only 20x and 40x power but it does the job great.  The fact that it is is dissection microscope means there is plenty of room at the bottom for working.  I use a compact florescent light to illuminate it because I get lots of light and the bulb doesn&#8217;t make my working area hot.  Having a nice pair of bent angle tweezers has been great for holding things while soldering or repairing bad soldering jobs.  The soldering job in the video was done before I had the microscope on the fine pitch pins of the Nokia 3310 LCD.  I soldered a section cut out from an IDE ribbon cable.  From looking around, $94 for this microscope appears to be the least expensive way to get this functionality.</p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/J6jxDQo05Dk&#038;hl=en&#038;fs=1&#038;ap=%2526fmt%3D18"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/J6jxDQo05Dk&#038;hl=en&#038;fs=1&#038;ap=%2526fmt%3D18" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://tinkerish.com/blog/?feed=rss2&amp;p=103</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AVR based Etch A Sketch with Nokia 3310 LCD</title>
		<link>http://tinkerish.com/blog/?p=50</link>
		<comments>http://tinkerish.com/blog/?p=50#comments</comments>
		<pubDate>Sun, 25 Jan 2009 15:18:28 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[AVR Projects]]></category>
		<category><![CDATA[atmega8]]></category>
		<category><![CDATA[avr]]></category>
		<category><![CDATA[electronics]]></category>
		<category><![CDATA[IR]]></category>
		<category><![CDATA[nokia 3310 lcd]]></category>
		<category><![CDATA[remote control]]></category>

		<guid isPermaLink="false">http://tinkerish.com/blog/?p=50</guid>
		<description><![CDATA[This project allows one to use a universal IR remote to conrol an AVR based Etch A Sketch.]]></description>
			<content:encoded><![CDATA[<p><strong>Summary</strong></p>
<p>This project allows one to use a universal IR remote to control an AVR based Etch A Sketch.  For display, we use the Nokia 3310 LCD ($10 from SparkFun.com).  The Etch A Sketch functionality is simply the ability to draw in a straight line up, down, left, right.  The purpose of this project was to demonstrate the improvements to <a title="Nokia 3310 Library" href="http://www.dharmanitech.com/2008/10/thermometer-design-using-ds1621.html" target="_blank">CC Dharmani&#8217;s NOkia 3310 library</a> that allows per pixel access using a pixel buffer.  The improved version has been included in the source of this project *.  As originally written, the library worked great displaying fonts of two different sizes, clearing the screen, and drawing a boarder around the edges.  Because of the way one must talk to the screen, it did not allow raw pixel access or random drawing.  Doing so requires a local cache (buffer) of the pixels.  This way, if you want to set a single pixel, you have the old value that you set to modify and write it back.  The improvements shown here do just that.  Additionally, we also have included a small tool to allow a .pgm file to be converted to a header for a splash screen.  The additional routine to display the image is also included.</p>
<p>* Hopefully CC Dharmani and I will get together and put this library in a source repository to store continual improvements<strong>.<br />
</strong></p>
<p><strong>Details</strong></p>
<p>For input, we use a 38kHz IR demodulating receiver.  These can be picked up for $4 at RadioShack or $0.75 on Digikey (parts list below).  Sparkfun.com also has <a title="Sparkfun.com IR breakout" href="http://www.sparkfun.com/commerce/product_info.php?products_id=8554" target="_blank">a fancy one for $9.95</a>.  For display, we use our handy dandy Nokia 3310 replacement LCD.  We talk to it using SPI.  The arrow keys on the remote move the cursor and draw a line as it goes.  The MENU or MUTE buttons swipe the screen.</p>
<p><object width="480" height="295" data="http://www.youtube.com/v/D3rQfWuJPzc&amp;hl=en&amp;fs=1&amp;ap=%2526fmt%3D18" type="application/x-shockwave-flash"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/D3rQfWuJPzc&amp;hl=en&amp;fs=1&amp;ap=%2526fmt%3D18" /><param name="allowfullscreen" value="true" /></object></p>
<p><strong>Schematics</strong></p>
<table border="0">
<tbody>
<tr>
<td>
<p><div id="attachment_85" class="wp-caption alignnone" style="width: 160px"><a href="http://tinkerish.com/blog/wp-content/uploads/2009/01/atmega8-with-nokia-3310-and-ir.png"><img class="size-thumbnail wp-image-85" title="Schematic - atmega8 with 3310 LCD and IR sensor" src="http://tinkerish.com/blog/wp-content/uploads/2009/01/atmega8-with-nokia-3310-and-ir-150x150.png" alt="Schematic - atmega8 with 3310 LCD and IR sensor" width="150" height="150" /></a><p class="wp-caption-text">Schematic - atmega8 with 3310 LCD and IR sensor</p></div></td>
<td>
<p><div id="attachment_82" class="wp-caption alignnone" style="width: 160px"><a href="http://tinkerish.com/blog/wp-content/uploads/2009/01/nokia_3310_lcd.jpg"><img class="size-thumbnail wp-image-82" title="Nokia 3310 LCD Pinout" src="http://tinkerish.com/blog/wp-content/uploads/2009/01/nokia_3310_lcd-150x150.jpg" alt="Nokia 3310 LCD Pinout" width="150" height="150" /></a><p class="wp-caption-text">Nokia 3310 LCD Pinout</p></div></td>
</tr>
</tbody>
</table>
<p><strong>Source Code</strong></p>
<table border="0">
<tbody>
<tr>
<td><a href="http://tinkerish.com/code/3310_routines.c">3310_routines.c </a> <a href="http://tinkerish.com/code/3310_routines.h">3310_routines.h</a></td>
<td>CC Darminitech&#8217;s Nokia 3310 LCD Library modified to support a local pixel buffer cache for individual pixel access.</td>
</tr>
<tr>
<td><a title="drawing source code" href="http://tinkerish.com/code/avr-spiceduino-3310-drawing.tar.gz">avr-spiceduino-3310-drawing.tar.gz</a></td>
<td>Entire source code and firmware and pgmtoheader program -</td>
</tr>
<tr>
<td><a href="http://tinkerish.com/code/pgmtoheader.c">pgmtoheader.c</a></td>
<td>Quickly hacked program to read in a 84&#215;56 8-bits per pixel .pgm file and spit out a splash.h file for inclusion to an AVR project to display images.</td>
</tr>
</tbody>
</table>
<p>Steps for making splash screens (included as header files) with pgmtoheader.c:</p>
<ul>
<li>open a file that you want to display on your Nokia 3310 (black and white graphics are best) in GIMP or Photoshop</li>
<li>resize to a height of 56</li>
<li>use the thresholding tool to find a good value to use as the point between black and white.  You probably will have to slide it back and forth until you get a good image.</li>
<li>stretch/resize to 84&#215;56</li>
<li>save as .pgm (raw not ascii)</li>
<li>open a hexeditor (I use khexedit) and hack off the header portion (or modify the code to skip over it)</li>
<li>compile pgmtoheader with &#8216;gcc -o pgmtoheader pgmtoheader.c&#8217;</li>
<li>run the pgmtoheader program on it with &#8216;./pgmtoheader /path/to/file.pgm &gt; splash.h&#8217;</li>
<li>you can now #include &#8220;splash.h&#8221; in the 3310_routines.c and call LCD_drawSplash() to display it.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://tinkerish.com/blog/?feed=rss2&amp;p=50</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

