Welcome! Log In Create A New Profile

Advanced

Extuder with max6675

Posted by alfadex 
Extuder with max6675
February 02, 2013 05:48PM
Hi, i am trying to do the extuder with a thermocouple and max6675

i made this


I connect Vcc to 5 volts
I connect 5 (SCK) and 7 (SO) of the max6675 to the TEMP_EXT of the gen 7 board. I am using teacup , but it does not work . Extruder temp is T:16383.
What am i doing wrong?
Re: Extuder with max6675
February 03, 2013 06:27PM
Should i place the code found here somewhere in config.h ????
Re: Extuder with max6675
February 03, 2013 07:14PM
No, teacup already has the code to read from a MAX6675 and your config should already be correct. This is likely a hardware problem, so post pictures and a complete description of what you've built and how you've connected it.
Re: Extuder with max6675
February 04, 2013 11:21AM
Your schematic looks right, so as Andrew said, it's most likely a build issue.

As an aside...you're aware that the MAX6675 is a 'not recommended for new design' part, right? fwiw, the MAX31855 is the replacement family.
Re: Extuder with max6675
February 05, 2013 09:42AM
max6675 doesn't work well with ramps and marlin.... i only managed to get it to work with saguinololu and marlin.... also it wont work with a lcd attached.... i have made my prusa run with both a thermocouple and a thermistor and i didn't find any difference in the print quality so i shifted back to a thermistor as it works well with all the firmwares and also they are cheap....
Re: Extuder with max6675
February 05, 2013 01:02PM
I will take photos and post here. I am using teacup. It was easier for me to place the thermocouple to the extruder because it is small ,thermistor is bigger enough and harder to stabilize it in a so small area . i will uplaod photo and if i don't find a solution, i 'll replace it with a thermistor.
Re: Extuder with max6675
February 08, 2013 08:46AM
i made again the circuit from the begging but i doesn't seems to work at all !
i am sure there is somethign that i have not understand.
here is max6675

and here mosfet




the circuit is this



pin 6 is going to a resistor 10K and after to 5volt. What is JP2-2 and JP1-1 at this pin for??

pin 5 ,7, is going to TEMP-EXT at the board. I invert these but nothing hapens

RT2 at GEN7 board is 10k, is it ok?

I am using teacup

Pronterface always says 16383

Re: Extuder with max6675
February 08, 2013 09:16AM
Chip Select (CS) is active low, you have it tied high, so the chip will never respond. If you have nothing else on the SPI, you can connect CS to ground.

ETA: I just realised another problem, the TEMP_EXT connector will only work with a thermistor. The MAX6675 is an SPI device, so you need to connect it to the SPI pins on the ICSP header.

ETA2: sorry, should have read datasheet more carefully, you need to set CS low only when reading from the chip. Therefore connect it to the SS pin on the ICSP connector.

Edited 2 time(s). Last edit at 02/08/2013 09:44AM by bobc.
Re: Extuder with max6675
February 08, 2013 10:27AM
what is ICSP connector? where is SS pin?
Re: Extuder with max6675
February 08, 2013 10:38AM
The ICSP connector is the 3x2 header and can be used for programming the bootloader, but it has the SPI pins. You might find this thread useful [forums.reprap.org]
Re: Extuder with max6675
February 08, 2013 10:52AM
ooh yes my mind stuck, i am testing now
Re: Extuder with max6675
February 08, 2013 11:59AM
i hadn't read the datasheet for max6675 i connect everything , i use two theromocouple and the temperature it reads is 0 deegrees celciou

P.s i have set CS to low,so that to enable serial output

Edited 1 time(s). Last edit at 02/08/2013 12:00PM by alfadex.
Re: Extuder with max6675
February 08, 2013 04:46PM
What pin did you connect CS to? Because if I'm reading all this right, the pin you need is PB4, which Gen7 connects to one of the mosfets.

Edited 1 time(s). Last edit at 02/08/2013 04:47PM by Andrew Smith.
Re: Extuder with max6675
February 08, 2013 08:30PM
Ah, my bad, SS is used for something else, also it is not on the ICSP connector!

But any spare digital IO pin can be used for CS I think, but you will need to change the firmware. In temp.c, change references to SS to the pin you have used. It think there are spare pins on the expansion connector. The SPI pins are also on this connector, so that may be more convenient.
Re: Extuder with max6675
February 09, 2013 07:31AM
OK. Consult this layout:

[reprap.org]

And the table here:

[reprap.org]

To find a digital pin you can connect CS to. I'd use one that goes to the expansion header and nowhere else.

Then open temp.c and edit line 128 and 145. Replace 'SS' with 'DIO'.
Re: Extuder with max6675
February 10, 2013 06:12AM
ok look ,I edit line 128 and 145. and change 'SS' with 'DIO4,but DIO4 is PB4, the output of the mosfet extruder.
I suppose i have to use an unsed output pin of the atmega because DIO4 is used,am I right? Which one should i use?

I have found that is i change CS from high (5V) ,to low (0v) ,it reads the temperature right!




If i want to use pin 20 of atmega (PD6) DIO? which nimber is?

Edited 1 time(s). Last edit at 02/10/2013 06:19AM by alfadex.
Re: Extuder with max6675
February 10, 2013 06:24AM
You have it right. Look for a pin on the CONN4 connector that isn't used elsewhere, but if you want to use an expansion board later you need to plan ahead and find a pin that won't conflict with it.

EDIT]

I linked the table above - PD6 is DIO14.

Edited 1 time(s). Last edit at 02/10/2013 06:25AM by Andrew Smith.
Re: Extuder with max6675
February 10, 2013 06:56AM
i see! i change it, to DIO14 and connect CS to pin 20 of atmega but this output is always 5V No matter if i set the temperature higher or lower than 16383
Re: Extuder with max6675
February 10, 2013 07:28AM
Yeah, its only low while reading from the max6675, so it'll always read as 5v.
Re: Extuder with max6675
February 10, 2013 07:32AM
ok i see,when CS is low it supposed to read the temperature of the maxx6675 and when CS is high serial aoutput is not enabled and so it does not work.Thats why i set pin 20, to control CS.
But the problem is, that max6675 can read the temperature when i set from 5 volts to 0.I mean i have to trigger from 5volts to 0v so that read the new temperature. If i set CS always to 0v it does not change,it stays at the last meseared temperature. So how can i trigger CS from 5 volts to 0volts ,maybe needs pwm?

Edited 1 time(s). Last edit at 02/10/2013 08:29AM by alfadex.
Re: Extuder with max6675
February 10, 2013 08:39AM
That's what the write(dio20,1) lines are for.
Re: Extuder with max6675
February 10, 2013 08:50AM
ok i write this and connetct CS to pin 20

// enable TT_MAX6675
WRITE(DIO14, 0);

// disable TT_MAX6675
WRITE(DIO14, 1);

but i mean if i want to see the measurment to pronterface i have to set manualy CS from high to low.
If i want to see a new measurment to pronterface i have to set again from high to low.I have to trigger every time from high to low to see the changes of the temperatue. If i set CS to low, temperatures does not change

I discover when printer is online ,when power supply is working ,pin 20 where CS is connected is 4.9 volt.But it supposed CS for max6675 is enabled with low logic

Edited 1 time(s). Last edit at 02/10/2013 10:59AM by alfadex.
Re: Extuder with max6675
February 10, 2013 11:59AM
The firmware drives cs low for a few clock cycles, once every 250ms. A multimeter will always read high, you'd need an oscilloscope to see the pulses.

Anyway, the firmware looks right so it has to be a hardware problem. I'd try removing the pullup resistor and going straight to the cs pin.
Re: Extuder with max6675
February 12, 2013 09:55AM
I tried without pullup resistor but the same. I tried to measure CS to watch the pulses with osciloscope but when i connect it ,printer goes offline.
I tried a second max6675 and doing exactly the same things!
I am thinking to replace thermocouple with a thermistor to make things easier. My thermistor is this
But datasheets says max temperature for thermistor is 125 degrees. Extruder reach 200-220 degrees, Isn't there any problem of destroying the thermistor? If thermistor is not touching the extryder head, will i have a reliable measurement?
Re: Extuder with max6675
February 12, 2013 04:59PM
I started out as a fan of thermocouples, because they are pretty much indestructible so you can bolt them directly to the hotend with a strong mechanical connection, but in the end, I gave up because it is more expense ( because of the additional electronics needed) and the thermistors do work pretty well. I do miss bolting them on though.
Re: Extuder with max6675
February 12, 2013 05:29PM
alfadex Wrote:
-------------------------------------------------------
> I tried without pullup resistor but the same. I
> tried to measure CS to watch the pulses with
> osciloscope but when i connect it ,printer goes
> offline.

Im no electronics expert, but Im pretty sure it shouldn't be doing that. May be worth trying another pin on a different port.

> I tried a second max6675 and doing exactly the
> same things!
> I am thinking to replace thermocouple with a
> thermistor to make things easier. My thermistor is
> this
> But datasheets says max temperature for thermistor
> is 125 degrees. Extruder reach 200-220 degrees,
> Isn't there any problem of destroying the
> thermistor? If thermistor is not touching the
> extryder head, will i have a reliable measurement?

You're going to need a thermistor rated for extrusion temperatures. Glass bead thermistors are the most common, but axial thermistors are easier to secure in place. This will require a second thermistor table, but thats not difficult. Don't even attempt your idea of having the thermistor out of contact with the extruder head.
Re: Extuder with max6675
February 17, 2013 08:32PM
And finally i did it with a thermocouple.But hotend temperature is not controled by atmega.
I made another ,seperate circuit with atmega8 which is controling the hotend
I use another one mosfet IRFZ44 and i control the extuder totaly seperate!
I know its not the best solution but temperature seems to be stable enough
I am waiting now for the filament to print something


Edited 1 time(s). Last edit at 02/17/2013 08:35PM by alfadex.
Sorry, only registered users may post in this forum.

Click here to login