<?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>twam.info &#187; Sensor</title>
	<atom:link href="http://www.twam.info/tag/sensor/feed" rel="self" type="application/rss+xml" />
	<link>http://www.twam.info</link>
	<description>My computer, physics, electronics &#38; photography blog</description>
	<lastBuildDate>Wed, 25 Jan 2012 20:49:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Adding additional I²C sensors to ALIX.3D3</title>
		<link>http://www.twam.info/hardware/alix/adding-additional-i2c-sensors-to-alix3d3</link>
		<comments>http://www.twam.info/hardware/alix/adding-additional-i2c-sensors-to-alix3d3#comments</comments>
		<pubDate>Thu, 07 May 2009 20:02:03 +0000</pubDate>
		<dc:creator>twam</dc:creator>
				<category><![CDATA[Alix]]></category>
		<category><![CDATA[ALIX.3D3]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Sensor]]></category>
		<category><![CDATA[Temperature]]></category>

		<guid isPermaLink="false">http://www.twam.info/?p=429</guid>
		<description><![CDATA[The manual of the ALIX.3D3 board mentions a lot of pin descriptions of all pin headers on the board. J8 interfaces the SMBus of the AMD CS5536 Geode companion (which is compatible to I²C if bus speed is below 100kHz, see Maxim’s Appnote for detailed comparison). So why not add additional I²C sensors. As an [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_431" class="wp-caption alignright" style="width: 220px"><a href="http://www.twam.info/wp-content/uploads/2009/05/smbus.jpg"><img class="size-medium wp-image-431" title="J8: SMBus" src="http://www.twam.info/wp-content/uploads/2009/05/smbus-210x157.jpg" alt="J8: SMBus" width="210" height="157" /></a><p class="wp-caption-text">J8: SMBus</p></div>
<p>The <a href="http://www.alix-box.info/wiki/images/Alix2.pdf">manual</a> of the ALIX.3D3 board mentions a lot of pin descriptions of all pin headers on the board. J8 interfaces the <a href="http://www.smbus.org/">SMBus</a> of the <a href="http://www.amd.com/us-en/ConnectivitySolutions/ProductInformation/0,,50_2330_9863_13022,00.html">AMD CS5536</a> Geode companion (which is compatible to <a href="http://de.wikipedia.org/wiki/I%C2%B2C">I²C</a> if bus speed is below 100kHz, see <a href="http://www.maxim-ic.com/appnotes.cfm/appnote_number/476">Maxim’s Appnote</a> for detailed comparison). So why not add additional I²C sensors. As an example I connected an <a href="http://www.national.com/ds/LM/LM75.pdf">LM75</a> temperature sensor.</p>
<p>First of all we need to add some pin headers to J8 found on board next to the USB port. <span id="more-429"></span>The pin assignment can be found on page 18 of the <a href="http://www.alix-box.info/wiki/images/Alix2.pdf">manual</a>:</p>
<table border="0">
<tbody>
<tr>
<th>PIN</th>
<th>signal</th>
<th>descriptions</th>
</tr>
<tr>
<td>1</td>
<td>+3.3V</td>
<td>power supply</td>
</tr>
<tr>
<td>2</td>
<td>SMB_SCL</td>
<td>SMBus/I²C clock</td>
</tr>
<tr>
<td>3</td>
<td>SMB_SDA</td>
<td>SMBus/I²C data</td>
</tr>
<tr>
<td>4</td>
<td>GND</td>
<td>ground</td>
</tr>
</tbody>
</table>
<p>We have to connect these four lines with the power (pin 8), SDA (pin 1), SCL (pin 2) and ground (pin 4) of the LM75 chip. A0, A1 and A2 have to be connected either to GND or power. The level on these pins configure the slave address of the device. I connected all of them with GND. The typical application example found in the <a href="http://www.national.com/ds/LM/LM75.pdf">datasheet</a> advises an 100 nF capacitor between pin 4 and pin 8 close to the chip:</p>
<p><a href="http://www.twam.info/wp-content/uploads/2009/05/lm75.png"><img class="aligncenter size-full wp-image-428" title="LM75: Typical application" src="http://www.twam.info/wp-content/uploads/2009/05/lm75.png" alt="LM75: Typical application" width="400" height="280" /></a></p>
<p>If soldered the LM75 (a smd chip) to an adapter and connected everything on a bread board:</p>
<p><a href="http://www.twam.info/wp-content/uploads/2009/05/lm75_wired.jpg"><img class="aligncenter size-medium wp-image-436" title="LM75 wired on bread board" src="http://www.twam.info/wp-content/uploads/2009/05/lm75_wired-210x196.jpg" alt="LM75 wired on bread board" width="210" height="196" /></a></p>
<p>If everything is connected it&#8217;s time to add software support. I assume you already installed the onboard temperature sensors descriped in my <a href="http://www.twam.info/hardware/alix/temperature-sensor-on-alix3d3">previous article</a>. So, only support for the LM75 is need in the kernel:</p>
<pre>Device Drivers  ---&gt;
   &lt;*&gt; Hardware Monitoring support  ---&gt;
      &lt;*&gt;   National Semiconductor LM75 and compatibles</pre>
<p>After compiling and rebooting you can run <em>sensors</em> again. It should show up the new device:</p>
<pre>lm75-i2c-0-48
Adapter: CS5536 ACB0
temp:      +30.0 C  (high = +80.0 C, hyst = +75.0 C)</pre>
<p>So connecting additional sensors is very easy (when they&#8217;re support in the kernel).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.twam.info/hardware/alix/adding-additional-i2c-sensors-to-alix3d3/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Temperature sensor on ALIX.3D3</title>
		<link>http://www.twam.info/hardware/alix/temperature-sensor-on-alix3d3</link>
		<comments>http://www.twam.info/hardware/alix/temperature-sensor-on-alix3d3#comments</comments>
		<pubDate>Thu, 30 Apr 2009 13:35:57 +0000</pubDate>
		<dc:creator>twam</dc:creator>
				<category><![CDATA[Alix]]></category>
		<category><![CDATA[ALIX.3D3]]></category>
		<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Sensor]]></category>
		<category><![CDATA[Temperature]]></category>

		<guid isPermaLink="false">http://www.twam.info/?p=308</guid>
		<description><![CDATA[The schematics of the ALIX.3D3 mention a temperature sensors LM86 on page 2 which external sensors pins are connected to the TDP/TDN pins of the Geode LX800 CPU. So this sensor should be able to measure CPU and mainboard temperature. The LM86 ist connected by the SMBus (which is compatible to I²C if bus speed [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_313" class="wp-caption alignright" style="width: 220px"><a href="http://www.twam.info/wp-content/uploads/2009/04/lm86.jpg"><img class="size-medium wp-image-313" title="LM86 on ALIX.3D3" src="http://www.twam.info/wp-content/uploads/2009/04/lm86-300x228.jpg" alt="LM86 on ALIX.3D3" width="210" height="160" /></a><p class="wp-caption-text">LM86 on ALIX.3D3</p></div>
<p>The <a href="http://www.alix-box.info/wiki/images/Alix3c.pdf">schematics</a> of the ALIX.3D3 mention a temperature sensors <a href="http://www.national.com/mpf/LM/LM86.html">LM86</a> on page 2 which external sensors pins are connected to the TDP/TDN pins of the Geode LX800 CPU. So this sensor should be able to measure CPU and mainboard temperature.</p>
<p>The LM86 ist connected by the <a href="http://www.smbus.org/">SMBus</a> (which is compatible to <a href="http://de.wikipedia.org/wiki/I%C2%B2C">I²C</a> if bus speed is below 100kHz, see <a href="http://www.maxim-ic.com/appnotes.cfm/appnote_number/476">Maxim&#8217;s Appnote</a> for detailed comparison) via the <a href="http://www.amd.com/us-en/ConnectivitySolutions/ProductInformation/0,,50_2330_9863_13022,00.html">AMD CS5536</a> Geode companion.<span id="more-308"></span></p>
<p>To support the temperature sensor by the linux kernel, several options must be set:</p>
<pre>Device Drivers  ---&gt;
&lt;*&gt; I2C support  ---&gt;
&lt;*&gt;   I2C device interface
      I2C Hardware Bus support  ---&gt;
      &lt;*&gt; Geode ACCESS.bus support
&lt;*&gt; Hardware Monitoring support  ---&gt;
&lt;*&gt;   National Semiconductor LM90 and compatibles</pre>
<p>After compiling and booting the kernel, we need some userspace tools to read information by the temperatur sensor. Usually this is done by <a href="http://www.lm-sensors.org/">Lm_sensors</a>. Gentoo provides ebuilds so you should be fine with</p>
<pre>emerge -va lm_sensors</pre>
<p>After emerging, you should run</p>
<pre>sensors-detect</pre>
<p>to search for sensors. The program will ask you some question on which devices it should scan for sensors and which modules should be loaded. If you compiled everything into kernel (not into modules) you should be fine with</p>
<pre>We can start with probing for (PCI) I2C or SMBus adapters.
Do you want to probe now? (YES/no): YES
Probing for PCI bus adapters...
Use driver `scx200_acb' for device 0000:00:0f.0: CS5536 [Geode companion] ISA

We will now try to load each adapter module in turn.
Load `scx200_acb' (say NO if built into your kernel)? (YES/no): no
If you have undetectable or unsupported I2C/SMBus adapters, you can have
them scanned by manually loading the modules before running this script.

We are now going to do the I2C/SMBus adapter probings. Some chips may
be double detected; we choose the one with the highest confidence
value in that case.
If you found that the adapter hung after probing a certain address,
you can specify that address to remain unprobed.

Next adapter: CS5536 ACB0 (i2c-0)
Do you want to scan it? (YES/no/selectively): YES
Client found at address 0x4c
Handled by driver `lm90' (already loaded), chip type `lm86'

Some chips are also accessible through the ISA I/O ports. We have to
write to arbitrary I/O ports to probe them. This is usually safe though.
Yes, you do have ISA I/O ports even if you do not have any ISA slots!
Do you want to scan the ISA I/O ports? (YES/no): no

Some Super I/O chips may also contain sensors. We have to write to
standard I/O ports to probe them. This is usually safe.
Do you want to scan for Super I/O sensors? (YES/no): no

Some south bridges, CPUs or memory controllers may also contain
embedded sensors. Do you want to scan for them? (YES/no): no</pre>
<p>After answering all questions, sensor-detect should be able to find your sensor</p>
<pre>Driver `lm90' (should be inserted):
  Detects correctly:
  * Bus `CS5536 ACB0'
    Busdriver `UNKNOWN', I2C address 0x4c
    Chip `lm86' (confidence: 6)</pre>
<p>sensors-detect will ask to save config (say YES) and propose some to commands to be executed, but we don&#8217;t care, because we compiled everything direct into kernel.</p>
<p>Now sould be able to run <em>sensors</em> and get temperatures:</p>
<pre>lm86-i2c-0-4c
Adapter: CS5536 ACB0
M/B Temp:    +47 C  (low  =    +0 C, high =   +70 C)
CPU Temp:  +56.8 C  (low  =  +0.0 C, high = +70.0 C)
M/B Crit:    +85 C  (hyst =   +75 C)
CPU Crit:    +85 C  (hyst =   +75 C)</pre>
<p>If everthing&#8217;s fine, you can add lm_sensors to default runlevel with</p>
<pre>rc-update add lm_sensors default</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.twam.info/hardware/alix/temperature-sensor-on-alix3d3/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

