nice video comparing tilting hydrometers:
nice video comparing tilting hydrometers:
nice video comparing tilting hydrometers:
Since you have it working in hardware, you just select the “Use PWM” switch on your PID element. The output will be a PWM % rather than a duty cycle %.Hey guys, can anyone suggest the best way to map a PID calculated power level (i.e. 0-100% power) to the required input signal on a Crydom MCPC2450C proportional SSR? Context being to drive a heating element with a PID algorithm in response to temperature (1-wire) for mashing.
Curve is below. I've got a line going from an ESP32 PWM pin into one of Pete's Analogue Amplifier Boards (AA-1), which is set to 0-10V output. Test signals (using a PWM Device in Brucontrol, not a PID Device) are "working" in generating a 0-10V signal into the pSSR which is responding as expected according to the curve below. Note that the control signal is 0-10V, despite the curve below having an upper bound of 11V.
Thanks for any help,
Meddo.
View attachment 705570
Thanks for the response Pete, to clarify though I'm trying to calibrate the linear output of the PID (0-255, or 0-100%) to the input axis on the S-curve shaped response curve chart. So for 50% power a 50% PWM signal neatly works, but what about 20% power? By eye it's about a 35% PWM signal.Since you have it working in hardware, you just select the “Use PWM” switch on your PID element. The output will be a PWM % rather than a duty cycle %.
Making another attempt to get my PID controlled proportional cooling valve working... Today I was running the still decided to give PID another try... I had to move the RTD off of the ESP32 nd onto the mega and only fried one RTD board in the process with 24vdc... oopsie... anyway, got that hooked up and working, and I am having a weird issue with the PID PWM output not matching what the element displays. it just gives a blip of an output...
I verified with a voltmeter, the mega just has a blip of an output.
blue lines are the same thing, the feedback from the valve... the right orange line is the monitored temperature and setpoint is 150. you see when it hits 150, it starts to increase PID output, but then just goes back to zero.. both Ki and Kd are 0 in this case, but it does the same thing if I put in 1, 0.1, 0.01.....
it is not the analog amplifier, it works rock solid in manual mode... I tried looking at the communications, but since the PID is handled completely in the Mega, I can only read the data that supplies the blue line... I can repeat it over and over, I just put it in manual, open the valve to 50-65%, and let the temp cool off, then re-enable the PID, and it closes the valve because it is below the setpoint, then when the setpoint is reached, just a blip... again this is verified with a DMM on the Mega output pin...
View attachment 705859
I had a similar issue last year with PID on my mega. I hooked up the serial port and enabled the debug level that shows the internal PID information. The input temperature element was showing proper temperature value as well as the input to the PID on the workspace, but when you look at the PID input in the debug console you see an invalid value. Eventually it went away during multiple attempts to reprogram FW and power cycling/rebooting PC/mega/network router/eth switches.
Sorry... not following you. I see two graphs. Which is which?
1.1 build 4, no clue what firmware is on Mega, probably been a year since I upgraded it... forget how to check firmware over ethernet, but %1 from comm window in BC does not show anything..
blues are the same thing.. the left orange is the PID output value, the right is the PID Input value temp... you see that when the right orange line crosses 150F, the PID output *says* it goes to 100%, but in reality, the arduino mega only outputs a little bump, and goes back to zero... the PID output that BC says is happening is NOT happening on the actual interface, but the interface works fin when the manual PWM is used on the same output, so it is NOT hardware...
Hey guys, I've finally gotten an ESP32 based box built, knocked up a step mash interface and process script, and gave it a wet-test last night. The portable box is built to be adaptable to a number of different single-vessel recirculating systems that I've built or bought and customised. Loving the bulk of it so far but I've got a few questions at this point - I've read every page of this thread over the last 9-12 months but don't remember the answers and haven't been able to find them in a search, but apologies if I'm repeating any.
For context, the notable components are:
Control Box:
Vessels:
- Brucontrol v1.1.4
- HUZZAH32 feather (ESP32) plus breakout board
- 5V, 12V, and 24V DC power supplies
- 2 x Crydom proportional SSRs to drive 240V AC elements, requiring 0-10VDC control signals
- Brucontrol TF3 thermistor filter board
- Brucontrol AA-1 analog amplifier board (to generate the 0-10V control signals for the Crydom SSRs)
So my questions:
- 1 x 65W AC pump
- 2 x Topsflo 24VDC pumps with PWM speed control
- 240V AC elements (2400W, 3600W, 4800W)
- 1-wire and NTC temp probes
Thanks for any help anyone can give,
- The NTC thermistor probes supplied with two of my 1V systems - which I assumed to be 10K - turn out to be 25K and 150K. Is there any way to use these with the AA-1 board, or do I need to source replacement thermistors?
- The 1-wire probe in my other vessel seems to be reading about 1 degree C too low (not sure why as it doesn't in my old ardbir or craftbeerpi systems, that I've noticed anyway - but that's a separate issue) - I've put a calibration on the 1-wire Device in Brucontrol but it looks like the PID Device (generating a PWM signal for the proportional SSRs) seems to be responding to the raw value rather than calibrated - is this expected behaviour? And if so, is there any way to vary this behaviour to align to calibrated values?
- Disabling the PID devices in Brucontrol via a script doesn't seem to actually stop them generating the PWM signal, is this behaviour expected? I.e., I hit a "stop" button in my interface which sends the command to the device "enabled = false", should this stop the PWM signal? If not, how should it be done instead? The PID Device is actually disabling in Brucontrol, so my syntax etc. is correct, but the elements are still staying on at full noise (chasing the PID target). I can hack it by setting the target temperature to say -100 degrees C, but that seems messy.
- Is there any way in a script to tell another script to resume at a particular section heading? Intent being a script listening for a "next" button press, tell the mashing script to resume at "mash step 2" for example?
- Perhaps relevant to the question above, is there any way in the script to "wait" for two conditions to be met, either in AND or OR combination? I.e., in psuedo-code for a mash rest: wait "timer" value <= 0 OR "buttonNext" state == true
- What's the current recommended Brucontrol version? Has the v1.2 beta been stress-tested enough to be confidently used in production, or is any other post-v1.1.4 production release imminent? I remember reading about device aliases, absolute addresses for 1-wire, and a few other goodies over the last few months - I'm keen to get access to them if they're ready to go.
- Since, from @BrunDog's response yesterday, there doesn't seem to be a way to calibrate the output of a PID Device to match the proportional SSR curve, is there an alternative way to implement a PID algorithm in Brucontrol that can be calibrated in such a manner, with the output then sent to a PWM Device rather than calculating directly on the PID Device onboard the interface?
Meddo
...looking at the automation direct PLC's , but looks like they have same 256k limit as mega???
And one more actually (sorry for spamming the thread) - in scripts is there a "not" function equivalent to the following psuedo-code available?
"Generic Switch Device" state = not("Generic Switch Device" state)
or
new bool CurrentState
CurrrentState = "Generic Switch Device" state
"Generic Switch Device" state = not(CurrentState)
Cheers,
Thanks for the reply, but no I'm trying to assign the inverse of the current state rather than compare (single "=").If I'm following you correctly and you want to test for a "not true" state, then use the not-equal-to operator !=
OK, I am remote, so I carefully did the migration to 1.1.9 via VNC, using SQL2012In the version you have, you need to have the PID on a PWM capable pin in order for it to use PWM for the output. In the newer versions, we added a switch to give you the flexibility to decide. If you don't mind, let's get the versions to the latest... Please upgrade to 1.1 Build 9 (1.2 Beta). I know it says beta but its stable. Please follow the upgrade instructions. Also update the FW to the latest for the interface. Then let's try again.
<DBConnection>Data
Source=(LocalDB)\v11.0;AttachDbFilename={0};Integrated
Security=True</DBConnection>
<DBConnection>DataSource=(LocalDB)\v11.0;AttachDbFilename={0};IntegratedSecurity=True</DBConnection>
There should be a space between the two words, "Data Source" and "Integrated Security"
thank you, that got me one more step:
View attachment 706069
13:07:09.725: Opening database: Data Source=(LocalDB)\v11.0;AttachDbFilename=C:\Users\POS_User\Documents\BruControl\Data\Data.mdf;Integrated Security=True
13:07:26.608: Exception while opening database: The database 'C:\USERS\POS_USER\DOCUMENTS\BRUCONTROL\DATA\DATA.MDF' cannot be opened because it is version 852. This server supports version 706 and earlier. A downgrade path is not supported.
Could not open new database 'C:\USERS\POS_USER\DOCUMENTS\BRUCONTROL\DATA\DATA.MDF'. CREATE DATABASE is aborted.
An attempt to attach an auto-named database for file C:\Users\POS_User\Documents\BruControl\Data\Data.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
I did initially copy the data.mdf file over, but with this new error, I tried deleting and replacing the Documents\BruControl\Data\data.mdf file with the one in the 1.1.9 zip file, and I tried deleting it altogether.... same response each time...
@clearwaterbrewer - Did we get you right? You can operate without the DB working... just can't generate graph data.
Enter your email address to join: