Git Product home page Git Product logo

Comments (4)

repetier avatar repetier commented on June 28, 2024

Hi,

the heated bed code is simple as it could be:

// Now manage heated bed
#if HEATED_BED_SENSOR_TYPE!=0
unsigned long time = millis();
current_bed_raw = read_raw_temperature(HEATED_BED_SENSOR_TYPE,HEATED_BED_SENSOR_PIN);
#if HEATED_BED_HEATER_PIN > -1
if (time - last_bed_set > HEATED_BED_SET_INTERVAL) {
digitalWrite(HEATED_BED_HEATER_PIN,current_bed_raw >= target_bed_raw ? LOW : HIGH);
last_bed_set = time;
}
#endif

You see it is checked every HEATED_BED_SET_INTERVAL milliseconds. Setting this too high can cause less updates, but I don't think this is your problem.

current_bed_raw = read_raw_temperature(HEATED_BED_SENSOR_TYPE,HEATED_BED_SENSOR_PIN);

reads the analog value of your thermistor. Wrong values for HEATED_BED_SENSOR_TYPE,HEATED_BED_SENSOR_PIN can give wrong results. HEATED_BED_SENSOR_TYPE must match your thermistor to get correct readings. Wrong types may give a target value you can not reach keeping your bed on forever.

 digitalWrite(HEATED_BED_HEATER_PIN,current_bed_raw >= target_bed_raw ? LOW : HIGH);

sets pin off if current_bed_raw is > target_bed_raw, otherwise it turns it on. Again a wrong HEATED_BED_HEATER_PIN can cause your problem.

I noticed you switched pin 3 and 4 usage against the default config. This is no problem as long as you catch all places in the configurations.h. So my guess is you forgot one place, perhaps the sensore pin? I don't know how you switched the pins. The easiest way is in pins.h just changing the pin numbers.

As I understand you use Repetier-Host (have found the problem reporting heated bed temp, thanks for that). To analise the problem open the temp monitor and set it to the heated bed. There you see the desired output and measured temperature. Compare them. If temp reading is wrong, the sensor is configured wrong. If the output shown doesn't match the real output, that pin is configured wrong.

If you still can't find the reason I may need your configuration.h and the thermistor types to analyse it further. Please send them via E-Mail (see readme.txt)

from repetier-firmware.

TinHead avatar TinHead commented on June 28, 2024

Hi,

Thanks for taking the time to look into this and for the explanation.

I'm going to send you my configuration.h and pins.h later today, I'm currently rewiring the whole thing. When I'm done I'll have another look at them and have them tested again, maybe I did some stupid mistake in there.

Regarding temperature reporting, yes I'm using the Repetier host.
As far as I tell at this point the temperature is reported correctly from my sensor, I checked it while heating up using the temperature measurment feature of my multimeter and it is pretty close.

What happens in the host is that I turn on the heated bed with the button, it turns it on. I set the temperature but it does not seem to actually set it (not sure if this comes from the host side or firmware side). It does report the correct temperature back but instead of returning current_temp/set_temp it returns current_temp/current_temp. If I try turning it off using the button nothing happens, it stays on. The firmware does not turn it off either when the temperature reaches set temperature. As I write this it comes to mind that it might wait for it to stabilize?

So I'm inclined to think that my thermistor, which is a KTY83-110 (1K PTC) works well according the table I managed to come up with. You'll see that in the config as USER_THERMISTORTABLE2, it's basically reverted since this guy's resistance goes up with temperature.

Cheers,

Razvan

from repetier-firmware.

repetier avatar repetier commented on June 28, 2024

Hi,

I know what your problem is. You've done everything right I assume except using a PTC which was not supported. For PTC the raw values don't need to be inverted, so the current logic works wrong for you.

I just uploaded a new version with PTC support. All you have to do is use the new extruder.cpp and set the thermistor type to 52 instead of 7 for USER_THERMISTORTABLE2. I hope your table has the adc values in increasing order, like adviced in the config!

Please report if it works. I have to PTC for testing myself but i think I changed the logic as it should be.

I have found the error in the host reporting the bed temp twice instead off the target temperature. This has no effect on the firmware working, but is corrected in the next host version coming out soon.

from repetier-firmware.

TinHead avatar TinHead commented on June 28, 2024

Woot! It works now! :D Thanks for fixing it man!

Here is my PTC KTY83-110 table if anyone like to use it:

#define USER_THERMISTORTABLE2 {
{1_4,-212_8},{18_4,-152_8},{36_4,-122_8},{53_4,-99_8},{70_4,-79_8},{88_4,-60_8},{105_4,-43_8},{122_4,-27_8},{140_4,-10_8},{157_4,5_8},{174_4,20_8},{192_4,36_8},
{209_4,50_8},{226_4,65_8},{244_4,80_8},{261_4,94_8},{278_4,108_8},{296_4,123_8},{313_4,137_8},{330_4,151_8},{348_4,166_8},{365_4,180_8},{382_4,194_8},{400_4,208_8},
{417_4,222_8},{434_4,236_8},{452_4,250_8},{469_4,264_8},{486_4,277_8},{504_4,291_8},{521_4,303_8},{539_4,317_8},{556_4,329_8},{573_4,340_8},{591_4,352_8},{608_4,362_8},
{625_4,372_8},{643_4,381_8},{660_4,388_8},{677_4,395_8},{695_4,400_8},{712_4,403_8},{729_4,405_8},{747_4,404_8},{764_4,401_8},{781_4,396_8},{799_4,387_8},{816_4,376_8},
{833_4,361_8},{851_4,341_8},{868_4,318_8},{885_4,291_8},{903_4,257_8},{920_4,220_8},{937_4,178_8},{955_4,126_8},{972_4,70_8},{989_4,4_8},{1007_4,-81_8},{1023*4,-211}}

from repetier-firmware.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.