So if my heater is 40W and my power supply is 24W, do I have to buy a more powerful power supply?
How can i minimize the delay of bootloader?
I see, but if I'm not mistaken, I think this formula is also used in thermistors for 3D printers, where the temperature must be accurate, but it is also possible that I have a mistake in the calculation of this formula somewhere, but that would probably measure wrong from the start.
R2 = R1 * (1024.0/(Vo+0.5) -1);// Vref->R2->Vo->R1-> GND
// R2 = R1 / (1024.0/(Vo+0.5) -1);// Vref->R1->Vo->R2-> GND
The difference is small compared to other sources of error, but this protects against divide by zero, and also puts the 1024 point estimates in the middles of the 1024 intervals between 0 and Vref.
In a word yes. You cannot place a 40 Watt load on a 24 watt supply. Matter of fact your load should not exceed 80% of what your supply is rated for. You want a margin of overhead.
That said I suggest you give this a read which actually covers use of a 100K thermistor. There are several code samples in the link. I suggest you start with the basic simple code.
Finally invest in an inexpensive DMM as it is likely one of the most important tools you can have.
Ron
You probably are not mistaken. Bad code has a tendency to be propagated by people who don't understand the details. Especially by those who consider Youtube and Instructables to be reliable sources of information. They simply don't know any better.
...and, in some circumstances, it makes scaling with faster shift operations possible.
Please print out your Vo
values and R2 at room temperature and up around when it's 200C.
You don't need a DMM. It's the ratio between the resistances that matter, and your ADC will be good enough.
If R_25 of the thermistor is approximately the same as the R1=100k in the the schematic or the R1=10k in the code, then Vo should be near 512 at room temperature and R2 should come out near R1. If the actual resistances are off 10:1 one way or the other, it will be apparent: Vo will be near 1024*(10/11)=930 or 1024*(1/11)=93 instead of 512, and the R2 calc will be way off.
Are you using physically using the R1=100K in the schematic and the different R10K in the code? It is a bit confusing, and will give wrong measurements of the intermediate resistance R2 (code estimates 10K for an actual 100K thermistor at room temperature), but since Ro=R1 in the code, the error balances out in the next line in the temperature calculation.
Your thermistor may not be suitable for the temperatures you want to measure, the equation gives these values for the upper readings of Vo. The resolution is getting pretty bad at the upper end.
Vo: 1010 Tc: 170.89C
Vo: 1011 Tc: 174.97C
Vo: 1012 Tc: 179.49C
Vo: 1013 Tc: 184.54C
Vo: 1014 Tc: 190.25C
Vo: 1015 Tc: 196.80C
Vo: 1016 Tc: 204.44C
Vo: 1017 Tc: 213.57C
Vo: 1018 Tc: 224.82C
Vo: 1019 Tc: 239.30C
Vo: 1020 Tc: 259.24C
Vo: 1021 Tc: 290.09C
Vo: 1022 Tc: 351.96C
Vo: 1023 Tc: -273.15C
The mid range is about room temperature
Vo: 511 Tc: 24.96C
Vo: 512 Tc: 25.04C
When you have the correct thermistor and formula for doing the calculation, then consider using a pre-calculated lookup table in the code.
Is the Arduino measuring the thermistor or the fixed R?
Ner' mind, if the Fritz is correct, the TM is R1.
If you add in the resistances at those temperatures you can see why the resolution is terrible with a R1=100K sense resistor.
For 200C, I get:
Rth=100000*1/exp(3950*(1/(273.15+25)-1/(273.15+220))) = 530 ohms
If it isn't operating out of spec at 220°C, you can trade off resolution near 25°C for resolution at 220°C if you use a smaller sense resistor for R1.
Maybe R1=10K would be a reasonable compromise, with Vo = 1024 * 10000/(10000+530) = 972
, but one would need to change R1 in the code.
ETA:
If you chose R1=680 ohm, then at 220°C, you'd have near maximum resolution and (5V/(530+680))=4mA for 9mW of self-heating in the Thermistor.
I had a look at the schematic for the RAMPS 1.4 board used for 3D printers, that uses 4.7K, with the nominal 100K thermistor being fairly common in the thermistor tables in the Marlin code.
If the OP wants to maintain a fairly precise temperature, it would be better to get rid of the mechanical relay and use a MOSFET or other electronic control so that PID control could be used, or at least put a little hysterisis in the switching temperature of the relay to prevent rapidly switching the relay ON/OFF at the target temperature (that may be part of the current problem).
Yes 4.7k R1 with a 100k thermistor is good for moving the high sensitivity range up to the range of 3d printer filament melting temperatures.
Another trick is to switch in a second resistor to give high sensitivity at two ranges. For instance split R1 into a 100k+4.7k with an additional Arduino I/O at the junction. Then set it to input for low temp accuracy and output LOW for high temps.
One way to use a PID with mechanical relays is to set a control interval, such as 120sec, and use the PID output to set the duty cycle within that period.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.