Recirculation infusion mash system library for Arduino

Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum

Help Support Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
I've figured out how to hook up the thermistor, but what pin are you connecting the flow meter too?
 
I've figured out how to hook up the thermistor, but what pin are you connecting the flow meter too?

Hall effect flow meter needs Arduino 5V and GND. So, if your flow meter follow the "standard colours", red wire should be connected to 5V and black wire to GND. The last wire should be connected to one of your interrupt pins on your Arduino. If it's an Arduino UNO, it should be connected to either :
  • pin 2 (interrupt #0) OR
  • pin 3 (interrupt #1)

After, you just call setInterruptFlow(interruptNumber , flowFactor), where interruptNumber is 0 or 1 on an UNO

That's it !

for other Arduino board : http://arduino.cc/en/Reference/attachInterrupt
 
New version available (v1.2.1)

- added : support for multiple regulator (up to 4) useful for diffrents mash water quantities

It replace an old feature that let you set settings for SIMPLEBATCH and DOUBLEBATCH

I was brewing a strong old ale 6 gal batch and noticed that mash water needed was equal to mash water used in 11 gal process identification. So i selected "double batch" for my simple batch (6 gal). That's why i think that "simple batch" and "double batch" was a bit confusing...

edit : I cannot edit first post anymore and I don't know why...Last updates will be on my google code page.

edit² : removed useless serial print, please re-download
 
I was brewing and was stuck with a dilemma : Is it better to stop heating when time is elapsed or maintain temperature ? Cooling could be problematic if your mash is too much cooled and you have to re-heat it a lot for mashout or alpha-amylase temperature level. Or even worse, bacteria temperature level.

On the second hand, i'm not sure temperature holding for a long time would be problematic for scorching...If your flow is sufficient to avoid scorching, would scorching would be avoided no mater for what time ???

What's your opinion on that ?

Bye !
 
When I'm brewing, after the timeframe is over, I hold temperature while I'm doing an iodine test, if it's complete, I crank the temperature up to 170. I don't mash unattended. Even if the heat goes off, I dont think that too big of a deal because the wort goes in the kettle and is sanitized when boiled. I still havent got my arduino wired up for testing, summer is a busy time of year, but I do have all the parts now.
 
When I'm brewing, after the timeframe is over, I hold temperature while I'm doing an iodine test, if it's complete, I crank the temperature up to 170. I don't mash unattended. Even if the heat goes off, I dont think that too big of a deal because the wort goes in the kettle and is sanitized when boiled. I still havent got my arduino wired up for testing, summer is a busy time of year, but I do have all the parts now.

That's what I thought... For now, heater is shut off when time is elapsed. I will change that soon ...

Thanks !
 
New version availible (v1.4)

Lots of changes :

- Temperature is maintained when time is elapsed (until KEYSELECT is pressed)
- Lot of alarm debug
- Serial monitor warning in identification tool
- arguments in setInterruptFlow to set lower and upper bound of flow rate (because it's not the same on all Rims system : if LWD or ULWD for ex.)
- MAXTEMPVAR = 1 deg Celcius
- Time remaining added to data logging
- Char showing if timer is counting down or not on LCD
 
After a lot of tests with PID filtering, I choose to modify my library...

I will replace PID Output filter by a derivative filter (filtering applied on derivative block only and not all PID)

PID Output filter combined with saturation worked great but causes a lag and, hence, a weird and brief overshoot just before reaching set point temperature. This weird overshoot is completely removed is filtering is applied only on derivative block.

For filtering value, it can be the same as PID Output filter value. It can be setted to :

tauFilter = Kd/10

Bye !
 
Error compiling...











RIMS\utility\PID_v1mod.cpp.o: In function `PID::Compute()':
C:\Program Files (x86)\Arduino\libraries\RIMS\utility/PID_v1mod.cpp:53: multiple definition of `PID::Compute()'
RIMS\utility\PID_v1.cpp.o:C:\Program Files (x86)\Arduino\libraries\RIMS\utility/PID_v1.cpp:47: first defined here
RIMS\utility\PID_v1mod.cpp.o: In function `PID::SetTunings(double, double, double)':
C:\Program Files (x86)\Arduino\libraries\RIMS\utility/PID_v1mod.cpp:88: multiple definition of `PID::SetTunings(double, double, double)'
RIMS\utility\PID_v1.cpp.o:C:\Program Files (x86)\Arduino\libraries\RIMS\utility/PID_v1.cpp:83: first defined here
RIMS\utility\PID_v1mod.cpp.o: In function `PID::SetSampleTime(int)':
C:\Program Files (x86)\Arduino\libraries\RIMS\utility/PID_v1mod.cpp:110: multiple definition of `PID::SetSampleTime(int)'
RIMS\utility\PID_v1.cpp.o:C:\Program Files (x86)\Arduino\libraries\RIMS\utility/PID_v1.cpp:105: first defined here
RIMS\utility\PID_v1mod.cpp.o: In function `PID::SetOutputLimits(double, double)':
C:\Program Files (x86)\Arduino\libraries\RIMS\utility/PID_v1mod.cpp:135: multiple definition of `PID::SetOutputLimits(double, double)'
RIMS\utility\PID_v1.cpp.o:C:\Program Files (x86)\Arduino\libraries\RIMS\utility/PID_v1.cpp:125: first defined here
RIMS\utility\PID_v1mod.cpp.o: In function `PID::SetMode(int)':
C:\Program Files (x86)\Arduino\libraries\RIMS\utility/PID_v1mod.cpp:156: multiple definition of `PID::SetMode(int)'
RIMS\utility\PID_v1.cpp.o:C:\Program Files (x86)\Arduino\libraries\RIMS\utility/PID_v1.cpp:146: first defined here
RIMS\utility\PID_v1mod.cpp.o: In function `PID::Initialize()':
C:\Program Files (x86)\Arduino\libraries\RIMS\utility/PID_v1mod.cpp:170: multiple definition of `PID::Initialize()'
RIMS\utility\PID_v1.cpp.o:C:\Program Files (x86)\Arduino\libraries\RIMS\utility/PID_v1.cpp:160: first defined here
RIMS\utility\PID_v1mod.cpp.o: In function `PID::SetControllerDirection(int)':
C:\Program Files (x86)\Arduino\libraries\RIMS\utility/PID_v1mod.cpp:184: multiple definition of `PID::SetControllerDirection(int)'
RIMS\utility\PID_v1.cpp.o:C:\Program Files (x86)\Arduino\libraries\RIMS\utility/PID_v1.cpp:174: first defined here
RIMS\utility\PID_v1mod.cpp.o: In function `PID::GetKp()':
C:\Program Files (x86)\Arduino\libraries\RIMS\utility/PID_v1mod.cpp:200: multiple definition of `PID::GetKp()'
RIMS\utility\PID_v1.cpp.o:C:\Program Files (x86)\Arduino\libraries\RIMS\utility/PID_v1.cpp:190: first defined here
RIMS\utility\PID_v1mod.cpp.o: In function `PID::GetKi()':
C:\Program Files (x86)\Arduino\libraries\RIMS\utility/PID_v1mod.cpp:201: multiple definition of `PID::GetKi()'
RIMS\utility\PID_v1.cpp.o:C:\Program Files (x86)\Arduino\libraries\RIMS\utility/PID_v1.cpp:191: first defined here
RIMS\utility\PID_v1mod.cpp.o: In function `PID::GetKd()':
C:\Program Files (x86)\Arduino\libraries\RIMS\utility/PID_v1mod.cpp:202: multiple definition of `PID::GetKd()'
RIMS\utility\PID_v1.cpp.o:C:\Program Files (x86)\Arduino\libraries\RIMS\utility/PID_v1.cpp:192: first defined here
RIMS\utility\PID_v1mod.cpp.o: In function `PID::GetMode()':
C:\Program Files (x86)\Arduino\libraries\RIMS\utility/PID_v1mod.cpp:203: multiple definition of `PID::GetMode()'
RIMS\utility\PID_v1.cpp.o:C:\Program Files (x86)\Arduino\libraries\RIMS\utility/PID_v1.cpp:193: first defined here
RIMS\utility\PID_v1mod.cpp.o: In function `PID::GetDirection()':
C:\Program Files (x86)\Arduino\libraries\RIMS\utility/PID_v1mod.cpp:204: multiple definition of `PID::GetDirection()'
RIMS\utility\PID_v1.cpp.o:C:\Program Files (x86)\Arduino\libraries\RIMS\utility/PID_v1.cpp:194: first defined here
RIMS\utility\PID_v1mod.cpp.o: In function `PID':
C:\Program Files (x86)\Arduino\libraries\RIMS\utility/PID_v1mod.cpp:21: multiple definition of `PID::pID(double*, double*, double*, double, double, double, int)'
RIMS\utility\PID_v1.cpp.o:C:\Program Files (x86)\Arduino\libraries\RIMS\utility/PID_v1.cpp:21: first defined here
RIMS\utility\PID_v1mod.cpp.o: In function `PID':
C:\Program Files (x86)\Arduino\libraries\RIMS\utility/PID_v1mod.cpp:21: multiple definition of `PID::pID(double*, double*, double*, double, double, double, int)'
RIMS\utility\PID_v1.cpp.o:C:\Program Files (x86)\Arduino\libraries\RIMS\utility/PID_v1.cpp:21: first defined here
 
Error compiling...











RIMS\utility\PID_v1mod.cpp.o: In function `PID::Compute()':
C:\Program Files (x86)\Arduino\libraries\RIMS\utility/PID_v1mod.cpp:53: multiple definition of `PID::Compute()'
RIMS\utility\PID_v1.cpp.o:C:\Program Files (x86)\Arduino\libraries\RIMS\utility/PID_v1.cpp:47: first defined here
RIMS\utility\PID_v1mod.cpp.o: In function `PID::SetTunings(double, double, double)':
C:\Program Files (x86)\Arduino\libraries\RIMS\utility/PID_v1mod.cpp:88: multiple definition of `PID::SetTunings(double, double, double)'
RIMS\utility\PID_v1.cpp.o:C:\Program Files (x86)\Arduino\libraries\RIMS\utility/PID_v1.cpp:83: first defined here
RIMS\utility\PID_v1mod.cpp.o: In function `PID::SetSampleTime(int)':
C:\Program Files (x86)\Arduino\libraries\RIMS\utility/PID_v1mod.cpp:110: multiple definition of `PID::SetSampleTime(int)'
RIMS\utility\PID_v1.cpp.o:C:\Program Files (x86)\Arduino\libraries\RIMS\utility/PID_v1.cpp:105: first defined here
RIMS\utility\PID_v1mod.cpp.o: In function `PID::SetOutputLimits(double, double)':
C:\Program Files (x86)\Arduino\libraries\RIMS\utility/PID_v1mod.cpp:135: multiple definition of `PID::SetOutputLimits(double, double)'
RIMS\utility\PID_v1.cpp.o:C:\Program Files (x86)\Arduino\libraries\RIMS\utility/PID_v1.cpp:125: first defined here
RIMS\utility\PID_v1mod.cpp.o: In function `PID::SetMode(int)':
C:\Program Files (x86)\Arduino\libraries\RIMS\utility/PID_v1mod.cpp:156: multiple definition of `PID::SetMode(int)'
RIMS\utility\PID_v1.cpp.o:C:\Program Files (x86)\Arduino\libraries\RIMS\utility/PID_v1.cpp:146: first defined here
RIMS\utility\PID_v1mod.cpp.o: In function `PID::Initialize()':
C:\Program Files (x86)\Arduino\libraries\RIMS\utility/PID_v1mod.cpp:170: multiple definition of `PID::Initialize()'
RIMS\utility\PID_v1.cpp.o:C:\Program Files (x86)\Arduino\libraries\RIMS\utility/PID_v1.cpp:160: first defined here
RIMS\utility\PID_v1mod.cpp.o: In function `PID::SetControllerDirection(int)':
C:\Program Files (x86)\Arduino\libraries\RIMS\utility/PID_v1mod.cpp:184: multiple definition of `PID::SetControllerDirection(int)'
RIMS\utility\PID_v1.cpp.o:C:\Program Files (x86)\Arduino\libraries\RIMS\utility/PID_v1.cpp:174: first defined here
RIMS\utility\PID_v1mod.cpp.o: In function `PID::GetKp()':
C:\Program Files (x86)\Arduino\libraries\RIMS\utility/PID_v1mod.cpp:200: multiple definition of `PID::GetKp()'
RIMS\utility\PID_v1.cpp.o:C:\Program Files (x86)\Arduino\libraries\RIMS\utility/PID_v1.cpp:190: first defined here
RIMS\utility\PID_v1mod.cpp.o: In function `PID::GetKi()':
C:\Program Files (x86)\Arduino\libraries\RIMS\utility/PID_v1mod.cpp:201: multiple definition of `PID::GetKi()'
RIMS\utility\PID_v1.cpp.o:C:\Program Files (x86)\Arduino\libraries\RIMS\utility/PID_v1.cpp:191: first defined here
RIMS\utility\PID_v1mod.cpp.o: In function `PID::GetKd()':
C:\Program Files (x86)\Arduino\libraries\RIMS\utility/PID_v1mod.cpp:202: multiple definition of `PID::GetKd()'
RIMS\utility\PID_v1.cpp.o:C:\Program Files (x86)\Arduino\libraries\RIMS\utility/PID_v1.cpp:192: first defined here
RIMS\utility\PID_v1mod.cpp.o: In function `PID::GetMode()':
C:\Program Files (x86)\Arduino\libraries\RIMS\utility/PID_v1mod.cpp:203: multiple definition of `PID::GetMode()'
RIMS\utility\PID_v1.cpp.o:C:\Program Files (x86)\Arduino\libraries\RIMS\utility/PID_v1.cpp:193: first defined here
RIMS\utility\PID_v1mod.cpp.o: In function `PID::GetDirection()':
C:\Program Files (x86)\Arduino\libraries\RIMS\utility/PID_v1mod.cpp:204: multiple definition of `PID::GetDirection()'
RIMS\utility\PID_v1.cpp.o:C:\Program Files (x86)\Arduino\libraries\RIMS\utility/PID_v1.cpp:194: first defined here
RIMS\utility\PID_v1mod.cpp.o: In function `PID':
C:\Program Files (x86)\Arduino\libraries\RIMS\utility/PID_v1mod.cpp:21: multiple definition of `PID::pID(double*, double*, double*, double, double, double, int)'
RIMS\utility\PID_v1.cpp.o:C:\Program Files (x86)\Arduino\libraries\RIMS\utility/PID_v1.cpp:21: first defined here
RIMS\utility\PID_v1mod.cpp.o: In function `PID':
C:\Program Files (x86)\Arduino\libraries\RIMS\utility/PID_v1mod.cpp:21: multiple definition of `PID::pID(double*, double*, double*, double, double, double, int)'
RIMS\utility\PID_v1.cpp.o:C:\Program Files (x86)\Arduino\libraries\RIMS\utility/PID_v1.cpp:21: first defined here

Delete PID_v1.cpp and PID_v1.h in your utility folder.

I've modify Arduino pid library and change the name to PID_v1mod to keep those libraries separated
 
Found a bug in integrator clamping anti-windup stopping integral action when needed. I will post an update soon.

edit : New version available (v1.6.1) :

bugfixe :

- Integrator clamping anti-windup is now functional and work pretty well ! Zero temperature overshoot on my RIMS !
 
So I did not post for a while and it's mainly for 2 reasons :
  • University
  • I brewed about 5-6 batches with my RIMS and this library and it works pretty well ! I had scorching problems with my first 2 batches only because I was restricting the flow at 5 L/min. It was not enough for me, i needed a full-power flow at 8-9 L/min (with my Chugger pump and a 1700 W LWD element). I just called setInterruptFlow() with 8 and 11 L/min and it works pretty well ! My succeeded batches are : 1 farmhouse Ale, 1 English Pale Ale and 1 Amber Ale.

I don't think there is debugging left on this library. For me, i consider it "complete". If anyone need auto-tunning functionalities, you can express it (by liking this post or commenting) and I could find time to work on that...
I thought of adding a Serial-NOR flash chip (1 MB or more could be sufficient) to aquires datas without having to connect a computer on Arduino USB Port. It's not that essential but I'm willing to work on that if it's needed by anybody else than me...
 
Thanks for posting your code, I am working on my own arduino controlled RIMs setup and this has been an excellent resource. I have a few questions after I read through the code.

1) You ask for the mash water volume but that doesn't appear to be taken into any of the calculations. Is this correct or am I missing it?
2) Did you determine the PID coefficients experimentally? Or was there a process you used?
3) You never ask for the water heater element wattage. Isn't this required? It seems like the PID equation should be based on the total energy in x liters of water at y temperature and then you use the element to add energy at a certain rate.

I am an electrical engineer but I did not take a controls class so maybe there is a gap in my understanding here. I will continue to do more research but I thought you might be able to help point me in the right direction.
 
Thanks for posting your code, I am working on my own arduino controlled RIMs setup and this has been an excellent resource. I have a few questions after I read through the code.

1) You ask for the mash water volume but that doesn't appear to be taken into any of the calculations. Is this correct or am I missing it?
2) Did you determine the PID coefficients experimentally? Or was there a process you used?
3) You never ask for the water heater element wattage. Isn't this required? It seems like the PID equation should be based on the total energy in x liters of water at y temperature and then you use the element to add energy at a certain rate.

I am an electrical engineer but I did not take a controls class so maybe there is a gap in my understanding here. I will continue to do more research but I thought you might be able to help point me in the right direction.

For 1) :

Mash water qty is the water quantity that you used in the process identification (see after) and with the current associated PID (manually calculated by you). It's useful if you brew simple and double beers that need about twice mash water and is twice slower to heat up. In that case, 2 process identification should be done and 2 PIDs should be calculated. Having said that, it's really not mandatory. If, for exemple, you brew 10L (simple) and 20L (double) batches, you can run process identification at 15 L and the associated PID should work pretty well with 10 L and 20 L (with a little bit of overshoot).

For 2) and 3)

All your questions can be answered with one systematic method applied every time in Control : PROCESS/SYSTEM IDENTIFICATION

That main objective is to find the equation (transfer function) that describes our physical process/system (in our case : water, pump and element input:heater power output: temp.). One of the most easy and trusted method is the step response (maybe you already studied that with first and second order filter)

I've included a tool that test your RIMS system (runned under normal condition) and put all necessary datas on the Serial Monitor of Arduino IDE, so that part should be easy.

A basic example of process identification would be :
  1. You start at 0 % of power on the element and you monitor the temperature per sec.
  2. At t = 1 sec, you put 50 % of power on the elements (2500 in my lib because it's 2500 mSec ON 2500 mSec OFF and so on, with time proportioning control) and you monitor the temperature.

With these 3 informations, input (heater power), output (temperature) and time (in sec) you can find the equation that describe your thermal system. It can be done manually or automatically with tools like Ident in MATLAB toolkit. After you can manually or automatically calculate your associated PID values (with that can regulate this mathematical function. There is a ton of method for that, if you're using MATLAB you can look at : PID Controller Tuning

edit : The Process Identification procedure (or step response) is mandatory if you want to know the "speed" of your thermal system. Manually managing mathematical equation and PID calulcation is not. You can try PID autotune algorithm at : http://playground.arduino.cc/Code/PIDAutotuneLibrary
 
So I had some new interesting idea for my RIMS and i'll find the time to work on it soon :

  1. ALARM IF 0 V ON HEATER With a cheap 5V DC power supply I can detect if there is a voltage on the heater. Pretty usefull if my breaker is triggered or if I manually shut it off by an external switch. I will add an alarm on the speaker if 0 V is detected.
  2. 8 MBIT FLASH MEMORY BREW DATAS (SPI) I will add functionalities to store brew datas in a flash memory (I will use winbond W25Q80BV ~1$). It will be possible to dump brew datas on USB at the startup of the Arduino.
  3. SPEAKER ALARMS DISTINCTION There will be 4 possible speaker alarms so I will find a way to distinguish all possible alarms (maybe with different frequencies)...

As I said, if anyone need PID AUTOTUNE feature, express it (PM or anything), i will find time to work on that...
 
Do you remember what coefficients you got for your setup?

I have my rims tube working and I am doing some test runs with water. I based my arduino code off of your library and I am attempting to tune using the Ziegler-Nichols method. From what I am seeing I need a Kp in the 100s maybe even 1000s range in order to get to temperature within a reasonable amount of time. Most of the examples I see have tuning values in the 1s range so this looks odd to me. I think the cause for the higher coefficients is that the output of the PID is based on the relay refresh rate (0-5000) so maybe it is acceptable in this case. I just want to make sure I am on the right order of magnitude here or maybe this method of tuning isn't appropriate for this system.
 
Do you remember what coefficients you got for your setup?

I have my rims tube working and I am doing some test runs with water. I based my arduino code off of your library and I am attempting to tune using the Ziegler-Nichols method. From what I am seeing I need a Kp in the 100s maybe even 1000s range in order to get to temperature within a reasonable amount of time. Most of the examples I see have tuning values in the 1s range so this looks odd to me. I think the cause for the higher coefficients is that the output of the PID is based on the relay refresh rate (0-5000) so maybe it is acceptable in this case. I just want to make sure I am on the right order of magnitude here or maybe this method of tuning isn't appropriate for this system.

Yes, my proportional gain is in the 1000s range. My elements is a 1700 W and my 4 PIDs are :

Code:
//  myRims.setTuningPID(Kc,Ki
//                       Kd,Tf,
//                       BatchVol);
// ======= Batch 10L ========
  myRims.setTuningPID(3210.9,7.8,
                     -61903.2,19.8,
                     10);
  // ======= Batch 15L =======
  myRims.setTuningPID(1776.6,5.6,
                      -126240.3,71.7,
                      15);
  // ======= Batch 20L ========
  myRims.setTuningPID(1977.0,5.4,
                      -161641.9,82.4,
                      20);
  // ======= Batch 25L ========
  myRims.setTuningPID(1965.2,8.2,
                      -178142.8,91.3,
                      25);

I did not calculate my PIDs with an analytical method (like Ziegler-Nichols) but with an iterative method (with MATLAB PID tuner). Z-N should work with this process. This method is supposed to force stability to the detriment of temperature overshoot.

P.S. : I know that negative derivative action is weird. Iteration sometime yield weirds result but it's really the best response, both for simulation (in Simulink) and on my RIMS. No overshoot and fast response. It's partially explained by the zero and the integrator in the process response.
 
New version available v1.7.2.

Changes :

  • ISR Flow Sensor speed improvement (less CPU time spent in the flow calculation)
  • Alarm if no voltage on heater (useful for breaker and manual swtich -> see docs)
  • Different frequencies for each alarms : (low pitch --- high pitch)
    (noVoltageAlarm --- timerElapsedAlarm --- incorrectFlowAlarm --- disconnectedThermistorAlarm)
  • Removed set point filter ("useless" with a good PIDF setting)
 
New version available v2.0

Added :

  • Winbond W25Q80BV SPI Flash memory for brew data. (see docs)
  • USB menu to access memory data (by holding KEYSELECT at startup)
 
New version available v2.0.1

Debug :

- MEM NOT FOUND print on USB access mode if the flash is not found

Comments :

- pinMode(pinUsedForInterrupt,INPUT_PULLUP) should be called in the setup() function of the main sketch for the interrupt used by the flow sensor (see doc).
 
can you post a picture of your set up?

Yeah, no problem.

With my very limited budget, I choose to built most of the stuff with recycled material. It's not shinny nor flashy but it works like a charm.

20140713064554.jpg

MLT : Built with a 250 L food grade plastic barrel. Insulated with aluminum/bubble wrap insulator (I measured about 55 % less energy consumed with and without insulator !!!). Wort is drained with a stainless steel braid at the bottom of the MLT. There is a normal 6 gal. primary fermenter next to it for scale

IMG036.jpg

CONTROL PANEL FRONT SIDE : Built with an old cedar wood wine box from Burgundy. You can see the Arduino and a power switch in the middle-left. Some fuses for the Arduino and the pump in the bottom-left. The heater LED at the top in the middle. The hall-effect flow sensor and thermistor signal is in the bottom-right hidden under the black wires. The rest is current input/output for pump and heater with manual switches for each of them.

IMG037.jpg

ARDUINO UNO : Waterproofed with old vinyl pool patch and water-proof cement. Old orange flip-flop was used to access the shield buttons.

IMG_20140805_174350436.jpg

CONTROL PANEL RIGHT SIDE : You can see an air flow output for the SSR fan (top 6 holes) and the round speaker (bottom)

IMG_20140805_174419707.jpg

CONTROL PANEL LEFT SIDE : You can see an air flow input for the SSR fan (cheap 12V CPU fan). There is the Arduino UNO USB blue wire too.

IMG039.jpg

PUMP AND HEATER : Chugger pump and 6000W 240V LWD connected in 120V for UUUULWD. Heat chamber is all in stainless steel except for T-fitting in lead-free brass (lot cheaper). You can see the termistor in the bottom-right too. It's an old micro-wave oven temperature probe that I had to empirically identify with a normal cooking thermometer and data interpolation to find the steinhart-hart values. Silicon tubbing is used for the rest.

IMG_20140805_174440616.jpg

HALL-EFFECT FLOW SENSOR : with a cheap XLR connector (3 connection usefull for +5V, GND, and flow sensor signal)

For a total cost (including shipping, on amazon and ebay) of ~900 $.
 
I keep getting this error?
Arduino: 1.0.6 (Windows 7), Board: "Arduino Uno"
In file included from identRimsBasic.ino:1:
C:\Users\*****\Documents\Arduino\libraries\utility/PID_v1mod.h:76: error: 'boolean' does not name a type
 
I keep getting this error?
Arduino: 1.0.6 (Windows 7), Board: "Arduino Uno"
In file included from identRimsBasic.ino:1:
C:\Users\*****\Documents\Arduino\libraries\utility/PID_v1mod.h:76: error: 'boolean' does not name a type

There is a strange bug at the linking of the c++ project. I did some modification in the examples. New version available here
 
I know this is a dumb question but I am very new to the Arduino programing game I have all the parts listed he running your examples my question is what pins do I connect my SSR and temp probe to? Thanks for any help in advance.
 
I know this is a dumb question but I am very new to the Arduino programing game I have all the parts listed he running your examples my question is what pins do I connect my SSR and temp probe to? Thanks for any help in advance.

The pin number of SSR and thermistor is specified by you in the constructor of the Rims object. i.e. :

Code:
Rims myRims(uiRims,[B]analogPinTherm[/B],[B]ssrPin[/B],currentTemp,ssrControl,settedTemp );

For my sketch, I chose (I have a UNO) analog input 1 (A1) for thermistor and and digital output 2 for SSR. So it looks like this :

Code:
Rims myRims(&myUI,1,2,&currentTemp,&ssrControl,&settedTemp);

More info in doc

P.S. thermistor is not directly connected to analog pin. More info here
 
is it possible for someone here to post their working RIMS sketch. That would be a great help. Thank you in advance.
 
my sketch :

Code:
#include "SPI.h"


#include "LiquidCrystal.h"
#include "Rims.h"


double currentTemp, ssrControl, settedTemp;
LiquidCrystal lcd(8,9,4,5,6,7);
UIRims myUI(&lcd,0,10,A2);
Rims myRims(&myUI,1,2,&currentTemp,&ssrControl,&settedTemp);

void setup() {
  Serial.begin(115200);
  float steinhartCoefs3[4] = {
  0.000589069548362047    , 0.000290548864959669 ,
  -0.00000689275259178226 , 0.000000327407829856038
  };
  myRims.setThermistor(steinhartCoefs3,10000.0);  

  //// ======= Batch 10L ========
  // IDENTIFICATION 27 juillet 2013
  //myRims.setTuningPID(3210.92876199084,7.81175564705165,
  //                   -61903.235901029,19.802399,
  //                   10);
  // ======= Batch 15L =======
  // IDENTIFICATION 27 juillet 2013
  myRims.setTuningPID(1776.59319370528,5.59579138695867,
                      -126240.344468662,71.669624,
                      15);
  // ======= Batch 20L ========
  // IDENTIFICATION 27 juillet 2013
  myRims.setTuningPID(1977.01174903309,5.41411153663579,
                      -161641.862192303,82.372805,
                      20);
  // ======= Batch 25L ========
  // IDENTIFICATION 27 juillet 2013
  myRims.setTuningPID(1965.19601947099,8.15669081962428,
                      -178142.782628963,91.337376,
                      25);
  // ======= Batch 50L ========
  // IDENTIFICATION 13 juillet 2014
  //// Th = 120 secondes
  myRims.setTuningPID(1298.87128704241, 26.9755895844458,
                      -86808.4120791142,66.833729365733802,
                      50);
  myRims.setPinLED(A3);
  myRims.setHeaterPowerDetect(A4);
  myRims.setInterruptFlow(1,6.0,8.0,100.0,true); pinMode(3,INPUT_PULLUP); 
  myRims.setMemCSPin(A5);
  myRims.checkMemAccessMode();
}
void loop() {
  myRims.run();
}
 
I found this library today, it's great!!! I was planning to do something like that on my own (even if a beginner in using arduino) and that's solving a the major part of my problems...
Since that I already have two Dallas ds18b20 waterproof probes, would it be difficult to edit the code in order to use my probes? (I had no time to read the library)
Can I ask somebody to post a scheme or picture of the pcb please?
 
It is not hard at all to edit the code to work with the ds18b20 sensors. I have a setup that is based off of franckgaga's work and I used the ds18b20 sensor.

https://github.com/serekson/arduino-rims_driver

There is a lot of added complication in mine because it has no local control and all of the commands come from a computer so I would only recommend using mine as reference to modify franckgaga's code.

Also note that my code is currently only using 9 bit resolution, 12 bit is better but the conversion takes longer. Based on my experience so far I would probably use 12 bit.
 
I tried to compare the two .h files but I wasn't able to understand what to do. It's my first time editing libraries... Can anybody help me?
 
Back
Top