Yet Another Auto Feeder

Do you have a question on how to do something.
Ask in here.
dlplunkett44
Posts: 74
Joined: Mon Aug 05, 2013 3:16 am

Re: Yet Another Auto Feeder

Post by dlplunkett44 »

So I finished modifying my Eheim auto feeder last night both for relay trigger and ac adapter. It runs fine when there are batteries, but when I have the ac adapter plugged in and set to 3v, whenever the "feed now" button is pressed, or the relay triggered (which does the same thing), it quickly turns off and on the feeder instead of rotating the feeding drum. This will happen 9 times out of 10, but every once in a while it will work. I don't have a multimeter, but I figured maybe the ac adapter wasn't giving it enough power (maybe less than 3v?), so I set it to the next step up which is 4.5v. When it is set at 4.5v, it works fine everytime; it also turns the feeding drum a little faster. I'm not sure if this is ok for the feeder long term, but it seems to work ok for now. Since it is opperating on a higher voltage, I don't want to leave the feeder itself powered all the time, so I've modified the code yet again to come on 5 seconds before the relay is activated so it has time to initialize, then stay on for 15 seconds after activating the relay giving the feeder time to fully rotate (I may have to modify the timing). Again, I'm going to try it tonight if you guys think the code is ok. THANKS AGAIN!!!!

Code: Select all

static unsigned long feeding = 0;

if ((now()%SECS_PER_DAY==28800) || (now()%SECS_PER_DAY==50400) || (now()%SECS_PER_DAY==72000)) //if it is 8am or 2pm or 8 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>=55) && (now()-feeding<=76)) //if between 55 and 76 seconds has past
  {
    ReefAngel.Relay.On(Port1);  //TURN FEEDER POWER ON
  }
  else
  {
    ReefAngel.Relay.Off(Port1);  //TURN FEEDER POWER OFF
  }

  if ((now()-feeding>=60) && (now()-feeding<=61)) //if between 60 and 61 seconds has past
  {
    ReefAngel.Relay.On(Port8); //TURN FEEDER RELAY ON
  }
  else 
  {
    ReefAngel.Relay.Off(Port8); //TURN FEEDER RELAY OFF
  }
} else {
  if ( feeding > 0 ) {
    feeding = 0;
  }
}
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Yet Another Auto Feeder

Post by lnevo »

It does sound like your not getting enough power. If it turns off when hitting the feed button manually... odd. Do you have another adapter you could try?
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Yet Another Auto Feeder

Post by rimai »

Sounds like the power supply doesn't have enough juice.
Roberto.
dlplunkett44
Posts: 74
Joined: Mon Aug 05, 2013 3:16 am

Re: Yet Another Auto Feeder

Post by dlplunkett44 »

Yeah, thats what I was thinking. I don't have another power supply. It says it outputs 1 amp at 3/4.5/5/6/9/12v. It works fine at 4.5 volts. I just wonder if its not really 3 volts. Maybe 2.5? The feeder specifically says don't use rechargable batteries. I wonder if this is because they are 1.2 volts instead of 1.5. That would be 2.4 instead of 3. Maybe this is the problem. That would also mean that just because I have it set at 4.5v, it may not be quite that high. Without a multimeter I don't know. I think I may pick one up on the way home. Does this look like a good one? http://www.radioshack.com/product/index ... =CT2032235
Or should I get:
http://www.radioshack.com/product/index ... =CT2032235
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Yet Another Auto Feeder

Post by rimai »

I like #2 myself.
What I think is happening is this....
The motor requires a lot of energy to start spinning. It's the nature of any electric motor. They required an in-rush current as much as 40 times greater than the operating current (when the motor is spinning).
Battery are able to discharge a lot of current for a short period of time without changing the voltage too much, so it is able to keep the mcu inside the feeder from browning out.
Unregulated power supplies, like the one you are using, can't do that too well. So, I think when the motor starts to spin, it draws too much current that the voltage of the power supply drops below the brown out voltage of the mcu in the feeder and it causes it to reset, which disengages the motor, which leads to voltage brought back to normal and the feeder comes back alive. Just a microsecond in the brownout voltage is enough to cause this.
The best solution is for you to get a regulated power supply.
Roberto.
dlplunkett44
Posts: 74
Joined: Mon Aug 05, 2013 3:16 am

Re: Yet Another Auto Feeder

Post by dlplunkett44 »

I think I will pick up the multimeter on the way home tonight. Do you think it will be ok to operate the feeder on 4.5v if I can't find a regulated 3v power supply?
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Yet Another Auto Feeder

Post by lnevo »

Here, grab one of these when your getting that multimeter :)

http://www.radioshack.com/product/index ... Id=3802149
Piper
Posts: 296
Joined: Fri Jul 20, 2012 7:13 am
Location: Oakley, CA

Re: Yet Another Auto Feeder

Post by Piper »

I used 5v cell phone wall wart to power a LM317T adjustable voltage regulator on my feeder and it's working great so far. There are a couple of links in the original auto feeder thread that talk, albeit briefly, about the adjustable regulator.

[EDIT]Just realized that the adapter below in unregulated. The one Lee posted above would be the better choice.[/EDIT]

Jameco.com has adapters though: http://www.jameco.com/webapp/wcs/stores ... _123158_-1

~Charlie
dlplunkett44
Posts: 74
Joined: Mon Aug 05, 2013 3:16 am

Re: Yet Another Auto Feeder

Post by dlplunkett44 »

Well I thought I would update everyone. First of all, thanks for all your help. I got the multimeter and did some tests. The original unregulated ac adapter at 3v was putting out ~3.050v, however when feeding was started, it briefly went to 0v and back up. Just like rimai said, it is requiring more current than is available and the volts are dropping causing it to reset. I was hoping I could just use the 4.5v setting. It was ~4.6 volts and would drop to ~4.2v when feeding was started, however it soon started to drop to 0v causing the feeder to reset. Because of this and not wanting to run it at 50% more voltage all the time, I got the 700mA 3v regulated power supply. It is putting out ~3.060 volts, and when running the feeder it drops to ~2.950, which is fine.
Again, thanks so much for everyone's help!
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Yet Another Auto Feeder

Post by Sacohen »

dlplunkett44 wrote:Well I thought I would update everyone. First of all, thanks for all your help. I got the multimeter and did some tests. The original unregulated ac adapter at 3v was putting out ~3.050v, however when feeding was started, it briefly went to 0v and back up. Just like rimai said, it is requiring more current than is available and the volts are dropping causing it to reset. I was hoping I could just use the 4.5v setting. It was ~4.6 volts and would drop to ~4.2v when feeding was started, however it soon started to drop to 0v causing the feeder to reset. Because of this and not wanting to run it at 50% more voltage all the time, I got the 700mA 3v regulated power supply. It is putting out ~3.060 volts, and when running the feeder it drops to ~2.950, which is fine.
Again, thanks so much for everyone's help!
How did you connect the power supply to the feeder?
I got the same 700mA 3v regulated power supply from Radio Shack and connected it to the battery terminals. positive to positive (or the red wire) and negative to the black wire.
I'm getting no power at all.
Any suggestions would help.
Piper
Posts: 296
Joined: Fri Jul 20, 2012 7:13 am
Location: Oakley, CA

Re: Yet Another Auto Feeder

Post by Piper »

Did you put a meter on your adapter to make sure you have the correct polarity and you're actually getting 3v out of it? From what I remember it was a pretty straight forward connection when I hooked mine up.

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

Re: Yet Another Auto Feeder

Post by Sacohen »

Yes it is 3.00v exactly.
I'm going to double check the polarity when I have a little more time.
I may of had it wrong because when it was connected and I put batteries in it didn't even work.
When I removed the adapter the batteries will power it, so worse come to worse I can at least use it with batteries and have the RA trigger it.

I don't have the time to re-solder it right now.

Thanks Piper
Smotz
Posts: 412
Joined: Sat Mar 30, 2013 5:02 pm
Location: CT, USA

Re: Yet Another Auto Feeder

Post by Smotz »

dlplunkett44 wrote:So I finished modifying my Eheim auto feeder last night both for relay trigger and ac adapter. It runs fine when there are batteries, but when I have the ac adapter plugged in and set to 3v, whenever the "feed now" button is pressed, or the relay triggered (which does the same thing), it quickly turns off and on the feeder instead of rotating the feeding drum. This will happen 9 times out of 10, but every once in a while it will work. I don't have a multimeter, but I figured maybe the ac adapter wasn't giving it enough power (maybe less than 3v?), so I set it to the next step up which is 4.5v. When it is set at 4.5v, it works fine everytime; it also turns the feeding drum a little faster. I'm not sure if this is ok for the feeder long term, but it seems to work ok for now. Since it is opperating on a higher voltage, I don't want to leave the feeder itself powered all the time, so I've modified the code yet again to come on 5 seconds before the relay is activated so it has time to initialize, then stay on for 15 seconds after activating the relay giving the feeder time to fully rotate (I may have to modify the timing). Again, I'm going to try it tonight if you guys think the code is ok. THANKS AGAIN!!!!

Code: Select all

static unsigned long feeding = 0;

if ((now()%SECS_PER_DAY==28800) || (now()%SECS_PER_DAY==50400) || (now()%SECS_PER_DAY==72000)) //if it is 8am or 2pm or 8 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>=55) && (now()-feeding<=76)) //if between 55 and 76 seconds has past
  {
    ReefAngel.Relay.On(Port1);  //TURN FEEDER POWER ON
  }
  else
  {
    ReefAngel.Relay.Off(Port1);  //TURN FEEDER POWER OFF
  }

  if ((now()-feeding>=60) && (now()-feeding<=61)) //if between 60 and 61 seconds has past
  {
    ReefAngel.Relay.On(Port8); //TURN FEEDER RELAY ON
  }
  else 
  {
    ReefAngel.Relay.Off(Port8); //TURN FEEDER RELAY OFF
  }
} else {
  if ( feeding > 0 ) {
    feeding = 0;
  }
}

This is how I did mine - seems easier..

Code: Select all

// if the hour is 7a and minute is 30 and seconds is 0 start the feeding mode
    if ( ((hour() == 7)) && (minute() == 30) &&(second() == 0) ) ReefAngel.FeedingModeStart(); 
  
    if (ReefAngel.DisplayedMenu==FEEDING_MODE)
    {
    if ( ((hour() == 7)) && (minute() == 31) &&(second() == 0) ) ReefAngel.Relay.On(Feeder); //TURN FEEDER RELAY ON at 7:31:00
    if ( ((hour() == 7)) && (minute() == 31) &&(second() == 2) ) ReefAngel.Relay.Off(Feeder); //TURN FEEDER RELAY OFF at 7:31:02
    if ( ((hour() == 7)) && (minute() == 32) &&(second() == 0) ) ReefAngel.Relay.On(Feeder); //TURN FEEDER RELAY ON at 7:32:00
    if ( ((hour() == 7)) && (minute() == 32) &&(second() == 2) ) ReefAngel.Relay.Off(Feeder); //TURN FEEDER RELAY OFF at 7:32:02
    }
// end feeding mode
Post Reply