<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>LeafLabs Garden &#187; Topic: Arduino TC4 shield - highly sensitive 4-channel thermocouple logger &#38; controller</title>
		<link>http://forums.leaflabs.com/topic.php?id=10289</link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:12:12 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://forums.leaflabs.com/search.php</link>
		</textInput>
		<atom:link href="http://forums.leaflabs.com/rss.php?topic=10289" rel="self" type="application/rss+xml" />

		<item>
			<title>Bhante on "Arduino TC4 shield - highly sensitive 4-channel thermocouple logger &#38; controller"</title>
			<link>http://forums.leaflabs.com/topic.php?id=10289#post-24287</link>
			<pubDate>Sat, 06 Apr 2013 07:15:48 +0000</pubDate>
			<dc:creator>Bhante</dc:creator>
			<guid isPermaLink="false">24287@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Thank you both for replying. The hardware is indeed as gbulmer linked (I have the earlier version 3.00 and 4.00 boards, but the difference is not important. In any case as crenn pointed out the I2C is powered from 3.3V, all the chips can operate at under 3.3V, and also the Vin pin is not connected except to outputs OT1 and OT2. I've powered the board from 3.3V on an Arduino and then it works perfectly and temperatures are read correctly. &#60;/p&#62;
&#60;p&#62;The point about I2C port 1 is that it has SDA on D9, which is an important pin used by the TC4 for PWM output. &#60;/p&#62;
&#60;p&#62;PWM is indeed a lot more flexible, and the PWM libraries are not in fact needed at all on the Maple/Olimexino, because any desired 16bit PWM can be set up directly and very easily on pins 9, 3 and 2 for outputs OT1, I/O3 and I/O2. The only exception is pin 10 (connected to output OT2) which I don't use, but some people use a PWM signal on pin 10 to control an AC fan with phase control. I suspect two timer channels could be used with an interrupt to put a bit-banged phase control signal directly on pin 10 (with help of input from a zero-cross detector) - or would that only be possible on specific pins?&#60;/p&#62;
&#60;p&#62;I have now got I2C working on the Olimexino to a limited extent - I can configure and read the MCP9800 correctly, using the old software I2C on D19 and D20, but for some reason the MCP3424 does not work at all. Probably the config of the chip is not working, but in any case I cannot read anything - all I get is all zero bytes or all FF bytes. I wanted to try Crennn's library on I2C2 - what is the syntax for this? Are there any Maple-IDE examples?&#60;/p&#62;
&#60;p&#62;I also had problems with the EEPROM because the mcEEPROM library would not compile. Is there a guide to interpreting the compiler output somewhere? I am getting this:&#60;/p&#62;
&#60;p&#62;Going to build using 'armcompiler' (ARM)&#60;br /&#62;
	Compiling core...&#60;br /&#62;
	Compiling libraries: mcEEPROM, Wire, TypeK&#60;/p&#62;
&#60;p&#62;                 from P:\Programs\Maple-IDE\maple-ide-0.0.12-windowsxp32\hardware\leaflabs\cores\maple/wirish_math.h:35,&#60;/p&#62;
&#60;p&#62;                 from P:\Programs\Maple-IDE\maple-ide-0.0.12-windowsxp32\hardware\leaflabs\cores\maple/wirish.h:45,&#60;/p&#62;
&#60;p&#62;                 from P:\Programs\Maple-IDE\maple-ide-0.0.12-windowsxp32\hardware\leaflabs\cores\maple/WProgram.h:27,&#60;/p&#62;
&#60;p&#62;                 from P:\Document\MapleIDE\libraries\mcEEPROM\/mcEEPROM.h:4,&#60;/p&#62;
&#60;p&#62;                 from P:\Document\MapleIDE\libraries\mcEEPROM\mcEEPROM.cpp:8:&#60;/p&#62;
&#60;p&#62;p:\programs\maple-ide\maple-ide-0.0.12-windowsxp32\hardware\tools\arm\bin\../lib/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/include/sys/reent.h:490: error: #if with no expression&#60;/p&#62;
&#60;p&#62;Listing of all compiler output follows.&#60;br /&#62;
	Note: &#38;lt;BUILD&#38;gt; stands for the temporary build directory used to compile your sketch, which is:&#60;br /&#62;
		Q:\Temp\build7028996388896413838.tmp&#60;/p&#62;
&#60;p&#62;	Also note that because of preprocessing, line numbers won't match up exactly.  We're working on a fix.&#60;br /&#62;
In file included from p:\programs\maple-ide\maple-ide-0.0.12-windowsxp32\hardware\tools\arm\bin\../lib/gcc/arm-none-eabi/4.4.1/include-fixed/math.h:19,&#60;br /&#62;
                 from P:\Programs\Maple-IDE\maple-ide-0.0.12-windowsxp32\hardware\leaflabs\cores\maple/wirish_math.h:35,&#60;br /&#62;
                 from P:\Programs\Maple-IDE\maple-ide-0.0.12-windowsxp32\hardware\leaflabs\cores\maple/wirish.h:45,&#60;br /&#62;
                 from P:\Programs\Maple-IDE\maple-ide-0.0.12-windowsxp32\hardware\leaflabs\cores\maple/WProgram.h:27,&#60;br /&#62;
                 from P:\Document\MapleIDE\libraries\mcEEPROM\/mcEEPROM.h:4,&#60;br /&#62;
                 from P:\Document\MapleIDE\libraries\mcEEPROM\mcEEPROM.cpp:8:&#60;br /&#62;
p:\programs\maple-ide\maple-ide-0.0.12-windowsxp32\hardware\tools\arm\bin\../lib/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/include/sys/reent.h:490: error: #if with no expression
&#60;/p&#62;</description>
		</item>
		<item>
			<title>crenn on "Arduino TC4 shield - highly sensitive 4-channel thermocouple logger &#38; controller"</title>
			<link>http://forums.leaflabs.com/topic.php?id=10289#post-22714</link>
			<pubDate>Wed, 06 Mar 2013 01:08:54 +0000</pubDate>
			<dc:creator>crenn</dc:creator>
			<guid isPermaLink="false">22714@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;If gbulmer has the right schematic, the shield looks like it will work; as the location it will try to pull 5V will actually pull from VDDA which is 3.3V. All the ICs can run at 3.3V fine and I can't see anything else that would cause an issue with the shield apart from not being able to use the I2C hardware at all.&#60;/p&#62;
&#60;p&#62;In the future, having the hardware running at 3.3V would probably be better where possible and then use a level convertor utilising IOREF (which is found on the new Arduinos), although this could cause a problem for existing older arduinos and arduino-compatible boards which do not follow this newer layout. This would include the Maple.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "Arduino TC4 shield - highly sensitive 4-channel thermocouple logger &#38; controller"</title>
			<link>http://forums.leaflabs.com/topic.php?id=10289#post-22710</link>
			<pubDate>Tue, 05 Mar 2013 08:42:48 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">22710@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Bhante - would you please confirm the T4C shield hardware you are asking about is described here:&#60;br /&#62;
&#60;a href=&#34;http://code.google.com/p/tc4-shield/source/browse/hardware/TC4/TC4%20V531/tc4-controller-0531-sch.pdf&#34; rel=&#34;nofollow&#34;&#62;http://code.google.com/p/tc4-shield/source/browse/hardware/TC4/TC4%20V531/tc4-controller-0531-sch.pdf&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;AFAICT - everything on that shield is designed to operate at 5V. &#60;/p&#62;
&#60;p&#62;Maple is a 3.3V part, and many of the pins on the shield headers are not 5V tolerant; they should only be operated in the range 0V to 3.3V. They have a absolute max input of 4V, so for example, no ADC pin should ever be driven above 4V. Without looking in detail at every component, I would expect some of it not to work for input. Connecting I2C between 3.3V and 5V usually uses a simple level shifter (MOSFET), but I couldn't see such circuitry on the shield.&#60;/p&#62;
&#60;p&#62;The PWM timers on Maple are much more flexible than the Arduino's, so I'd expect to be able to implement any PWM scheme supported by the Arduino. However, a custom PWM library is likely to rely on hardware specific ATmega hardware features, and that will need porting. There is quite a rich Maple Timer library which may help.&#60;/p&#62;
&#60;p&#62;I don't understand your point about using I2C port 2 instead of port 1.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bhante on "Arduino TC4 shield - highly sensitive 4-channel thermocouple logger &#38; controller"</title>
			<link>http://forums.leaflabs.com/topic.php?id=10289#post-22704</link>
			<pubDate>Mon, 04 Mar 2013 16:09:30 +0000</pubDate>
			<dc:creator>Bhante</dc:creator>
			<guid isPermaLink="false">22704@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I am wondering if anybody has tested the TC4 thermocouple shield with the Maple, or ported its thermocouple libraries? &#60;/p&#62;
&#60;p&#62;The TC4 is a 4-channel thermocouple logger with sufficiently accurate digitising of thermocouples to produce highly sensitive rate-of-rise plots. It can control outputs such as heaters, DC fans, AC fans and motors etc using PWM signals on Arduino pins 9, 3 and 11 (and also in its later versions using a phase angle signal on pin 10) via solid state relays or transistors, optoisolators etc. It was designed to control coffee roasting machines, but can also be used for controlling other types of temperature-based equipment, or simply as a very accurate temperature logger, PID etc. It is also often used for controlling espresso machines.&#60;/p&#62;
&#60;p&#62;For the Arduino it has libraries for K-type, J-type and T-type thermocouples, and a library for the ADC on the shield, 16 bit PWM etc. The libraries are here:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://code.google.com/p/tc4-shield/source/browse/#svn%2Fapplications%2Flibraries%2Ftags%2FREL-300%2Flibraries&#34; rel=&#34;nofollow&#34;&#62;http://code.google.com/p/tc4-shield/source/browse/#svn%2Fapplications%2Flibraries%2Ftags%2FREL-300%2Flibraries&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;The majority of TC4 users also use a specially developed LCD adaptor and button interface attached via I2C, details here:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://code.google.com/p/tc4-shield/source/browse/#svn%2Fhardware%2FLCDapter&#34; rel=&#34;nofollow&#34;&#62;http://code.google.com/p/tc4-shield/source/browse/#svn%2Fhardware%2FLCDapter&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Can anyone advise me on the likely compatibility of this shield to Maple? As I see it the most important issues are the use of Arduino timers and PWM on pins 3 and 9, as the TC4 uses a custom PWM library that addresses the timers 1 and 2 on the ATMega directly.&#60;/p&#62;
&#60;p&#62;I assume that by using I2C port 2 instead of I2C port 1 we wouldn't get into conflict with port 1's use of D9.&#60;/p&#62;
&#60;p&#62;Bhante&#60;/p&#62;
&#60;p&#62;A few other hardware notes on the TC4 shield:&#60;/p&#62;
&#60;p&#62;Two pots can be attached to the analog ports 0 and 1 as a voltage divider to control the PWM output on pins D9 (OT1) and D3 (IO3); D9 is configured as 16 bit PWM to give a long duty cycle PWM (64 Hz to 4 seconds) suitable for controlling heaters (via relay or SSR). D3 is configured as 8 bit PWM to give a low power 8 bit PWM via a transistor suitable for controlling a DC fan. An additional output OT2 is available on pin 10, but its use has changed across different versions of the shield (early version: alternative 16 bit PWM but not implemented in the code; later versions: phase angle control via an external interface board).&#60;/p&#62;
&#60;p&#62;The early shield versions had a standard LCD parallel interface in addition to the I2C LCD interface, but the parallel interface was dropped in later versions because most people used the I2C LCD with 4 built-in buttons.&#60;/p&#62;
&#60;p&#62;The 4 thermocouples are connected to an MCP3424 ADC on the shield on the I2C bus, and therefore do not use the Arduino ADC which has inadequate resolution. &#60;/p&#62;
&#60;p&#62;There is also a JeePort interface connected to D3, D6 and A2, but that is not widely used. Later versions also have an additional output IO2 on D2, but that is not essential to the board's operation. &#60;/p&#62;
&#60;p&#62;The software uses extensive timing using T0, and therefore this is not used for any of the PWM signals. A4 and A5 are of course used for the I2C interface. &#60;/p&#62;
&#60;p&#62;The TC4 has a small 24C512 EEPROM used usually only for configuration data; for logging purposes data is sent out on the serial port. Some users have added bluetooth and control a coffee roaster or espresso machine from a smartphone.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
