sjgittins / KilnTemperatureLogger

Temperature Logger for Pottery Kiln using raspberry pi, MAX31855, and K type thermocouple
GNU General Public License v3.0
0 stars 0 forks source link

Calculating Rate of Temperature Change #1

Open sjgittins opened 3 years ago

sjgittins commented 3 years ago

Can't figure out how to calculate temperature change over timer intervals (1,5,10,15,other) minutes to know when kiln temperature is reaching equilibrium. Once the temperature rise rate drops below some value, say (+)200 F per hour, then set an alert so user can flip the next switch on the kiln.

Attached is just some time and temperature data (not from kiln firing) to serve as a basis for said calculation.

KilnTemp - Copy.zip

peargnav commented 3 years ago

hi there, I'm new here! I have tried your code. So far the temperature is always 32.0 F. No idea what I did wrong. I used your code as is.

sjgittins commented 3 years ago

Thats the default value. Theres a break in your circuit somewhere. Either that or it's the temperature sensor, but anytime I see 32.0 I know there is a wiring issue

On Fri, Jul 30, 2021, 15:34 peargnav @.***> wrote:

hi there, I'm new here! I have tried your code. So far the temperature is always 32.0 F. No idea what I did wrong. I used your code as is.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/sjgittins/KilnTemperatureLogger/issues/1#issuecomment-890110478, or unsubscribe https://github.com/notifications/unsubscribe-auth/AS4ONLMJGGJUHZ6EXIT75L3T2L5FDANCNFSM4X5AQQOQ .

peargnav commented 3 years ago

Hello there!

i) I apologize for the late reply, I'm new at this github thing.

ii) Thanks for the advice I'll wire again the whole thing.

iii) Hardware I'm using a raspberry pi compute module 4 and I'm wired as it follows;

raspberrypi MAX31855 GPIO# NAME BCM Pin number N/A 3.3 VDC 3v3 Power 1 Vin
Power

N/A Ground Ground 9 GND

13 GPIO 13 BCM 27 21 DO MISO (SPI)

22 GPIO 22 BCM 6 33 CS GPCLK2

14 GPIO 14 BCM 11 23 CLK SCLK (SPI)

iv) I'll try it and let you know if it works!

Thank you!

peargnav commented 3 years ago

Hello there, I wired the whole thing again. I installed a new MAX31855 with new wires and it does not work yet. I put the thermocouple on a hot surface and it always reads 32 F. I will check again. I'll keep you posted. Thanks for the input

peargnav commented 3 years ago

not working yet, it displays always 32 F. Dont know yet what Im doing wrong!

sjgittins commented 3 years ago

Can you post a picture of the layout? Did you solder the leads onto the MAX38155 yourself, or was it a pre-soldered chip? Send close up pictures of the soldering on the MAX31855. What type of thermocouple are you using? Send pics / specs on that too.

keep me posted, I've been there and it is super frustrating. I dragged my feet for a year on this project cause my issues fell into 2 categories. Half the time I was getting 0C error despite having changed nothing from recent powerdown, and the other half the program would error and exit because a short to ground caused the program to exit.

Eventually I bought more new MAX31855s from an actual reputable vender - there are MANY fakes out there. Some have power protection on them, and the cheap ones don't. I bought one from ebay and hooked it up to the 5V not the recommended 3.3V and it won't work anymore.

Hoping it's a K-type thermocouple, and if so, do you have an actual pyrometer with the direct K type plug?

Anytime I see the 32.0F temperature I do 3 things to try and fix it. Googling MAX31855 reads 0C issue takes me here: https://forums.adafruit.com/viewtopic.php?f=19&t=35656 - their issue was wiring, might need better jumpers on your breadboard, but I'll wait to see what your layout looks like.

  1. I'd verify the thermocouple actually works using independent hardware - i.e. K type thermometer / pyrometer
  2. I verify each connection is secure - between the forum answers above pointing to undersized jumper wires, or my experience of initially having a bad solder at one of the connections on the MAX31855 chip
  3. Tear it out and start anew, get solid core wire spool and make your own jumpers. Their diameter is bigger than the cheap industry jumpers, and you can cut each wire to size as you go, and have really clean runs.

Don't give up! You are close.

Also, this code is old, I have a local copy on my pi I'll update soon. I fixed this actual issue getting temperature over time, so I'll help you and then I can close this as an old issue.

Cheers

On Thu, Aug 5, 2021 at 3:35 PM peargnav @.***> wrote:

not working yet, it displays always 32 F. Dont know yet what Im doing wrong!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/sjgittins/KilnTemperatureLogger/issues/1#issuecomment-893730200, or unsubscribe https://github.com/notifications/unsubscribe-auth/AS4ONLL2RM6BDHIAWM2MNZDT3LRW7ANCNFSM4X5AQQOQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

--

Regards,

Scott J. Gittins

peargnav commented 3 years ago

Hello there, thanks for the input this is really helpful !

i) In order to get the right information and ask the right questions I'll write a complete list of hardware, wiring, code and much more about my project

ii) I'll post some pictures of the complete hardware

iii) I'll describe the procedure I have been using when I'm troubleshooting the hardware.

iv) I know sometimes is frustrating when things do not work. For me is an strange/weird feeling of excitement because I do learn how to troubleshoot things and at the same time disenchantment because you do not know what went wrong. Is like looking for a vaccine without knowing the virus!

I'll keep you posted and again thank you.

cheers

peargnav commented 3 years ago

Hello there, everything is working now the wiring is done as described below I'm glad is working now is such a relief!

Connect the Raspberry Pi 3.3V power pin to Vin Connect the Raspberry Pi GND pin to GND Connect the Pi SCLK pin to the MAX31855 CLK Connect the Pi MISO pin to to the MAX31855 DO Connect the Pi GPIO 5 pin to to the MAX31855 CS

sometimes the program stops because the circuit is shorted to ground so I'm working on it.

peargnav commented 3 years ago

again thank you for your input

peargnav commented 3 years ago

Now I have to solve the shortage problem ! these are now the next steps of my project: i) to solve the shortage problem ii) build an interface or anything that allow me to start the thermocouple only when the heat is applied to the machine.

peargnav commented 3 years ago

the main idea is to build an embedded system that can read and export the data from the thermocouple to a sql data base. The system has to be able to start without using the raspberry pi terminal. For instance, I want a button or any input that can start the program. After that, or in parallel I will do the data analysis something similar than you are trying to do. I'll write down the specs and shared it with with you . Personally I think this is awesome, I like to build things. Anyway, I'll leave you to it, I'll keep you posted. Cheers

sjgittins commented 3 years ago

so glad it is working better. Keep in mind that when the short to ground error pops, the program terminates. Originally I went down a path to write to a sql database or something similar, but in the end I settled on a local CSV file which delivered everything I needed. I'll post my new script when time allows. Cheers

On Wed, Aug 18, 2021 at 12:34 PM peargnav @.***> wrote:

the main idea is to build an embedded system that can read and export the data from the thermocouple to a sql data base. The system has to be able to start without using the raspberry pi terminal. For instance, I want a button or any input that can start the program. After that, or in parallel I will do the data analysis something similar than you are trying to do. I'll write down the specs and shared it with with you . Personally I think this is awesome, I like to build things. Anyway, I'll leave you to it, I'll keep you posted. Cheers

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/sjgittins/KilnTemperatureLogger/issues/1#issuecomment-901259797, or unsubscribe https://github.com/notifications/unsubscribe-auth/AS4ONLI2D64FPZN6PAMANETT5POK5ANCNFSM4X5AQQOQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

--

Regards,

Scott J. Gittins