Inconsistent Power Scaling with Arduino Control - Page 4

Discuss roast levels and profiles for espresso, equipment for roasting coffee.
marcism (original poster)
Posts: 131
Joined: 11 years ago

#31: Post by marcism (original poster) »

uwe wrote:regarding temperature reading: here's an excelent article from Marko : https://artisan-roasterscope.blogspot.c ... noise.html
A thermocouple with MAX 6675 is noisy. RTDs are much better. For that reason, I use a PT100 for measuring BT.
I attached a picture where you can see the ditterence; ET is measured viaTC, BT by a Pt100.
<img>
Mine have always been pretty calm thankfully, but I suspect it's the delay in the loop that is sending my BT a bit whacky. Honestly, it could be the max6685 unit itself that is damaged, it's had a pretty hard life.

What I was reading about was what ira suggested, using Millis to simulate the delay and allow the max6675s to call their readings at 250ms intervals (what they're rated for) and for modbus to have a quicker interval to control the heater.

ira
Team HB
Posts: 5497
Joined: 16 years ago

#32: Post by ira »

For what it's worth, I read the temperature about as fast as I could, way more than 4 times a second and used FILTER_BITS set to which gave me a lag of a couple of seconds and a much cleaner signal. I also found it very important to keep the ground of the sensor and the ground of the roaster tightly coupled. I just read the data sheet of the MAX6675 and I can find nothing about "250ms intervals (their recommended latency)," there. That must be some recommendation designed to not overwhelm the Arduino code. In my case, I hand coded the read instruction and bit banged the clock to maximize the read speed. FYI, like this:

For those who actually know how to program, I apologize, but it works perfectly and MISRA does't complain!

Ira
// This goes at the top
unsigned int TempOne=0x2f;
#define FILTER_BITS 8u
// End This goes at the top
void GetTemp1(void){
	unsigned char i;
	unsigned int Temperature=0u;
	unsigned int temp ;
	CLK1_OFF();
	CS1_OFF();
	CLK1_ON();
	CLK1_OFF();
	i = 0u;
	while (i<13u){
		Temperature *= 2u ;
		CLK1_ON();
		if (SI1_TEST())
			{SetBit(Temperature,0u);}else{}
		CLK1_OFF();
		++i;
	}
	CLK1_ON();
	CLK1_OFF();
	CS1_ON();
    temp = TempOne/FILTER_BITS;
    TempOne += (Temperature-temp);
}

marcism (original poster)
Posts: 131
Joined: 11 years ago

#33: Post by marcism (original poster) »

Quick update:

Well, seems like it was a grounding issue!

See if you can tell where I plugged and unplugged my laptop :lol:



Interesting that the ET doesn't seem to be affected by it, but it's MAX6675 is on a different grounding PIN, so perhaps (I can't really see how) that is making a difference.

ira
Team HB
Posts: 5497
Joined: 16 years ago

#34: Post by ira »

I notice that the Arduino ready MAX6675 boards I can find pictures of are built to the minimum requirements, the chip and a .1uf cap. If you search further it's recommended to put ferrite beads and a small capacitor on the input to help minimize RF interference, but I guess you'd have to lay out your own board to do that kind of stuff and it doesn't look like you're having noise issues any more. If you think an improved board might help, ask and I'll make one since I have all the parts here except for the PCBoard which I can lay out in a few minutes. I also don't understand why they've not moved on to the MAX31855 which is the new improved version of that part.

Ira

marcism (original poster)
Posts: 131
Joined: 11 years ago

#35: Post by marcism (original poster) replying to ira »

Do you think it would be worth transitioning over to the 31855s?

And thanks for the offer!

ira
Team HB
Posts: 5497
Joined: 16 years ago

#36: Post by ira »

If it needs improvement, then maybe, if what you have is working good enough, then use it till it becomes clear improving it might help you roast better. And then, please ask, I'd be really curious to know how much better a board I design works, if at all.

Ira

marcism (original poster)
Posts: 131
Joined: 11 years ago

#37: Post by marcism (original poster) replying to ira »

After yesterday's flawless roast, it looks like I'll be sorted for now. I am intrigued by your board though! You can't make one and do some testing on your set up?

I also wanted to say thanks again for the help, you really solved a huge amount of problems not just with my roaster, but for potentially a huge swath of folk who have followed the same guide.

ira
Team HB
Posts: 5497
Joined: 16 years ago

#38: Post by ira »

Always glad to help. I'm always surprised when some seeming large number of people, including I would think, trained people who went to school for this stuff, miss such an obvious problem. It seemed completely obvious when I wrote the FrankenBehmor code and I never had the problem.

My board has been set up that way for a couple of years, I never did it the basic way as I always take special care of anything that connects to analog sources. Not so much because I know what I'm doing, more because I'm afraid I don't and try to be extra careful to not introduce noise. Digital at the low frequencies of Arduinos and such is rather tolerant of noise, thermocouples not so much.

Ira

User avatar
CarefreeBuzzBuzz
Posts: 3863
Joined: 7 years ago

#39: Post by CarefreeBuzzBuzz »

If anyone wants to summarize the technical learning here I will post a link on the Quick Start Guide. This is outside my area of knowledge.
Artisan.Plus User-
Artisan Quick Start Guide
http://bit.ly/ArtisanQuickStart

ira
Team HB
Posts: 5497
Joined: 16 years ago

#40: Post by ira »

Someone who has access should just fix the original code so it becomes the new normal and then this doesn't really matter. I've no idea how to go about that, I just knew the solution.

Ira

Post Reply