Welcome! Log In Create A New Profile

Advanced

Repetier + Megatronics + Thermocouple

Posted by 3ntrlab 
Repetier + Megatronics + Thermocouple
February 05, 2013 09:32AM
Hello all,
I am starting to use a megatronics board with a thermocouple.

Upon Reprapworld indication, I put -1 on the ext0_tempsensor_type (in config.h).

Unfortunately I get a nice "0 C°" on the Repetier console.

Setup: bareboard, 12 powered and connected to PC via USB. No other cable alive, nor resistors.

Am I doing something wrong ?

Thank you all,
Davide
Re: Repetier + Megatronics + Thermocouple
February 05, 2013 11:40AM
-1 is a very stupid idea, as there is no such type. Only these are defined:

// What type of sensor is used?
// 1 is 100k thermistor (Epcos B57560G0107F000 - RepRap-Fab.org and many other)
// 2 is 200k thermistor
// 3 is mendel-parts thermistor (EPCOS G550)
// 4 is 10k thermistor
// 8 is ATC Semitec 104GT-2
// 5 is userdefined thermistor table 0
// 6 is userdefined thermistor table 1
// 7 is userdefined thermistor table 2
// 50 is userdefined thermistor table 0 for PTC thermistors
// 51 is userdefined thermistor table 0 for PTC thermistors
// 52 is userdefined thermistor table 0 for PTC thermistors
// 97 Generic thermistor table 1
// 98 Generic thermistor table 2
// 99 Generic thermistor table 3
// 100 is AD595
// 101 is MAX6675
#define EXT0_TEMPSENSOR_TYPE 1

I would try 1 if you have no idea. It is/was a very common type (epcos does not produce it any more I heard).


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 + Megatronics + Thermocouple
February 05, 2013 12:04PM
Stupid: I had to trust Megatronics people.
Can't comment, as I am a newbee on arduino programming and I just started digging into *.h files.

Anyway, I've been trying other values and so far, without any luck..

For instance:

I tried putting "100" since it seems that on board there is an AD597 chip, and I got:

SdFat.cpp: In function 'void spiBegin()':
SdFat.cpp:2558: error: 'MISO_PIN' was not declared in this scope
SdFat.cpp:2559: error: 'MOSI_PIN' was not declared in this scope
SdFat.cpp:2560: error: 'SCK_PIN' was not declared in this scope

Any idea ?

Best Regards
Davide Ardizzoia
Re: Repetier + Megatronics + Thermocouple
February 05, 2013 12:14PM
Yesterday i uploaded a fixed pins.h to solve some pin issues with the Megatronics. Please download that and replace your old pins.h with the one in that package.

Also I doubt your extruder has a AD597 chip build in. I have never seen one in the wild. I guess when they said -1 they meant 1.


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 + Megatronics + Thermocouple
February 06, 2013 01:45AM
repetier Wrote:
-------------------------------------------------------
> Yesterday i uploaded a fixed pins.h to solve some
> pin issues with the Megatronics. Please download
> that and replace your old pins.h with the one in
> that package.

I know, I was the one that e-mailed you the Megatronics request.
My mistake is to have pasted above the "old" error message, before using your revised "Pins.h".

AFTER upgrading "pins.h" , putting "100" gets me:

Extruder.cpp:221: error: expected primary-expression before ',' token

>
> Also I doubt your extruder has a AD597 chip build
> in. I have never seen one in the wild. I guess
> when they said -1 they meant 1.

They refer to Marlin, where there is some control about -1 setting.
Anyway, my Megatronics has a 597, as you can see... don't know now if it is a curse or a blessing....

AD597

Best Regards
Davide Ardizzoia
Re: Repetier + Megatronics + Thermocouple
February 06, 2013 02:36AM
By the list of posibilities I would say 100 is the correct value, the AD597 is compatible with 595. You will have to define the correct pin in pins.h, which is analog nr 8. In marlin:
#define TEMP_0_PIN 8 // ANALOG NUMBERING

I don't know why it comes up with the mosi/sck etc. The chip does not require that, maybe it's enabling SD card? But may adding this will help:

#define SCK_PIN 52
#define MISO_PIN 50
#define MOSI_PIN 51


repetier Wrote:
-------------------------------------------------------
> -1 is a very stupid idea, as there is no such
> type. Only these are defined:
>
>
> // What type of sensor is used?
> // 1 is 100k thermistor (Epcos B57560G0107F000 -
> RepRap-Fab.org and many other)
> // 2 is 200k thermistor
> // 3 is mendel-parts thermistor (EPCOS G550)
> // 4 is 10k thermistor
> // 8 is ATC Semitec 104GT-2
> // 5 is userdefined thermistor table 0
> // 6 is userdefined thermistor table 1
> // 7 is userdefined thermistor table 2
> // 50 is userdefined thermistor table 0 for PTC
> thermistors
> // 51 is userdefined thermistor table 0 for PTC
> thermistors
> // 52 is userdefined thermistor table 0 for PTC
> thermistors
> // 97 Generic thermistor table 1
> // 98 Generic thermistor table 2
> // 99 Generic thermistor table 3
> // 100 is AD595
> // 101 is MAX6675
> #define EXT0_TEMPSENSOR_TYPE 1
>
>
> I would try 1 if you have no idea. It is/was a
> very common type (epcos does not produce it any
> more I heard).




reprapworld.com
PLA, ABS, PETG multiple colors (3 and 1.75 mm) €16,49 / kg
Megatronics 3.0 €79.99 / Minitronics €37,19
Re: Repetier + Megatronics + Thermocouple
February 06, 2013 02:55AM
Hello Brupje,
changing above values (temp_0_pin 8) brings me:

Extruder.cpp:221: error: expected primary-expression before ',' token

In extruder.cpp:

#if ANALOG_INPUTS>0
const uint8 osAnalogInputChannels[] PROGMEM = ANALOG_INPUT_CHANNELS;
uint8 osAnalogInputCounter[ANALOG_INPUTS];
uint osAnalogInputBuildup[ANALOG_INPUTS];
uint8 osAnalogInputPos=0; // Current sampling position
volatile uint osAnalogInputValues[ANALOG_INPUTS];
#endif

I don't understand: ANALOG_INPUT_CHANNELS is a placeholder or it is a variable ?
If it is a placeholder: which value should I put there ?
If it is a variable: tried searching thru Repetier files, but didn't find any mention about it...

?
Davide Ardizzoia


==============================
no toys here...sorry
Re: Repetier + Megatronics + Thermocouple
February 06, 2013 05:35AM
ANALOG_INPUT_CHANNELS seems to be defined in repetier.h

I would say EXT0_ANALOG_CHANNEL is not defined correctly in repetier.h
, because this line it wrong:

#if NUM_EXTRUDER>0 && EXT0_TEMPSENSOR_TYPE<100

I think it should be

#if NUM_EXTRUDER>0 && EXT0_TEMPSENSOR_TYPE<101




reprapworld.com
PLA, ABS, PETG multiple colors (3 and 1.75 mm) €16,49 / kg
Megatronics 3.0 €79.99 / Minitronics €37,19
Re: Repetier + Megatronics + Thermocouple
February 06, 2013 12:21PM
brupje Wrote:
-------------------------------------------------------
> ANALOG_INPUT_CHANNELS seems to be defined in
> repetier.h
>
> I would say EXT0_ANALOG_CHANNEL is not defined
> correctly in repetier.h
> , because this line it wrong:
>
> #if NUM_EXTRUDER>0 && EXT0_TEMPSENSOR_TYPE<100
>
> I think it should be
>
> #if NUM_EXTRUDER>0 && EXT0_TEMPSENSOR_TYPE<101

Yep, had forgotten that this was also a analog type. Fix is now on github.


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 + Megatronics + Thermocouple
February 12, 2013 11:22AM
Tried new mod file from above and/or github. Still no luck with thermcouple (or LCD).
The only good thing so far is the SD working, while with Marlin it doesn't :-)

Any idea ?

Bye
Davide


==============================
no toys here...sorry
Re: Repetier + Megatronics + Thermocouple
February 13, 2013 02:08AM
Some progress.

1) Be sure to set EEPROM_MODE to 0 during testing :-)

2) LCD setting in PINS.H are not considered. Need to insert them into uiconfig.h

3) Encoder settings, too, need to be changed directly in uiconfig.h.

4) Thermocouple still dead (working in Marlin)

My humble suggestion: why not keep the Marlin approach: just set PINS.H then set the options and compiler takes care for subsitution of constant (pin) values ?

Bye
Davide


==============================
no toys here...sorry
Re: Repetier + Megatronics + Thermocouple
February 13, 2013 02:45AM
Once we are back on track with order picking the backordered megatronics boards, I will try to release a repetier version compatible with Marlin too. Maybe later this week




reprapworld.com
PLA, ABS, PETG multiple colors (3 and 1.75 mm) €16,49 / kg
Megatronics 3.0 €79.99 / Minitronics €37,19
Re: Repetier + Megatronics + Thermocouple
February 13, 2013 03:29AM
Thank you, Brupje !
Hope your work will be backward-compatible with Megatronics 1.0 (but I hope to be able to order you soon several 2.0 boards) :-)

ANYWAY: I won't be upset if in the meantime someone tells me HOW to make thermocouple work with Repetier firmaware.




Bye
Davide

Edited 1 time(s). Last edit at 02/13/2013 03:30AM by 3ntrlab.


==============================
no toys here...sorry
Re: Repetier + Megatronics + Thermocouple
February 13, 2013 10:12AM
Found the problem.

Was using a "J" thermocouple... when I was convinced it was a "K".

As soon as I plug in a TRUE "K" (as expected for Megatronics) will report.

Bye
Davide


==============================
no toys here...sorry
Re: Repetier + Megatronics + Thermocouple
February 14, 2013 10:36AM
Update:

K thermcouple arrived, but results aren' too different.
Temperature reading is erratical.
If thermocouple shielding/tip are in contact with metal frame, readout is skyrocketing.
If kept away (insulated) from grounding, it works...until stepper aren't engaged... then readout is going down.

Checked PSU (brand new, server grade): no problem.
Using a desktop top quality ultraprecise Vdc supply: no change.

Either I got a defective board OR i am missing something.

Now trying with thermistors (but really hate them).

Bye
Davide


==============================
no toys here...sorry
Re: Repetier + Megatronics + Thermocouple
February 14, 2013 12:07PM
Update...

It turns out that with a 100uFarad condenser ( parallel wiring ) the thermocouple should work as expected.... and it works!
Now the output is steady, and reliable.

Therefore IF you have a thermocouple AND you have a Megatronics 1.0, do yourself a favor and buy a couple condensers...

Back to Repetier firmware: now as soon as I start the printer, the extruder stepper just hums, but doesn't move. Tried changing accelleration, steps/mm, mintemps.... nothing.

Reloaded Marlin: it works.

Any hidden parameter I am missing ?

Best Regards
Davide Ardizzoia


==============================
no toys here...sorry
Re: Repetier + Megatronics + Thermocouple
February 14, 2013 02:36PM
Humming is normally an indication of too high speed or start speed. Since o.80 max extruder speed is in mm/s. Start with ops disabled.


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 + Megatronics + Thermocouple
February 15, 2013 01:54AM
Disable Ops. No change.
As soon as system is started, the extruder is humming (no motion asked from host).
Tried any speed. No change.

As soon as I start host I get "printer in dry mode".

See :

07:29:42.937 : Printer set into dry run mode until restart!
07:29:43.109 : FIRMWARE_NAME:Repetier_0.81 FIRMWARE_URL:[github.com] PROTOCOL_VERSION:1.0 MACHINE_TYPE:Mendel EXTRUDER_COUNT:1 REPETIER_PROTOCOL:2


My extruder configuration:


#define EXT0_X_OFFSET 0
#define EXT0_Y_OFFSET 0
#define EXT0_STEPS_PER_MM 92.601
#define EXT0_TEMPSENSOR_TYPE 100
#define EXT0_TEMPSENSOR_PIN TEMP_0_PIN
#define EXT0_HEATER_PIN HEATER_0_PIN
#define EXT0_STEP_PIN E0_STEP_PIN
#define EXT0_DIR_PIN E0_DIR_PIN
#define EXT0_INVERSE false
#define EXT0_ENABLE_PIN E0_ENABLE_PIN
#define EXT0_ENABLE_ON true
#define EXT0_MAX_FEEDRATE 1
#define EXT0_MAX_START_FEEDRATE 2
#define EXT0_MAX_ACCELERATION 3
#define EXT0_HEAT_MANAGER 1
#define EXT0_WATCHPERIOD 1
#define EXT0_PID_INTEGRAL_DRIVE_MAX 150
#define EXT0_PID_INTEGRAL_DRIVE_MIN 60
#define EXT0_PID_P 24
#define EXT0_PID_I 0.88
#define EXT0_PID_D 80
#define EXT0_PID_MAX 255
#define EXT0_ADVANCE_K 0.0f
#define EXT0_ADVANCE_L 0.0f
#define EXT0_WAIT_RETRACT_TEMP 150
#define EXT0_WAIT_RETRACT_UNITS 0
#define EXT0_SELECT_COMMANDS "M120 S5 P5\nM117 Extruder 1"
#define EXT0_DESELECT_COMMANDS ""
#define EXT0_EXTRUDER_COOLER_PIN -1
#define EXT0_EXTRUDER_COOLER_SPEED 255

Using Repetier host, of course.

I am starting to think that PINS.H has something to do with this (but I am using same config for EXT0 that is working for Marlin).

Hope I am doing something wildly wrong.

Best Regards
Davide


==============================
no toys here...sorry
Re: Repetier + Megatronics + Thermocouple
February 15, 2013 03:03AM
Ok, I know where that message comes from. If your thermocoule send temperatures lower/higher a given value in the config, the extruder gets disabled for safety reasons. Normally this is acompanied by a message telling which thermistors are wrong. Not seeing this in your case could mean the error was only the start and did go away after a short time. So maybe the initalization took some time to get correct values and the firmware measured one before that. Try setting the critical values to extreme values like -1000 and 8000. That should prevent this at least with thmermistors, had no thermocouples to test so I do not know the extreme values. You could also disable the check in Extruders.cpp at the bottom in the manager_heater function.


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 + Megatronics + Thermocouple
February 15, 2013 03:30AM
Ok for critical values, but... where ?

Thank you,
Davide


==============================
no toys here...sorry
Re: Repetier + Megatronics + Thermocouple
February 15, 2013 08:39AM
Found critical values, set to outlandish values. No way.
Disabled Heated Bed. No way.
I don't know why and when, but now I get an "external reset" each time I start the thing.
Tried also outlandish value in accel and speed. No way.

Back to Marlin, but waiting for news here: I love Repetier.

Bye
Davide


==============================
no toys here...sorry
Re: Repetier + Megatronics + Thermocouple
February 15, 2013 10:52AM
FOUND !

EXT0_ENABLE_ON false

(was true)

Now EVERYTHING works !!!

Ahhhh... can enjoy the weekend!

Bye
Davide


==============================
no toys here...sorry
Re: Repetier + Megatronics + Thermocouple
February 24, 2015 01:08AM
I changed the pin setting and configuration.h which was easy enough, but was getting the common error of when starting the hot end, the tempature would drop and trigger the MINTEMP error. This was easily fixed by swapping the wires over for the thermocouple and ran fine!!!. I found this message on a website about the boards

Connect Thermocouple


Wire up your thermocouple to the board. Thermocouples have polarity, so you need to insert it the right way to get a proper reading. If you insert it wrong, it will simply report the reverse of the real temperature.
Please note: the v1.0 board has a silkscreen error, and the +/- signs on the board are reversed. Sorry!
Sorry, only registered users may post in this forum.

Click here to login