topbanner.gif
Login
Username

Password




Not a member yet?
Click here to register.

Forgotten your password?
Request a new one here.
Shoutbox
You must login to post a message.

CharcoalRoaster
11/04/2019 1:58 AM
+1 snwcmpr

snwcmpr
11/03/2019 2:16 AM
Can we make the shoutbox UNAVAILABLE until a member has a certain number of posts?

allenb
11/01/2019 2:20 AM
Funopt, please post in the gas and electric heat sources forum

Funopt
10/30/2019 5:17 AM
Can someone help me for using forced propane burner as my heating element. I rather want to use lpg than electric. Do you think it would work

snwcmpr
10/22/2019 5:31 AM
Thanks to you all....... I was not sleeping ... I stayed awake worried about it all. :)

Users Online
Guests Online: 4

Members Online: 0

Total Members: 6,236
Newest Member: dale67
In Memory Of Ginny
Donations

Latest Donations
renatoa - 2.00
JitterzZ - 2.01
renatoa - 2.00
allenb - 25.00
snwcmpr - 10.00

View Thread

Who is here? 1 guest(s)
 Print Thread
Arduino MAX31855 to Artisan
Gullygossner
I have a MAX31855 in the mail and I was hoping to use an Arduino UNO, K type thermocouple and SSR to drive the heater on my West Bend P1 Roaster via Artisan.

I tried to follow this tutorial a few months back with a MAX6675 but was unsuccessful and shelved the idea for a while. https://medium.com/@lukasgrasse/how-to-make-an-arduino-controlled-coffee-roaster-f6a3334fd7d5

I would like to give it another go and came across this code which looks like it may fit the bill.
https://github.com/bitwisetech/popc

I am looking for some insight as to how to have Artisan speak to my Arduino using the Popc code. Also if anyone knows of a build I could read up on using the above mentioned hardware, that would be icing on the cake.
 
renatoa
I worked a lot with popc code, I have even my own customised build, so I can answer to any question you have, if the author no more listen here.
Please shot with particular questions you have.
 
Sinobi
Gullygossner I PM'ed you.

I have code and schematics that probably will help you.
They are only almost ready for going public, so until then you alone will get them in PM.
I will do a separate roaster build thread in a very short time with all info for the forum users.

/Henrik
 
elkayem
Adafruit’s MAX31855 library works really well. I’m using it in my project right now. It is available in the Arduino Library Manager.

I should be posting some code showing communication of MAX31855 data to Artisan on my github site this weekend, but it isn’t there yet. It is pretty darn simple so I’ll bet you’ll figure it out by then. I’m not familiar with the popc code so can’t help there.
 
Gullygossner
I think the code from Henrik is going to do the trick. I feel my main issue may lie with the settings to configure artisan to modbus.
 
renatoa
The problem is the lame resolution and sample time of MAX circuits.
With 0.25 C degree resolution you need a 15 seconds averaging window, at least, to have 10% precision for RoR.
Why insist on these circuits when you can have 0.012 C resolution, and 2 channels, for same money as a single max ?
 
Sinobi
I find that an averaging of 4 readings pr. second, that is close to maximum for the MAX6675, yields a reasonable steady temperature reading.

But please, tell what better options are out there.
 
Sinobi
renatoa wrote:

The problem is the lame resolution and sample time of MAX circuits.
With 0.25 C degree resolution you need a 15 seconds averaging window, at least, to have 10% precision for RoR.
Why insist on these circuits when you can have 0.012 C resolution, and 2 channels, for same money as a single max ?


Running the numbers
MAX31855 0.25/0.012/5 (five samples/sec) equals 4 seconds to reach 0.012C resolution
MAX6675 0.25/0.012/4 (four samples/sec) equals 5 seconds to reach 0.012C resolution
Not saying that is fast, but it's much faster than 15 seconds
 
renatoa
My math (and experience) is different.
Maybe the above could work for a static value, but we measure here a permanent moving point, and what is more important, we use this data to compute RoR, which is first derivative, i.e. a magnifier of every sudden variation.

Let's say at minute 5 we have 150 C degrees. and ROR 10 deg / minute.
This means at 5:15 theoretically we should have 150+10/4 = 152.5 degrees.
How accurate can you measure this temperature with a MAX? +/- 0.25 degrees, so at 5:15 you can have either 152.25 either 152.75 reading, leading to a random ROR value in the 9-11 interval, thus 10% precision.
Any interval shorter than 15 seconds will degrade this precision, whatever averaging or oversampling you are doing, will only smooth transitions between the 0.25 C degree steps.

But, still... if I can have 0.012 C native resolution, i.e. LSB value of ADC... for a cost less than a MAX... why should I even consider the MAX path, because... why ?

Did I mentioned also that I have a 60-70ms sample time, instead 200-250 as for a MAX ? Grin
 
Sinobi
Sinobi wrote:

But please, tell what better options are out there.


And the answer is....?
 
Gullygossner
I've got the sketch loaded, I press on in Artisan and get no temperature readings. As soon as I make a change to the slider I get an error 'Modbus Error: writeSingleRegister() Modbus Error: [Connection] Failed to connect[ModbusSerialClient(rtu baud [19200])]@line331'

I currently don't have the ssr wired up, could this be why it's throwing this error? I was hoping I could test everything on the software side prior to wiring everything up just to make sure I had this working first.
Edited by Gullygossner on 03/02/2019 3:54 AM
 
Sinobi
No, Artisan should just update the MODBUS registers over the USB connection.
As soon as you click On, you should see one second of MODBUS Communication Error in the upper left, then it should read Resume and the the temp should come up. All in less than five seconds.
It sounds like you might have selected the wrong USB port (comm port) in Artisan Port Configuration.
Edited by Sinobi on 03/02/2019 6:21 AM
 
elkayem
renatoa wrote:

My math (and experience) is different.
Maybe the above could work for a static value, but we measure here a permanent moving point, and what is more important, we use this data to compute RoR, which is first derivative, i.e. a magnifier of every sudden variation.

Let's say at minute 5 we have 150 C degrees. and ROR 10 deg / minute.
This means at 5:15 theoretically we should have 150+10/4 = 152.5 degrees.
How accurate can you measure this temperature with a MAX? +/- 0.25 degrees, so at 5:15 you can have either 152.25 either 152.75 reading, leading to a random ROR value in the 9-11 interval, thus 10% precision.
Any interval shorter than 15 seconds will degrade this precision, whatever averaging or oversampling you are doing, will only smooth transitions between the 0.25 C degree steps.

But, still... if I can have 0.012 C native resolution, i.e. LSB value of ADC... for a cost less than a MAX... why should I even consider the MAX path, because... why ?

Did I mentioned also that I have a 60-70ms sample time, instead 200-250 as for a MAX ? Grin


Interesting discussion. (Gullygossner, I hope this isn't too off topic!)

Renatoa, I am presuming you are comparing the MAX31855 to the MCP3424 ADC on the TC4. It isn't obvious to me that the MCP3424 superior, though certainly cheaper ($4 for 4 channels vs $5 for 1 channel). I would definitely be interested in seeing a head-to-head matchup.

MAX31855 resolution is indeed 0.25 C, but that means the quantization error is a uniform +/-0.125 C distribution. The 1-sigma standard deviation on that is 0.25/sqrt(12) = 0.072 degC. Renatoa, I hope you don't mind if I put a finer point on your example. Using your example of a 10 degC/min RoR measured over 15 seconds, then 1-sigma = 0.072 * sqrt(2) / 15 sec = 0.0068 degC/sec = 0.4 degC/min. That's a 4% standard deviation on that single measurement. However, I presume that most users are using some sort of filtering on their RoR calculation (e.g., Smoothing feature in Artisan). Averaging over multiple samples will quickly knock down this error.

I think the signal conditioning in the MAX31855 is worth something too. Additional resolution may not improve performance in the presence of noise. A K-type thermocouple a Seebeck coefficient of 41 microV/degC, so all it takes is about 3 microV RMS noise to rise above the quantization 1-sigma value. For comparison, the 18-bit MCP3424 ADC, a very capable 4 channel sigma-delta ADC, has a noise floor of 1.5 uV according to the datasheet. That noise value requires a sample rate of 3.75 SPS (267 msec sample time). However, if using it with the 60-70 msec sample time mentioned in renatoa's post (15 SPS), then you only get 16 effective bits, or about 4X worse which I presume corresponds to about 6 microV RMS noise.

Also, the MAX31855 includes cold junction compensation based on an internal temperature reading. Of course this can be done off-chip with another external ambient temperature measurement, but it is nice to have this step performed in one package.

MAX31855 data conversion time is 70-100 msec, so I presume it can be read at 10 Hz. I haven't tried. I'm currently only reading it at 2 Hz.

My guess is that in the end, these two units perform at a similar level, but that's only a guess from what I read in the datasheets. I would love to hear some real world experience comparing the two.
Edited by elkayem on 03/06/2019 2:44 AM
 
renatoa
16 bits plus a dedicated thermocouple amplifier, implementing CJC too, delivering 5mV per C degree at ADC input, that's magic powder ;)

MCP3424 alone in 18 bits mode is in the same ballpark as MAX.
 
Gullygossner
Sinobi wrote:

No, Artisan should just update the MODBUS registers over the USB connection.
As soon as you click On, you should see one second of MODBUS Communication Error in the upper left, then it should read Resume and the the temp should come up. All in less than five seconds.
It sounds like you might have selected the wrong USB port (comm port) in Artisan Port Configuration.


You were correct in the fact that I had the incorrect comm port in the Artisan port configuration. For some reason on my mac I had to manually find the Arduino port using ls /dev/ and then manually enter it in. It then exhibited the behaviour as mentioned above by Sinobi.

Now, I get a static BT reading in Artisan between 5-7C. I load up the MAX31855 serialthermocouple sketch, I get a proper temperature reading in the Arduino IDE serial monitor so I feel I've got the wiring correct but Artisan is not receiving data correctly.
 
Sinobi
It might sound like you either have Port Configuration - Input 1 set up wrong, or that something is done wrongly in casting of the temperature value from the thermocouple.readCelsius() and until it gets put into the MODBUS array.
MODBUS array is unsigned integers (uint16_t), and if you have set Port Configuration - Input 1 like in the picture you got from me, Artisan will read the MODBUS data as that, and handle it with the Input 1 set up dividers and C/F etc.
So make sure that you sketch code handles the numbers correctly as they move between commands in your sketch. For me, that is often where I make mistakes.
 
Sinobi
Gullygossner wrote:
You were correct in the fact that I had the incorrect comm port in the Artisan port configuration. For some reason on my mac I had to manually find the Arduino port using ls /dev/ and then manually enter it in. It then exhibited the behaviour as mentioned above by Sinobi.

Now, I get a static BT reading in Artisan between 5-7C. I load up the MAX31855 serialthermocouple sketch, I get a proper temperature reading in the Arduino IDE serial monitor so I feel I've got the wiring correct but Artisan is not receiving data correctly.

Hold your horses, something strange is occurring here. So sorry.
I just tried some changes in my sketch, and now I too am getting 6C, even after I reverted back to the version I was using before.
Very strange indeed.
I'll be back!

/Henrik
 
Sinobi
Solved
Gullygossner, please find new version of the sketch in the .ino link I gave you.
And again, sorry. It was me not keeping sufficiently track of my sketch updates.
 
Gullygossner
Sinobi wrote:

Solved
Gullygossner, please find new version of the sketch in the .ino link I gave you.
And again, sorry. It was me not keeping sufficiently track of my sketch updates.


All good now! Hopefully going to try a roast tonight.

Thank you so much for your help along the way.
 
Want to Help?
By donating you can ensure that HR will continue to be open for years to come. Expenses are 100% transparent and can be viewed publicly at all times. You can find more information on donations and why we request them by reading up on the forum topic here. Thank you.

Jump to Forum:

Similar Threads

Thread Forum Replies Last Post
Getting Center 301 to connect to Windows 10/Artisan Dataloggers/Controllers/Rate of Rise Meters 2 11/07/2019 12:04 PM
Artisan won't recognize yoctocouple Roasting Coffee 2 10/25/2019 3:31 PM
ESP8266/TC4 Wireless link to Artisan via Wifi Dataloggers/Controllers/Rate of Rise Meters 7 10/08/2019 1:23 AM
Artisan and Mastech 6514 Dataloggers/Controllers/Rate of Rise Meters 10 09/30/2019 11:09 PM
TC4+ Arduino coffee roaster shield (TC4-compatible) Dataloggers/Controllers/Rate of Rise Meters 135 09/16/2019 7:13 PM
Homeroasters Association Logo, and all Content, Images, and Icons © 2005-2016 Homeroasters Association - Logos are the property of their respective owners.
Powered by PHP-Fusion Copyright © 2019 PHP-Fusion Inc
Released as free software without warranties under GNU Affero GPL v3
Designed with by NetriX