Welcome! Log In Create A New Profile

Advanced

Temperature readings not updating

Posted by jmgiacalone 
Temperature readings not updating
July 22, 2010 02:09PM
Hello All,

This is a bit of a plea for help, as I cannot fathom what is happening within the firmware to cause the issue I have.

I have just completed the mechanical assembly of my repstrap, and have come to test the functionality of my extruder. Unfortunately, the firmware appears to read the temperature correctly at power up, but the value then never changes until the power is cycled again.

I am using the MAX6675 chip to read a thermocouple. My motherboard is an Arduino MEGA and I am running the latest FiveD_GCode firmware (20100719).

I can confirm that the MAX6675 reads correctly, as I have run a test program in my Arduino to apply full PWM to the extruder for 2 mins then switch off the PWM, and print the temperature to the serial port every second all the while. This test was run with all of the electronics powered up, so I don't believe my problem is a noise issue ( in fact I would have expected duff readings if that were the case).

Happy that the hardware is ok, I then modified the internalTemperature() code to output dummy values which increment every time the function is called. This also worked as expected. I was able to send M104 S2500, and monitor this dummy temperature rise to 2500 whereupon the PID control switched off the PWM to the extruder heater.

So I know my hardware is good, and that the firmware is calling the internalTemperature() function. It also appears that a valid temperature reading is being acquired by this function. So I cannot understand why the temperature is read once correctly, and forever more just reads the same value?!

If anyone has any ideas, or has seen a similar problem, I would be grateful for any help.

Thanks,
Jean-marc.


eMAKER-blue-2.png

[emaker.io]

[emaker.limited]
Re: Temperature readings not updating
July 23, 2010 10:04AM
Well after many hours of banging my head against what seemed to be a brick wall, I believe I have found the solution.

I read somewhere that the MAX6675 could not be expected to produce more than about 5 reads per second. My test program did 1 read every second, and so worked as expected.

The FiveD firmware, however, read the MAX6675 much more frequently (I had #define SLOW_CLOCK 5000 in configuration.h), resulting in the MAX6675 not updating it's temperature reading.

So, changing SLOW_CLOCK to 50000 solved the problem!
Re: Temperature readings not updating
July 31, 2010 10:49PM
What firmware are you using? I have tried to use the standard reprap firmware, but when I uncomment the line in configuration.h for the 6675 thermocouple, the sketch no longer compiles:
// Temperature measurement
// Uncomment ONE of the next three
//#define USE_THERMISTOR
//#define AD595_THERMOCOUPLE
#define MAX6675_THERMOCOUPLE

error: 'NUMTEMPS' was not declared in this scope In member function 'void PIDcontrol::pidCalculation(int)':
Re: Temperature readings not updating
August 01, 2010 03:24AM
Hey Greg,

NUMTEMPS is defined in Temperature.h, however it is only compiled if #define USE_THERMISTOR is not commented out.

I found that the official version of the reprap firmware didn't work 'out of the box' without some tweaking. You could try uncommenting #define USE_THERMISTOR as well as #define MAX6675_THERMOCOUPLE and see if it now compiles. If not, I can publish my code if it's any help, although I have hackled it about quite a lot to remove any unused code (like support for motherboard other than the Arduino MEGA I am using).

My setup is stepper drives for all axes and extruder feed, thermocouple temperature measurement of the heater nozzle, (via a MAX6675), thermistor temperature measurement of the heated bed, all run from an Arduino MEGA through a ProtoSHIELD (from NKC).


eMAKER-blue-2.png

[emaker.io]

[emaker.limited]
Re: Temperature readings not updating
August 01, 2010 04:02AM
If you could post your code that would be great. I dont have a heated bed and I have the techzone remix electronics with the MAX6675 thermocouple for the extruder (this is what I got with the techzone complete laser cut kit).
Re: Temperature readings not updating
August 04, 2010 06:09AM
Code posted to github:

[github.com]

not sure how useful it will be for you, but feel free to do as you please with it.


eMAKER-blue-2.png

[emaker.io]

[emaker.limited]
Re: Temperature readings not updating
August 05, 2010 04:32AM
Thanks, but I received a copy of the firmware from BalanceSeeker in South Africa. I have posted it to the wiki:
[reprap.org]
Sorry, only registered users may post in this forum.

Click here to login