My Neptune Apex web interface compatible DIY reef controller

Please find attached my contribution. I have quickly whipped up an Android application to display a webpage.
When you first load the app it will display a white screen. Simply tap immediately below the top status bar and the URL Setup page will appear.
Enter the URL of you reef controller, including http://.
If you can't get it to work simply enter http://www.google.com and followed by clicking the Save button. If all was entered correctly the google website should appear.
To change the URL again, simply click below the status bar.
The apk is called OneWebPage but the app name is Reef Controller. I have also included a Reef Cartoon Icon.

Enjoy. https://www.dropbox.com/s/admnpfnhlze1cuo/OneWebPage.apk?dl=0
 
My Neptune Apex web interface compatible DIY reef controller

Hi, I am new in this thread. What you did is perfect, the very best DIY controller! I have a problem while compiling with 1.6.7 ide arduino software"time_t was not declared in this scope". I have set up the libraries as from GitHub in libraries in sketch folder. Did someone know what's wrong?


Gesendet von iPhone mit Tapatalk
 
Last edited:
Hi, I am new in this thread. What you did is perfect, the very best DIY controller! I have a problem while compiling with 1.6.7 ide arduino software"time_t was not declared in this scope". I have set up the libraries as from GitHub in libraries in sketch folder. Did someone know what's wrong?


Gesendet von iPhone mit Tapatalk

arduino probably did not find the library.
try arduino 1.6.5 if you are not able to get it to work on 1.6.7.
 
Got the commutation signals working. I only have the arduino on a breadboard and no driver circuit yet, so I hard coded some values to get the state machine going.

The motor signal period is 24ms, and each high pulse is 8ms.
The bottom channel is the 20khz pwm for speed control. According to the Atmel notes, it should be ANDed with the 6 motor signals. The stock controller only applies the speed pwm to the lower signals only, so I will do the same.

The motor startup runs 8 commutation steps using hard coded timing, I don't think that is even 1 revolution, then assumes there is BEMF signal by that time and hands off to BEMF controlled commutation.

The gap between the startup sequence and the BEMF controlled commutation should not be that big. The code uses timer0 to auto trigger adc reading, but since timer0 is used by arduino for millis() function, I switched it to use timer2 but left the auto trigger on timer0 which is slower. I want to avoid modifying the millis() function code to use timer2, but I may have to do that.

If I am able to get some MOSFETs, I can wire something up and test this weekend.

I'll probably capture the startup sequence timing of the stock controller and tweak the program to make the startup as similar as possible to the stock controller.

commutation2.jpg~original
 
Last edited:
I think for the final circuit, I am going to use an arduino pro mini and L6234 driver. This greatly reduces the component count. The driver is rated 4amp (2.5amp if you use through hole version), so it should work with any pump under 50 watts, including cp-40. Probably can work on pumps up to 80 watts. The object is to make it easy for anyone to diy at a fraction of the cost of buying one from fish street or icecap. This weekend, I will try to collect data on jct pump using stock controller.

FWIW, I measured the coil resistance on the jct 4000, and it is 4 ohms. Not sure how power and voltage calculations work. That explains why when I plugged in the WP pump controller, the led lights went out, because it is essentially shorting the 24v supply with 4 ohms. So it is impossible for the WP controller to work despite the claims. :)
 
Looking for ideas on how to get 5v from 24v power supply.

On the stock controller, it looks like it uses 2 transistors + 7805 to do this, but I can't find any circuit like this. I know I can get one of those switching regulators with TO-220 profile, but that costs like $4. I might end up with that if I can't find any other option. I think the stock controller use a 100ma 7805 regulator. That's still almost 2 watts of heat to dissipate if using only linear regulators.

as soon as I posted this, I saw the L6234 has circuit using emitter follower voltage regulator followed by 7805.
 
Last edited:
Looking for ideas on how to get 5v from 24v power supply.

On the stock controller, it looks like it uses 2 transistors + 7805 to do this, but I can't find any circuit like this. I know I can get one of those switching regulators with TO-220 profile, but that costs like $4. I might end up with that if I can't find any other option. I think the stock controller use a 100ma 7805 regulator. That's still almost 2 watts of heat to dissipate if using only linear regulators.

as soon as I posted this, I saw the L6234 has circuit using emitter follower voltage regulator followed by 7805.



Are you drawing all 100mA? That would be quite a lot for an AVR/Arduino.

The no load dissipation of a linear regulator is given by the the quiescent current.

My go to for logic supplies in this range is the MCP16311 synchronous buck (30V in, PFM mode for low current), but if your goal is all through hole that doesn't qualify.
 
ok, thanks. I might consider that.
I don't know how much load yet.
The recom 78E05-0.5 costs $2.80, I think that should be good enough.
object is for easy diy, so through hole helps.
 
right. those will work as well. that's expensive on amazon. I think same costs like $1 or $2 on ebay. I've had a couple of those go bad on me. The good thing with the cheap ebay buck converter is, they shutdown the output if anything goes wrong, so it won't damage anything else. I was afraid it might pass the input voltage directly to the output.
 
soldered wires to connect to logic analyzer

low side MOSFET inputs
53D540C9-A473-4018-9021-28125F41E25D.jpg~original


high side inputs to transistors that drives the MOSFETs.
B4064AFD-F5BC-40B9-8A5A-8E027C76F1EC.jpg~original


the commutation signals. Note the H and L labels are reversed. Only the bottom is modulated with PWM. The soft start ramp up sequence goes from 20% to 70% (the lowest setting) in about 20 seconds. I have to analyze what it is doing for the first second, where WL has signal, and VH and UH are both ON. I thought only one H and one L can be high at any instant, but it seems like it is ok for VH and UH to be both high while WL has pwm signal. The first few signals looks like it is doing the same thing as the Atmel app note, where the pulses start wide then gets narrower and narrower.

dct-commutation.jpg~original


I'll try to program the arduino to generate exactly the same signals. Some day if I get a hold of cp-40 or gyre, I can do the same.

I will collect data from the LM339 BEMF signals sometime this weekend if I get the chance.
 
Last edited:
I got the data for BEMF from the stock controller. Its essentially as described in any document you can find describing BLDC motor.

I am getting a better understanding of how these brushless motors work. I don't think I can use the L6234 motor driver, as it is not possible to control the speed via pwm.

I am able to answer my own questions:
The pump run dry shut off is done via over current control. Without load, the pump will run faster and draw more current, until it hits the current limit set in the controller.

The stalled propeller is detected if BEMF signal stops.

While researching this topic, I found out that you can get brushless motor controller modules for $10-$!2 on ebay. I got one and tested it and it works. So this is certainly an option for anyone who wants to control the DC pumps using PWM. It even has reverse direction control so this will work even for controlling Gyre.

http://www.reefcentral.com/forums/showthread.php?p=24576484#post24576484


I will probably still build my own controller board using arduino.
 
My Neptune Apex web interface compatible DIY reef controller

D0ughb0y - sounds awesome!! Which controller Board did you get?


I really need to learn to use my logic analyzer!

Sorry for being MIA on hacking apart the Jebao's. I have Been a little distracted lately... I got my 3D printer. Woo! Slowly getting it dialled in then there will be no stopping me with DIY :p
 
I got the white one, but wished I got the green one instead. As far as I can tell, they use the same motor controller chip, the green board just use power mosfets for driver to handle higher current.

I ran the white one for maybe 30 minutes, and the chip mosfets were warm to the touch, and not too hot to touch yet. So I think it can go safely to 2A with no problem. it is rated 3A. The green one I think can go up to 6A without attaching heat sink.

Logic analyzer can get better data if you want to reverse engineer how something is done. You can capture the signal from the CP-40 controller. It should be similar to what I did. Just find the points for the high/low mosfet drive signal, and the BEMF output from the LM339.

Maybe you can design and 3D print a better propeller for the CP-40 that will actually push some water when spun in reverse. The main reason I have not bought a CP-40 or gyre is because it still is essentially a one sided pump. Or half side in case of Gyre, if you attach the AA rotors.

I think for old WP style pump rotor, it will actually push water backward if spun in reverse, just need someone to manufacture a brushless motor based WP or RW pump.
 
Back
Top