Eheim autofeeder

Request new hardware or ideas for the controller
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Eheim autofeeder

Post by lnevo »

Nope :)
dcartier
Posts: 33
Joined: Thu Sep 20, 2012 2:34 am

Re: Eheim autofeeder

Post by dcartier »

I bought one of these for use over Christmas. I installed a micro 5V relay inside and ran a cable out with an 2 pin ATO connector on it. It worked great. Kept things fed for a week.

Dennis
User avatar
jsclownfish
Posts: 378
Joined: Mon Oct 24, 2011 7:52 pm
Location: Saint Louis

Re: Eheim autofeeder

Post by jsclownfish »

Awesome! Just out of curiosity how are you scheduling feedings? I really like the small doses each hour with a brief feeding timer. It just feels a bit more natural for the fish. It's really funny how they know when the waves stop during the day it's feeding time. They all go right to the feeder drop point when it happens.
-Jon
dcartier
Posts: 33
Joined: Thu Sep 20, 2012 2:34 am

Re: Eheim autofeeder

Post by dcartier »

For the feeding schedule, I just had my RA turn on feeding mode at 6:00 PM and press the button at 6:01 (to give my overflows time to drain).

They only thing I was not as crazy about is the flakes tended to stay on the surface so my yellow tang tends to miss out as his nose is just not made for surface feeding (or at least he thinks it isn't).

I recently found a feeding float. It is a foam rectangle with a plastic inner frame that that floats on the surface. It comes with a rod on a suction cup. I think the next time I use my feeder I will position it under the feeder so the flakes fall into the rectangle. That will mean they can't go down the overflows and maybe the tang will get a chance if leftovers sink.

Dennis
User avatar
jsclownfish
Posts: 378
Joined: Mon Oct 24, 2011 7:52 pm
Location: Saint Louis

Re: Eheim autofeeder

Post by jsclownfish »

I like the idea of the ring. I've seen something like that before as well. My yellow tang gets after the flakes pretty well, even on the surface.

-Jon
00Warpig00
Posts: 289
Joined: Wed May 16, 2012 9:52 pm

Re: Eheim autofeeder

Post by 00Warpig00 »

Use pellets instead of flakes... like New Life Spectrum Thera +A 1mm pellets. some float for a few seconds and some drop like a rock as soon as they hit the water. My fish, at least, think they are crack. I even have a pair of flame angels that try to eat the 3mm size and physically cant because they are too big. My Tangs, Pearlscale Butterfly, Majestic Foxface, and puffer all LOVE the 3mm ones. Most of the rest of my fish eat the 1mm size. If you haven't tried them I cannot recommend enough. Well worth the money.

Nick
180G FOWLR
20GH QT#1
29G QT#2

Image
User avatar
jsclownfish
Posts: 378
Joined: Mon Oct 24, 2011 7:52 pm
Location: Saint Louis

Re: Eheim autofeeder

Post by jsclownfish »

I'm looking for an idea on how to trigger the feeder away from the tank. When I'm observing the tank with the webcam or showing it to someone I thought it would be really cool to be able to trigger the feeder remotely so they can see all the fish in the live video feed. :geek: The relay just needs a change status from open to closed (like a push button does) to trigger the feeding. So when I do use my code I just have it quickly open then close the relay. I could probably just send a memory change command from say 0 to 1 and then a second command to switch it back, but it would be more elegant for it to switch back on it's own after I change it. Any ideas?

Thanks,
Jon
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Eheim autofeeder

Post by lnevo »

Yeah. Thats exactly what you want it to do. Thats how my auto water change and ato refill modes work.

If memory location = 1 then set it to 0 and do whatever :)

Should work great!
User avatar
jsclownfish
Posts: 378
Joined: Mon Oct 24, 2011 7:52 pm
Location: Saint Louis

Re: Eheim autofeeder

Post by jsclownfish »

Yes, but is there a way to have it automatically reset to back to 1 after a short period of time if changed to "let go of the button"?

-Jon
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Eheim autofeeder

Post by lnevo »

Put your actions to turn the feeder on in a function. Call the function to turn it on for whatever thats gonna do...once the function is triggered you can reset the variable and continue "holding" the button the way you normally would.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Eheim autofeeder

Post by lnevo »

Here's the function I just wrote up. My feeder is on order so I still have to modify it.

Code: Select all

void runFeeder() {
  static TimerClass afTimer;
  static time_t buttonPress;
  byte feederDelay=InternalMemory.read(Mem_B_FeederDelay);
    
  if(InternalMemory.read(Mem_B_AutoFeed)) {
    InternalMemory.write(Mem_B_AutoFeed,false);
    FeedingModeStart();
    afTimer.SetInterval(feederDelay*60);
    afTimer.Start();
  }
    
  if(afTimer.IsTriggered()) buttonPress=now();
  
  // Turn on feeder for 5 seconds.
  if (now()-buttonPress<5) 
    ReefAngel.Relay.On(Feeder);
  else
    ReefAngel.Relay.Off(Feeder);
}
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Eheim autofeeder

Post by lnevo »

If anyone sees any issues with that function as written, let me know :)
Piper
Posts: 296
Joined: Fri Jul 20, 2012 7:13 am
Location: Oakley, CA

Re: Eheim autofeeder

Post by Piper »

Lee - Which method are you going to use to modify the feeder? There are a couple of different links at the beginning of this thread and I found another method somewhere else, I'll have to see if I can track down that link, that seemed a little easier for those of us that are not all that well versed in electronics like myself to follow.

I'd like to automate my feeder but I need the mod part to be *real* simple so I can follow it. And preferably with lots of pictures :)

~Charlie
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Eheim autofeeder

Post by lnevo »

I'm not concerned about batteries and don't want another power cord. I don't have an IO module so what I'm going to do is get the 5v dc micro relay from radio shack and connect it to one of those usb power jacks like you get with an iPhone. They are 5v also. They sell em at 7-11 now for a few bucks. I'm going to get a long enough usb cable and put a mono audio jack on it and put a mono port on the feeder. At least thats my plan. I figure this way I don't need any resistors capacitors or anything else...i hope :)
Piper
Posts: 296
Joined: Fri Jul 20, 2012 7:13 am
Location: Oakley, CA

Re: Eheim autofeeder

Post by Piper »

Interesting. Can you post a couple of pics when you get done? I have the IO module and I was planning on using one of those ports to trigger the manual push button on the feeder. If I remember correctly I just need to tap into the button solder joints on the PCB. I need to go back and look closer at the directions I found for that to be sure though. There might be some other parts/pieces I need to get to make that work.

~Charlie
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Eheim autofeeder

Post by lnevo »

Im basically doing what Jon did without replacing the batteries you just need to connect the relay to the push button leads and the relay to your io module or ato port. All my ports are taken so ill drive the relay with the outlet power :)

I'll post pics of the build when i get everything together.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Eheim autofeeder

Post by lnevo »

Theres some good pics here of the process also.

http://wamas.org/forums/blog/13/entry-4 ... ontroller/

The circuit he uses though has a resistor and capacitor since the inferior apex controller only makes it easy to turn the port on for at least a minute I guess...

Since we have more fjne grained control i think i'll be fine with just the relay wired in. Anyone with electronics info that thinks Im going to kill something please let me know. :)
User avatar
jsclownfish
Posts: 378
Joined: Mon Oct 24, 2011 7:52 pm
Location: Saint Louis

Re: Eheim autofeeder

Post by jsclownfish »

Yep. BTW, I just used this bit of code to remotely trigger my feeder. It is really cool to send a quick signal to the feeder and then watch all the fish come up to feed on my webcam. ;)

Code: Select all

  if ( InternalMemory.read(VacationPulseFeed) == 1 ) // feeder trigger
	{
          Feed = 1;   // Turn on feeder and feedmode
          ReefAngel.Timer[FEEDING_TIMER].SetInterval(InternalMemory.read(FastFeed));  //shorter feed time for autofeeder			
          ReefAngel.FeedingModeStart();
          ReefAngel.Timer[FEEDING_TIMER].SetInterval(InternalMemory.FeedingTimer_read());   //reset normal feed time
          InternalMemory.write(VacationPulseFeed,0);          //reset pulse to 0 for a pulse effect
	} 
         else Feed = 0;
-Jon
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Eheim autofeeder

Post by lnevo »

Where do you do your "action" to push the button over the IO channel?
User avatar
jsclownfish
Posts: 378
Joined: Mon Oct 24, 2011 7:52 pm
Location: Saint Louis

Re: Eheim autofeeder

Post by jsclownfish »

I just send a byte over I2C to the IO and it triggers the relay for the feeder. I have inputs to the IO for the buzzer and feeder and outputs for the flow sensors, floats, and light sensors.

Let me know if you want me to post the code (I'm not at my PC at the moment).

-Jon
Piper
Posts: 296
Joined: Fri Jul 20, 2012 7:13 am
Location: Oakley, CA

Re: Eheim autofeeder

Post by Piper »

jsclownfish wrote:Let me know if you want me to post the code (I'm not at my PC at the moment).

-Jon
That would be great if you could. That sounds like exactly what I want to do.

Thanks,
Charlie
User avatar
jsclownfish
Posts: 378
Joined: Mon Oct 24, 2011 7:52 pm
Location: Saint Louis

Re: Eheim autofeeder

Post by jsclownfish »

OK, so here is how I do it. I tried to simplify my ino files down to the autofeeder stuff. Also, you'll see I slowly added more options so there are 4 now:
1. feed once a day
2. feed twice a day
3. feed every hour during the day
4. feed on command with a memory location read to trigger the event.

Here is the relevant main code...

Code: Select all

// Vacation autofeeder memory locations
#define Vacation         100
#define VacationEnable      Vacation  //autofeeder on=1
#define VacationStartHr      Vacation+1  //1st hour
#define VacationStartMin   Vacation+2  //1st minute
#define VacationStart2ndHr      Vacation+3   //2nd hour
#define VacationStart2ndMin   Vacation+4   //second minute
#define FastFeed    Vacation+5  //Fast feeder timer
#define VacationPulseFeed    Vacation+6  //pulse signal from the internal memory function

byte Feed = 0;

void setup()
{
}
void loop()
{
//Autofeeder Mode
  if (  (InternalMemory.read(VacationEnable) > 0) || (InternalMemory.read(VacationEnable) <= 2)  ) // check for vacation mode 1 time a day
	{
         // Check if the current time is equal to the start time.
            if (NumMins(hour(), minute()) == (NumMins(InternalMemory.read(VacationStartHr), InternalMemory.read(VacationStartMin))))
            {
              if (second() == 0) 
              		{
			Feed = 1;   // Turn on feeder and feedmode
			ReefAngel.FeedingModeStart();
		        }   
            }
            else Feed = 0;
         }
  if ( InternalMemory.read(VacationEnable) == 2 ) // check for vacation mode 2 times a day
	{
         // Check if the current time is equal to the start time.
            if (NumMins(hour(), minute()) == (NumMins(InternalMemory.read(VacationStart2ndHr), InternalMemory.read(VacationStart2ndMin))))
            {
              if (second() == 0) 
              		{
			Feed = 1;   // Turn on feeder and feedmode
			ReefAngel.FeedingModeStart();
		        }   
            }
            else Feed = 0;
         }
  if ( InternalMemory.read(VacationEnable) == 3 ) // check for vacation mode hourly
	{
           if ((hour() >= 10) || (hour() <= 19)) //from 10a-7p 
             {
              if (minute() ==30 && second() == 0) //once an hour on the half hour
              		{
			Feed = 1;   // Turn on feeder and feedmode
                        ReefAngel.Timer[FEEDING_TIMER].SetInterval(InternalMemory.read(FastFeed));   //short feed timer		
                        ReefAngel.FeedingModeStart(); 
                        ReefAngel.Timer[FEEDING_TIMER].SetInterval(InternalMemory.FeedingTimer_read());  //reset original feed timer
		        }   
             else Feed = 0;
             }
         }
  if ( InternalMemory.read(VacationPulseFeed) == 1 ) // feeder trigger for remote feeding
	{
          Feed = 1;   // Turn on feeder and feedmode
          ReefAngel.Timer[FEEDING_TIMER].SetInterval(InternalMemory.read(FastFeed));	//short feed timer		
          ReefAngel.FeedingModeStart();
          ReefAngel.Timer[FEEDING_TIMER].SetInterval(InternalMemory.FeedingTimer_read());  //reset original feed timer
          InternalMemory.write(VacationPulseFeed,0);     //reset variable to 0 to mimic a pulse or button release   
	} 
         else Feed = 0;

//I/O module communication
  Wire.beginTransmission(7);      // transmit to device #7 (IO Module)
  Wire.write('$');         // send the $$$
  Wire.write('$');
  Wire.write('$');
  Wire.write(Feed);
  Wire.endTransmission();      // stop transmitting  
and here is the relevant IO code....

Code: Select all

#include <Wire.h>
#include <avr/wdt.h>

byte Feeder=0;   //autofeeder signal

void setup()
{
  Wire.begin(7);
  Wire.onReceive(receiveEvent);
  pinMode(10,OUTPUT);  //autofeeder pin
  digitalWrite(10,LOW); 
}

void loop()
{
  //feeder 
 if (Feeder == 0)
 {
   digitalWrite(10, LOW);
 }
 else if (Feeder == 1)
 {
   digitalWrite(10, HIGH);
 }
}

void receiveEvent(int howMany) 
{
  if (howMany==4)  // Our custom protocol is 4 bytes
  {
    byte cmd1,cmd2,cmd3,cmd4;
    cmd1=Wire.read();
    cmd2=Wire.read();
    cmd3=Wire.read();
    cmd4=Wire.read();  
    if (cmd1=='$' && cmd2=='$' && cmd3=='$') // the first 3 bytes of the custom protocol are $$$ to ensure it's coming from RA
    {
      Feeder=cmd4;
    }
  }
  else
    for (int a=0;a<howMany;a++)
      Wire.read(); // if the number of bytes is not 4, discard everything
} 

Hope that helps.
-Jon
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Eheim autofeeder

Post by lnevo »

So it looks like the button "press" is really just a momentary action. Was trying to figure out how much time I needed to "hold" the button down for..i

For the electronics part. You are just going from the io module to relay and relay to button?
User avatar
jsclownfish
Posts: 378
Joined: Mon Oct 24, 2011 7:52 pm
Location: Saint Louis

Re: Eheim autofeeder

Post by jsclownfish »

Yes. I just used a little plastic box to to hold the 5V relay from RadioShack http://www.radioshack.com/product/index ... Id=2062478.

Jon
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Eheim autofeeder

Post by lnevo »

That gives me a great idea... :)

Roberto can you sell me a small ReefAngel box with a mini usb port? i'm thinking like the pressure switch case. I can install the relay in that and run a mono audio cable up to the feeder :)

I could use the hole to mount the mono jack :) just need to make sure it'll be ok size wise...

If we can do something shoot me a PM with the options :)
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Eheim autofeeder

Post by rimai »

Sure. It's very tiny though.
Roberto.
User avatar
jsclownfish
Posts: 378
Joined: Mon Oct 24, 2011 7:52 pm
Location: Saint Louis

Re: Eheim autofeeder

Post by jsclownfish »

I like that idea! I don't like that mine is hard wired now and I haven't taken the time to change it. The RadioShack plastic box is also too big. I'd think you would need a IO size box though.


Jon
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Eheim autofeeder

Post by lnevo »

Yeah The pressure switch may be too tiny...but io module size would work :) i've no idea how big the relay is.. :)
User avatar
jsclownfish
Posts: 378
Joined: Mon Oct 24, 2011 7:52 pm
Location: Saint Louis

Re: Eheim autofeeder

Post by jsclownfish »

the one I used was maybe 1" long and 1/4" around.
Jon
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Eheim autofeeder

Post by lnevo »

Just picked up the relay some mono ports and jacks. The relay is not the one linked but it should be fine. Pretty small.
Post Reply