• Welcome to National Homebrew Club Ireland. Please login or sign up.
July 20, 2025, 06:50:00 PM

News:

Renewing ? Its fast and easy - just pay here
Not a forum user? Now you can join the discussion on Discord


Ardbir Help eBIAB- a few questions on PID and window size.

Started by northernnick, May 21, 2016, 12:50:34 PM

Previous topic - Next topic

northernnick

I have built a ArdBir for my eBIAB setup. I haven't bought it from the store, I had all the components around laying around so I just used their sourcecode on the arduino.

Now it is wired correctly as of this below but minus the pump (I don't have /need it just yet)



PID settings kP = 50
                    kI  =   1
                    kD =  10

I did a few test runs with 5-7 Litres of water on step mashes - (heat to 45C, hold for 1 min, heat to 50, hold, 60, hold, 68, hold, 75, hold, boil, 5 mins) It would take me 45 mins or so. And it kept overshooting the temp. So I changed the PID setting as per a few websites. But I either was undershooting (just staying 1C below target) or overshooting (1/2C over). I'd have to be continuinly watching the temp, I couldn't just rely on the buzzer saying it reached the temp.

What are peoples luck with PID, window size settings etc?

Secondly, when I really examined the temp, sometimes the element would just continue to run even when the heat on but not triggered (H but not with a white background if you know what I mean). I would have to physically remove the power to the kettle and plug it back in. It would then be fine.

Do element need to get rid of their current before shutting off? Or is the trigger switching so quickly (window time) it isn't giving it time to turn off, hence just heating as normal?

It's really bafflying me. I'm not really using it for automation as I can't rely on it, I'm kinda just using it as a thermometer and a timer, which seems a bit silly compared to what it SHOULD be able to do.

Any thoughts?

Thanks, N


pob

What is your setup? eg keggle with 2 elements? Burco type with single element? What volume?

You may need to try a full volume test with water- the 5-7 litres may be too small for ArdBir PID to react correctly.

pob

I'm using
P 100
I 5
D 10
SampleSet 1500s
WindowsSize 4500s

For a 2 x 2.4kW Keggle.

It's nearly there, a tad bit slow getting to the last 1-2°C (it's quite 'cautious') - I'm sure I could tweak it but as it's working fine it'll do for time being.

Hint: With active mash heating remember to reduce your strike temp, a lot easier to heat up by a degree than overshooting & trying to cool down.

northernnick

It's a Peco boiler with a 2.4Kw element inside.

I just tried it in manual mode and it did the same. It took my strike temp to 80C when it was set at 68C. The H is is in black so its not trigggered but is "active". I press the heat button to turn it off (no H) and it the boiler still churning away. I unplug boiler, enough to not hear any noise from the element and then plug it back in. Element not on as expected.

I can toggle between heat on and off, for 10 seconds either side and it works fine, so I know the wiring is correct and the SSR is working. But it's just strange. If I plug in a light put the temp probe near it it will stay on until the bulb gets hot and then turn off, as the heating element should.

Its like like I need a minimum time for the "OFF" state.


pob

Then there's an issue with the SSR (or its wiring).

Is the LED pulsing in time with the 'H', as it heats?

northernnick

I don't have a LED at the moment, I think It'll be on the to do list.

I don't think it is the SSR... because it turns on when DC voltage is applied and turns off when it isn't. I've ran multimeters accross that.  I have a new element so hopefully when that gets installed there might be some more luck.

On the AC side. The voltage should definately drop to zero correct when the relay is closed correct? I'm not to familar with AC electronics.

Is there an AutoTune PID algorithm that works out the correct variables? I seem to recall a code you can run on the arduino and it will raise a temp to the boil and work out the correct variables. Something like you fill it to the correct of water for your batch and it does temp step increases to work out the error rate.


pob

Quote from: northernnick on May 22, 2016, 01:23:41 PM
I don't have a LED at the moment, I think It'll be on the to do list.
I meant on the SSR, there is usually one that lights up when it's switched on.

Circle under 10A mark, above terminal 3.


Quote from: northernnick on May 22, 2016, 01:23:41 PM
On the AC side. The voltage should definately drop to zero correct when the relay is closed correct? I'm not to familar with AC electronics.
Would have thought so
a bit more SSR reading


Quote from: northernnick on May 22, 2016, 01:23:41 PM
Is there an AutoTune PID algorithm that works out the correct variables? I seem to recall a code you can run on the arduino and it will raise a temp to the boil and work out the correct variables. Something like you fill it to the correct of water for your batch and it does temp step increases to work out the error rate.

Think it might be handier to play with ArdBir PID settings to see how it reacts.
Arduino PID Autotune Library
more PID reading

northernnick

Sorry It does have a LED on it and was lighting up when "closed"/"on" in tests. However, obviously I have that in a case so I can't tell whether its lighting up when its running.

One thing I have just remembered is that I run it from a small portable USB external battery, I might try it again with a 9V dedicated plug. Potentially I might not be producing enough switching current to turn the SSR "open/"off".

Also what I might do is temporarily hook up a a lightbulb as well as to the heating element so I will know that the AC is switching as it should and therefore the heating element is switching on and off as it should. Then run manual mode again.


darren996

I think the SSR switch only requires 5v. Hook your kettle as the heat source. Most kettles have some kind of led indicator when they are on. You wil hear the element firing also. You can have a nice cuppa when you're done:)

Sent from my GT-I9505 using Tapatalk


Will_D

@POB: The picture you posted is NO of a normal AC SSR!!  ??? ???
Remember: The Nationals are just round the corner - time to get brewing

pob

Quote from: Will_D on May 22, 2016, 06:44:23 PM
@POB: The picture you posted is NO of a normal AC SSR!!  ??? ???

Just being used visually (pulled from Google Images, without looking at rating) to show position  of LED on Fotek SSR copies, probably most popular ones usually got from Ali/China.

AC version would be DA not DD.

pob

+1 on Darren's method.

Could you safely keep the case lid off to test? Before you add external case LEDs.

northernnick

May 23, 2016, 08:48:37 AM #12 Last Edit: May 23, 2016, 09:31:10 AM by northernnick
I followed that advice. I changed to a 5V 1.5A power supply and tried again with 5 Litres of water. I kept hitting near the mark (undershooting) but that can be tweaked in the PID settings. The main point being that is turned on and off as expected.

I had the case lid on its side and can confirm that the LED on the SSR was flashing in sync with the H (blue H, white background "ON") but not when it was a regular H ("off").

Could possibly have been that the external battery has too little current it to open the gate/break affectively, even though the H was flashing on and off the screen. I'll try and confirm later when I do a 20+ litre of water after work.


molc

Sounds like leakage alright. I had one ssr connected to mime that would "pulse" a lamp connected every 10 seconds, so swapped it out.
I use Pobs settings as well. They're a little cautious but hit the temperature dead on everytime, so I'm happy enough with them. Once you trust it, you just walk off and let it work through its program cycle, so it's no pain.

Sent from my E5823 using Tapatalk

Fermenting: IPA, Lambic, Mead
Conditioning: Lambic, Cider, RIS, Ole Ale, Saison
On Tap: IPA, Helles, Best Bitter

northernnick

June 17, 2016, 04:29:24 PM #14 Last Edit: June 18, 2016, 05:52:12 PM by northernnick
OK, a few weeks have passed and I've done more research/tinkering/headscratching. My head is still very confused so I'll go through it with photos.

So doing some probing with my multimeter, I busted the SSR (silly mutilmeter only went upto 10A and I was pumping 13+A) so fair enough, I needed one anyway to test further. I added a mains power for the arduino instead of a portable battery, just to double double make sure it wasn't something like not enough current/turning it on/off. New SSR came (Fotek 40A) and off it went into the project box along with a dedicated Arduino power supply. I have upgraded my kettle so I am now using a new element (3000w) compared with my previous (2400W)

So firstly I test the SSR. Acive "H"(eat)



Inactive "H"



Put 16L Litres in and I put it on automode, just for a bit of help with the start/stop sceduling and buzzer so I could check on the temp.

At first, ambient > 30C mash in, and it worked! Hurrah! "It must have been the SSR", I shout. The element switching on and off around 28C trying to slowly the get the temp to 30. It gets to 30, buzzer goes on, 1 min rest, no power going to the kettle. Great flipping stuff. I'll let her go to 45C.....

So off the kettle went and sure enough, 45C, the buzzer goes off, the "H" in no active on the screen.... and the f*****king b****strd element is still roaring away, 46C, 47C, 48C.... I waited til 50 and it did the same. So I unplugged the ardbir >> heating element cable and plugged it back in. It wasn't on. Physically pulling the plug and inserting it was the only way to get it to stop boiling when the "H" was not active. So I know that there is something weird here. The SSR is working, and when it says the "H" is not active it still needs to be physically broken to ensure 0V.

Out comes to DMM, I crack off the element case and attach the probes.

The automation program was Paused, the "H" inactive and therefore SSR shut off. The display reads 0V. Great.



I continue the program and the multimeter is back at 230V. "H" active.



So I run it for 10 secs and then pause it. "H" inactive and .... Oo oh! :( The kettle boiling away and the multimeter reads 230V.



The plug gets pulled and as expected the voltage drops to 0V... as it should have done anyway. It gets plugged back in and it still remains 0V, again as it should do when the SSR is off and the "H" in inactive.



I try one last test. I put it in manual mode and I manually test the turning it on and off. And now it gets interesting...
"H" active for 1 sec then inactive = works correctly. 230 - 0
"H" active for 2 sec then inactive = works correctly. 230 - 0
"H" active for 3 sec then inactive  = works correctly. 230 - 0
"H" active for 10 sec then inactive  = Permanently on 230 even when inactive.

So does timing have a factor in this? As has been shown, when first turned on going upto 30C from ambient and the element being off for a few days, it works as should. And when turning it on and off manually upto 5 seconds, it behaves as it should. Be after either 10 seconds of being on, it does not seem to be want to work as it should.

TLDR; new element, new SSR, new power supply. SSR turns on and off from the arduino but the voltage after the element has been on for over 10 seconds stays on permanently and can only be drop to 0V/off by physically unplugged the power going to the kettle.

I apologise for this long post, I just thought if i was as descriptive as possible it would explain my troubleshooting process and lay out the anomalies with the system.

Thanks in advance, N . (If any Mods can delete the below attachment that would be great.