auto control swimming pool

syntony

Member
That sounds like a good idea.
Though, if that volume of water has changed by 2oC in one hour, I think I'd just turn the pump on for an hour and continually check the temp.

Anyway, you've got some ideas to try out. It's up to you now. Feel free to post your completed code for a 'once over'.
in my place, no chance to change like that quickly
in general, in summer, the water temp increase 1 or 2 degres every days
to arrive between 28 to 30

so now I chek witch code for temp sensor
and step by step, built my project

I will post again request , idea, projection of this project

thank you so much

regards
 

hippy

Ex-Staff (retired)
The PICAXE cannot deal with negative numbers. You can however map a negative number to some other unused number, so -1 may be represented by 101, -2 by 102 etc. There are other ways to do this but this is probably simplest.

So ...

Let temp1 = 20 ' 20C
Let temp1 = 1 ' 1C
Let temp1 = 101 ' -1C
 

BeanieBots

Moderator
What sensor are you using?
Simply use whatever 'number' it gives you for -3oC.

Also, with select case, you can use a range.
eg case 20 to 40
 

syntony

Member
OK, I will test with this value
thanks

I make a new test
Main:
Do
for Counter=0 to 24
bit0=bit10 'swap bits around
bit1=bit9 '(just 3 bits for 8 bit pattern.)
bit2=bit8
bit3=bit7
bit4=bit6
bit5=bit4
if Demand > ModCounter then
High Pump 'Turn on pump
else
Low Pump 'Turn off pump
endif
pause 2000 'pause for whatever time you want between on/off cycles.



if pause = 1 hour, I obtain a 24 hours pattern
and I approach of my first request

just a problem when Temp=0,
the pump ON, 7hours, stop 1 hour, run 7hours, stop 1
hour, run 7 hours...
it's better if pump ON, pump OFF, pump ON, pump OFF etc.. etc...

so for the 0 degre, I use the same process like 22,23,24 degres
and it's good
 

BeanieBots

Moderator
If you have gone up to the 5th bit, your counter must clock the full 32.
You cannot use 24 or the pattern will be incomplete and give strange results.

As explained several times earlier, you can ONLY use full powers of 2 with that method. 1,2,4,8,16,32,64,128

Also, your mapping is wrong for that number of bits.
 

syntony

Member
If you have gone up to the 5th bit, your counter must clock the full 32.
You cannot use 24 or the pattern will be incomplete and give strange results.

As explained several times earlier, you can ONLY use full powers of 2 with that method. 1,2,4,8,16,32,64,128

Also, your mapping is wrong for that number of bits.
yes, yes, I agree

I just want test some process on my simulator
just to see, what appened
I learn and test at the same time


I come back to the good settings of counter
 

syntony

Member
Now I come back and I can test on AXE091 with picaxe18

I think this program not perfect, sure need to be optimized
but begin to aswer to my request

I don't know if it is good for negative temp

Anybody can help me ?

thanks

Syntony
 

Attachments

Last edited:
Top