Welcome! Log In Create A New Profile

Advanced

Repetier with max6675 on ramps 1.4

Posted by leolino 
Repetier with max6675 on ramps 1.4
December 05, 2013 03:06AM
Good Morning,
I'm new to this forum and I hope to make this post in the right place :-) .
I'm building a 3d printer and I like the composition Arduino Mega 2560 + Ramps 1.4 + max6675 because I have an extruder with thermocouple thermistor instead ... and use firmware repetier .
In configuration.h line 502 I 've found :

/ / Uncomment the Following line for MAX6675 support.
/ / # define SUPPORT_MAX6675

I uncommented the line and the compilation of the sketch gives me the following error:

Extruder.cpp : In function ' void initExtruder () ' :
Extruder.cpp : 327 : error : ' struct Extruder ' has no member named ' SENSORTYPE '

refers to that part of Extruder.cpp :

# ifdef SUPPORT_MAX6675
if ( act- > SENSORTYPE == 101 ) {
WRITE ( SCK_PIN , 0);
SET_OUTPUT ( SCK_PIN ) ;
WRITE ( MOSI_PIN , 1);
SET_OUTPUT ( MOSI_PIN ) ;
WRITE ( MISO_PIN , 1);
SET_INPUT ( MISO_PIN ) ;
digitalWrite (act -> tempControl.sensorPin , 1);
pinMode (act -> tempControl.sensorPin , OUTPUT) ;
}
# endif

Can anyone tell me please what 's wrong ?
I'm not a great expert on C. .. something I can resolve this but its not :-( .
Thanks to those who can tell me something.
Bye .
Re: Repetier with max6675 on ramps 1.4
December 05, 2013 07:33AM
Quote
leolino
Good Morning,
I'm new to this forum and I hope to make this post in the right place :-) .
I'm building a 3d printer and I like the composition Arduino Mega 2560 + Ramps 1.4 + max6675 because I have an extruder with thermocouple thermistor instead ... and use firmware repetier .
In configuration.h line 502 I 've found :

/ / Uncomment the Following line for MAX6675 support.
/ / # define SUPPORT_MAX6675

I uncommented the line and the compilation of the sketch gives me the following error:

Extruder.cpp : In function ' void initExtruder () ' :
Extruder.cpp : 327 : error : ' struct Extruder ' has no member named ' SENSORTYPE '

refers to that part of Extruder.cpp :

# ifdef SUPPORT_MAX6675
if ( act- > SENSORTYPE == 101 ) {
WRITE ( SCK_PIN , 0);
SET_OUTPUT ( SCK_PIN ) ;
WRITE ( MOSI_PIN , 1);
SET_OUTPUT ( MOSI_PIN ) ;
WRITE ( MISO_PIN , 1);
SET_INPUT ( MISO_PIN ) ;
digitalWrite (act -> tempControl.sensorPin , 1);
pinMode (act -> tempControl.sensorPin , OUTPUT) ;
}
# endif

Can anyone tell me please what 's wrong ?
I'm not a great expert on C. .. something I can resolve this but its not :-( .
Thanks to those who can tell me something.
Bye .

Where did you find all those big letters?
Line 327:
if ( act- > SENSORTYPE == 101 ) {
should be:
if ( act- > sensorType == 101 ) {
grinning smiley
Re: Repetier with max6675 on ramps 1.4
December 05, 2013 07:53AM
I have changed...but always the same error..... :-(
Re: Repetier with max6675 on ramps 1.4
December 05, 2013 09:07AM
Try the development version. there that code was rewritten to fit new system. Unfortunately I have no such sensor to test myself.


Repetier-Software - the home of Repetier-Host (Windows, Linux and Mac OS X) and Repetier-Firmware.
Repetier-Server - the solution to control your printer from everywhere.
Visit us on Facebook and Twitter!
Re: Repetier with max6675 on ramps 1.4
December 05, 2013 09:14AM
ehm...thanks you repetier.... but where i can find this development version....?eye rolling smiley
Re: Repetier with max6675 on ramps 1.4
December 05, 2013 09:26AM
It's the devleopment branch on github. Or use this link:

https://github.com/repetier/Repetier-Firmware/tree/development


Repetier-Software - the home of Repetier-Host (Windows, Linux and Mac OS X) and Repetier-Firmware.
Repetier-Server - the solution to control your printer from everywhere.
Visit us on Facebook and Twitter!
Re: Repetier with max6675 on ramps 1.4
December 06, 2013 03:50AM
Thanks again Reperier... but again i have a similar error like before:

#ifdef SUPPORT_MAX6675
int16_t read_max6675(uint8_t ss_pin)
{
int16_t max6675_temp = 0;
HAL::spiInit(1);
HAL::digitalWrite(ss_pin, 0); // enable TT_MAX6675
HAL::delayMicroseconds(1); // ensure 100ns delay - a bit extra is fine
max6675_temp = HAL::spiReceive(0);
max6675_temp <<= 8;
HAL::max6675_temp |= HAL::spiReceive(0);
HAL::digitalWrite(ss_pin, 1); // disable TT_MAX6675
return max6675_temp & 4 ? 2000 : max6675_temp >> 3; // thermocouple open?
}
#endif
#ifdef SUPPORT_MAX31855
int16_t read_max31855(uint8_t ss_pin)
{
uint32_t data = 0;
int16_t temperature;
HAL::spiInit(1);
HAL::digitalWrite(ss_pin, 0); // enable TT_MAX31855
HAL::delayMicroseconds(1); // ensure 100ns delay - a bit extra is fine

for (unsigned short byte = 0; byte < 4; byte++)
{
data <<= 8;
data |= HAL::spiReceive();
}

HAL::digitalWrite(ss_pin, 1); // disable TT_MAX31855

//Process temp
if (data & 0x00010000)
return 20000; //Some form of error.
else
{
data = data >> 18;
temperature = data & 0x00001FFF;

if (data & 0x00002000)
{
data = ~data;
temperature = -1 * ((data & 0x00001FFF) + 1);
}
}
return temperature;
}
#endif

And when compile the error is:

Extruder.cpp: In function 'int16_t read_max6675(uint8_t)':
Extruder.cpp:1061: error: 'max6675_temp' is not a member of 'HAL'

I don't know.... i'm thinking to change the Hot end with one with a thermistore for not use max6675... but i would know why don't works :-)
Re: Repetier with max6675 on ramps 1.4
December 06, 2013 03:53AM
I see. This line
HAL::max6675_temp |= HAL::spiReceive(0);

should be

max6675_temp |= HAL::spiReceive(0);


Repetier-Software - the home of Repetier-Host (Windows, Linux and Mac OS X) and Repetier-Firmware.
Repetier-Server - the solution to control your printer from everywhere.
Visit us on Facebook and Twitter!
Sorry, only registered users may post in this forum.

Click here to login