Code for DC return pump
Re: Code for DC return pump
Thanks for the help. I guess eventually I will buy another one that you can control with the RA.
Re: Code for DC return pump
I haven't seen this pump but I am gathering that the controller sends 24v PWM to the DC motor to control speed why not just use an appropriately powered LED driver directly to the motor to control the speed?
Looks like a Meanwell ELN-60-27P could do it.
*EDIT
oops this is a three phase motor, needs a motor controller
Looks like a Meanwell ELN-60-27P could do it.
*EDIT
oops this is a three phase motor, needs a motor controller
Re: Code for DC return pump
Alright you could use a programmable ESC like this one http://www.hobbyking.com/hobbyking/stor ... oCXUjw_wcB
You would control the ESC like a servo from the reef angel
There are more expensive but prebuilt I2C ESC's are available the difficulty is in finding any that can handle 24v.
Or you could just build one...
http://www.atmel.com/images/doc8012.pdf
Basically everything you need to know to control one of these motors can be found from people using arduino to control hobby RC.
Note that because the motor allegedly does not have hall sensors you should look for an esc that will work with sensor-less motors...
You would control the ESC like a servo from the reef angel
There are more expensive but prebuilt I2C ESC's are available the difficulty is in finding any that can handle 24v.
Or you could just build one...
http://www.atmel.com/images/doc8012.pdf
Basically everything you need to know to control one of these motors can be found from people using arduino to control hobby RC.
Note that because the motor allegedly does not have hall sensors you should look for an esc that will work with sensor-less motors...
Re: Code for DC return pump
Can't say for sure it would work without documentation for the motor or esc but the specs are ok.
the ESC would need to be programmed so make sure that the ESC has appropriate documentation on programming.
Roberto can we get a PWM port (ato port/ports) to do PMM? or would a servo shield need to be made to handle that?
the ESC would need to be programmed so make sure that the ESC has appropriate documentation on programming.
Roberto can we get a PWM port (ato port/ports) to do PMM? or would a servo shield need to be made to handle that?
Re: Code for DC return pump
Do you mind sending a pic to me of the board? jegillis@yahoo.comIsmaclst wrote:Sent.
It needs to have an ESC in it just the same, It should have a micro controller in it and some way to tell that controller what you want it to do.
Re: Code for DC return pump
Ok, sent them to you.
Re: Code for DC return pump
Is there any writing at all on the U3 Chip on that board?
Re: Code for DC return pump
0-5PWM is available on both ATO ports or any channel on the dimming expansion module.
0-10PWM is available in the relay box dimming port.
0-10PWM is available in the relay box dimming port.
Roberto.
Re: Code for DC return pump
Nope.jegillis wrote:Is there any writing at all on the U3 Chip on that board?
Re: Code for DC return pump
Since it doesn't sound like this is possible, what would I put into my code to shut the return off if it gets too high? I would use the water level sensor to decide what the max height is and if it gets that high it will shut off port 1. I'm using a gate valve on the drain to create a full siphon so I want the water level sensor to act like a failsafe.
Re: Code for DC return pump
Try something like this:
Code: Select all
if (ReefAngel.WaterLevel.GetLevel(1)>50)
ReefAngel.Relay.Off(Port1);
else
ReefAngel.Relay.On(Port1);
Roberto.
Re: Code for DC return pump
Thanks, Roberto.
Re: Code for DC return pump
Ismaclst wrote:Since it doesn't sound like this is possible, what would I put into my code to shut the return off if it gets too high? I would use the water level sensor to decide what the max height is and if it gets that high it will shut off port 1. I'm using a gate valve on the drain to create a full siphon so I want the water level sensor to act like a failsafe.
Don't give up so easily....I have been getting a little confused with the PPM (Pulse Position Modulation (servo.write) and PWM.
You should be able to use the ESC you posted (Look for RC Airplane ESC as they are all sensorless) with a 0-5v PWM from the reef angel. Programing will need to be done but it is possible. (The controller has to learn the range of the reef angel PWM signal)
Re: Code for DC return pump
How sure are you that this will work? I'm only asking because I don't want to throw anymore money at something that might work. What kind of programming is involved for the RA?
Re: Code for DC return pump
without having done it myself I cannot say for sure it will work, in principle it will. If you don't want to throw more money at it hold off and I will get myself one of these pumps soon and try it out.Ismaclst wrote:How sure are you that this will work? I'm only asking because I don't want to throw anymore money at something that might work. What kind of programming is involved for the RA?
The programming for the RA is to make a calibration program for the PWM output corresponding to the ESC... For example the ESC may want 100%, 0%, and 50% to learn the range...
ESC programming may entail setting voltage, locking out reverse, and locking out brake, and/or shutting off the battery eliminating circuit (BEC) depending on the ESC.
The ESC is designed for the same type of motor the only other quirk of using an airplane ESC would be that on startup of the ESC the PWM signal must be at 0 to "arm" the esc (this is a safety feature on planes so you don't chop off a finger).
And it will only work with 0-5v PWM, 0-10v PWM or analog will not work.
Re: Code for DC return pump
Has anyone seen a DCT4000 from a US seller? I can only seem to find it in the UK at a cost of $160 bucks. The DCT6000 is on amazon for 100.
Re: Code for DC return pump
I appreciate you looking into this. They have them for 65 plus shipping, but I think they either come from China or the UK.
http://www.fish-street.com/jebaojecod_d ... eturn_pump
http://www.fish-street.com/jebaojecod_d ... eturn_pump
Re: Code for DC return pump
I will just get the 6000 from amazon, easy return if it doesn't work out and no duties or brokerage charges. Last time I got a $25 car part from the UK UPS charged me $130 in brokerage charges for the inconvenience of prepaying $2.50 in duty charges. I will order the stuff this week and see how it goes.
Re: Code for DC return pump
Any updates?jegillis wrote:I will just get the 6000 from amazon, easy return if it doesn't work out and no duties or brokerage charges. Last time I got a $25 car part from the UK UPS charged me $130 in brokerage charges for the inconvenience of prepaying $2.50 in duty charges. I will order the stuff this week and see how it goes.
Re: Code for DC return pump
Not on the DCT, but my DC6000 works perfect with the code that was in this thread.
An interesting note, when I used the DC6000 controller, 4 light out of 6 was getting my overflow to 98%. I thought it will be equal to 66% in the reef angle code. After playing a bit 77% gets me to 67% in the overflow. I am fine with it, since the waterfall sound is not very bad. I learned that you need to play with the control to find the best for each case.
http://forum.reefangel.com/status/banne ... nWolf&t=-8
An interesting note, when I used the DC6000 controller, 4 light out of 6 was getting my overflow to 98%. I thought it will be equal to 66% in the reef angle code. After playing a bit 77% gets me to 67% in the overflow. I am fine with it, since the waterfall sound is not very bad. I learned that you need to play with the control to find the best for each case.
http://forum.reefangel.com/status/banne ... nWolf&t=-8
Thanks
Onur
Onur
Re: Code for DC return pump
Sorry been busy the last few days with girl scout camping...I have the DCT pump waiting on a speed controller the cheap one I got was junk. Should have the new one on Monday.Ismaclst wrote:Any updates?jegillis wrote:I will just get the 6000 from amazon, easy return if it doesn't work out and no duties or brokerage charges. Last time I got a $25 car part from the UK UPS charged me $130 in brokerage charges for the inconvenience of prepaying $2.50 in duty charges. I will order the stuff this week and see how it goes.
Re: Code for DC return pump
Got the new speed controller today, worked on figuring out how to use servo.write all day hopefully all will work out tomorrow
here is the code I am going to try out it compiled if anyone who knows better sees a problem with this let me know
First you need the servo libraries added to the ReefAngel libraries
This gives our servo a name (placed after the last #include)
placed this in setup to attach return pump to the low ato pin
Placed this in loop
here is the code I am going to try out it compiled if anyone who knows better sees a problem with this let me know
First you need the servo libraries added to the ReefAngel libraries
Code: Select all
#include <Servo.h>
Code: Select all
Servo returnpump; // return pump control
Code: Select all
returnpump.attach(lowATOPin); //Attaches return pump to low ato
Code: Select all
pinMode(lowATOPin,OUTPUT);
returnpump.write(90); //value between 90 and 180
Re: Code for DC return pump
So the code works to output the correct signal from the low ato port
Running into another problem in that I need to run through my loop as close as possible to every 20ms for this to work which is not happening.
otherwise all I get is random jitters from the motor
code examples I have found have sketches that control only the motor and add a 20ms delay in the loop. Is their a way to determine how long it takes to run through the loop?
Any other ideas?
Running into another problem in that I need to run through my loop as close as possible to every 20ms for this to work which is not happening.
otherwise all I get is random jitters from the motor
code examples I have found have sketches that control only the motor and add a 20ms delay in the loop. Is their a way to determine how long it takes to run through the loop?
Any other ideas?
Re: Code for DC return pump
What does the servo class do?
Isn't is just a simple PWM signal?
Isn't is just a simple PWM signal?
Roberto.
Re: Code for DC return pump
rimai wrote:What does the servo class do?
Isn't is just a simple PWM signal?
It is a PWM signal that is sent at a 50hz instead of 490hz of a standard PWM signal
I'm using the code servo.writeMicroseconds with a value of between 1000 and 2000 now instead of just .write (value in degrees) as its easier to understand the changes.. Basically the microsecond value is the length of time on high pulse and the low pulse needs to be about 20ms consistently which is where I am getting confused as I was under the impression that the low pulse length was determined by the frequency
Looking at the Servo.h comments it looks like I can use refresh() throughout the loop to ensure that the signal is refreshed every 20ms so I may have answered my own question.
I also just found a servo library someone wrote specifically to control these esc's so I may give that a try if this doesn't work.
Re: Code for DC return pump
Ok, so I found a design flaw in the DCT pumps. It doesn't retain the speed you had when you lose power to the pump. When it starts back up it is on max speed. This is a problem for me because I restrict my drain so I can create a full siphon. Thankfully, I used the code Roberto gave me to shut off my pump when my overflow reaches a certain height. But this just creates a cycle of off and on on my pump since it is running at max speed. Has anybody heard if Jebao fixed this in a new controller? I don't want to have this happen when I'm away for an extended period of time.
Re: Code for DC return pump
Thats horrible. That would be a deal breaker for most people.
Re: Code for DC return pump
I know. I wish I had researched these before I bought mine.