Eheim autofeeder

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

Re: Eheim autofeeder

Post by lnevo »

I only did the control part. I still rely on battery.

All you need are some audio mono ports and jacks, a small project box and a relay. Amos i believe you have the dc power expansion? If so you can connect a 12vdc relay right to that and when its powered on it completes the circuit. You wire the relay to the pins on the feeder button and it closes the circuit when you provide power to the relay which then feeds the fish. The mono ports are just to make everything look nice. If you do the battery replacement u might be able to put the relay inside the feeder.
Amos Poh
Posts: 107
Joined: Sun Jul 22, 2012 4:51 am
Location: Singapore

Re: Eheim autofeeder

Post by Amos Poh »

Thanks Inevo :)

Did i mention iam a Idiot when it comes to electrical engineering :) lol.
I still dont get what to purchase and how to assemble it. yes i do have a power control expansion how can i use that to power the feeder?

Sorry for the noob questions
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Eheim autofeeder

Post by lnevo »

Power +/- goes to relay +/-

Relay output connects to pins ok manual button.

Done thats all you need. Now when you power on the outlet, the relay closes, fish get fed. I think the simplicity is whats getting in the way :)
Amos Poh
Posts: 107
Joined: Sun Jul 22, 2012 4:51 am
Location: Singapore

Re: Eheim autofeeder

Post by Amos Poh »

lnevo wrote:Power +/- goes to relay +/-

Means Power of Feeder +/- Goes to power Control expansion +/-

Relay output connects to pins ok manual button.

Relay output connects to pins ok manual button? this part iam not sure

Done thats all you need. Now when you power on the outlet, the relay closes, fish get fed. I think the simplicity is whats getting in the way :)

Thanks for the patience by the way :lol:
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Eheim autofeeder

Post by lnevo »

Amos Poh wrote:
lnevo wrote:Power +/- goes to relay +/-

Means Power of Feeder +/- Goes to power Control expansion +/-
NO! The power is going to connect to a 12vdc relay that you will need from radio shack. The feeder is only 3v if you connect that directly to the feeder I'm not sure what will happen. I've only done the control part, not the battery replacement,

For the other part, you'll need to crack open the feeder and you'll see the button that you push (there are 2 of them) when you want to feed manually. You will need to solder wires to two of the pins and connect that to the output side of the relay. There's some links earlier in the thread with pictures and some other directions I had found (and didn't use for their circuit) that may make it clearer.
Piper
Posts: 296
Joined: Fri Jul 20, 2012 7:13 am
Location: Oakley, CA

Re: Eheim autofeeder

Post by Piper »

Hi Piper and Inevo,

I recently brought a battery powered auto feeder and was thinking of powering it up via the ReefAngel instead of batteries also would be best if i can trigger a feed wirelessly.

Found this thread with lots of information but i am a idiot when it comes to electrical stuff. Possible to teach me what to buy and how to assemble?

1) power up the feeder using RA
2) trigger a feed wirelessly

Autofeeder is using 2x 1,5v AA battery

Thanks in advance :)
What feeder did you get? Sounds like it might not be the Eheim feeder. If that's the case, you will need to open it up and figure out how to wire the relay to the button.

The easiest way is as Lee suggested and just use the RA to power the relay that triggers the button and just keep the batteries in the unit to power the it. I used an old 5v cell charger wall-wart to power my feeder but if you do that you need to use/make a voltage regulator to go from 5v (or whatever you have) to 3v. You can also find one cheap on-line: http://dx.com/p/mini-dc-4-40v-to-dc-1-5 ... ule-142488

If you use a 12v relay (http://dx.com/p/oje-sh-112dm-12v-5a-pow ... ack-141959) you can use your DC expansion to trigger it.

Image

Using the image above as an example, you would wire your DC expansion to pins one and two of the relay. You would wire pins 3 and 4 to the button on the feeder. When you apply power from the DC expansion to pins 1 and 2 of the relay it will trigger the relay closing (or completing) the circuit at pins 3 and 4 which would emulate a button press on the feeder. In newbie terms the relay is taking the place of the button on the feeder.

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

Re: Eheim autofeeder

Post by Piper »

I should note that not all relays are the same. Some may have the pins in different locations and some may have more pins. You need to check the diagram and/or data sheet for your relay for proper wiring. Just make sure that if it is a 4 pin relay that it is "NO" or Normally Open. That means if there is no power to the relay it's open or not completing the circuit. Many of the relays you will find have 5 pins which will handle either case depending on how you wire it.

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

Re: Eheim autofeeder

Post by lnevo »

The 4 pin relay is sometimes referred to as SPST (single pole, single throw) relay.
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Eheim autofeeder

Post by Sacohen »

So how many volts is being sent to the feeder trigger.

From this link.
http://wamas.org/forums/blog/13/entry-4 ... ontroller/
it looks like the feeder is getting 12V off of the relay.

I'm wondering if I can do this using a 3V Walwart to replace the batteries and a 12V signal coming out of the Power Expansion Module.

If I set program the RA to only close the Power Expansion Module of a second then I shouldn't need the capacitor and resistor.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Eheim autofeeder

Post by rimai »

If you are using a relay, like piper posted above, there is no voltage being sent to the feeder.
You are basically closing the relay contacts similar to what you would do manually on a button.
Roberto.
Piper
Posts: 296
Joined: Fri Jul 20, 2012 7:13 am
Location: Oakley, CA

Re: Eheim autofeeder

Post by Piper »

It depends on your relay. I used a 5v relay to trigger so I can use my I/O module. Other have used 12v relays. I would think a 12v relay with the DC power expansion would work just fine.

You will need ~3v to power the feeder though. I had a hard time finding a 3v wall wart so I used a 5v and a LM317T voltage regulator to get to 3.3v.
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Eheim autofeeder

Post by Sacohen »

You are closing the contact, thereby completing the circuit and letting voltage through to the feed button.

Each port on the Power Expansion Module is relay and would do the same thing that Piper did above.
Unless I'm missing something I don't see the reason to use the DC Expansion port to trigger a relay if we can just set the expansion port to be on for 1 second and then turn off.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Eheim autofeeder

Post by rimai »

No, each port in the power control expansion module is not a relay. Each port has a driver that is capable of closing a relay or driving a small 12VDC motor.
You would still need the relay to close the contact of a relay to simulate a push button press.
Roberto.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Eheim autofeeder

Post by lnevo »

That's not true. In the scenarios the 5V/12V relay is closing the circuit that the push-button woudl normally close. The RA relay or Power expansion port is only going to power the relay that closes the circuit. It's not feeding voltage to the button the way you described.
Piper
Posts: 296
Joined: Fri Jul 20, 2012 7:13 am
Location: Oakley, CA

Re: Eheim autofeeder

Post by Piper »

Lee explained that better than I did. Think of the relay as a pair of hands touching a wire from each side of the feeder button together which essentially bypasses the button. You need to power the relay to activate the hands though. 5v and 12v relays are cheap easy to come by. You'd obviously want to go with the 12v relay if you want to power it with your DC power expansion.

If you can find a 3v wall wart you can use that to replace the batteries in the feeder itself if you want to. Or just leave the batteries in there.

~Charlie
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Eheim autofeeder

Post by Sacohen »

Finding a 3v PS is not a problem. I found a link in another thread for one at Radio Shack and I just I'll get a small 12v DC relay and fit it into the are where the batteries would go and all should be fine.
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Eheim autofeeder

Post by Sacohen »

This is the Power Supply that was posted in another thread.

http://www.radioshack.com/product/index ... Id=3802149

I'll connect it to the battery leads.

If I use that and this 12VDC/1A SPDT Micro Relay connected to the push button leads.

http://www.radioshack.com/product/index ... Id=2062481

I should be OK.

I should be able to leave the actual push button connected in place and use that if I were at home and wanted to give an extra feeding, correct?
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Eheim autofeeder

Post by lnevo »

I cant see the pics but my push button still works and i use it all the time.
Piper
Posts: 296
Joined: Fri Jul 20, 2012 7:13 am
Location: Oakley, CA

Re: Eheim autofeeder

Post by Piper »

Sacohen wrote:I should be able to leave the actual push button connected in place and use that if I were at home and wanted to give an extra feeding, correct?
Yep. Mine works that way too. I also tied it to a button via my I/O module that activates it as well. My feeder is in the far back corner of my canopy and hard to get to. I put a few buttons in a small enclosure that is Velcro's to the inside of the canopy door where it is easy to get to when you open it up to feed.
egadgetjnr
Posts: 54
Joined: Wed Jul 18, 2012 1:32 pm

Re: Eheim autofeeder

Post by egadgetjnr »

Piper wrote:
Sacohen wrote:I should be able to leave the actual push button connected in place and use that if I were at home and wanted to give an extra feeding, correct?
Yep. Mine works that way too. I also tied it to a button via my I/O module that activates it as well. My feeder is in the far back corner of my canopy and hard to get to. I put a few buttons in a small enclosure that is Velcro's to the inside of the canopy door where it is easy to get to when you open it up to feed.
Hey piper, how did you use it with you IO module? I want to do something similar for my ozone but at the moment only have it setup to power a 12v wall wart relay to trigger it on and off. Could you take some photos and possibly show some code on how you coded it? I just can't get my head around how you use the IO module to trigger the relay or switch.

Thanks
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Eheim autofeeder

Post by Sacohen »

So I've done some looking at this and other Auto Feeder threads and this is the code I've come up with.

Code: Select all

static unsigned long feeding = 0;

if ((now()%SECS_PER_DAY==64800)) //if it is 6 pm
{
ReefAngel.FeedingModeStart(); //START FEEDING MODE
}

if (ReefAngel.DisplayedMenu==FEEDING_MODE)
{
if ( feeding == 0 ) {
feeding = now(); //set the time of the start of feeding to variable feeding
}

if ((now()-feeding>=60) && (now()-feeding<=61)) //if between 60 and 61 seconds has past
{
ReefAngel.Relay.On(Feeder); //TURN FEEDER RELAY ON
}
else 
{
ReefAngel.Relay.Off(Feeder); //TURN FEEDER RELAY OFF
}
} else {
if ( feeding > 0 ) {
feeding = 0;
}
}
The Relay in the feeder will be triggered off my Power Expansion Module Port #3, which I will set up like this...

Code: Select all

// Define Relay Ports by Name
#define Actinic_Lights     1
#define Day_Lights         2
#define Unused             3
#define Pumps              4
#define Sump_Fan           5
#define DeNit_Doser        6
#define DeNit_Pump         7
#define Unused             8

#define ATO_Pump           Box1_Port1
#define Moon_Lights        Box1_Port2
#define Feeder             Box1_Port3
#define Unused             Box1_Port4
#define Unused             Box1_Port5
#define Unused             Box1_Port6
#define Unused             Box1_Port7
#define Dummy              Box1_Port8
Lee you are the most familiar with my code (since you just reworked it for me).
Does this look good?
It looks like this will drop the power on the Jebao pumps like turning on Feeding Mode from the head unit or the Andriod App. Is that correct?
Will it work with the NTM that is set up to run after a feeding?
Will this work if I wanted to do a manual feeding from the RA head unit or the Andriod App?
If not I guess I could always do a manual trigger on the Feeder Port.

Am I asking to many questions, just tell me to shut up :).
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Eheim autofeeder

Post by lnevo »

It looks fine and should trigger everything you currently do with Feeding mode. The call to FeedingModeStart() is the same as hitting the feeding button in the apps/portal or with joystick. Good job!
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Eheim autofeeder

Post by Sacohen »

Thank you. Again the work was done already (I think by you actually for someone else) I just took it and modified it a bit.
Piper
Posts: 296
Joined: Fri Jul 20, 2012 7:13 am
Location: Oakley, CA

Re: Eheim autofeeder

Post by Piper »

egadgetjnr wrote: Hey piper, how did you use it with you IO module? I want to do something similar for my ozone but at the moment only have it setup to power a 12v wall wart relay to trigger it on and off. Could you take some photos and possibly show some code on how you coded it? I just can't get my head around how you use the IO module to trigger the relay or switch.
Will do. If not tonight, I can get to it tomorrow night.
egadgetjnr
Posts: 54
Joined: Wed Jul 18, 2012 1:32 pm

Re: Eheim autofeeder

Post by egadgetjnr »

Piper wrote: Will do. If not tonight, I can get to it tomorrow night.
No worries. Thank you
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Eheim autofeeder

Post by Sacohen »

Got my feeder today. It's much smaller than I thought.
Will probably mod and set it up this weekend.

Thanks for the help.
Piper
Posts: 296
Joined: Fri Jul 20, 2012 7:13 am
Location: Oakley, CA

Re: Eheim autofeeder

Post by Piper »

Piper wrote:
egadgetjnr wrote: Hey piper, how did you use it with you IO module? I want to do something similar for my ozone but at the moment only have it setup to power a 12v wall wart relay to trigger it on and off. Could you take some photos and possibly show some code on how you coded it? I just can't get my head around how you use the IO module to trigger the relay or switch.
Will do. If not tonight, I can get to it tomorrow night.
I had a chance to get to this tonight. I'm 90% sure this is the code I uploaded to my I/O module. I basically copied/pasted what Roberto and others put together and haven't really modified much at all.

Code: Select all

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

byte IOports[] ={3,5,6,9,10,11};
byte ChannelValue[] = {0,0,0,0,0,0};
byte cmdnum=255;
byte datanum=255;

byte IOOut=0;

void setup() {
  wdt_enable(WDTO_1S);
  Wire.onReceive(receiveEvent);
  Wire.onRequest(requestEvent);
  Wire.begin(9);
  for (int a=0; a<6; a++) {
    pinMode(IOports[a],INPUT);
    digitalWrite(IOports[a],HIGH); //pull up resistor
    // digitalWrite(IOports[a],LOW); //pull up resistor
  }
}

void loop() {
  wdt_reset();
  if (cmdnum != 255) {
    ProcessCMD(cmdnum,datanum);   
    cmdnum=255;
    datanum=255;
  }
}

void requestEvent() {
  IOOut=0;
  for (int a=0; a<6; a++) {
    IOOut += digitalRead(IOports[a])<<a; //pull up resistor
  }
  Wire.write(IOOut);
}

void receiveEvent(int howMany) {
  wdt_reset();
  if (howMany == 5) {
    byte cmd1, cmd2, cmd3, cmd4, cmd5;
    cmd1=Wire.read();
    cmd2=Wire.read();
    cmd3=Wire.read();
    cmd4=Wire.read();
    cmd5=Wire.read();
    if (cmd1=='$' && cmd2=='$' && cmd3=='$') {
      cmdnum=cmd4;
      datanum=cmd5;
      //Serial.println(cmd4,DEC);
      //Serial.println(cmd5,DEC);
    }
  }
  else {
    for (int a=0; a<howMany; a++) {
      Wire.read();
    }
  }
}

void ProcessCMD(byte cmd, byte data) {
  wdt_reset();
  // Individual Channel
  if (cmd>=0 && cmd<=5) {
    ChannelValue[cmd]=data;
    pinMode(IOports[cmd],OUTPUT);
    analogWrite(IOports[cmd],data);
  }
}

I also added this to the very bottom of my INO file:

Code: Select all

// *****************************************************************************
// * I/O Expansion
// *****************************************************************************

void IOSetChannel( byte channel, boolean status) {
  Wire.beginTransmission(I2CIO);
  Wire.write("$");
  Wire.write("$");
  Wire.write("$");
  Wire.write(channel);
  Wire.write(status?255:0);
  Wire.endTransmission(); 
}
I use this in my INO to listen for button presses:

Code: Select all


// Just below my includes I define my I/O ports:
// I/O Module Constants
#define IO_Port_1    0
#define IO_Port_2    1
#define IO_Port_3    2
#define IO_Port_4    3
#define IO_Port_5    4
#define IO_Port_6    5

// .......

// I have this in my loop to monitor my I/O ports:
    // Check to see if we hit the feeding mode button to trigger the relay
    // If so, set it back to low and clear the flag
    if (ioAutoFeederRelayTriggered == true) {
      IOSetChannel(IO_Port_1,LOW); // Sets channel 0 to LOW
      ioAutoFeederRelayTriggered = false;
    }

    if(!ReefAngel.IO.GetChannel(IO_Port_5)) {
      // ReefAngel.FeedingModeStart();
      IOSetChannel(IO_Port_1,HIGH); // Sets channel 0 to HIGH
      ioAutoFeederRelayTriggered = true;
    }
    
    // Start/Stop Feeding Mode
    if(!ReefAngel.IO.GetChannel(IO_Port_3)) {
      if (!ReefAngel.DisplayedMenu==FEEDING_MODE) {
        ReefAngel.FeedingModeStart();
      }
      else {
        ButtonPress++;
      }
    }
    
    // Start/Stop Water Change Mode
    if(!ReefAngel.IO.GetChannel(IO_Port_4)) {
      if (!ReefAngel.DisplayedMenu==WATERCHANGE_MODE) {
        ReefAngel.WaterChangeModeStart();
      }
      else{
         ButtonPress++;
      }
    }

    // Trigger Nutrient Export Mode
    if(!ReefAngel.IO.GetChannel(IO_Port_6)) {
      triggerNutrientExportMode();
      //ButtonPress++;
    }

I put 4 small tact switches into a small Radio Shack enclosure and velcro'd that inside my canopy door. That feeds down to my I/O module sitting in a cabinet next to my tank. The buttons are wired into ports 3 through 6 (counting from 1 as #defined above, not 0). If the first button is pressed (IO_Port_3) that will put the tank into feeding mode. Button 2/IO_Port_4 the tank goes into water change mode.

Pressing button 3/IO_Port_5 is what actually triggers the feeder. I have a 5v relay connected to IO_Port_1 (port 0). When you press button 3 it sets IO_Port_1 to high with this: IOSetChannel(IO_Port_1,HIGH);. That sends ~5v to the relay which is wired to both sides of the tact switch on the feeder which triggers it to feed/rotate. I also set a flag so I can check to see if IO_Port_1 is high so I can set it back to low and shut off the relay. You can also eliminate the flags with something along the lines of this:

Code: Select all

    if (ReefAngel.IO.GetChannel(IO_Port_1)) {
      IOSetChannel(IO_Port_1,LOW); // Sets channel 0 to LOW
    }
and save a little memory. I just haven't gotten around to fixing that yet myself.

I do have a couple of other problems/TODOs to take care of but I've been too busy lately. I need to "debounce" my buttons. Sometimes I'll get multiple presses when I hit a button once. I'm running a modified version of the dev branch of the libs and the feeding mode and water change mode are not working like they did when I was on the current libs. All are minor issues which wont change the basic concept.

Let me know if you still want pictures. I have the I/O module and related enclosures stuffed in the back of my cabinet. I need to dig them out to get good pics.

~Charlie
ozworld
Posts: 6
Joined: Fri Jun 07, 2013 1:14 pm

Re: Eheim autofeeder

Post by ozworld »

dcartier wrote: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
I also used a small 5V relay inside and ran a thermostat 4 in 1 cable (2 for the 3v power supply and 2 to the ATO port). My questions is: what code can I use to trigger the ATO high port to enable the relay? (I have a Reef Angel + Controller).
Thanks!
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Eheim autofeeder

Post by Sacohen »

I have the code in one of my posts at the top of this page.
You just need to modify it to work with whatever port you are going to use to trigger it.
ozworld
Posts: 6
Joined: Fri Jun 07, 2013 1:14 pm

Re: Eheim autofeeder

Post by ozworld »

Thanks Steve, what I'm looking for is the actual trigger for the ATO High port that is connected to the auto feeder relay.
Post Reply