⚠️ This forum has been restored as a read-only archive so the knowledge shared by the community over many years remains available. New registrations and posting are disabled.

All times are UTC + 8 hours




Post new topic Reply to topic  [ 167 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6 ... 12  Next
Author Message
PostPosted: Sep 29th, '11, 10:33 
Site Admin
Site Admin
User avatar

Joined: Mar 12th, '06, 07:56
Posts: 17803
Images: 4
Location: Perth
Gender: Male
Blog: View Blog (1)
You might need to PM me requests like that BW, I can miss them easily when buried in amongst a thread.


Top
 Profile Personal album  
Reply with quote  
    Advertisement
 
PostPosted: Sep 29th, '11, 12:31 
Almost divorced
Almost divorced

Joined: May 28th, '10, 07:02
Posts: 1390
Gender: Male
Are you human?: YES
Location: Syd
I think for this kinda system the skimmer + floating feed might be a good backup. This way you can see and the system will auto stop when the uneaten pellets gets to a certain weight.

I have seen someone else with this kinda system (programmed feeder) not a trigger feeder though.


Top
 Profile  
Reply with quote  
PostPosted: Sep 29th, '11, 15:37 
Seriously, this cant be healthy.
Seriously, this cant be healthy.
User avatar

Joined: Mar 26th, '10, 20:46
Posts: 5404
Location: South Australia
Gender: Male
Are you human?: Yep
Location: South Australia
earthbound wrote:
You might need to PM me requests like that BW, I can miss them easily when buried in amongst a thread.


yeah sorry, it was a silly thing to put in the world anyway.


Top
 Profile  
Reply with quote  
PostPosted: Sep 29th, '11, 15:41 
Seriously, this cant be healthy.
Seriously, this cant be healthy.
User avatar

Joined: Mar 26th, '10, 20:46
Posts: 5404
Location: South Australia
Gender: Male
Are you human?: Yep
Location: South Australia
and this...

I'm getting there.

The red light indicates to the fish that feed will appear if the lever is pressed, the green light simulates a little burst of power to the motor delivering some feed.

The fish then cant feed again until a given time set buy the human. In this demo 10 seconds. Once the wait is over, the red light comes back on and the fish can feed again. The wait might be more like 15 minutes or an hour, and the user will also be able to set how much feed is dumped, and the total mount dumped in any given day




Top
 Profile  
Reply with quote  
PostPosted: Sep 29th, '11, 16:40 
Seriously, this cant be healthy.
Seriously, this cant be healthy.
User avatar

Joined: Mar 26th, '10, 20:46
Posts: 5404
Location: South Australia
Gender: Male
Are you human?: Yep
Location: South Australia
All the code gets reformatted when you dump it so sorry if there are alignment issues. The forum doesnt like Tabs

Code:
'Demand Fish Feeder ver 2011-09-29-1600
'
'--------------------------------------------------
By BullwinkleII (so far)
'No rights reserved
'Demand fishfeeder with over feeding protection.
'written on AXEpad via Ubuntu
'----------------------------------------------------

'PICAXE 08M   (or not - I'm guessing this is goign to outgrow the 08M)
'uses 58 of 256 bytes  (so far)

'-------------------About-------------------------
'program feeds fish via a switch in the water that the fish press
'activating a 36 rpm geared motor and screw, fed by a hopper of fish feed.
'fish are restricted to a certain number of feeds per day, and are
'forced to wait a certain time between feeds
'fish are notified of food being availible via a LED near the switch
'---------------------------------------------------
                            
         
symbol FeedAmount=b0         'stores the dose size of food per lever press     
symbol MaxFeeds =b1                'stores the maximum number of feeds per day
symbol TwelveHours =w2         'stores an approximate 24 hour period in "WAIT"s or "SLEEP"s                                                              '                                              between resets of feed alowance
symbol NoFeedWait  = w3         'sets the length of time fish must wait between feeds so they '    '                                              dont eat it all at once
symbol IsFeedOK = b4            'Yes or no - 0 = no dose allowed, 1 = 1 dose allowed
Symbol LeverState = b5           'not pressed = 0, pressed = 1

'====================================================

Main:      

   gosub Init
   
'------------------------ ongoing program loop -------------------------------

   Continue:         
      
                 'check to see if SimulateOneFullDay button is pressed
       'check to see if "change NoFeedWait limit" button has been pressed
       'check to see if " change number of feeds button is pressed
       'check to see if change feed size button has been pressed

       gosub CheckForLeverPress

   
   goto Continue
'------------------------------------------------------------------------------------

end

'--------------------------'here lies everything adjustable -------------------------
                                       
   Init:   'run once at start up
   {
                             
        low 2
        let FeedAmount = 100         'readadc #   would be better set via screw pot to allow       '                                                    in field adjustments
        let MaxFeeds =  12              'readadc #  would be better set via a screw pot
   
        let TwelveHours =  100         'debug only    '43200   <-----should really be this number '  '                                                     of seconds 
        Let NoFeedWait = TwelveHours/MaxFeeds   'not working TODO:
        let IsFeedOK = 1            'set initial state to allow 1 dose of feed

   return
   }


'-----------------------------------------
CheckForLeverPress:
{
   
   if pin3 =1 then  gosub FeedNow       'if the lever is pressed go and feed them
   
   return
}

'-----------------------------------------

FeedNow:
{
   
   if IsFeedOK = 0 then return                'bail out of subroutine if fish are not alowed to feed '                                                              '                                                             for whichever reason
   end if
   
   high 2                    'turn on the green light (this would be the motor in ' ''                                                            the real version)
   pause 500                                        'leave it on fo 1.2 a secondr 
   low  2                     'turn off the green light

   pin3 = 0                     'I think this resets the switch but I'm not sure if its needed
   let leverstate = 0                 'not yet used
   
   low 1                         'turn off the red light telling fish the cant feed
   pause 10000                                 'wait for the length of time we force them to wait
   high 1                      'Turn the red light back on telling them the lever is ''                                                              active
     
return
}

'-------------------------------------------


Top
 Profile  
Reply with quote  
PostPosted: Sep 29th, '11, 17:23 
Seriously, this cant be healthy.
Seriously, this cant be healthy.
User avatar

Joined: Mar 26th, '10, 20:46
Posts: 5404
Location: South Australia
Gender: Male
Are you human?: Yep
Location: South Australia
so now I'm going to create a method for telling how many feeds they have had.

I figured I'd go with a long flash for 10's and a short flash for 1's (thanks to Simmicht on the PICAXE forum)

so if the fish had pressed the lever 23 times a light would flash

long long short short short

then wait 30 seconds, and repeat until they fed again, then update the display

so the problem is how to break that number into 2 and 3

I was thinking

take the number
if its greater than 10 flash a long flash
if not, go to the short flash section
subtract 10 from it
if its greater than 10 flash a long flash
if not, go to the short flash section
subtract 10 from it
if its greater than 10 flash a long flash
if not, go to the short flash section
subtract 10 from it

and then have a short flash section that does the same thing, but does a short flash, and then subtracts 1 until it reaches zero

any other ideas on how to do this?


Top
 Profile  
Reply with quote  
PostPosted: Sep 29th, '11, 18:52 
Bordering on Legend
Bordering on Legend
User avatar

Joined: May 5th, '11, 13:32
Posts: 346
Gender: Male
Are you human?: YES
Location: Brisbane, Australia
how about something like this bw

http://www.quasarelectronics.com/3129-u ... ounter.htm


Top
 Profile  
Reply with quote  
PostPosted: Sep 29th, '11, 19:13 
Seriously, this cant be healthy.
Seriously, this cant be healthy.
User avatar

Joined: Oct 11th, '07, 19:43
Posts: 6687
Gender: Male
Are you human?: Not at 3 am :(
Location: Kalgoorlie
Thats not too expensive either.


Top
 Profile  
Reply with quote  
PostPosted: Sep 29th, '11, 21:04 
Seriously, this cant be healthy.
Seriously, this cant be healthy.
User avatar

Joined: Mar 26th, '10, 20:46
Posts: 5404
Location: South Australia
Gender: Male
Are you human?: Yep
Location: South Australia
MattySEQ wrote:


Yeah, that would do the trick.

I'll keep the code modular so something like that would fit right in with ease.

But for now I'll have to work with what I've got.

I'll make the code call a subroutine called "ShowFeedCounts" or something, so that if anyone wants to make one with a digital display, the only bit of code that will need changing is that small section.


Top
 Profile  
Reply with quote  
PostPosted: Sep 29th, '11, 22:19 
Bordering on Legend
Bordering on Legend
User avatar

Joined: Jan 12th, '07, 21:42
Posts: 475
Location: Melbourne - D'nong North
Gender: Male
Location: AU
Few point, Bw

Just one LED incorporated in the lower part of the paddle,
when ON, food is available, but only x hits, depending on the amount of food dropped on each hit. LED tuns off after last hit allowed.

Food available every x hours
If needed only during daytime, incorporate Light Dependant Resistor (LDR)
to prevent nightime operation.

One of the parameters, amount of food / hits / or time “in between” adjustable manually on the spot by a pot or BCD switch with display.

You cold also use water temp reading to adjust one of those parameters but that’s getting even more complicated.
Try to keep it as simple as possible.

Many of the HSM checks should be part of the water pumps timer if also based on a Picaxe
and if “HSM” is activated, it should turn off pumps and the feeder as well.
If not, a supervisory controller should disconnect the pumps and the fish feeder when in alarm mode.
Do not make them part of the feeder controller.

Work out what you really need, put it onto a schema with a picaxe needed to do the job,
then try to program each function, work on each of them separately in the Programming editor until you get them working in the simulator
and then try to put them together into one program and get that working.

If needed specific help, make it a mew post on the axe forum, “Automatic fish feeder” or something similar.

T’will keep you busy for a while.


Top
 Profile  
Reply with quote  
PostPosted: Sep 29th, '11, 23:46 
Xtreme Contributor
Xtreme Contributor

Joined: Aug 1st, '11, 20:29
Posts: 110
Gender: Male
Are you human?: YES
Location: China, Shanghai
Thought about such stuff, but my approach if fundamentally different.

I prefer existing rock-solid and field-proven software, easy to interoperate and to customize. And cheap, too. Generic opensource (free software) is the way. We agree on this.

But the most complete and efficient ones run on PC-style machines, and I'm not fond of any form of lock-in, therefore I will go for a PC. A rugged one, especially second hand, is not so expensive, by using SSD (solid state mass memory) no more fragile than a thingy like yours, and much more flexible, extendable, powerful and it offers a boatload of ways to develop code (languages, frameworks...), network-ready, with many available peripherals, easy to replace on-the-spot...

A Linux distro will animate it. Solid and powerful.

Next I will use existing software engines in order to avoid re-coding (and debug!) some needed generic services, because I'm not a big fan of the reinvent the wheel nor "NIH" approaches. A workflow engine (because there is a finite state automata laying there, underneath), a rules engine to act as a last line of defense for example by analyzing all commands set to be sent to actuators in order to enforce some safety rules for all actions, whatever triggers it), a monitoring software (Zabbix, Nagios...) to detect if something goes wrong and be notified...

Then I will first care about monitoring, then about acting on the system (feeding...).

Just food for thought.


Top
 Profile  
Reply with quote  
PostPosted: Sep 30th, '11, 00:01 
Seriously, this cant be healthy.
Seriously, this cant be healthy.
User avatar

Joined: Mar 26th, '10, 20:46
Posts: 5404
Location: South Australia
Gender: Male
Are you human?: Yep
Location: South Australia
steve s

most of that stuff is in the original plan from the first post.

I'll add the option of day/night, I like it. I dont think I'd use it, but if it's of use and I have a pin for it, I'll add it.

Why do you say "Do not make them part of the feeder controller." re: HSM controls?

I hadn't thought of this other than this being a stand alone feeder, but I guess it would be nice to be able to cascade HSM alarms to any other picaxe system also in use.

And yeah, I'm busy, and I can hardy see because of looking at led's blinking out numbers of feeds :)

I love learning new stuff.

I'm working on the section that will report numbers of feeds. It's nearly there, but the if then else structure is proving to be a bit confusing to me :)

I have it blinking a long flash for 10, 20, etc and short flasses for the digits.

So 23 feeds would be long long short short short

It works quite well and is very easy to read but for some reason that I cant figure, when I get to 10, I get 1 long and 10 short flashes instead of just 1 long

Once you do the 11th feed it works properly, but its just the transition from reporting 9 feeds to reporting 10 feeds that is being stubborn :)

That part of the code looks like this...

Code:
FlashFeedsSoFar:
{

let TempCount = FeedCount

for i = Tempcount to 1 step -10
   if  i > 9 then gosub FlashLong
   if i < 10 then
      let TempCount = i
      let i = -1                   'I dont think this line is being read
endif
next i

for i = Tempcount to 1 step - 1
   if i > 0 then gosub FlashShort
   if i = 0 then let i = 0              'and I just noticed this line and have no idea why its there :)
   end if
next i
   
Pause 1000

return
}

'---------------------------

FlashLong:
{
   High 4
   pause 500
   low 4
   Pause 500

return
}

'--------------------------------

FlashShort:
{
   High 4
   pause 200
   low 4
   Pause 200

return
}


I'll sort it out.

But there is still the problem of needing to have this report, but have the system remain alert to lever presses.

One option is to only report the "feeds so far" during the times the fish are restricted from getting any feed.

I'm only using the 08M and I don't think it supports interrupts or (psudo)multi-tasking so I might have to modernize a bit, and get the next chip up.


Top
 Profile  
Reply with quote  
PostPosted: Sep 30th, '11, 00:04 
Seriously, this cant be healthy.
Seriously, this cant be healthy.
User avatar

Joined: Mar 26th, '10, 20:46
Posts: 5404
Location: South Australia
Gender: Male
Are you human?: Yep
Location: South Australia
natmaka wrote:
Thought about such stuff, but my approach if fundamentally different.
[stuff deleted]
Just food for thought.


Sounds great! Are you actually building it now?

If so, you should start a thread and share what you are doing. It would be cool to have some options.


Top
 Profile  
Reply with quote  
PostPosted: Sep 30th, '11, 04:27 
Xtreme Contributor
Xtreme Contributor

Joined: Aug 1st, '11, 20:29
Posts: 110
Gender: Male
Are you human?: YES
Location: China, Shanghai
BullwinkleII wrote:
Are you actually building it now?


Not yet, just thinking about it.

Quote:
If so, you should start a thread and share


Will do, but don't hold your breath as I'm slowwwwww :lol:


Top
 Profile  
Reply with quote  
PostPosted: Oct 1st, '11, 19:42 
Bordering on Legend
Bordering on Legend
User avatar

Joined: Jan 12th, '07, 21:42
Posts: 475
Location: Melbourne - D'nong North
Gender: Male
Location: AU
Bw, just reread through the latest, trying o understand you “FlashFeeds” rutine.

See divisions in the manual and how I used it in this subroutine
Code:
; 14M Picaxe

; Flash LED (subrutine)

pause 400

b1=25                    'store read or preset value
b2=b1/10                 'isolate tens
b3=b1//10                'isolate remainder

for b0=1 to b2           'flash tens
if b2=0 then remainder
high 1                   'LED on
pause 600
low 1                    'LED off
pause 200
next b0

pause 200

remainder:

for b0=1 to b3           'flash units
high 1
pause 200
low 1
pause 200
next b0

;retun

Keep the dash / dot in at least 3/1 proportion (morse code standard) for easier reading.
(but adjust it how it suits you best)

In “for b0=1 to b2” if less than ten in b2, b0=0 and 0 will flash so you need
“if b2=0 then remainder”

likewise in “for b0=1 to b3” if b0=0 to b3 you will get extra flash because the 0 will count

re the paddle, you could light the LED until the paddle is hit, turn the LED off for a short period to allow for the dropped food to bee eaten
and light the LED again until next hit and so forth.
Preset number of hits in a variable.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 167 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6 ... 12  Next

All times are UTC + 8 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron

Powered by phpBB® Forum Software © phpBB Group
Portal by phpBB3 Portal © phpBB Türkiye
[ Time : 0.070s | 13 Queries | GZIP : Off ]