My Neptune Apex web interface compatible DIY reef controller

sorry to hear that. are you completely out of the hobby?

the only thing keeping me in are the diy projects. :)

anyway, I think I can modify the circuit, so there are 4 PWM for pump control. and either 4 dosers, or 2 doser + 2 50hz PWM (jumper selectable). But before I make the change, I need to get a hold of a maxspect gyre or jebao crossflow. I want this controller to be able to control a gyre, but I'm not quite ready to buy one yet. Maybe I'll contact Coralvue to see if I can get some technical info.
 
So since I have an Apex, an Arduino Mega, and a DCT 15000...

I can read in the Apex VDM signal and change the 0-10V to a PWM signal based on it (like LEDs).

What do I need to deliver as a PWM signal (through the third pin, other than the +24VDC and GND), to control the speed?

Frequency, voltage level, duty cycle to speed, min duty cycle...?
 
you can just use the default arduino 488z 8 bit pwm.
Min is 50%, so values between 128 and 255. You may be able to go as low as 20%, but it varies from pump to pump. I think the jecod controllers lowest setting is about 50% duty cycle.
 
D0ughb0y -

I'm getting out for a short period of time. Last summer, my house was hit by lightning while I was on vacation. I had no one able to go monitor the tank, and I just left the state when the storm hit. So when I came home, everyone was alive, but not happy. I moved everyone to a QT tank, because the controller was burned up, along with everything else (Surge was in use, but it took the most damage). So I purchased everything that needed replaced, and stuff. I was unable to ever get the systems chemistry stable after that. I was fighting everything under the sun. So I finally made the decision to take a break.

I'm also moving in three weeks to Missouri. So it was good timing. Once I get settled in, I'll look at getting another tank. Right now, a break will be nice. I still keep up on this thread (obviously), and will continue to run your controller. I will also help out, any questions that I can answer, when asked.

I've been building a ton of home automatition stuff, and integrated your controllers calls, and data, into my main hub, so I was able to control even my tank from my Raspberry Pi Central Management Console. Was really nice.
 
This is absolutely amazing. Sadly I've only been messing with an arduino for about a week and know nothing about it. Wish me luck

Sent from my SM-G935F using Tapatalk
 
This is absolutely amazing. Sadly I've only been messing with an arduino for about a week and know nothing about it. Wish me luck

Sent from my SM-G935F using Tapatalk



If you are a little handy, you should be able to build this. Everyone including me started from zero knowledge of arduino.
 
you can just use the default arduino 488z 8 bit pwm.
Min is 50%, so values between 128 and 255. You may be able to go as low as 20%, but it varies from pump to pump. I think the jecod controllers lowest setting is about 50% duty cycle.

I thought the frequency needs to sync up with the pump's design configuration to match the angular momentum with each pulse, otherwise, the pump might lack pressure or flow? I would also expect the pump to create some kickback in induced voltage (due to the coil and magnet inductance) compared to a semiconductor load like LEDs. It might not hurt the arduino with isolation, but it could punish the power supply? Doesn't that require special treatment?

The controller also seems to measure the resulting current and goes into shutdown/hiccup mode if the impeller is stuck.

This is not based on experience/measurement. It's just piecing together the requirements from stepper motors, and the little bit I remember about torque/speed of different impellers.

Has anyone just put sense lines on the controller pins and run them to an oscilloscope while the pump is running?

Capturing the startup/steady/slowdown/shutoff waveforms for the ten speed settings would be awesome. Any chance someone's working on that? :bounce3: :twitch:
 
I thought the frequency needs to sync up with the pump's design configuration to match the angular momentum with each pulse, otherwise, the pump might lack pressure or flow? I would also expect the pump to create some kickback in induced voltage (due to the coil and magnet inductance) compared to a semiconductor load like LEDs. It might not hurt the arduino with isolation, but it could punish the power supply? Doesn't that require special treatment?



The controller also seems to measure the resulting current and goes into shutdown/hiccup mode if the impeller is stuck.



This is not based on experience/measurement. It's just piecing together the requirements from stepper motors, and the little bit I remember about torque/speed of different impellers.



Has anyone just put sense lines on the controller pins and run them to an oscilloscope while the pump is running?



Capturing the startup/steady/slowdown/shutoff waveforms for the ten speed settings would be awesome. Any chance someone's working on that? :bounce3: :twitch:



Yes, I measured the jebao controller waveform using oscilloscope and logic analyzer so the waveform generated by this controller is 100% clone of the jebao controller. So it performs exactly as the original controller unlike using apex and the converter where I see comments saying it runs slower than the stock controller.

Btw, the pwm line is not affected by the motor fly back current.

I had asked in my local forum to borrow a gyre or jebao cp-40 so I can reverse engineer them but got no response. I also got no response yet from coralvue requesting for info.
 
Ok! I need to start from scratch (still need that sticky :) ), so until then, I'll have to mimic your output with my Arduino using signals from my Apex. Could you point me to the section of this thread that shows the section I should use (code, circuit, etc...) to do this?
 
I don't think you can drive it from apex signal. I know in original neptune aquacontroller, you can only change the value once per minute, and perhaps that changed to once per second in apex. The jebao time minimum is 110ms (when you turn the dial all the way counter clockwise). There are quite a lot of limitations with the Apex controller.

You can find the source in pwmpumps.ino. It has bare metal AVR code, but not that hard to follow if you read the ATmega2560 datasheet. The circuit is to just connect the arduino pwm pin directly to the pwm input of the pump.
 
One new addition to the v2 of the controller I plan to add is support for optical liquid level sensor like this one.

http://www.ebay.com/itm/331615870709

I'm just going to make the same 4 pins used for ultrasonic sensor work for the optical sensor (so you choose either ultrasonic or optical in config.h). It can be used as continuous water level sensor (like how much water is left in your top off reservoir), or as replacement to float switch for top off.

I just ordered one so I can see how well it works. If it works well, I will use that as the default and will use it as my top off reservoir water level sensor. The only issue I see is teensy analog input max is 3.3v (it can handle 5v, but anything above 3.3 will just read as 3.3).
 
I just ordered one so I can see how well it works. If it works well, I will use that as the default and will use it as my top off reservoir water level sensor. The only issue I see is teensy analog input max is 3.3v (it can handle 5v, but anything above 3.3 will just read as 3.3).



Nothing two resistors and a follower opamp won't fix :)
 
I'm only using the apex to initiate a change - no different than changing the intensity level of LEDs. The Arduino takes that signal and generates the PWM. I'm only using the Apex as a communications hub. All the fast work is done with the Mega.
 
I managed to get the controller board completely routed on eagle.
just waiting to test the circuit on the optical level sensor before I order the boards.
currently, it supports 16 outlets, 2 float ATO switches, 1 ultrasonic or optical level sensor (if it works), 6 pwm for controlling pumps, 2 of which can be converted to 12v dosing pump control, 2 dosing pumps (can be 4), one or more temp probes, one feeder, two pwm controlled fans, one serial interface to atlas sensor, and one or more I2C atlas sensors and runs wifi. it also has ACS712 current sensor input, but not sure how reliable this is. the plan is to monitor current (and derived power) usage.

My test code to MCP23017 IO expander runs I2C at 1mhz clock. I have not tested if the atlas stamps can handle 1mhz I2C, but worst case, I know it works at 400khz.

Currently, there is no support for gyre pumps, since I don't have access to one for testing. But 2 of the 6 pwm lines can be run at a different frequency, in case that is what's needed to support gyre pumps.

sorscode, does the dct pump start up by ramping up with the stock controller? I can try to do the same. Also, dct pump advertises it will shut down when run dry. Is this feature built in to the pump or the controller? I don't know if you have actually tried running the pump dry to test it.

------
go sharks
go warriors
 
Last edited:
The DCT pumps DO ramp up on start. The run dry feature is in the pump. To reset it if it runs dry you have to unplug the pump from the controller for a few seconds and then connect it back up.
 
thanks.

say if you set H1 (continuous flow) to 100%, how many seconds does it take to ramp up to 100% from time it is plugged in?

BTW, I also read that if you unplug the controller, and plug it back in, it does not remember the last setting and will run at 100%?

I think perhaps if the pump is somehow powered by 24v and pwm line is open, it will run at 100%.
I have added the appropriate pullup/pulldown so pwm line is 0 on startup to prevent running at 100%.
 
thanks.

I think 1 second per 10% is a good guess.
The lowest setting on the controller is 50 maybe 60% of max flow, so I think 5 seconds to ramp to lowest setting makes sense.

I know on WP pump controller, the lowest setting is 50% duty cycle. Although the pump does not really start spinning until at least 20% duty cycle.
 
Is it possible to detect current so if the pump has been dry (turned itself off), that you wait X minutes with no power, then turn it back up again?

This would also work in case the pump is unplugged, then replugged.
 
Back
Top