Benachrichtigungen
Alles löschen

PT100 with amp board  

Seite 4 / 6
  RSS
Bunny Science
(@bunny-science)
Noble Member
RE: PT100 with amp board

Yes, the additional resolution would be nice.

Veröffentlicht : 28/08/2019 2:59 pm
Chocki
(@chocki)
Prominent Member
RE: PT100 with amp board

Hopefully the parts should arrive soon, then I can play with it, I'll hook it up to my Arduino MEGA first to see what ADC values I get, then mod the amp and see what I get again, then test with a K type thermocouple hooked up with the PT100 sensor to compare values and adjust the thermistor (Thermocouple) table for the PRUSA.

The rest of my re-build is going bit by bit, new thicker cables from new PSU to reverse mounted Einsy, also adjusted the new PSU to 26 volts output, I'm going with the PIN10 P3 connector analog in for the PT100 amp.

Designing new cover plate with FAN casing for the LRS-350 PSU with a customisable finger guard to suit fitting an Arctic F9 Silent 92mm fan to the PSU.

The idea is so that the fan housing can be printed separately to the rest of the cover, this way anyone can make their own design to suit their taste, and maybe a skin for the rest of the PSU so that the colour matches with whatever else you want, again customisable designs.

And I'm still learning about the firmware, I may have to break it down into chunks to load onto the MEGA to fully learn what different parts do, but this is a long term project, even crossed my mind that this may be a good way to tune the trinamics, just buy a trinamics module, run barebones software on the MEGA, plug it into one of the steppers on the printer and drive it, should be easier to connect a scope and no danger of frying your EINSY.

 

Normal people believe that if it ain’t broke, don’t fix it. Engineers believe that if it ain’t broke, it doesn’t have enough features yet.

Veröffentlicht : 29/08/2019 11:20 am
--
 --
(@)
Illustrious Member
RE: PT100 with amp board

should be easier to connect a scope and no danger of frying your EINSY.

?? You should be able to ground at the PS common and not do any damage. At least my first pass at looking at the EINSY schematics show it should be safe - all of the GND points float, so should just drop to earth when attaching the scope. Or are you wanting to look at the stepper drive differentially?

 

Diese r Beitrag wurde geändert Vor 5 years von --
Veröffentlicht : 29/08/2019 3:23 pm
Chocki
(@chocki)
Prominent Member
RE: PT100 with amp board

Thanks Tim.

The hot end parts have not arrived yet, so nothing happening yet ☹️ 

 

Normal people believe that if it ain’t broke, don’t fix it. Engineers believe that if it ain’t broke, it doesn’t have enough features yet.

Veröffentlicht : 31/08/2019 11:05 pm
Chocki
(@chocki)
Prominent Member
RE: PT100 with amp board

My parts arrived, and I have glued a 10k multiturn potentiometer to the board ready to solder, so that I can adjust the gain from 10 to 16. Potentiometer pins will be soldered directly to the ends of R5.

Currently there is a glass block on it pressing down until the clear gorilla glue dries, and tomorrow I will solder the ends.

Normal people believe that if it ain’t broke, don’t fix it. Engineers believe that if it ain’t broke, it doesn’t have enough features yet.

Veröffentlicht : 10/09/2019 11:11 am
Chocki
(@chocki)
Prominent Member
RE: PT100 with amp board

All soldered and set to 3.300K Ohms. I had to buy a new multimeter when I realised my existing 30+ years old Fluke one was no longer accurate, tried new battery, but no good, guess I can't complain really.

Got a Beha Amprobe37XR-A so should last a good number of years, pointless getting a cheap Chinese meter, it would have been worse than my faulty 30+ years old meter.  🙂

Just creating a little snap shut case for the board and testing on an Arduino MEGA can start.

Normal people believe that if it ain’t broke, don’t fix it. Engineers believe that if it ain’t broke, it doesn’t have enough features yet.

Veröffentlicht : 12/09/2019 1:28 pm
metacollin
(@metacollin)
Eminent Member
RE: PT100 with amp board
Posted by: @chocki

True, but the resolution is poor. The ATMEGA 2560 only has a 10 bit ADC input so that's 1024 values between 0v and 5v.

This isn't strictly true.  The ATMEGA 2560 has a SAR (successive approximation) ADC, which thanks to the built in 0.5LSB of quantization noise simply by bring a SAR ADC, plus thermal noise gives it enough noise for oversampling to be very effective.  The Prusa firmware uses 16x oversampling, which means it takes 16 samples each time the temperature is measured.  This increases the dynamic range by 16 fold, or 4 bits.  Unfortunately, this also increases the noise amplitude by the square root of the samples, or 4 fold.  All in all, you need 4^n samples, where n is the number of additional bits of resolution you want.  

This isn't free of course, it causes measurement time to increase exponentially.  These 2 extra bits require 16 samples per measurement, and if we wanted just one more bit, it would take 64 samples.  

 

As long as the signal being measured changes slowly enough relative to the total oversampling time, it works very well and does actually get you extra effective bits of resolution that are actually accurate and not just more bits of noise.  

 

So for all intents and purposes, the Prusa firmware is squeezing 12 bits out of that 10 bit ADC.  The real number of values is roughly 4096, and remember, that is AFTER factoring in the increased noise from oversampling as well.  It really is 4096, not kinda sorta 4096.  

Source: http://ww1.microchip.com/downloads/en/Appnotes/doc8003.pdf

 

So in reality, even with a voltage swing of only 1.58V, you still have 1295 possible values.  This translates into a resolution slightly better than 1/3rd of a degree. 

This is more than enough.   In fact, whether you use the PT100 + amplifier board and the narrower voltage swing or the wider swing of the thermistor, in both cases the variation on VCC (which is used as the reference) will completely dominate any temperature measurement errors, NOT the measurement resolution.  

 

In other words, there is no point to increasing the voltage swing or removing the 4K7 resistor.  You won't get better measurement accuracy because the voltage swing is not the dominant source of error and is not the limiting factor.  

Veröffentlicht : 07/12/2019 2:02 pm
metacollin
(@metacollin)
Eminent Member
RE: PT100 with amp board

Of course, if you were to use a dedicated external reference instead of VCC... that's a different story 🙂

Veröffentlicht : 07/12/2019 2:14 pm
Chocki
(@chocki)
Prominent Member
RE: PT100 with amp board

@ metacollin

I learn something new every day!, Thanks.

I thought I had developed a leak at the heatbreak, but it turned out to be dust and gossamer threads sucked in through the heatsink cooling fan, built up and melted on top of the heater block!, but only found this out once I had stripped down the extruder, which meant that I finally got round to rebuilding my skelestruder hotend, new titanium heatbreak  fitted with thermal grizzly kryonaut compond. Cut new capricorn PTFE tube although the old one is still perfect, but was just over one mm too short, so could potentially move.

Nickel plated copper heat block,  new heater and PT100 sensor, all fitted and wrapped, the hardest part was making sure the cable ties do not foul the frame anywhere, top left and right, heater wires should also be clear of the heated bed terminal covers (Long screw replaced months ago).

Now to cut and put ferrules onto the heater cable as it is too long, and fit the E3d amplifier and connect it up to the board, then the fun begins, modding the firmware.  🙂

Normal people believe that if it ain’t broke, don’t fix it. Engineers believe that if it ain’t broke, it doesn’t have enough features yet.

Veröffentlicht : 11/02/2020 2:06 pm
Chocki
(@chocki)
Prominent Member
RE: PT100 with amp board

Thermistor table: PT100 with E3d amp set to gain of 16 instead of 10 as supplied.

With Gain 15.9697    
       
Temp. Res VOut. ADC
0 0   1
1 100.39 1.781177 366
10 103.9 1.842016 378
20 107.79 1.909332 392
30 111.67 1.976359 406
40 115.54 2.043099 419
50 119.4 2.109552 433
60 123.24 2.175548 447
70 127.07 2.241261 460
80 130.89 2.306692 473
90 134.7 2.371842 487
100 138.5 2.436712 500
110 142.29 2.501302 513
120 146.06 2.565446 526
130 149.82 2.629313 539
140 153.58 2.693075 553
150 157.31 2.756224 565
160 161.04 2.819269 578
170 164.76 2.882043 591
180 168.46 2.944379 604
190 172.16 3.006613 617
200 175.84 3.068411 629
210 179.51 3.129942 642
220 183.17 3.191208 655
230 186.82 3.252208 667
240 190.45 3.312778 679
250 194.07 3.373086 692
260 197.69 3.4333 704
270 201.29 3.493086 716
280 204.88 3.552613 729
290 208.45 3.611717 741
300 212.02 3.670729 753
310 215.57 3.72932 765
320 219.12 3.787821 777
330 222.65 3.845903 789
340 226.17 3.903733 800
350 229.67 3.961147 812
360 233.17 4.018474 824
370 236.65 4.075387 836
380 240.13 4.132215 847
390 243.59 4.188633 859
400 247.04 4.244803 870
410 250.48 4.300728 882
420 253.9 4.356245 893
430 257.32 4.411681 905
440 260.72 4.466713 916
450 264.11 4.521502 927
460 267.49 4.576051 938
470 270.86 4.630359 949
480 274.22 4.684429 960
490 277.56 4.7381 971
500 280.9 4.791694 982
510 284.22 4.844891 993
520 287.53 4.897853 1004
530 290.83 4.950581 1015

 

Diese r Beitrag wurde geändert Vor 5 years von Chocki

Normal people believe that if it ain’t broke, don’t fix it. Engineers believe that if it ain’t broke, it doesn’t have enough features yet.

Veröffentlicht : 11/02/2020 5:18 pm
Chocki
(@chocki)
Prominent Member
RE: PT100 with amp board

This is for a direct analog input as available on the Mk3 but not on the Mk3s.

Normal people believe that if it ain’t broke, don’t fix it. Engineers believe that if it ain’t broke, it doesn’t have enough features yet.

Veröffentlicht : 11/02/2020 6:04 pm
Chocki
(@chocki)
Prominent Member
RE: PT100 with amp board

Scratch that the spare (NOT) analog input in P3, pin 10 PK0 is used to check if you are using the correct firmware or not, so even if you have a MK3, this pin is used to check if the IR filament sensor exists or not.

Back to using the original thermistor input but with a modified thermistor table 247 to allow for my amp having a gain of 16 instead of 10.

Its actually not that far different from a non 4k7 pullup resistor input.

Modified Thermistor table 247:

  {   0 * OVERSAMPLENR,    0 },
  { 378 * OVERSAMPLENR,    1 },
  { 390 * OVERSAMPLENR,   10 },
  { 403 * OVERSAMPLENR,   20 },
  { 417 * OVERSAMPLENR,   30 },
  { 430 * OVERSAMPLENR,   40 },
  { 443 * OVERSAMPLENR,   50 },
  { 457 * OVERSAMPLENR,   60 },
  { 470 * OVERSAMPLENR,   70 },
  { 483 * OVERSAMPLENR,   80 },
  { 496 * OVERSAMPLENR,   90 },
  { 509 * OVERSAMPLENR,  100 },
  { 522 * OVERSAMPLENR,  110 },
  { 535 * OVERSAMPLENR,  120 },
  { 548 * OVERSAMPLENR,  130 },
  { 560 * OVERSAMPLENR,  140 },
  { 573 * OVERSAMPLENR,  150 },
  { 586 * OVERSAMPLENR,  160 },
  { 598 * OVERSAMPLENR,  170 },
  { 611 * OVERSAMPLENR,  180 },
  { 623 * OVERSAMPLENR,  190 },
  { 636 * OVERSAMPLENR,  200 },
  { 648 * OVERSAMPLENR,  210 },
  { 660 * OVERSAMPLENR,  220 },
  { 673 * OVERSAMPLENR,  230 },
  { 685 * OVERSAMPLENR,  240 },
  { 697 * OVERSAMPLENR,  250 },
  { 709 * OVERSAMPLENR,  260 },
  { 721 * OVERSAMPLENR,  270 },
  { 733 * OVERSAMPLENR,  280 },
  { 745 * OVERSAMPLENR,  290 },
  { 756 * OVERSAMPLENR,  300 },
  { 768 * OVERSAMPLENR,  310 },
  { 780 * OVERSAMPLENR,  320 },
  { 792 * OVERSAMPLENR,  330 },
  { 803 * OVERSAMPLENR,  340 },
  { 815 * OVERSAMPLENR,  350 },
  { 826 * OVERSAMPLENR,  360 },
  { 838 * OVERSAMPLENR,  370 },
  { 849 * OVERSAMPLENR,  380 },
  { 860 * OVERSAMPLENR,  390 },
  { 872 * OVERSAMPLENR,  400 },
  { 883 * OVERSAMPLENR,  410 },
  { 894 * OVERSAMPLENR,  420 },
  { 905 * OVERSAMPLENR,  430 },
  { 916 * OVERSAMPLENR,  440 },
  { 927 * OVERSAMPLENR,  450 },
  { 960 * OVERSAMPLENR,  480 },
  { 1013 * OVERSAMPLENR, 530 }

Normal people believe that if it ain’t broke, don’t fix it. Engineers believe that if it ain’t broke, it doesn’t have enough features yet.

Veröffentlicht : 12/02/2020 5:46 pm
Chocki
(@chocki)
Prominent Member
RE: PT100 with amp board

Used the following to get my values above along with my own excel table which I will post when I have everything finished and tested.

https://github.com/MarlinFirmware/Marlin/issues/5543

Normal people believe that if it ain’t broke, don’t fix it. Engineers believe that if it ain’t broke, it doesn’t have enough features yet.

Veröffentlicht : 12/02/2020 6:11 pm
ajsmcs
(@ajsmcs)
Active Member
RE: PT100 with amp board

There is already a thermistor table within the stock prusa firmware, for the PT100 with Amp, that lets you plug it into the stock thermistor port and it compensates for the 4k7 resistor on that pin. 

Just uncomment the appropriate line.

i’ve been running 385 degree prints on  my machine using this exact method, daily, for the better part of a year without any issues. 

I repeat. 

Plug the pt100 board right into the thermistor input (plus a power pin), -not- Analog Pin 10.  As long as you uncomment the correct line in the code it will automatically compensate for the 4k7 resistor on that input. 

Veröffentlicht : 12/02/2020 6:22 pm
Chocki
(@chocki)
Prominent Member
RE: PT100 with amp board

@andrew-s48

Thanks, I already know this but I have! Modded my amp to give a gain of 16 so have had to create a new thermistor table.

With this I can only measure up to 530 deg not the 1100 of the standard amp. 😉

Normal people believe that if it ain’t broke, don’t fix it. Engineers believe that if it ain’t broke, it doesn’t have enough features yet.

Veröffentlicht : 12/02/2020 6:44 pm
ajsmcs
(@ajsmcs)
Active Member
RE: PT100 with amp board

Out of curiosity, why? 

Veröffentlicht : 12/02/2020 8:35 pm
Chocki
(@chocki)
Prominent Member
RE: PT100 with amp board

The original has a small voltage swing over printing temperatures and hence lowish resolution as I thought it just works over 1024 bits  (0v to 5V) until Metacollin showed me how it is possible to increase the resolution with some clever software which in effect increases the resolution and is what Prusa do.

I looked at the original gain (10) and worked out that I could get a larger voltage swing by increasing the gain with 16 being the optimum based on available resistor values and printing temperature range, although I doubt I will be going anywhere near 500 Deg C. This in effect increased the resolution of the PT100 sensor with amp solution.

When I started this, PRUSA did not use PK0 (Analog Input A8), so I planned on repurposing this for my input, but alas, it is used for the Mk3S and is used on the Mk3 now to check you have the correct firmware to hardware.

I have posted the information above more for anyone else who may want to experiment, but the PT100 amp works as is without having to change any values in table 247.

Normal people believe that if it ain’t broke, don’t fix it. Engineers believe that if it ain’t broke, it doesn’t have enough features yet.

Veröffentlicht : 12/02/2020 8:50 pm
Chocki
(@chocki)
Prominent Member
RE: PT100 with amp board

Something doesn't add up here when using the thermistor input, guess using the amp at x16 gain is a no no with that 4k7 pullup resistor.

As the amplifier output gets closer to 5v, the pullup resistor affects the signal too much to be able to measure accurately.

Looking at calculations it corresponds to an input voltage of above 3.3v and the ability to measure temperature goes out of the window, with the x10 amp this equates to about 600 Deg C

Up to about 230 Deg, the actual temperature read 10 deg lower, but once I tried to bump the temperature higher above 250 Deg, I basically got thermal runaway with the PRUSA temperature display never going above 260 Deg even though the block was advancing above 300!.

So unless you have a non pulled up analog input available (And we don't), do not increase the PT100 amplifier gain above 10 (Basically as supplied by e3d).

So putting it back to stock x10 gain and using the unmodified 247 thermistor table and running tests again.

One thing for anyone else contemplating modifying hardware.

a word of WARNING!

ALWAYS use more than one method of measurement especially anything to do with heaters, and don't rely on the modified hardware giving you correct results!, OR YOU COULD END UP WITH A FIRE ON YOUR HANDS!.

Normal people believe that if it ain’t broke, don’t fix it. Engineers believe that if it ain’t broke, it doesn’t have enough features yet.

Veröffentlicht : 13/02/2020 2:28 pm
Chocki
(@chocki)
Prominent Member
RE: PT100 with amp board

Close, but not quite, measurments against indicated were out slightly, so corrected table is below, now temperatures are almost spot on.

edit thermistortables.h starting at line 1135

{ 0 * OVERSAMPLENR, 0 },
{ 245 * OVERSAMPLENR, 1 },
{ 252 * OVERSAMPLENR, 10 },
{ 261 * OVERSAMPLENR, 20 },
{ 269 * OVERSAMPLENR, 30 },
{ 278 * OVERSAMPLENR, 40 },
{ 286 * OVERSAMPLENR, 50 },
{ 294 * OVERSAMPLENR, 60 },
{ 302 * OVERSAMPLENR, 70 },
{ 311 * OVERSAMPLENR, 80 },
{ 319 * OVERSAMPLENR, 90 },
{ 327 * OVERSAMPLENR, 100 },
{ 335 * OVERSAMPLENR, 110 },
{ 343 * OVERSAMPLENR, 120 },
{ 351 * OVERSAMPLENR, 130 },
{ 359 * OVERSAMPLENR, 140 },
{ 367 * OVERSAMPLENR, 150 },
{ 375 * OVERSAMPLENR, 160 },
{ 383 * OVERSAMPLENR, 170 },
{ 391 * OVERSAMPLENR, 180 },
{ 398 * OVERSAMPLENR, 190 },
{ 406 * OVERSAMPLENR, 200 },
{ 414 * OVERSAMPLENR, 210 },
{ 422 * OVERSAMPLENR, 220 },
{ 429 * OVERSAMPLENR, 230 },
{ 437 * OVERSAMPLENR, 240 },
{ 444 * OVERSAMPLENR, 250 },
{ 452 * OVERSAMPLENR, 260 },
{ 459 * OVERSAMPLENR, 270 },
{ 467 * OVERSAMPLENR, 280 },
{ 474 * OVERSAMPLENR, 290 },
{ 482 * OVERSAMPLENR, 300 },
{ 489 * OVERSAMPLENR, 310 },
{ 496 * OVERSAMPLENR, 320 },
{ 504 * OVERSAMPLENR, 330 },
{ 511 * OVERSAMPLENR, 340 },
{ 518 * OVERSAMPLENR, 350 },
{ 525 * OVERSAMPLENR, 360 },
{ 532 * OVERSAMPLENR, 370 },
{ 540 * OVERSAMPLENR, 380 },
{ 547 * OVERSAMPLENR, 390 },
{ 554 * OVERSAMPLENR, 400 },
{ 622 * OVERSAMPLENR, 500 },
{ 688 * OVERSAMPLENR, 600 },
{ 750 * OVERSAMPLENR, 700 },
{ 809 * OVERSAMPLENR, 800 },
{ 865 * OVERSAMPLENR, 900 },
{ 919 * OVERSAMPLENR, 1000 },
{ 969 * OVERSAMPLENR, 1100 },
};

Diese r Beitrag wurde geändert Vor 5 years von Chocki

Normal people believe that if it ain’t broke, don’t fix it. Engineers believe that if it ain’t broke, it doesn’t have enough features yet.

Veröffentlicht : 13/02/2020 4:20 pm
Chocki
(@chocki)
Prominent Member
RE: PT100 with amp board

That'll teach me for posting before testing!, someone scrub the above post, I have gone the wrong way!. It is now worse.

Normal people believe that if it ain’t broke, don’t fix it. Engineers believe that if it ain’t broke, it doesn’t have enough features yet.

Veröffentlicht : 13/02/2020 4:36 pm
Seite 4 / 6
Teilen: