0-10V Control of Prop Pumps for Alternating Gyre

rushbattle

Valuable Member
View Badges
Joined
Oct 19, 2016
Messages
1,347
Reaction score
1,644
Location
Equality
Rating - 0%
0   0   0
Howdy All,

For many years I have been seeking the flow pattern that @Ryanbrs has described in the following link at 15:20 or so:


It is more or less one set of pumps flowing from right to left (or vice versa) at 100% of the flow you want, not necessarily max flow for the pumps, and the other side is off. Then the pumps on the opposite side start at 0% and ramp up to 100% while the other side ramps down to 0% from 100%, slowly while creating a shifting turbulent area in the tank. Then that side flows for a while, reverse that pattern and then rinse and repeat.

I bought some Octo Pulse 4 and Tunze Stream 3 with 0-10V signal inputs so I can try to implement this pattern, but I refuse to buy an Apex to achieve this (personal reasons, nothing against Neptune). Once reef-pi @Ranjib implements flow control I will definitely be using that for control of this situation, but I am looking for some temporary flow control in the interim. Any ideas for a reasonably priced DIY implementation of this flow pattern output in two 0-10V signals? @theatrus you have any input? Soldering and configuring/assembling electronics I can do, programming I cannot, at least not right now....

Any input/help from you R2R folks would be greatly appreciated!!!!
 

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Howdy All,

For many years I have been seeking the flow pattern that @Ryanbrs has described in the following link at 15:20 or so:


It is more or less one set of pumps flowing from right to left (or vice versa) at 100% of the flow you want, not necessarily max flow for the pumps, and the other side is off. Then the pumps on the opposite side start at 0% and ramp up to 100% while the other side ramps down to 0% from 100%, slowly while creating a shifting turbulent area in the tank. Then that side flows for a while, reverse that pattern and then rinse and repeat.

I bought some Octo Pulse 4 and Tunze Stream 3 with 0-10V signal inputs so I can try to implement this pattern, but I refuse to buy an Apex to achieve this (personal reasons, nothing against Neptune). Once reef-pi @Ranjib implements flow control I will definitely be using that for control of this situation, but I am looking for some temporary flow control in the interim. Any ideas for a reasonably priced DIY implementation of this flow pattern output in two 0-10V signals? @theatrus you have any input? Soldering and configuring/assembling electronics I can do, programming I cannot, at least not right now....

Any input/help from you R2R folks would be greatly appreciated!!!!

You should try modelling the pumps as lights instead and try out this. You dont need anything new in reef-pi to test it out at least. Do you know what is the frequency of alternate flow? Here is an example of generating 10V PWM for two pump in alternate direction after every two hours. This is a good starting point, i think:
Screen Shot 2018-11-25 at 7.01.05 PM.png
 
OP
OP
R

rushbattle

Valuable Member
View Badges
Joined
Oct 19, 2016
Messages
1,347
Reaction score
1,644
Location
Equality
Rating - 0%
0   0   0
You should try modelling the pumps as lights instead and try out this. You dont need anything new in reef-pi to test it out at least. Do you know what is the frequency of alternate flow? Here is an example of generating 10V PWM for two pump in alternate direction after every two hours. This is a good starting point, i think:
Screen Shot 2018-11-25 at 7.01.05 PM.png

The time constant is something like 1 hour. 15 minutes right full, left off - 15 minutes ramp down on right and up on left - 15 minutes left full - 15 minutes ramp left down and right up. If reef-pi can do this, I will order parts for the build ASAP!
 

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
The time constant is something like 1 hour. 15 minutes right full, left off - 15 minutes ramp down on right and up on left - 15 minutes left full - 15 minutes ramp left down and right up. If reef-pi can do this, I will order parts for the build ASAP!
reef-pi's UI only have two hours interval currently. reef-pi does provide API using which you can pretty much do anything, but that will also require you to run a small python or javascript based program to do your wave making calculation and call reef-pi to apply those PWM values. I can definitely give you example, but just to reiterate this is not present in UI right now.
We have wave maker as planned feature in next major release, so expect this to be available sometime early next year.
 
OP
OP
R

rushbattle

Valuable Member
View Badges
Joined
Oct 19, 2016
Messages
1,347
Reaction score
1,644
Location
Equality
Rating - 0%
0   0   0
reef-pi's UI only have two hours interval currently. reef-pi does provide API using which you can pretty much do anything, but that will also require you to run a small python or javascript based program to do your wave making calculation and call reef-pi to apply those PWM values. I can definitely give you example, but just to reiterate this is not present in UI right now.
We have wave maker as planned feature in next major release, so expect this to be available sometime early next year.
I cannot like this post enough! There needs to be a multi-like option, so I can like it more times than one. I am so excited for the wave maker module, this is what the world needs!

The python or javascript are where I get lost quickly. Comfortable getting reef-pi running and configuring the hardware, but I am a lost child in a scary and dangerous forest when it comes to coding. I've never even attempted to do anything like that.

I will order the parts to give the earlier example lighting module control a try in the tank, just to get started. Does the Lighting Adafruit guide contain all the guidance I need to get two 0-10V outputs to control the pumps? Does anyone know if I need to rectify the outputs to get a DC signal for the RO Octo Pulse and Tunze Stream 3 inputs?
 

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
I cannot like this post enough! There needs to be a multi-like option, so I can like it more times than one. I am so excited for the wave maker module, this is what the world needs!

The python or javascript are where I get lost quickly. Comfortable getting reef-pi running and configuring the hardware, but I am a lost child in a scary and dangerous forest when it comes to coding. I've never even attempted to do anything like that.

I will order the parts to give the earlier example lighting module control a try in the tank, just to get started. Does the Lighting Adafruit guide contain all the guidance I need to get two 0-10V outputs to control the pumps? Does anyone know if I need to rectify the outputs to get a DC signal for the RO Octo Pulse and Tunze Stream 3 inputs?
Yes. You should first test out if 10V PWM generated by reef-pi can control the pumps. If thats working, rest is easy. You dont need all the things from kessil controller , particularly things related to the moonlight (power mosfet etc) or housing. Just get the barebone kessil control logic, this is a rough parts list:
- Pi 3 or pi zero
- 12V 1A power supply
- bread board for prototyping
- 1 2n222A or 2n3904 transistor
- two lm2596 modules (to generate 10v and 5v from 12V)
- one 1K Ohm resistor, one 10K ohm resistor.
- Jumper wires, and connectors to pass the 10V pwm to your pumps
This should be enough to generate 1 channel 10V pwm signal, which you can use to test the pumps.. if they respond to the controls, then you can prepare for a permanent solution, while I can add the necessary features in due time and share a tiny script/code for you as a stop gap measure, i bet this will be less than 50 lines of code.
 
OP
OP
R

rushbattle

Valuable Member
View Badges
Joined
Oct 19, 2016
Messages
1,347
Reaction score
1,644
Location
Equality
Rating - 0%
0   0   0
Yes. You should first test out if 10V PWM generated by reef-pi can control the pumps. If thats working, rest is easy. You dont need all the things from kessil controller , particularly things related to the moonlight (power mosfet etc) or housing. Just get the barebone kessil control logic, this is a rough parts list:
- Pi 3 or pi zero
- 12V 1A power supply
- bread board for prototyping
- 1 2n222A or 2n3904 transistor
- two lm2596 modules (to generate 10v and 5v from 12V)
- one 1K Ohm resistor, one 10K ohm resistor.
- Jumper wires, and connectors to pass the 10V pwm to your pumps
This should be enough to generate 1 channel 10V pwm signal, which you can use to test the pumps.. if they respond to the controls, then you can prepare for a permanent solution, while I can add the necessary features in due time and share a tiny script/code for you as a stop gap measure, i bet this will be less than 50 lines of code.
All of this is ordered! I’ll do my best to get it running without much oversight, but I’m worried I’ll have a bunch of questions. Many thanks!
 

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
All of this is ordered! I’ll do my best to get it running without much oversight, but I’m worried I’ll have a bunch of questions. Many thanks!
Don’t worry about that , we have more than one people to answer your questions :)
 

crusso1993

7500 Club Member
View Badges
Joined
Oct 21, 2018
Messages
8,671
Reaction score
44,649
Location
SW, FL, USA
Rating - 0%
0   0   0
And Ranjib pulls through again!
 
OP
OP
R

rushbattle

Valuable Member
View Badges
Joined
Oct 19, 2016
Messages
1,347
Reaction score
1,644
Location
Equality
Rating - 0%
0   0   0
Don’t worry about that , we have more than one people to answer your questions :)
@Ranjib Wow, I know it has been a while. It only felt like a week at most! Since this post I have figured out how to load a raspbian lite image onto uSD. Run wireless and headless. Load reef-pi and run all updates. Build test fixture for running pumps on 10V PWM. Test. Finished that today. Here is a picture of my very advanced and clean test fixture....
testfixture.JPG


The tip of the TRS male is the signal output. The result is that the pumps do run on ~3-10V PWM, but they are wanting 0-10V DC input. The controllers flicker and act oddly via PWM. If I run them on my variable DC power supply they act as expected. I added a 100uF cap to the PWM as shown and that decreased the odd behaviors, but did not eliminate them.

So 0-10VDC it is, and I have successfully built and tested my first reef-pi build! Super excited for all of my reef-pi related work in the near future!

What do you think would suffice to get to DC from this PWM circuit? A small inductor and a high-ish value cap? Are 1/4w inductors sufficient? 15V rated caps should suffice, how large do you think I should go?

Any input appreciated!

Thanks for all of the help, and thanks everyone for your help and support!
 
OP
OP
R

rushbattle

Valuable Member
View Badges
Joined
Oct 19, 2016
Messages
1,347
Reaction score
1,644
Location
Equality
Rating - 0%
0   0   0
That is a marvel of custom engineering!!:cool:
Are you running this as a light profile?
Hey, if it works... it works :) Just a proof of concept, so it must be as goofy looking as possible :):):)

Yes, I set up the 0-10V output through the lighting module. Just using fixed mode so I can do the testing for now.
 

Skydvr

Well-Known Member
View Badges
Joined
Apr 28, 2014
Messages
575
Reaction score
279
Rating - 0%
0   0   0
Try throwing another cap (or two) in parallel with the first one.
That will increase the capacitance and the discharge time, smoothing out the PWM.

If you have the ability, increasing the pulse rate for the PWM signal will reduce the ripple (in conjunction with a capacitor).

You could use a BJT in an emitter-follower configuration to convert the PWM to an analog 0-10V signal.
There are also commercially available PWM converster for around $10. Far chaper I’m sure if you scrounge auction sites or one of the various Chinese websites hawking cheap versions (stolen designs with lower quality components/QA standards) of commercially available solutions.


There are plently of free resources out there to learn programming. Many of them are actually good too. Getting the syntax down and the basics of creating programs isn’t too difficult. Start by mimicing someone else’s code and figuring out how to manipulate it to do what you want or make it more efficient and cleaner. It really isn’t that bad once you get into it.
 
OP
OP
R

rushbattle

Valuable Member
View Badges
Joined
Oct 19, 2016
Messages
1,347
Reaction score
1,644
Location
Equality
Rating - 0%
0   0   0
Try throwing another cap (or two) in parallel with the first one.
That will increase the capacitance and the discharge time, smoothing out the PWM.

If you have the ability, increasing the pulse rate for the PWM signal will reduce the ripple (in conjunction with a capacitor).

You could use a BJT in an emitter-follower configuration to convert the PWM to an analog 0-10V signal.
There are also commercially available PWM converster for around $10. Far chaper I’m sure if you scrounge auction sites or one of the various Chinese websites hawking cheap versions (stolen designs with lower quality components/QA standards) of commercially available solutions.

There are plently of free resources out there to learn programming. Many of them are actually good too. Getting the syntax down and the basics of creating programs isn’t too difficult. Start by mimicing someone else’s code and figuring out how to manipulate it to do what you want or make it more efficient and cleaner. It really isn’t that bad once you get into it.

I tried 100uF, I might go ~1000uF next, I'll pick through my parts disaster area to see what I can find.

I am at 1000Hz now on the pi pwm pins. I guess I will get some extra PCA9685 and run them even a bit higher, maybe 2000Hz..

The BJT solution is interesting, do you have a part# in mind? Is there any resistance around the BJT or is it just a straight emitter-follower config? I am guessing it would need a bit of extra voltage to get to the full 10V from the supply?

You got me on the programming. I can commit to looking at someone else's code and trying to reverse engineer, but coding is like voodoo to me. I wasn't even any good at latin and spanish in highschool....

Thanks for the help!!!!
 

Skydvr

Well-Known Member
View Badges
Joined
Apr 28, 2014
Messages
575
Reaction score
279
Rating - 0%
0   0   0
I don’t have anything offhand, I’d have to do some research on parts first.

There should be plenty of examples online.

Does the data sheet for the driver call out anything on driving with PWM? Hopefully 2kHz will be sufficient to trick the driver into seeing it as an analog signal.

If you add one big 10mF capacitor and it takes a little bit for the driver to stabilize and behave as if it is recieving an analog signal (or has a lot of lag when responding to changes), it is because the one big capacitor is taking too long to charge up (or discharge). Sometimes a few smaller capacitors in parallel is better than one big one. I don’t know the response of your circuit or how much current that output can drive, so 10mF may be fine. Just something to be aware of if you get some odd, unexpected responses after stepping up to a larger capacitor.
 
OP
OP
R

rushbattle

Valuable Member
View Badges
Joined
Oct 19, 2016
Messages
1,347
Reaction score
1,644
Location
Equality
Rating - 0%
0   0   0
Try throwing another cap (or two) in parallel with the first one.
That will increase the capacitance and the discharge time, smoothing out the PWM.

If you have the ability, increasing the pulse rate for the PWM signal will reduce the ripple (in conjunction with a capacitor).

You could use a BJT in an emitter-follower configuration to convert the PWM to an analog 0-10V signal.
There are also commercially available PWM converster for around $10. Far chaper I’m sure if you scrounge auction sites or one of the various Chinese websites hawking cheap versions (stolen designs with lower quality components/QA standards) of commercially available solutions.


There are plently of free resources out there to learn programming. Many of them are actually good too. Getting the syntax down and the basics of creating programs isn’t too difficult. Start by mimicing someone else’s code and figuring out how to manipulate it to do what you want or make it more efficient and cleaner. It really isn’t that bad once you get into it.
I just tried 330uF cap and 10kHz pwm setting in reef-pi. There were all sorts of oscillations on the output. I think I need some resistance and inductance or a BJT.
 

Skydvr

Well-Known Member
View Badges
Joined
Apr 28, 2014
Messages
575
Reaction score
279
Rating - 0%
0   0   0
It is mostly learning how to structure the text and figuring out how to break down the problem (what the programming needs to accomplish) into smaller repeatable tasks and subroutines. The bulk of it really is learning syntax. Most programming environments are built to be simple and easy to use. Most programmers are lazy, they don’t want the programming environment to make things more difficult than they have to be.
 

Skydvr

Well-Known Member
View Badges
Joined
Apr 28, 2014
Messages
575
Reaction score
279
Rating - 0%
0   0   0
Try a couple more capacitors and maybe cut the cycle rate in half (one thing at a time so you can note the response).
 
OP
OP
R

rushbattle

Valuable Member
View Badges
Joined
Oct 19, 2016
Messages
1,347
Reaction score
1,644
Location
Equality
Rating - 0%
0   0   0
Try a couple more capacitors and maybe cut the cycle rate in half (one thing at a time so you can note the response).
Ok, I put a 4700uF cap in parallel with the 330uF. The output is pretty slow to respond, and the DC output is steady.

Now to the next curious thing, at 80% duty cycle, the output is 0.2VDC. At 90% duty cycle it is 1.4VDC and at 100% it is 7-8VDC from a 11.66VDC supply rail.
 

Making aqua concoctions: Have you ever tried the Reef Moonshiner Method?

  • I currently use the moonshiner method.

    Votes: 24 22.4%
  • I don’t currently use the moonshiner method, but I have in the past.

    Votes: 2 1.9%
  • I have not used the moonshiner method.

    Votes: 77 72.0%
  • Other.

    Votes: 4 3.7%
Back
Top