My Neptune Apex web interface compatible DIY reef controller

Doughboy, I'm sorry to be such a pest but I'd really like to get this thing working and nothing I do makes any sense to me, it just isn't working for me like it should be...

with your home sensor in your feeder, when it is in the home position, is the micro switch open or closed ?

mine is open in home position but I can change it to closed and it still doesn't make a difference....

pin 49 is live most of the time, pin A10 is also live...live meaning both channels are outputting 5vdc...

I assume that pin 49 should not be powered unless the feed mode has been selected, and then the home sensor is to tell pin 49 to turn off once the home position has been reset

I can reboot the Arduino and it will start up with the feeder running non-stop, home sensor position makes no difference, when I select the feedA button, the feeder will continue to run for 5~6 more seconds then stop, the home sensor still makes no difference, I can then disconnect the sensor pin wire and it will start the feeder running again non-stop

is it possible that this Arduino could have an issue with pin 49 and everything else seem to work just fine ? I'm running outta ideas LOL
 
Did you wire the pnp transistor circuit on pin 49 exactly as shown in the diagram? The most important part is the diode. Does the transistor show any kind of damage? Like bulging, burnt smell?

The way the circuit works is at tri-state or high on pin 49, output is 0v, and 5v if pin49 is low.

Check and compare the code again in interruptsio.ino with the latest to make sure at least the feeder code is the same.
 
Home position is open, hence the reading on pin a10 is high at home position. The internal pull-up will make the reading 5v. When not in home position, it is shorted to ground.
 
Did you wire the pnp transistor circuit on pin 49 exactly as shown in the diagram? The most important part is the diode. Does the transistor show any kind of damage? Like bulging, burnt smell?

The way the circuit works is at tri-state or high on pin 49, output is 0v, and 5v if pin49 is low.

Check and compare the code again in interruptsio.ino with the latest to make sure at least the feeder code is the same.

that is most likely where I'm going wrong, I'm still using the same circuit that I did with the Jarduino, it consists of a BC549 transistor, IN4001 diode, 1k ohm resistor...the fan control circuit he used for basically everything

looks like I'll be building another circuit :) what are the specific components in your circuit ? I have the resistors and I have the IN4001 diode, will the BC549 transistor work with your circuit ?

and I switched out the Arduino with a brand new Sainsmart mega board, same issue with the feeder LOL
 
that is most likely where I'm going wrong, I'm still using the same circuit that I did with the Jarduino, it consists of a BC549 transistor, IN4001 diode, 1k ohm resistor...the fan control circuit he used for basically everything

looks like I'll be building another circuit :) what are the specific components in your circuit ? I have the resistors and I have the IN4001 diode, will the BC549 transistor work with your circuit ?

and I switched out the Arduino with a brand new Sainsmart mega board, same issue with the feeder LOL

I don't know what the jarduino circuit is, but bc549 being an npn transistor, I don't see how it is possible this will work. You said it is for fan control, so it probably is wired for 12v.

It will help if you mentioned up front that you used your own circuit when you first posted something is not working.
 
I don't know what the jarduino circuit is, but bc549 being an npn transistor, I don't see how it is possible this will work. You said it is for fan control, so it probably is wired for 12v.

It will help if you mentioned up front that you used your own circuit when you first posted something is not working.

yea sorry bout that, I honestly didn't think about it, it was what I used in the Jarduino, I just assumed it would work here too...your design is a whole other beast :D

I just ordered the pieces needed for your circuit design, and while I was there, I went ahead and ordered the pieces for the dosing pump circuits too :)

and yep the fan circuit is designed for the 12v fans but it works with 5v as well, it basically works like a relay, power the center pin of the transistor and it allows the ground across to start the motor

in the Jarduino, the feeder channel is only powered for around 4 seconds, which allows the motor time to pass the home position of the home sensor, then the home sensor holds the connection to ground until it returns to home, thereby breaking connection again, it's a really simple design to figure out, your design is a little more complex, I understand the idea, but the mechanics of it has had me dumbfounded LOL
 
redtop,

I just compared the config.h I am using and the one on github, and in the action setting for FeedB, instead of {Feeder,30,210}, use this {Feeder,30,1}
I will update the config.h file on github later.

The feed b macro runs for 4 minutes (240 seconds).
One of the actions defined for it is for feeder to be initially off for 30 seconds (wait for water to settle), then turn on feeder. Since the outlet cycles once a second, we only need to trigger the feeder to come on using 1 second. Otherwise, the original setting will turn it on again after it comes to home position up till the 240 second expires.

I'm not sure if this is the cause of the problem you are seeing. or if even by running feed a, the feeder was not stopping. If the feeder comes on upon reboot, then the logic of your circuit is reversed. If you keep your original circuit, then you need to reverse the logic in initfeeder, feed, and feedhandler methods. (instead of set to 0 to turn on, it should be 1 to turn on). I am not familiar with the jarduino circut, but if it is a standard npn circuit, then the motor is wired to to collector and +v, then you need another 2 wires to connect the home and ground to the feeder hence will require 4 wires. Is that how your circuit is wired? using pnp circuit, only 3 wires are needed since now the motor is wired to collector and ground.
 
redtop,

I just compared the config.h I am using and the one on github, and in the action setting for FeedB, instead of {Feeder,30,210}, use this {Feeder,30,1}
I will update the config.h file on github later.

The feed b macro runs for 4 minutes (240 seconds).
One of the actions defined for it is for feeder to be initially off for 30 seconds (wait for water to settle), then turn on feeder. Since the outlet cycles once a second, we only need to trigger the feeder to come on using 1 second. Otherwise, the original setting will turn it on again after it comes to home position up till the 240 second expires.

I'm not sure if this is the cause of the problem you are seeing. or if even by running feed a, the feeder was not stopping. If the feeder comes on upon reboot, then the logic of your circuit is reversed. If you keep your original circuit, then you need to reverse the logic in initfeeder, feed, and feedhandler methods. (instead of set to 0 to turn on, it should be 1 to turn on). I am not familiar with the jarduino circut, but if it is a standard npn circuit, then the motor is wired to to collector and +v, then you need another 2 wires to connect the home and ground to the feeder hence will require 4 wires. Is that how your circuit is wired? using pnp circuit, only 3 wires are needed since now the motor is wired to collector and ground.

in the Jarduino circuit, only 2 wires are needed to trigger the feeder, ground and the trigger wire, the homing sensor takes over from there to feed its power, once it has returned to home it stops again.....if you remember how your feeder was designed from the factory, it had a feed now button on it, in the Jarduino, it is basically just electronically pushing that feed now button....I really can't explain it but it is a simple design

I'll change that in the code too and see what happens, thank you

just got confirmation that my electronic components needed for your circuit design shipped out today also, should have all that in 3 or 4 days, then maybe I can get it all sorted out :)
 
Has anyone incorporated some pwm led control for this build? I was thinking about using portuons of jarduino for this, but I dont know how I'd shoehorn it into this sketch. I guess id need to learn some html as well so I had an interface to control the led pwm.
 
Has anyone incorporated some pwm led control for this build? I was thinking about using portuons of jarduino for this, but I dont know how I'd shoehorn it into this sketch. I guess id need to learn some html as well so I had an interface to control the led pwm.

If you are going to do it, first, the pwm led control function must be stand alone. or at least only controls the normal pwm pins (pins available noted in the circuit diagram). Any use of time, you must change it to use the value in variable timenow.

you need an initled function to be called in setup(), and an updateled function to be called in loop().
 
D0ughb0y how is it going. Did you have time to look at the additional sensors.

not yet.
I was actually planning on working on this over this last long weekend but had to do something else.
I also need to update the neptune apex version of the html file (for apex users), since neptune decided to completely change the data structure of the status function return in the latest apex firmware.
 
d0ughb0y is it possible to have 2 controller on the web each controlling its tank with different ip port forwarded

it depends on the router.
your router must be capable of forwarding to a different port.

I know my netgear router did not support this when I first got it. It can only forward to the same port. But a firmware upgrade changed that so now the router supports forwarding to a different internal port.
 
What you mean by internal port right now i got it ported to 8000 int and 8000 ext.
I have the Linksys smart router.
 
it depends on the router.
your router must be capable of forwarding to a different port.

I know my netgear router did not support this when I first got it. It can only forward to the same port. But a firmware upgrade changed that so now the router supports forwarding to a different internal port.

Could I change webserverport to something else on one
 
yes you can change the port number by editing TinyWebserver.cpp line 74.
The newer version of TinyWebserver library allows specifying server port, but I did not bother updating since the version I am using works fine as it is.

So say if you did not change the port.
you will have one running at say 192.168.1.10 port 8000, and a second controller running at port 192.168.1.11 port 8000

then your router must support mapping to a different port.
so you configure port forwarding for port 7000 to go to 192.168.1.10:8000 then configure port 8000 to go to 192.168.1.11:8000

the router just needs to support using a different the internal and external port number.
 
yes you can change the port number by editing TinyWebserver.cpp line 74.
The newer version of TinyWebserver library allows specifying server port, but I did not bother updating since the version I am using works fine as it is.

So say if you did not change the port.
you will have one running at say 192.168.1.10 port 8000, and a second controller running at port 192.168.1.11 port 8000

then your router must support mapping to a different port.
so you configure port forwarding for port 7000 to go to 192.168.1.10:8000 then configure port 8000 to go to 192.168.1.11:8000

the router just needs to support using a different the internal and external port number.

Which is internal the 7000 or the 8000
So in my router setting I would

192.168.1.10 192.168.1.11
internal 8000 8000
external 7000 8000
and when at a different location I would use my dyn account:8000 for one and dyn account:7000 for the other
 
Back
Top