rocketscream / TinyReflowController

An all-in-one Arduino compatible reflow controller powered by ATtiny1634R
121 stars 64 forks source link

reflowOvenPID.Compute(); issue #12

Open VILLO88 opened 3 years ago

VILLO88 commented 3 years ago

Hi, i'm trying to running this code from Rocketscream tiny reflow V2, but when the Compute() call is in the loop, simply the board do not boot up, the oled stay black and nothing works, if i temporarly remove the compute() using // the board is booting and oled works. ANy idea? p.s. i use the original board from rocketscream, the 328p have promini3v3 8mhz bootloader on it.



// PID computation and SSR control if (reflowStatus == REFLOW_STATUS_ON) { now = millis();

reflowOvenPID.Compute();                                                            THIS IS THE FUNCTION CALL !!!

if ((now - windowStartTime) > windowSize)
{
  // Time to shift the Relay Window
  windowStartTime += windowSize;
}
if (output > (now - windowStartTime)) digitalWrite(ssrPin, HIGH);
else digitalWrite(ssrPin, LOW);

} // Reflow oven process is off, ensure oven is off else { digitalWrite(ssrPin, LOW); }

rocketscream commented 3 years ago

Did you add anything onto the code? It looks like not enough RAM? I have been producing boards few days ago and never run into something like this.

VILLO88 commented 3 years ago

Thanks for the reply, no i did not add anything to the code, very strange, i ve tried to make a new clean installation of arduino ide and libraries but nothing change. I use this atmega with Promini 3v3 8mhz bootloader https://www.mouser.it/ProductDetail/Microchip-Technology-Atmel/ATMEGA328P-MU?qs=K8BHR703ZXgI55tOEPBx9w%3D%3D

2 photo of my pcb : https://gyazo.com/ee13fb30e90581852b786eca3ec4063f https://gyazo.com/249481c18296b7385a7ea8863f741651

Any idea? i really love this project, i hope to find a solution

rocketscream commented 3 years ago

The MCU is correct part number. The compute part shouldn't be blocking. I'm not sure what causes this because this is the first time I heard something like this on this design.

jone1316 commented 3 years ago

I had the exact same issue. I solved it by using using an older version of the arduino PID library (version 1.1.1). PID

Hope this helps.

rocketscream commented 3 years ago

I had the exact same issue. I solved it by using using an older version of the arduino PID library (version 1.1.1). PID

Hope this helps.

Thank you for reporting this. A look into the PID library changes, it shouldn't hold the process. I believe it could be the RAM issue on the ATMega328P. I will check on this. I'm using 1.1.1 for your information.

VILLO88 commented 3 years ago

I had the exact same issue. I solved it by using using an older version of the arduino PID library (version 1.1.1). PID

Hope this helps.

I will try, thank you very much!

jone1316 commented 3 years ago

It was version 1.2.0 that was causing an issue. PID