Shop OBEX P1 Docs P2 Docs Learn Events
Automatic Pet Fountain X — Parallax Forums

Automatic Pet Fountain X

ihmechihmech Posts: 179
edited 2010-11-23 19:36 in Robotics
Hello everyone, I just finished a major software update to my Automatic Pet Fountain that is listed in the "Projects" section. http://forums.parallax.com/showthread.php?t=124221

I changed the name to APFx since it's not really the second version I have planned to build, but I have started to lay down the foundations for APF2 that will use the Propeller....when I learn how to use it. ;-)

The code I had originally wrote did the job, but I saw a need for improvement. I didn't want to change any hardware and the BS2 that I was using was maxed out. I installed a BS2e that I had bought used and had not learned how to use it yet. So, I did a lot of work and figured how to program a multi slot stamp. (I tip my hat to anyone that writes large complex programs on these and keeps it staight!!)

I reused some of the routines from the old program, but rewrote almost all of the code. It now consists of three slots being used. 0: Main Program, 1: User Interface Program, 2: Diagnotic program.

The main program monitors the select button, main power status, and the float. It will first scan the select button and then check the power status 50 times and then scan the float position. This setup makes getting into the user interface menus instant when pressing the select button, instead of having to hold the button until it scanned the float and button.

The user interface program is mostly the same menu structure as before, but has been completely redone. Navigation is now smooth and instant without having to release the buttons quickly to stay on the desired selection. When a button is pressed, it has to be released in order to proceed with another selection. No more pause breaks to allow time for button release. I tried to keep slot 1 with only the menus in it. There are some minor tasks perfomed in slot 1, but the diagnostic tasks and a new refill task is in slot 2.

The diagnostic program contains the float test, that will power up the interface board allowing the user to manually move the float and observe the four LEDs. The LEDs indicate what the switches are doing. The board will stay powered until the user presses enter. The servo test opens the water valve and keeps it open until enter is pressed.(don't leave when doing this test!)
There is a refill routine that will refill the bowl after cleaning. It is accessed from the maintinence menu. It refills the bowl without a safety counter to close the valve in case of a float failure. That means it will refill an emty bowl and does not have to be prefilled as I used to after cleaning.

I hope I explained this well, but if anyone has a question. By all means, ask.

Thank you to everyone that helped me in my learning and building! I really had a lot of fun making something vastly better without changing major hardware!! It's fun improving something with only code!!

I also discovered that now with using a BS2e, it enables me to install a hardware addon without ripping up and rewriting perfectly good code! Now I can do experiments with components that I plan using in APF2!

Thanks!
Sign In or Register to comment.