ReefRhythm - Advance Stepper Motor Controller with OpenSource

zerokewl

Community Member
View Badges
Joined
Feb 21, 2023
Messages
29
Reaction score
3
Location
Mississippi
Rating - 0%
0   0   0
So my hydros controller has a 0-10v output with 4 separate channels and each channel can have up to 10 separate steps 1v or 2v or 3v etc etc

Does that mean I can use the analog feature and run 7 pumps off each channel?

And if I understand the analog feature correctly I would set the ml/min I wanted via the software but my hydros controller would control the dosing time
Example I set the pump via software to 5ml/min but the hydros controller would be able to dose 10ml if it told the pump to run for 2 minutes ?
 
OP
OP
yury88

yury88

Active Member
View Badges
Joined
Oct 21, 2023
Messages
194
Reaction score
136
Location
indo-pacific
Rating - 0%
0   0   0
So my hydros controller has a 0-10v output with 4 separate channels and each channel can have up to 10 separate steps 1v or 2v or 3v etc etc

Does that mean I can use the analog feature and run 7 pumps off each channel?

And if I understand the analog feature correctly I would set the ml/min I wanted via the software but my hydros controller would control the dosing time
Example I set the pump via software to 5ml/min but the hydros controller would be able to dose 10ml if it told the pump to run for 2 minutes ?
Hm, didn't get how 4 separate channels will control 7 pumps.

Lets make it clear.
From your words Hydros has four 0-10V output with 10 steps. I think its like 0V, 1V, 2V... 10V
Lest name it ADC1, ADC2, ADC3, ADC4

Now, ReefRhythm has 8 analog inputs that you can program via UI. Note that you can use one analog input for many pumps if you want to run it in parallel.
And programming is very flexible.

If you want to control pump by time -yes you can make this setting.

For example you can make settings for pin 5 on ESP32:
1)50% signal = 0ml/min
2)50.1% signal = 5ml/min


Now you can connect ADC1 to pin 5(use voltage divider 10V->3.3V!) and switch first Hydros channel to 6V(everything over 51% ~ 5.1V will work) for 2 minutes to run pump for 2 minutes with 5ml/min rate.
----------------------------------------------------------------------------------------------------------------------------

This is good and stable way to control this pump, but you can do more flexible settings:
1)45% signal = 0ml/min
2)45.1% signal = 5ml/min
3)65.1% signal = 5ml/min

4)75% = 5 ml/min

5)75.1% = 10ml/min
6)100% = 10ml/min

Now you can control pump by time from Hydros with 5ml/min rate if channel =5V and 10ml/min if channel = 8-10V
Screenshot 2024-05-02 135816.png
 
OP
OP
yury88

yury88

Active Member
View Badges
Joined
Oct 21, 2023
Messages
194
Reaction score
136
Location
indo-pacific
Rating - 0%
0   0   0
Release 0.8.3 - User extension(Add-on) and Limits support.
Now you can program login in UI when to disable(or enable) dosing.
And doser now support user UI and back-end extensions.

Example of project with extension I will show later. Its give the way how build more complex project utilize ready to go doser functionality.
For example its can be easily become KH automatic tester or you can add some missed logic for integration with other project.

More examples and FAQ I will publish on weekend
Screenshot 2024-05-02 151645.png Screenshot 2024-05-02 152830.png
 
OP
OP
yury88

yury88

Active Member
View Badges
Joined
Oct 21, 2023
Messages
194
Reaction score
136
Location
indo-pacific
Rating - 0%
0   0   0
Example of utilizing the "Extension" feature:

In that case, I added a PH controller in the web UI and PH sensor polling in the back-end.

So I will use PH sensor values from the PH extension to disable (utilizing the "Limits" feature) limewater dosing if PH will rise too high.

And because my small project for Kalk Stirrer is based on the "ReefRhythm" project, it will automatically get all the latest features and functionality.

And github firmware builds for the OTA upgrade are working out of the box.
 
OP
OP
yury88

yury88

Active Member
View Badges
Joined
Oct 21, 2023
Messages
194
Reaction score
136
Location
indo-pacific
Rating - 0%
0   0   0
Release v0.9 Develop.

This is not "master", if there is a desire to test - for OTA update you need manually put the link on OTA page.

New UI features:
- Names for pumps
- Support for light/dark theme
- Support for custom themes

Screenshot 2024-05-06 221617.png
Screenshot 2024-05-06 221608.png


Screenshot 2024-05-06 221558.png
Screenshot 2024-05-06 221549.png



New Doser feature:
- Pump Stop button
- Pump inversion
- Reagent flow tracker
- Publish all past doses on MQTT broker
- Programmable logic for the doser

Screenshot 2024-05-06 221722.png Screenshot 2024-05-06 221706.png

Screenshot 2024-05-07 012356.png
 
OP
OP
yury88

yury88

Active Member
View Badges
Joined
Oct 21, 2023
Messages
194
Reaction score
136
Location
indo-pacific
Rating - 0%
0   0   0
Announcement for v1.0:
1) Weekday choice in schedule
2) Helpers with autocalculation reagent usage by schedule
3)Button for pump maintenance(stop doing anything)
4)Changing filesystem for wear leveling support.
5)AP mode
6)External clock support for offline mode

And here it is. Mostly, that's it. Full-function dosing pumps:)
 

Paulo Hanashiro

Community Member
View Badges
Joined
Jun 4, 2013
Messages
51
Reaction score
25
Location
Sydney/Australia
Rating - 0%
0   0   0
Hey @yury88, need your help with the dosing build process.

I got the ESP flashed, connected the serial wires + power across both boards. But the stepper isn't moving.

Did some basic troubleshooting and everything looks good:
  • ESP-TX --> Stepper-RX, ESP-RX --> Stepper-TX
  • Ground is common across ESP and Stepper
  • Stepper has power and I can run the calibration successfully.
I'm playing around with the stepper interface, just to confirm if I'm missing anything but I'm quite lost.
For example:
  • tried to just connect and run the code
  • Tried the "Restore" option in the stepper interface (2nd last option)
  • Updated stepper UART baud to 38400 as I saw this value in the code:
Python:
    uart = UART(1)
    uart.init(baudrate=38400, rx=rx_pin, tx=tx_pin, timeout=100)
    wifi = network.WLAN(network.STA_IF)

Do I need any special configuration in the stepper? Also, the ESP Serial over USB just gives me the boot process, if I command anything using the Web-UI I will only show squares in the serial (I'm assuming baud is correct at 115200).

Am I missing anything here? Can you help me in getting this working?

Thanks and regards.
 

Paulo Hanashiro

Community Member
View Badges
Joined
Jun 4, 2013
Messages
51
Reaction score
25
Location
Sydney/Australia
Rating - 0%
0   0   0
nevermind. It looks like I'm not supposed to have the ESP connected to USB and trying to run the stepper at the same time.

Disconnected the USB cable and calibration process is working. :cool:
 
OP
OP
yury88

yury88

Active Member
View Badges
Joined
Oct 21, 2023
Messages
194
Reaction score
136
Location
indo-pacific
Rating - 0%
0   0   0
Oh, sorry, I was so busy with main functionality that haven't made a good manual.
I will fix this soon)

So 42C Driver settings:
1)Mode CR_UART
2)Uart 38400
3)UartAddr 0xe0(if one head pump, if many- 0xe0 for first, 0xe1 for next etc)
4)Calibration -> motor should move a little clockwise/counterclockwise.
If it's shaking- motor wires are not conneted in right order.

About usb- actually shouldn't be problem with USB+External power supply same time.
You even can intall Thronny on PC and look on logs realtime.

But after flashing you need to restart board manually one time.
And dont forgot to calibrate pump at first, I recommend to use micro weighting scale becose for 0.58 RPM(lowest speed) flow can be around 0.10-0.2ml/min. So its better to run it for 20 minutes. Than weight and divide value to get accurate calibration
 

robinm

Community Member
View Badges
Joined
Feb 21, 2021
Messages
40
Reaction score
29
Location
Louth
Rating - 0%
0   0   0
I've been playing with this and so far am impressed with what you've achieved and thank you for sharing with the community. I do have some questions though. On the schedule section it has a start time, amount and duration but also an end time which doesn't seem to be editable and also isn't updated by the start time and the duration so what is the purpose of the end time? Also the duration appears to be limited to 6000 seconds which if I'm using it to dose Kalk overnight is not enough (It seems that the dose page doesn't have the same limitation and I can specify 36000 secs or 10 hrs). Lastly the schedule has a frequency selection which defaults to 1. What does that signify?

Thanks
 
OP
OP
yury88

yury88

Active Member
View Badges
Joined
Oct 21, 2023
Messages
194
Reaction score
136
Location
indo-pacific
Rating - 0%
0   0   0
I've been playing with this and so far am impressed with what you've achieved and thank you for sharing with the community. I do have some questions though. On the schedule section it has a start time, amount and duration but also an end time which doesn't seem to be editable and also isn't updated by the start time and the duration so what is the purpose of the end time? Also the duration appears to be limited to 6000 seconds which if I'm using it to dose Kalk overnight is not enough (It seems that the dose page doesn't have the same limitation and I can specify 36000 secs or 10 hrs). Lastly the schedule has a frequency selection which defaults to 1. What does that signify?

Thanks
Hi, change the value of frequency from 1.
So when frequently dosing = 1, it's "one shot" dosing at a chosen time.

When frequency is over 1, it has multiple doses in the time range.

For example, if you want to dose every minute for an hour, you can choose a duration of 60 seconds, a frequency of 60 minutes per hour, and a time range of 1 hour.

If you want to dose 24h/7 you can choose frequency 1440(24h*60) for 12:00PM-11:59PM with duration 60sec

The settings are very flexible; you can set them as you want.

Screenshot_2024-05-08-02-27-02-50_3aea4af51f236e4932235fdada7d1643.jpg
Screenshot_2024-05-08-02-27-35-46_3aea4af51f236e4932235fdada7d1643.jpg
Screenshot_2024-05-08-02-27-48-62_3aea4af51f236e4932235fdada7d1643.jpg
 

robinm

Community Member
View Badges
Joined
Feb 21, 2021
Messages
40
Reaction score
29
Location
Louth
Rating - 0%
0   0   0
I see, so for example if I wanted to dose 1000 ml in the period from 21:00 until 07:00 I would set up 2 schedules firstly for 100ml over 3600 secs start time 21:00, end time 23:59 frequency 3 and secondly 100 ml over 3600 secs start time 00:00 end time 07:00 frequency 7. Is that right?

Thanks
 
OP
OP
yury88

yury88

Active Member
View Badges
Joined
Oct 21, 2023
Messages
194
Reaction score
136
Location
indo-pacific
Rating - 0%
0   0   0
I see, so for example if I wanted to dose 1000 ml in the period from 21:00 until 07:00 I would set up 2 schedules firstly for 100ml over 3600 secs start time 21:00, end time 23:59 frequency 3 and secondly 100 ml over 3600 secs start time 00:00 end time 07:00 frequency 7. Is that right?

Thanks
1)21:00-23:59 freq 4, duration 3600, 100ml:
21:00 100ml, 22:00 100ml, 23:00 100ml, 23:59 100ml

2)01:00-06:00 freq 6, duration 3600, 100ml
01:00 100ml ... 06:00 100ml

06:00 dose has duration 3600sec, so it will be until 7:00 as you want

Or:
21:00-23:00 freq 3
0:00-6:00 freq 7
 

BDH

New Member
View Badges
Joined
Feb 5, 2024
Messages
7
Reaction score
5
Location
57110
Rating - 0%
0   0   0
Yury88, Auto water change has been mentioned in this thread. I have been working on a very basic, budget auto water change system with peristaltic pumps, but my stumbling block is not being able to get equal flow rates from two pumps. My first attempt was using pumps very similar to yours:


and controller:


I used one controller for each pump, all same settings, same power supply, same hose length, same everything. One pump would always pump more than the other. I tried swapping power supplies, controllers, even connected both pumps to same controller. I couldn't get equal flow. Without some sort of feedback loop and PID (which is way above my level of skill) I don't see a way to make it work.

So then I tried this pump:



I ran this dual head pump with the controller listed above, same length hoses, and yet one head still out-pumps the other. I'm talking 4-6 ounces over a 24 hour period. You'd think they would be fairly equal because of the design.


Do you have any insight on how to get equal in/out flow rates using peristaltic pumps without lots of extra supervision like flow meters or level sensors?
 

theatrus

Valuable Member
View Badges
Joined
Mar 26, 2016
Messages
2,051
Reaction score
3,442
Location
Sacramento, CA area
Rating - 0%
0   0   0
Yury88, Auto water change has been mentioned in this thread. I have been working on a very basic, budget auto water change system with peristaltic pumps, but my stumbling block is not being able to get equal flow rates from two pumps. My first attempt was using pumps very similar to yours:


and controller:


I used one controller for each pump, all same settings, same power supply, same hose length, same everything. One pump would always pump more than the other. I tried swapping power supplies, controllers, even connected both pumps to same controller. I couldn't get equal flow. Without some sort of feedback loop and PID (which is way above my level of skill) I don't see a way to make it work.

So then I tried this pump:



I ran this dual head pump with the controller listed above, same length hoses, and yet one head still out-pumps the other. I'm talking 4-6 ounces over a 24 hour period. You'd think they would be fairly equal because of the design.


Do you have any insight on how to get equal in/out flow rates using peristaltic pumps without lots of extra supervision like flow meters or level sensors?

You don't really, as the tubing also plays a part here. Using different tubing (e.g. a stiffer rubber) may work.

Most pumps of this fashion require some calibration to ensure more equal flow rates.
 
OP
OP
yury88

yury88

Active Member
View Badges
Joined
Oct 21, 2023
Messages
194
Reaction score
136
Location
indo-pacific
Rating - 0%
0   0   0
Yury88, Auto water change has been mentioned in this thread. I have been working on a very basic, budget auto water change system with peristaltic pumps, but my stumbling block is not being able to get equal flow rates from two pumps. My first attempt was using pumps very similar to yours:


and controller:


I used one controller for each pump, all same settings, same power supply, same hose length, same everything. One pump would always pump more than the other. I tried swapping power supplies, controllers, even connected both pumps to same controller. I couldn't get equal flow. Without some sort of feedback loop and PID (which is way above my level of skill) I don't see a way to make it work.

So then I tried this pump:



I ran this dual head pump with the controller listed above, same length hoses, and yet one head still out-pumps the other. I'm talking 4-6 ounces over a 24 hour period. You'd think they would be fairly equal because of the design.


Do you have any insight on how to get equal in/out flow rates using peristaltic pumps without lots of extra supervision like flow meters or level sensors?
In my opinion, the idea of a pump with double tubing only fits laboratories where lines are short, etc.

About your issue, I think pumps have different performance because of the of the tubing in pumps and the different line lengths.
But everything can be calibrated. Just calibration should be performed with a real setup. And if you have 2 pumps, for refilling and draining, they can be calibrated separately and it should solve the problem or at least make it less inaccurate
 
OP
OP
yury88

yury88

Active Member
View Badges
Joined
Oct 21, 2023
Messages
194
Reaction score
136
Location
indo-pacific
Rating - 0%
0   0   0
Release v0.9 Develop.

This is not "master", if there is a desire to test - for OTA update you need manually put the link on OTA page.

New UI features:
- Names for pumps
- Support for light/dark theme
- Support for custom themes


New Doser feature:
- Pump Stop button
- Pump inversion
- Reagent flow tracker
- Publish all past doses on MQTT broker
- Programmable logic for the doser

Same features + lots of bugfix.

Release 0.9.1 Master
 

Paulo Hanashiro

Community Member
View Badges
Joined
Jun 4, 2013
Messages
51
Reaction score
25
Location
Sydney/Australia
Rating - 0%
0   0   0
hi Yury.
Unable to find the issues tracker on github so reporting it here.

Just updated to latest v0.9.1 Master and found that the calibration isn't working anymore. I reverted it back to v0.8.5-master and everything is running nice now.

cheers
 
OP
OP
yury88

yury88

Active Member
View Badges
Joined
Oct 21, 2023
Messages
194
Reaction score
136
Location
indo-pacific
Rating - 0%
0   0   0
hi Yury.
Unable to find the issues tracker on github so reporting it here.

Just updated to latest v0.9.1 Master and found that the calibration isn't working anymore. I reverted it back to v0.8.5-master and everything is running nice now.

cheers
Thank you for reporting.
I activated the issue tracker and discussions on Github.

Fixed in 0.9.2

And I strongly recommend upgrading to 0.9.x because yesterday I just bumped into ESP32 manufacturer limitations for only 10 network connections max, and this was the reason why Web became unavailable in some cases.
And I had to release 0.9 right away to fix this.

All reported issues will be fixed right away.
I'm running my tank on 0.9.x now, and trace element dosing also...
 
Last edited:

Managing real reef risks: Do you pay attention to the dangers in your tank?

  • I pay a lot of attention to reef risks.

    Votes: 115 43.4%
  • I pay a bit of attention to reef risks.

    Votes: 88 33.2%
  • I pay minimal attention to reef risks.

    Votes: 43 16.2%
  • I pay no attention to reef risks.

    Votes: 15 5.7%
  • Other.

    Votes: 4 1.5%
Back
Top