Author Topic: Water cooling thermometer  (Read 17282 times)

0 Members and 1 Guest are viewing this topic.

Offline bluc

  • Posts: 208
Water cooling thermometer
« on: December 11, 2016, 06:46:37 AM »
I want to build a arduino thermometer with three sensors for my cooling water loop. Condeser in/condenser out and water after cooling system.(is a closed loop water system with an aircon and a radiator to cool output water.)

I found this sketch here https://arduino-info.wikispaces.com/MultipleTemperatureSensorsToLCD.
Wondering is it major job to change it so it works on pin assignment not dallas address? So the sensors are always plugged into the same three pins and are always dallas sensors. Be much simplier if I could just plug any sensor in and have it work rather than get the address then change the sketch each time I need to replace a sensor, especially since there is likely to be a large gap in between and not having the best memory... Can someone point me in the right direction cheers.

Offline YHB

  • VS Moderator
  • Posts: 905
Re: Water cooling thermometer
« Reply #1 on: December 11, 2016, 03:02:21 PM »
Have a look here http://visionstills.org/index.php?topic=398.msg4489#msg4489

This only has two sensors with a dedicated pin for each, follow the logic and you can add more pins sensors as required.

Let me know how it goes, it will help me develop the Idiot's Guide I am slowly developing.
Where Thrift Becomes An Art-Form

Offline YHB

  • VS Moderator
  • Posts: 905
Re: Water cooling thermometer
« Reply #2 on: December 11, 2016, 03:27:39 PM »
Forgot to mention.

The pin numbers are defined in MyBoard.h which is included in the Zip File.

Good Luck
Where Thrift Becomes An Art-Form

Offline Edwin Croissant

  • Global Moderator
  • Posts: 428
Re: Water cooling thermometer
« Reply #3 on: December 11, 2016, 03:38:33 PM »
Wondering is it major job to change it so it works on pin assignment not dallas address? So the sensors are always plugged into the same three pins and are always dallas sensors. Be much simplier if I could just plug any sensor in and have it work rather than get the address then change the sketch each time I need to replace a sensor, especially since there is likely to be a large gap in between and not having the best memory... Can someone point me in the right direction cheers.

I made a library for the DS18B20 that does exactly that.
Shouldn't be to difficult to  adapt the sketch. If you need help just give a yell  :)

Offline bluc

  • Posts: 208
Re: Water cooling thermometer
« Reply #4 on: December 11, 2016, 05:51:52 PM »
Thanks fellas will look at yhb solution tomorrow then if need will ask for help edwin 8)

Offline bluc

  • Posts: 208
Re: Water cooling thermometer
« Reply #5 on: December 12, 2016, 08:32:27 AM »
Ok had another look at yhbs solution but wanted to do more myself so. I found an arduino thermometer project that just worked straight of the bat I opened it and the one from yhb and I think I have the bulk worked out but am stuck atm. Wonder if some could give me some tips? here is my code

Code: [Select]
#include <OneWire.h>
#include <DallasTemperature.h>//
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
#define ONE_WIRE_BUS_CondenserIn 2
#define ONE_WIRE_BUS_CondenserOut 3
//#define ONE_WIRE_BUS 2
// Setup two oneWire instances to communicate with the Dallas sensors
OneWire oneWireCondenserIn(ONE_WIRE_BUS_CondenserIn), oneWireCondenserOut(ONE_WIRE_BUS_CondenserOut);


//DallasTemperature sensors(&oneWire);
DallasTemperature SensorCondenserIn(&oneWireCondenserIn), SensorCondenserOut(&oneWireCondenserOut);
//initilize screen and sensors
void setup()
{
  lcd.init();
  lcd.backlight();
  sensorCondenserIn.begin();
  sensorCondenserOut.begin();
}
//Get temp from Sensors
void loop()
{
  sensorCondenserIn.requestTemperatures();
  lcd.setCursor(0, 0);
  lcd.print(sensors.getTempCByIndex(0));
  lcd.print(" *C Cond In");
  delay(3000);
}
void loop()
{

  sensorCondenserOut.requestTemperatures();
  lcd.setCursor(1, 0);
  lcd.print(sensors.getTempCByIndex(0));
  lcd.print(" *C Cond Out");
  delay(3000);
}

In the "Get code from sensors" section I get error 'sensorCondenserIn' was not declared in this scope Not sure what I did wrong Help appreciated cheers.

Offline YHB

  • VS Moderator
  • Posts: 905
Re: Water cooling thermometer
« Reply #6 on: December 12, 2016, 11:31:17 AM »
This is a first !!!! YHB trying to help somebody with code  :D
But I think this will help, add the two lines in red and keep your fingers crossed.

#include <OneWire.h>
#include <DallasTemperature.h>//
#include <Wire.h>
#include <LiquidCrystal_I2C.h>

float sensorCondenserIn ;
float sensorCondenserOut ;


LiquidCrystal_I2C lcd(0x27, 16, 2);
#define ONE_WIRE_BUS_CondenserIn 2
#define ONE_WIRE_BUS_CondenserOut 3
//#define ONE_WIRE_BUS 2
Where Thrift Becomes An Art-Form

Offline bluc

  • Posts: 208
Re: Water cooling thermometer
« Reply #7 on: December 12, 2016, 11:46:08 AM »
Added that now I get


"exit status 1
request for member 'begin' in 'sensorCondenserIn', which is of non-class type 'float'
Guessing that you don't start a sensor with "begin" in the"float" class or am I barking up the wrong tree because that is the way it is coded in the idiots guide..
"
« Last Edit: December 12, 2016, 11:53:08 AM by bluc »

Offline bluc

  • Posts: 208
Re: Water cooling thermometer
« Reply #8 on: December 12, 2016, 12:06:22 PM »
Was reading about the error code was saying something about passing serial data. Wondering would it be because my lcd has a backpack on it? Unlike in the idiot guide that has seperate pins assigned?

Offline YHB

  • VS Moderator
  • Posts: 905
Re: Water cooling thermometer
« Reply #9 on: December 12, 2016, 12:15:58 PM »
lcd.init();
  lcd.backlight();
  sensorCondenserIn.begin();
  sensorCondenserOut.begin();

I think this should be

SensorCondenserIn.begin();
  SensorCondenserOut.begin();

to match your

DallasTemperature SensorCondenserIn(&oneWireCondenserIn), SensorCondenserOut(&oneWireCondenserOut);

It is very case sensitive

Where Thrift Becomes An Art-Form

Offline bluc

  • Posts: 208
Re: Water cooling thermometer
« Reply #10 on: December 12, 2016, 12:17:50 PM »
that may be it will check after dinner in the middle of cooking will post back asap!!

Offline bluc

  • Posts: 208
Re: Water cooling thermometer
« Reply #11 on: December 12, 2016, 12:39:14 PM »
ok now on this line
Code: [Select]
DallasTemperature SensorCondenserIn(&oneWireCondenserIn), SensorCondenserOut(&oneWireCondenserOut);
I get error
"exit status 1
conflicting declaration 'DallasTemperature SensorCondenserIn'"



Offline YHB

  • VS Moderator
  • Posts: 905
Re: Water cooling thermometer
« Reply #12 on: December 12, 2016, 03:40:47 PM »
Bluc,

You have 2 loops, try the code attached below.

Only set up for serial monitor, but it should work. ( fingers crossed)

I cannot try it I do not have a backpack
Where Thrift Becomes An Art-Form

Offline bluc

  • Posts: 208
Re: Water cooling thermometer
« Reply #13 on: December 12, 2016, 04:05:56 PM »
I get
'TempIn' was not declared in this scope here is the whole error output.

"
C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware "C:\Program Files (x86)\Arduino\hardware" -hardware "C:\Users\blucm\AppData\Local\Arduino15\packages" -tools "C:\Program Files (x86)\Arduino\tools-builder" -tools "C:\Program Files (x86)\Arduino\hardware\tools\avr" -tools "C:\Users\blucm\AppData\Local\Arduino15\packages" -built-in-libraries "C:\Program Files (x86)\Arduino\libraries" -libraries "C:\Users\blucm\Documents\Arduino\libraries" -fqbn=arduino:avr:nano:cpu=atmega328 -ide-version=10610 -build-path "C:\Users\blucm\AppData\Local\Temp\build0632c618d94527f37093ca9b289ba810.tmp" -warnings=default -prefs=build.warn_data_percentage=75 -verbose "D:\Documents\downloads\trial\trial.ino"
C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware "C:\Program Files (x86)\Arduino\hardware" -hardware "C:\Users\blucm\AppData\Local\Arduino15\packages" -tools "C:\Program Files (x86)\Arduino\tools-builder" -tools "C:\Program Files (x86)\Arduino\hardware\tools\avr" -tools "C:\Users\blucm\AppData\Local\Arduino15\packages" -built-in-libraries "C:\Program Files (x86)\Arduino\libraries" -libraries "C:\Users\blucm\Documents\Arduino\libraries" -fqbn=arduino:avr:nano:cpu=atmega328 -ide-version=10610 -build-path "C:\Users\blucm\AppData\Local\Temp\build0632c618d94527f37093ca9b289ba810.tmp" -warnings=default -prefs=build.warn_data_percentage=75 -verbose "D:\Documents\downloads\trial\trial.ino"
Using board 'nano' from platform in folder: C:\Users\blucm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.12
Using core 'arduino' from platform in folder: C:\Users\blucm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.12
Detecting libraries used...
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10610 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR   "-IC:\Users\blucm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.12\cores\arduino" "-IC:\Users\blucm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.12\variants\eightanaloginputs" "C:\Users\blucm\AppData\Local\Temp\build0632c618d94527f37093ca9b289ba810.tmp\sketch\trial.ino.cpp" -o "nul"
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10610 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR   "-IC:\Users\blucm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.12\cores\arduino" "-IC:\Users\blucm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.12\variants\eightanaloginputs" "-IC:\Users\blucm\Documents\Arduino\libraries\OneWire" "C:\Users\blucm\AppData\Local\Temp\build0632c618d94527f37093ca9b289ba810.tmp\sketch\trial.ino.cpp" -o "nul"
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10610 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR   "-IC:\Users\blucm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.12\cores\arduino" "-IC:\Users\blucm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.12\variants\eightanaloginputs" "-IC:\Users\blucm\Documents\Arduino\libraries\OneWire" "-IC:\Users\blucm\Documents\Arduino\libraries\DallasTemperature" "C:\Users\blucm\AppData\Local\Temp\build0632c618d94527f37093ca9b289ba810.tmp\sketch\trial.ino.cpp" -o "nul"
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10610 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR   "-IC:\Users\blucm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.12\cores\arduino" "-IC:\Users\blucm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.12\variants\eightanaloginputs" "-IC:\Users\blucm\Documents\Arduino\libraries\OneWire" "-IC:\Users\blucm\Documents\Arduino\libraries\DallasTemperature" "-IC:\Users\blucm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.12\libraries\Wire\src" "C:\Users\blucm\AppData\Local\Temp\build0632c618d94527f37093ca9b289ba810.tmp\sketch\trial.ino.cpp" -o "nul"
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10610 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR   "-IC:\Users\blucm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.12\cores\arduino" "-IC:\Users\blucm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.12\variants\eightanaloginputs" "-IC:\Users\blucm\Documents\Arduino\libraries\OneWire" "-IC:\Users\blucm\Documents\Arduino\libraries\DallasTemperature" "-IC:\Users\blucm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.12\libraries\Wire\src" "-IC:\Users\blucm\Documents\Arduino\libraries\LiquidCrystal_I2C\src" "C:\Users\blucm\AppData\Local\Temp\build0632c618d94527f37093ca9b289ba810.tmp\sketch\trial.ino.cpp" -o "nul"
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10610 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR   "-IC:\Users\blucm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.12\cores\arduino" "-IC:\Users\blucm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.12\variants\eightanaloginputs" "-IC:\Users\blucm\Documents\Arduino\libraries\OneWire" "-IC:\Users\blucm\Documents\Arduino\libraries\DallasTemperature" "-IC:\Users\blucm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.12\libraries\Wire\src" "-IC:\Users\blucm\Documents\Arduino\libraries\LiquidCrystal_I2C\src" "C:\Users\blucm\Documents\Arduino\libraries\OneWire\OneWire.cpp" -o "nul"
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10610 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR   "-IC:\Users\blucm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.12\cores\arduino" "-IC:\Users\blucm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.12\variants\eightanaloginputs" "-IC:\Users\blucm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.12\libraries\Wire\src" "-IC:\Users\blucm\Documents\Arduino\libraries\LiquidCrystal_I2C\src" "-IC:\Users\blucm\Documents\Arduino\libraries\OneWire" "-IC:\Users\blucm\Documents\Arduino\libraries\DallasTemperature" "C:\Users\blucm\Documents\Arduino\libraries\DallasTemperature\DallasTemperature.cpp" -o "nul"
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10610 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR   "-IC:\Users\blucm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.12\cores\arduino" "-IC:\Users\blucm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.12\variants\eightanaloginputs" "-IC:\Users\blucm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.12\libraries\Wire\src" "-IC:\Users\blucm\Documents\Arduino\libraries\LiquidCrystal_I2C\src" "-IC:\Users\blucm\Documents\Arduino\libraries\OneWire" "-IC:\Users\blucm\Documents\Arduino\libraries\DallasTemperature" "C:\Users\blucm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.12\libraries\Wire\src\Wire.cpp" -o "nul"
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10610 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR   "-IC:\Users\blucm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.12\cores\arduino" "-IC:\Users\blucm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.12\variants\eightanaloginputs" "-IC:\Users\blucm\Documents\Arduino\libraries\OneWire" "-IC:\Users\blucm\Documents\Arduino\libraries\DallasTemperature" "-IC:\Users\blucm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.12\libraries\Wire\src" "-IC:\Users\blucm\Documents\Arduino\libraries\LiquidCrystal_I2C\src" "C:\Users\blucm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.12\libraries\Wire\src\utility\twi.c" -o "nul"
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10610 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR   "-IC:\Users\blucm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.12\cores\arduino" "-IC:\Users\blucm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.12\variants\eightanaloginputs" "-IC:\Users\blucm\Documents\Arduino\libraries\DallasTemperature" "-IC:\Users\blucm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.12\libraries\Wire\src" "-IC:\Users\blucm\Documents\Arduino\libraries\LiquidCrystal_I2C\src" "-IC:\Users\blucm\Documents\Arduino\libraries\OneWire" "C:\Users\blucm\Documents\Arduino\libraries\LiquidCrystal_I2C\src\LiquidCrystal_I2C.cpp" -o "nul"
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10610 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR   "-IC:\Users\blucm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.12\cores\arduino" "-IC:\Users\blucm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.12\variants\eightanaloginputs" "-IC:\Users\blucm\Documents\Arduino\libraries\DallasTemperature" "-IC:\Users\blucm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.12\libraries\Wire\src" "-IC:\Users\blucm\Documents\Arduino\libraries\LiquidCrystal_I2C\src" "-IC:\Users\blucm\Documents\Arduino\libraries\OneWire" "C:\Users\blucm\AppData\Local\Temp\build0632c618d94527f37093ca9b289ba810.tmp\sketch\trial.ino.cpp" -o "nul"
Generating function prototypes...
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10610 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR   "-IC:\Users\blucm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.12\cores\arduino" "-IC:\Users\blucm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.12\variants\eightanaloginputs" "-IC:\Users\blucm\Documents\Arduino\libraries\OneWire" "-IC:\Users\blucm\Documents\Arduino\libraries\DallasTemperature" "-IC:\Users\blucm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.12\libraries\Wire\src" "-IC:\Users\blucm\Documents\Arduino\libraries\LiquidCrystal_I2C\src" "C:\Users\blucm\AppData\Local\Temp\build0632c618d94527f37093ca9b289ba810.tmp\sketch\trial.ino.cpp" -o "C:\Users\blucm\AppData\Local\Temp\build0632c618d94527f37093ca9b289ba810.tmp\preproc\ctags_target_for_gcc_minus_e.cpp"
"C:\Program Files (x86)\Arduino\tools-builder\ctags\5.8-arduino10/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\Users\blucm\AppData\Local\Temp\build0632c618d94527f37093ca9b289ba810.tmp\preproc\ctags_target_for_gcc_minus_e.cpp"
Compiling sketch...
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os  -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10610 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR   "-IC:\Users\blucm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.12\cores\arduino" "-IC:\Users\blucm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.12\variants\eightanaloginputs" "-IC:\Users\blucm\Documents\Arduino\libraries\OneWire" "-IC:\Users\blucm\Documents\Arduino\libraries\DallasTemperature" "-IC:\Users\blucm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.12\libraries\Wire\src" "-IC:\Users\blucm\Documents\Arduino\libraries\LiquidCrystal_I2C\src" "C:\Users\blucm\AppData\Local\Temp\build0632c618d94527f37093ca9b289ba810.tmp\sketch\trial.ino.cpp" -o "C:\Users\blucm\AppData\Local\Temp\build0632c618d94527f37093ca9b289ba810.tmp\sketch\trial.ino.cpp.o"
D:\Documents\downloads\trial\trial.ino: In function 'void loop()':

trial:29: error: 'TempIn' was not declared in this scope

   TempIn = (SensorCondenserIn.getTempCByIndex(0));

   ^

trial:30: error: 'TempOut' was not declared in this scope

   TempOut = (SensorCondenserOut.getTempCByIndex(0));

   ^

Using library OneWire in folder: C:\Users\blucm\Documents\Arduino\libraries\OneWire (legacy)
Using library DallasTemperature in folder: C:\Users\blucm\Documents\Arduino\libraries\DallasTemperature (legacy)
Using library Wire at version 1.0 in folder: C:\Users\blucm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.12\libraries\Wire
Using library LiquidCrystal_I2C at version 2.6.0 in folder: C:\Users\blucm\Documents\Arduino\libraries\LiquidCrystal_I2C
exit status 1
'TempIn' was not declared in this scope
"

Offline YHB

  • VS Moderator
  • Posts: 905
Re: Water cooling thermometer
« Reply #14 on: December 12, 2016, 06:37:34 PM »
This is not impressive, sorry but in mitigation I was trying to write to you at the same time as fending off requests from my wife to pick her up at the supermarket and my mother who needed a meal.

Women just do not understand priorities. ::) ::)

I have gone round in circles, now I forgot to add the same lines as you, so somewhere near line 7 or 8 add ;

float TempIn ;
float TempOut ;

My version compiles and loads OK, I hope yours does to now.

My cooling monitoring I only show the difference ie TempOut - TempIn but I have an alarm on TempOut.
Where Thrift Becomes An Art-Form

Offline bluc

  • Posts: 208
Re: Water cooling thermometer
« Reply #15 on: December 13, 2016, 07:55:30 AM »
Thanks for all the help yhb your a legend!!

Here is my sketch

Code: [Select]
#include <OneWire.h>
#include <DallasTemperature.h>//
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
float TempIn ;
float TempOut ;
#define ONE_WIRE_BUS_CondenserIn 2
#define ONE_WIRE_BUS_CondenserOut 3
// Setup two oneWire instances to communicate with the Dallas sensors
OneWire oneWireCondenserIn(ONE_WIRE_BUS_CondenserIn), oneWireCondenserOut(ONE_WIRE_BUS_CondenserOut);


//DallasTemperature sensors(&oneWire);
DallasTemperature SensorCondenserIn(&oneWireCondenserIn), SensorCondenserOut(&oneWireCondenserOut);
//initilize screen and sensors
void setup()
{
  lcd.init();
  lcd.backlight();
  SensorCondenserIn.begin();
  SensorCondenserOut.begin();
  TempIn = (SensorCondenserIn.getTempCByIndex(0));
  TempOut = (SensorCondenserOut.getTempCByIndex(0));
}


void loop()
{
  SensorCondenserOut.requestTemperatures();
  SensorCondenserIn.requestTemperatures();
  lcd.print(SensorCondenserIn.getTempCByIndex(0));
  lcd.setCursor(0, 0);
  lcd.print("Conden In  c ");
  delay(50);
  lcd.print(SensorCondenserOut.getTempCByIndex(0));
  lcd.setCursor(0, 1);
  lcd.print("Conden Out c ");
  delay(50);
  }


http://i975.photobucket.com/albums/ae237/blucmal/Home%20brew/Hooks.jpeg
Water cooling thermometer


Here is the sketch and libraries. Will try and help anyone who want to make one but most likely I will be as much a hindrance as a help  ;D

* blucs thermometer.zip (1535.84 kB - downloaded 0 times.)
« Last Edit: December 13, 2016, 08:02:44 AM by bluc »

Offline bluc

  • Posts: 208
Re: Water cooling thermometer
« Reply #16 on: December 13, 2016, 07:58:01 AM »
On a cooling water loop any point to barometer temp adjustment Maybe I could add that and I want an alarm on the condenser out a error message on sensor failure and also add my third temp. The fun continues :)

Offline YHB

  • VS Moderator
  • Posts: 905
Re: Water cooling thermometer
« Reply #17 on: December 13, 2016, 11:38:39 AM »
On a cooling water loop any point to barometer temp adjustment ?

No point really.

As I said earlier I just display the Temperature Difference, I find it easier than to continually make mental adjustments to allow for rising input temperatures. It's my preference its up to you what you prefer.

a error message on sensor failure

Sensor failure will return a value of -127, its enough but I like a text message. So if tempout = 127 then "Sensor missing" etc etc.

I want an alarm on the condenser out

With my set up - I have an alarm on the condenser out, which is great if there is not enough cooling and the temperature rises slowly. But with mine if the cooling supply stops for any reason then the alarm does not work because there is no flow through the condenser therefore "condenser out" does not increase to trigger the alarm.

To cover the eventuality that I step on the supply hose to the condenser or the pump packs in, I have a sensor/alarm to measure the temperature of the vapour as it exits the condenser.
 
People will say this is all overkill not needed, but I enjoy building it and it means a safer system.

The fun continues :)

I agree.

Toodlepip
Where Thrift Becomes An Art-Form

Offline bluc

  • Posts: 208
Re: Water cooling thermometer
« Reply #18 on: December 13, 2016, 03:46:23 PM »
Ok I am back with another problem I cant fix. It is probably minor but thought I would ask.
My code prints an output temp where its not supposed to here is my code
Code: [Select]
#include <OneWire.h>
#include <DallasTemperature.h>//
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,20,4);
float TempIn ;
float TempOut ;
float TempReCooled ;
#define ONE_WIRE_BUS_CondenserIn 2
#define ONE_WIRE_BUS_CondenserOut 3
#define ONE_WIRE_BUS_ReCooled 1
// Setup Three oneWire instances to communicate with the Dallas sensors
OneWire oneWireCondenserIn(ONE_WIRE_BUS_CondenserIn), oneWireCondenserOut(ONE_WIRE_BUS_CondenserOut), oneWireReCooled(ONE_WIRE_BUS_ReCooled);


//DallasTemperature sensors(&oneWire);
DallasTemperature SensorCondenserIn(&oneWireCondenserIn), SensorCondenserOut(&oneWireCondenserOut), SensorReCooled(&oneWireReCooled);
//initilize screen and sensors
void setup()
{
  lcd.init();
  lcd.backlight();
  SensorCondenserIn.begin();
  SensorCondenserOut.begin();
  SensorReCooled.begin();
  TempIn = (SensorCondenserIn.getTempCByIndex(0));
  TempOut = (SensorCondenserOut.getTempCByIndex(0));
  TempReCooled = (SensorCondenserOut.getTempCByIndex(0));
  lcd.setCursor(2,1);                       //intro
  lcd.print(F("Cooling Temp by"));         //intro 
  lcd.setCursor(0,3);                       //intro
  lcd.print(F("Bluc & VISIONSTILLS"));            //intro 
  delay(2000);                              //intro
  lcd.clear();
  lcd.setCursor(3,3);                                                                         //LCD indication
  lcd.print("Cooling  Temps");
}


void loop()
{
 
  SensorCondenserOut.requestTemperatures();
  SensorCondenserIn.requestTemperatures();
  SensorReCooled.requestTemperatures();
 
  lcd.print(SensorCondenserIn.getTempCByIndex(0));
  lcd.setCursor(0, 0);
  lcd.print("Conden In  c ");
  delay(50);
 
  lcd.print(SensorCondenserOut.getTempCByIndex(0));
  lcd.setCursor(0, 1);
  lcd.print("Conden Out c ");
  delay(50);
 
  lcd.print(SensorReCooled.getTempCByIndex(0));
  lcd.setCursor(0, 2);
  lcd.print("Re Cooled  c ");
  delay(50);
 
}

In here is a pic of what it looks like

http://i975.photobucket.com/albums/ae237/blucmal/Home%20brew/Resized_20161214_203439.jpeg
Water cooling thermometer


I have no idea why it tries to print the output of line 57
Code: [Select]
lcd.print(SensorReCooled.getTempCByIndex(0)); down the bottom after cooling temps. As well as in the third line on display after "re cooled c" Any ideas.

Offline bluc

  • Posts: 208
Re: Water cooling thermometer
« Reply #19 on: December 14, 2016, 10:08:28 AM »
Can not pin down this bug here is what the display looks like with line 0 not in use anywhere in my sketch and the dallas sensors dissconnected.
http://i975.photobucket.com/albums/ae237/blucmal/Home%20brew/Try.jpeg
Water cooling thermometer

and here is the code that prints that on my lcd
Code: [Select]
void loop()
{
  SensorCondenserIn.requestTemperatures();
  lcd.print(SensorCondenserIn.getTempCByIndex(0));
  lcd.setCursor(0, 1);
  lcd.print("Conden In  c ");
  delay(50);

  SensorCondenserOut.requestTemperatures();
  lcd.print(SensorCondenserOut.getTempCByIndex(0));
  lcd.setCursor(0, 2  );
  lcd.print("Conden Out c ");
  delay(50);

  SensorReCooled.requestTemperatures();
  lcd.print(SensorReCooled.getTempCByIndex(0));
  lcd.setCursor(0,3);
  lcd.print("Re Cooled  c ");
  delay(50); 

 
 
}

very frustrating lol. I have tried another screen and another arduino the error is somewhere in the code..