Update
Not much more has been done on the Reef-Pi, because it's pretty much where i want it for now. But the one thing I have done is to get a auto pellet feeder to work.
I was given two of these by a mate. After familiarising myself with their workings, I realised it wasn't going to be easy. When turned on, you have two options -
- Feed once every 24 hours after original turn-on time, or
- Feed Every 24 hours after turn-on AND 6 hours after that - so two feedings 6 hours apart repeating every 24 hours.
Not what I wanted. There is a Manual button, but that only works in addition to the auto mode. The feeder can't be on and only in Manual mode.
What I did discover though is that for the "once every 24 hours" mode to work, what the unit does is run a cycle immedaitely after turning on, and then every 24 hours after that. So I figured what I would do is turn the unit on, let it run it's first cycle, then turn it off. Tested manually and it achieved what I wanted.
So, I pulled the unit apart and got to work. First thing I did was get rid of the batteries. It runs on 2 x AA batteries (3V). I've decided to take a chance and run the unit on 5V from the same power supply that I use to power the Pi. So far it seems to run it fine. Time will tell if it holds up. If it does die, I have another one as spare and it will get connected to 3V.
Next was to bypass the momentary switch that turns the unit off and on. I did this by connecting the suitable terminals on the board to a spare relay I had on the reef-pi. I called this AF Switch and connected it Normally Open.
So now under normal conditions, the feeder site there getting 5V power just as if it had batteries in.
To get the unit to dispense a feed, I have a Macro that looks like this :
- Turn AF Switch ON
- Wait 2 seconds
- Turn AF Switch OFF
- Wait 10 seconds
- Turn AF Swithc ON
- Wait 2 seconds
- Turn AF Switch OFF
This has the effect of tricking the Auto Feeder into thinking the momentary switch has been pressed to turn it on, so it dumps it's first load of food. The unit then gets turned off so that it doesn't feed as per it's internal timer.
Works perfectly!!! I now have a timer that triggers this macro for my morning feed. And I can trigger the Macro manually any time I want to feed pellets.