View Single Post
Unread 10/30/2013, 01:29 PM   #104
d0ughb0y
Registered Member
 
d0ughb0y's Avatar
 
Join Date: Mar 2008
Location: sf bay area
Posts: 5,165
I've got the basic code for all 7 modes of the Jebao controller working.
H1 - 100% constant
H2 - 75% constant
H3 - 50% constant
W1 - pulse
W2 - 6 steps up 6 steps down
W3 - 6 steps up 8 steps down
ELSE - random value between 50%-100%

In my previous comment, I mentioned I measured voltage higher than 50% and 75% for H3 and H2. I see now that the PWM duty cycle is 50% and 75%, but the measured RMS voltage will be a little higher than 50% and 75%, which now makes sense.

I was looking at the waveform on my oscilloscope for the 7 modes, and noticed something interesting with W3 mode. The way it works looks interesting.
So on the first part, the speed of the pump will ramp up fast, to push water hard. Then it fades slowly back down to 50%. I think this is the equivalent of Lagoon mode in Ecotech pump. And ELSE is the equivalent of Reef Crest.

I see a lot of potential in the ability to define your own waveform mode. the design is you define each mode by setting the level value for 16 steps. And the program will use those values to control the pump speed on each time period.

for example, if you define 1 time period as 1 second, and you define your 16 step pattern as (this is W1 mode)
255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0
Then the pump will be at 100% for 0.5 seconds, and then off for 0.5 seconds, then repeat the cycle. If say you want the pulse to be at 25% duty cycle, then just use 255 for the first 4 steps, then 0 for the rest.
And also, it does not have to be an array of 16 fixed values. For ELSE, it returns the value of random(128,255). You can write your own waveform function.

I will be testing the program to control the pump this weekend.

other waveform suggestions welcome.


d0ughb0y is offline   Reply With Quote