built a controller for a peltier minifrigobar, hacked the original circuit between the power supply and the original thermostat.
the goal is to adapt the frigobar to a incubator to a steady 34ºC
Used a picaxe 18 high power board with a picaxe 18x as the controller. a bit overkill for now but usefull later on other brainstorms.
Ds18b20 on input C.0
optocoupler output on out B.0
sertxd to monitor the shabang.
the code:::::::: well in this matter im very basic BASIC, but with the command readtemp i can do the job easaly, but with readtemp12 im having some troubles in defining w1 value to trigger output B.0
Went to code snipets forum page and pasted the code to PE, but in the sentence "if w1<xxxxxx then heat_on", im confusing bcd to ascci and binary to decimal and 12bit to temperature , just simply to define value of w1 and some correlation to 34 degrees celsius. any help apreciated. thanks 4 ur time.
==================================================================================
Code:
init:
low b.0
pause 50
main:
readtemp12 0,w1
if w1<21250 then heat_on
low b.0
goto convert
convert:
let b9 =43 'Display + (43) space (32)
IF W1 > 64655 THEN ' info - 55 degrees = 64656
let b9 =45 'Display - (45)
W1 = - W1 ' info if - ie w1=1000 display - 10.00 C
ENDIF
W1 = W1 * 25 / 4 ' info + ie w1=8500 display 85.00 C
BINTOASCII w1,b8,b7,b6,b5,b4
IF b8 = "0" THEN : b8 = " " :ENDIF ' zero blanking b8
IF b8 = " " AND b7 = "0" THEN : b7 = " " :ENDIF ' zero blanking b7
SERTXD (CR, LF, "Temperature ",b9,b8,b7,b6,".",b5,b4," Degrees C", CR, LF) 'resolution to 0.06
goto main
heat_on:
high b.0
pause 1000
goto convert
===============================================================================
thanks 4 ur time.
the goal is to adapt the frigobar to a incubator to a steady 34ºC
Used a picaxe 18 high power board with a picaxe 18x as the controller. a bit overkill for now but usefull later on other brainstorms.
Ds18b20 on input C.0
optocoupler output on out B.0
sertxd to monitor the shabang.
the code:::::::: well in this matter im very basic BASIC, but with the command readtemp i can do the job easaly, but with readtemp12 im having some troubles in defining w1 value to trigger output B.0
Went to code snipets forum page and pasted the code to PE, but in the sentence "if w1<xxxxxx then heat_on", im confusing bcd to ascci and binary to decimal and 12bit to temperature , just simply to define value of w1 and some correlation to 34 degrees celsius. any help apreciated. thanks 4 ur time.
==================================================================================
Code:
init:
low b.0
pause 50
main:
readtemp12 0,w1
if w1<21250 then heat_on
low b.0
goto convert
convert:
let b9 =43 'Display + (43) space (32)
IF W1 > 64655 THEN ' info - 55 degrees = 64656
let b9 =45 'Display - (45)
W1 = - W1 ' info if - ie w1=1000 display - 10.00 C
ENDIF
W1 = W1 * 25 / 4 ' info + ie w1=8500 display 85.00 C
BINTOASCII w1,b8,b7,b6,b5,b4
IF b8 = "0" THEN : b8 = " " :ENDIF ' zero blanking b8
IF b8 = " " AND b7 = "0" THEN : b7 = " " :ENDIF ' zero blanking b7
SERTXD (CR, LF, "Temperature ",b9,b8,b7,b6,".",b5,b4," Degrees C", CR, LF) 'resolution to 0.06
goto main
heat_on:
high b.0
pause 1000
goto convert
===============================================================================
thanks 4 ur time.