View Single Post
Old 11-20-14, 01:44 AM   #292
takyka
Helper EcoRenovator
 
Join Date: Jul 2014
Location: Hungary
Posts: 34
Thanks: 0
Thanked 16 Times in 10 Posts
Default floats and 1w temp sensors

In my hetpump controller sw I use long and float operations alot. In such application the speed of the uC is plenty to waste for emulated floating point operations. Even there are several frequent interruts from flow sensors, timer, there is tcp/ip communication and the user interface is still responsive.

In my code, I implemented setup menu for dallas temp sensor assignment.

I store the assigned 1w addresses in eeprom, in the background, the program periodically read the temperature information from sensors one by one and stores the result in a global array.

From "main" program I just use the temperatures from the array.

The setup menu looks like this:
l 1w
List of 1W devices:
Bus:0 1W bus number
00;28B0BFA704000088 20.44C 0; (0) Air in device number, serial, measuret temperature (if device support it) assigned function number, assigned function description
01;28328EA704000045 20.81C 2; (0) Air evap. gas
02;286AC6A70400001D 20.13C 7; (0) Condenser gas
03;282EC6A7040000B4 20.44C unassigned device
04;28AED4A7040000A1 20.75C
05;28055CA80400006A 20.81C 1; (0) Air out
06;284382A7040000CB 20.06C 13; (0) Suction temp
07;2857FEA704000000 19.25C 8; (0) Condenser liquid
08;285F8DA704000082 20.06C
09;28FFBDA70400005A 19.31C 9; (0) Heating water in
Bus:1 no device on bus
Bus:2
00;281239BB030000BD 24.63C 11; (2) Electric box
Functions:
00; * Air in * means device assigned to function
01; * Air out
02; * Air evap. gas
03; Water evap. liquid
04; Water evap. gas
05; Well water in
06; Well water out
07; * Condenser gas
08; * Condenser liquid
09; * Heating water in
10; Heating Water out
11; * Electric box
12; Compressor
13; * Suction temp
14; Discharge temp
a 0 3 10 assign command, bus number, device number, function number see above
a 0 4 06 like above
l1w list new 1w config

If you want to import it, i'm willing to help you to dig out from my code the related parts.

In my topic you can find details
http://ecorenovator.org/forum/geothe...iscussion.html

This post is here about it:
http://ecorenovator.org/forum/39116-post8.html


T.

Last edited by takyka; 11-20-14 at 02:11 AM..
takyka is offline   Reply With Quote
The Following 2 Users Say Thank You to takyka For This Useful Post:
buffalobillpatrick (11-21-14), jeff5may (11-20-14)