Program is out of control
Mike2545
Posts: 433
I am building a "jumping water fountain". There are 12 solenoids around an indoor pond with 1/4"water jets that will each shoot a pulse of water. I have the water and electric installed and I have just finished the control box.
I am working on the program and I'm sure that it can be condensed. I am already using 86% of the memory and want to write more.
It will be motion actuated, so when someone walks by it will start the action.
I have used a lot of Debugin routines to fine tune the timing when I get the control box on site.
The part I think can be condensed is the solenoid firing routines.
Please give me some pointers.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike2545
This message sent to you on 100% recycled electrons.
I am working on the program and I'm sure that it can be condensed. I am already using 86% of the memory and want to write more.
It will be motion actuated, so when someone walks by it will start the action.
I have used a lot of Debugin routines to fine tune the timing when I get the control box on site.
The part I think can be condensed is the solenoid firing routines.
Please give me some pointers.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike2545
This message sent to you on 100% recycled electrons.
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
· -- Carl, nn5i@arrl.net
Your test, Jump2-5 routines can each be condensed by putting everything into a loop, and having a lookup table to determine which pins to turn on/off. It will reduce 48 lines of your test routine to 7 lines, for example.
SRLM: I was thinking about the Lookup/lookdown commands but have not used them in a program before. Guess I'll hvae to play around with that.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike2545
This message sent to you on 100% recycled electrons.
I have reduced the long string of information to 7 lines using LOOKUP
Total program space 54%.
That leaves plenty of room to add more solenoid firing routines.
If you can find a way to shave off more memory please let me know.
I have some more pictures to share and I'll post video on You tube when its done.
Thanks
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike2545
This message sent to you on 100% recycled electrons.
I think that for the sake of versatility I'll keep the format like it is. (With the ability to run 1 or 2 solenoids & different numbers of them)
I can write enough different firing routines with the available memory to keep it changed up.
& I learned about LOOKUP
Thanks
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike2545
This message sent to you on 100% recycled electrons.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·"If you build it, they will come."
Sprinkler valves open and close too slowly. I have tested out the valves (before trenching) and water hammer is not an issue.
These valves have 1/4 inch NPT threads and 24 volt coils.
Rated 1900 KPa which is about 275lbs/sq in
Brand new valves for $3 each! I can't hardly believe that!!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike2545
This message sent to you on 100% recycled electrons.
The solenoids are running at .46Amps, the transformer is 2A. I can have up to 4 on at one time without overloading the transformer.
I would need a 6 amp transformer to turn them all on at once. So I'm limited in that respect but I think it will be OK (visually).
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike2545
This message sent to you on 100% recycled electrons.
I hope to have it up and running this week, although I only have a short window of time, I may have to put it off till next week.
www.youtube.com/watch?v=a-llFTYLhig
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike2545
This message sent to you on 100% recycled electrons.
[noparse][[/noparse]see attached]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Smile ... It increases your face value!