what i need to upgrade to a thermocouple ?

Having a problem? Post it here and someone will be along shortly to help
User avatar
Jimustanguitar
ULTIMATE 3D JEDI
Posts: 2608
Joined: Sun Mar 31, 2013 1:35 am
Location: Notre Dame area
Contact:

Re: what i need to upgrade to a thermocouple ?

Post by Jimustanguitar »

So... type 100 for the thermocouple board that I'm using, and A3 for the pin, but still no cigar.
// 100 is AD595
// 101 is MAX6675
// 102 is MAX31855
#define EXT0_TEMPSENSOR_TYPE 100
// Analog input pin for reading temperatures or pin enabling SS for MAX6675
#define EXT0_TEMPSENSOR_PIN A3
// Which pin enables the heater
#define EXT0_HEATER_PIN HEATER_0_PIN
#define EXT0_STEP_PIN E0_STEP_PIN
#define EXT0_DIR_PIN E0_DIR_PIN
// set to false/true for normal / inverse direction
#define EXT0_INVERSE true
#define EXT0_ENABLE_PIN E0_ENABLE_PIN
// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
#define EXT0_ENABLE_ON false
// The following speed settings are for skeinforge 40+ where e is the
// length of filament pulled inside the heater. For repsnap or older
// skeinforge use higher values.
// Overridden if EEPROM activated.
I've got 5v correctly powering the board, and have about 2.8v on the signal lead headed into A3.

I've done a little more googling and have heard some horror stories about pins.h needing to be modified and flipping other switches in the firmware. ( http://forums.reprap.org/read.php?267,182192 )

Could this be a pins problem? The temp value on the display is pretty consistent at 360 whether A3 is plugged in or not. I'm suspicious that there's something disconnected elsewhere in the firmware.

I've also attached the code that I'm uploading. It's a fresh copy of the SeeMe git with 2 lines (pasted above) changed for the thermocouple, and the motor current also modified. Otherwise, bone stock.
Attachments
Repetier_therm.zip
(295.4 KiB) Downloaded 210 times
Earthbound
Printmaster!
Posts: 458
Joined: Sun Sep 07, 2014 2:39 am

Re: what i need to upgrade to a thermocouple ?

Post by Earthbound »

I figured I should get out of the theoretical and into the guts. Came home and installed the K-type thermocouple and AD8495 buffer (TYPE 60) that I bought from Adafruit.

I still don't have it working right, but it is working...

I'm sorry Jim, I led you astray with the #define EXT0_TEMPSENSOR_PIN A3 line. I'm used to working with Arduino sketches that use the An identification of analog inputs, which maps them to their digital names. When my first attempts to get my TC working just came back DEF, I dug into the Repetier code and found that these functions don't want pin ID in the same format.

Lose the "A" making it #define EXT0_TEMPSENSOR_PIN 3 to get it looking at the correct pin.

Suddenly the flipped pin numbering on the silkscreen for the analog header of the v1.0/1.1 boards makes perfect sense. Pins 1 & 2 provide +5 & GND, then pins 3 thru 8 can be referenced by the same numbers (they are analog inputs 3 thru 8).

So the high value or DEF you were getting was because the function was looking at pin# that was out of range. Hopefully you'll see something better once you change A3 to 3.

I'm looking at my display, which is hovering around 263C. TC is responsive, but it looks like I need to take a look at the math it uses to scale the input for TYPE 60. It sure was easier when it was just theory...
"Trust no quote from the Internet." - Abraham Lincoln
Earthbound
Printmaster!
Posts: 458
Joined: Sun Sep 07, 2014 2:39 am

Re: what i need to upgrade to a thermocouple ?

Post by Earthbound »

Okay, so that was mildly painful. Got mine working reasonably well. The Adafruit board (#1778) uses the AD8495 buffer, but doesn't fall into the TYPE 60 descriptor because of their design implementation. I created a new TYPE 61 (arbitrary, and in no way an official part of the Repetier package). Had to add some lines in the Extruder.cpp file and I want to experiment with the math a little more. Using the ideal "theoretical" math, I see a few degrees of error (at room temperature). I tweaked the numbers to give the correct result but fear that it simply moves the error to a different range. The TC should be very accurate and I suspect the error is introduced at the A-to-D conversion.
"Trust no quote from the Internet." - Abraham Lincoln
User avatar
Jimustanguitar
ULTIMATE 3D JEDI
Posts: 2608
Joined: Sun Mar 31, 2013 1:35 am
Location: Notre Dame area
Contact:

Re: what i need to upgrade to a thermocouple ?

Post by Jimustanguitar »

Awesome work, that's very good news! I'll give it a try after work today. Thank you again for all of your assistance on this front, it hasn't gone unnoticed.

So I'll compile a single thread with all of the right info as a guide. I assume that Pin 3 is the correct formatting to use (instead of A3) on the newer versions of the Rambo board with the 8x2 header as well?
Earthbound
Printmaster!
Posts: 458
Joined: Sun Sep 07, 2014 2:39 am

Re: what i need to upgrade to a thermocouple ?

Post by Earthbound »

Jimustanguitar wrote: I assume that Pin 3 is the correct formatting to use (instead of A3) on the newer versions of the Rambo board with the 8x2 header as well?
On the newer boards it is similar, but not quite as convenient. I've listed both here.


RAMBo v1.0/1.1 analog header is 8x1
pin 1 marked closest to ATMEGA2560 chip (the big square).

pin# = function
1 = 5v
2 = GND
3 = analog input 3
4 = analog input 4
5 = analog input 5
6 = analog input 6
7 = analog input 7, but already tasked to T3 thermistor circuit, so best to use others inputs.
8 = analog input 8
--------------------------------------------------------------------------------------------------------

PAMBo v1.2/1.3 analog header is 4x2
pin 1 marked. Numbering when viewed with adjacent T0 connector on right
2468
1357

pin# = function
1 = 5v
2 = GND
3 = analog input 6
4 = analog input 3
5 = analog input 7, but already tasked to T3 thermistor circuit, so best to use others inputs.
6 = analog input 4
7 = analog input 8
8 = analog input 5
--------------------------------------------------------------------------------------------------------


The pin-to-input numbering on the newer boards jumps around instead of matching the older boards.
For both layouts, avoid using input 7.
"Trust no quote from the Internet." - Abraham Lincoln
User avatar
Jimustanguitar
ULTIMATE 3D JEDI
Posts: 2608
Joined: Sun Mar 31, 2013 1:35 am
Location: Notre Dame area
Contact:

Re: what i need to upgrade to a thermocouple ?

Post by Jimustanguitar »

This configuration has been working for me. Using Pin 3 instead of A3 did the trick!

The next hurdle is to create a thermocouple profile for the amplifier board that I'm using, since it's not baked into Repetier already. My hot-end reads about 16 degrees instead of 20 at room temperature.
Post Reply

Return to “Troubleshooting”