reef-pi :: An opensource reef tank controller based on Raspberry Pi.

Aquarium Specialty - dry goods & marine livestock

robsworld78

Well-Known Member
Review score
+0 /0 /-0
View Badges
Joined
Feb 14, 2020
Messages
761
Reaction score
1,036
Review score
+0 /0 /-0
Location
Edmonton, Canada
stepper.png
Looks good! Would a person be able to use a single GPIO for step and ignore the others?
 

theatrus

Valuable Member
Review score
+0 /0 /-0
View Badges
Joined
Mar 26, 2016
Messages
1,555
Reaction score
2,862
Review score
+0 /0 /-0
Location
Sacramento, CA area
Looks good! Would a person be able to use a single GPIO for step and ignore the others?

IMO, you probably want to control STEP and the enable pin at minimum. No sense in keeping the motor energized and holding when its not in use. Rest could be hard-strapped to your choice of setup.
 

robsworld78

Well-Known Member
Review score
+0 /0 /-0
View Badges
Joined
Feb 14, 2020
Messages
761
Reaction score
1,036
Review score
+0 /0 /-0
Location
Edmonton, Canada
IMO, you probably want to control STEP and the enable pin at minimum. No sense in keeping the motor energized and holding when its not in use. Rest could be hard-strapped to your choice of setup.
I don't see one for Rest but I know of the enable pin. Would that be the same as a 3D printer when you disable driver? Once disabled you can move the motor freely. I can see that being a good thing.
 

theatrus

Valuable Member
Review score
+0 /0 /-0
View Badges
Joined
Mar 26, 2016
Messages
1,555
Reaction score
2,862
Review score
+0 /0 /-0
Location
Sacramento, CA area
I don't see one for Rest but I know of the enable pin. Would that be the same as a 3D printer when you disable driver? Once disabled you can move the motor freely. I can see that being a good thing.
Right, same idea.

The TI chips usually have a trio of slightly overlapping inputs, for example the often used DRV8825:

1642549710978.png


Setting ENBL, or putting the device in reset or sleep, would drop power consumption and allow the motor to just free wheel. If nothing else, do it for the power consumption unless of course you're doing something like a very slow continuous water change.

Using a disable function will reset the indexer (e.g., lose the microstepping position), but you can't hold a microstep position without active power, and this isn't like a precision zeroed CNC setup so the point is moot.
 
AquaCave Logo Banner

robsworld78

Well-Known Member
Review score
+0 /0 /-0
View Badges
Joined
Feb 14, 2020
Messages
761
Reaction score
1,036
Review score
+0 /0 /-0
Location
Edmonton, Canada
Right, same idea.

The TI chips usually have a trio of slightly overlapping inputs, for example the often used DRV8825:

1642549710978.png


Setting ENBL, or putting the device in reset or sleep, would drop power consumption and allow the motor to just free wheel. If nothing else, do it for the power consumption unless of course you're doing something like a very slow continuous water change.
Thanks good to know. I'll have to hook up a motor and see what kind of power it draws, if it's high then I'll go the 2 pin route. If it's low maybe I'll use a switch to save a GPIO this way for maintenance or whatever a person can switch off.
 
OP
Ranjib

Ranjib

7500 Club Member
Review score
+0 /0 /-0
View Badges
Joined
Apr 16, 2016
Messages
9,432
Reaction score
16,302
Review score
+0 /0 /-0
Location
Pleasant Hill, Concord
Right, same idea.

The TI chips usually have a trio of slightly overlapping inputs, for example the often used DRV8825:

1642549710978.png


Setting ENBL, or putting the device in reset or sleep, would drop power consumption and allow the motor to just free wheel. If nothing else, do it for the power consumption unless of course you're doing something like a very slow continuous water change.

Using a disable function will reset the indexer (e.g., lose the microstepping position), but you can't hold a microstep position without active power, and this isn't like a precision zeroed CNC setup so the point is moot.
for titration this will matter though.
The current implementation only turns on the enable pin, it does not turn those pins off. I still dont know how all this will play out in real life. Hence as i mentioned, i want to run it for some time and then circle back with improvements/bug fixes. The stepper details are already bit too much on the doser page, and should be migrated to driver/hal layer,
 

theatrus

Valuable Member
Review score
+0 /0 /-0
View Badges
Joined
Mar 26, 2016
Messages
1,555
Reaction score
2,862
Review score
+0 /0 /-0
Location
Sacramento, CA area
for titration this will matter though.
The current implementation only turns on the enable pin, it does not turn those pins off. I still dont know how all this will play out in real life. Hence as i mentioned, i want to run it for some time and then circle back with improvements/bug fixes. The stepper details are already bit too much on the doser page, and should be migrated to driver/hal layer,
Yeah, while the titration is running. But I’m between, different story.
Agree, trying to map this at a different level makes a ton of sense, need a Stepper class driver and individual drivers below that.
 

Tom Bishop

Well-Known Member
Review score
+0 /0 /-0
View Badges
Joined
Jan 1, 2019
Messages
854
Reaction score
1,305
Review score
+0 /0 /-0
Location
Missouri
@Tom Bishop ViaSpectra boards showed up. Haven't done anything but take a picture :)

1.jpg



I realized I had 4 pin XH headers on hand, but not 3 pin. Lots of JST headers are hit or miss if they're in stock.
Woot!

I can send you some JST headers I have a bunch of them, let me know. I can also solder my own headers, I am modding a vipar right now that I could use some boards, my pcb assy are still in work, lol. Looks like your option was way faster. I finally got in touch with @Michael Lane his only request was if selling them to remove his ML silkscreen, something to keep in mind if I make anymore up. Ah I spy that you added your blueacro silk to the board, that would also distinguish the difference, nice touch. I need to learn how to use kicad to do stuff like that.

I'm itching to get a hold of some, let me know how I can help, not even sure how you do a QA check on them. Do the diodes appear to be going in the right direction?

Update: well I thought I had a bunch but I only have 5 of the 3 pin XH connectors have a bunch of the 4 pin on hand. Oh and I updated a post in the vipar thread that I am hoping you can chime in on, I tagged you there also. :)
 
Last edited:
Top Shelf Aquatics

pais

New Member
Review score
+0 /0 /-0
View Badges
Joined
Jun 27, 2019
Messages
13
Reaction score
11
Review score
+0 /0 /-0
Hello I'm not a new user but from few years I'm running reef-pi and I like it very much, as the continuos improvements and versions continues amaze me. I'm actually running reef pi 5.0 or similar (I cannot determinate the version no more from configuration-about, idk why...). However I always put myself in troubles trying things... I connected a hand-made circuit to pwm1 on RPI pi3 b+ and managed to control pwm signal using reef pi. Everything worked fine for a while, but maybe after a reboot stopped working (voltage from pwm1 pin stayed on 0V for every setting of pwm). So I thinked I could have damaged the pin. I checked creating a reef-pi output in same pin and was working indeed. So I checked from command prompt pin configuration and manually changed the pin to pwm mode. Now everything seems to work fine from reef-pi, but I get a delay from when I change light value to when change (1 second or less). However I was getting no visible delay before all changes , so im asking do you know what's going on ? Was it the right way changing pin mode from command line ?
Thank you !
 

theatrus

Valuable Member
Review score
+0 /0 /-0
View Badges
Joined
Mar 26, 2016
Messages
1,555
Reaction score
2,862
Review score
+0 /0 /-0
Location
Sacramento, CA area
Woot!

I can send you some JST headers I have a bunch of them, let me know. I can also solder my own headers, I am modding a vipar right now that I could use some boards, my pcb assy are still in work, lol. Looks like your option was way faster. I finally got in touch with @Michael Lane his only request was if selling them to remove his ML silkscreen, something to keep in mind if I make anymore up. Ah I spy that you added your blueacro silk to the board, that would also distinguish the difference, nice touch. I need to learn how to use kicad to do stuff like that.

I'm itching to get a hold of some, let me know how I can help, not even sure how you do a QA check on them. Do the diodes appear to be going in the right direction?

Update: well I thought I had a bunch but I only have 5 of the 3 pin XH connectors have a bunch of the 4 pin on hand. Oh and I updated a post in the vipar thread that I am hoping you can chime in on, I tagged you there also. :)

I powered one up with just a power supply, and things appear to be set up roughly the right way.

IMG_9635.jpg


Op-amp is powered, reference is putting out about 3.2V, so the protection diodes are at least in the right way :)

Somehow, in importing the project, the silk screen text became microscopic, so its a bit hard to sort out what is what from the silk alone. I didn't catch this earlier. Happy to send you a few for testing - haven't tried the PWM to voltage part yet, but I suspect it should just work.
 

Tom Bishop

Well-Known Member
Review score
+0 /0 /-0
View Badges
Joined
Jan 1, 2019
Messages
854
Reaction score
1,305
Review score
+0 /0 /-0
Location
Missouri
I powered one up with just a power supply, and things appear to be set up roughly the right way.

IMG_9635.jpg


Op-amp is powered, reference is putting out about 3.2V, so the protection diodes are at least in the right way :)

Somehow, in importing the project, the silk screen text became microscopic, so its a bit hard to sort out what is what from the silk alone. I didn't catch this earlier. Happy to send you a few for testing - haven't tried the PWM to voltage part yet, but I suspect it should just work.
I'm chomping at the bit, I have a vipar that I am modifying led wise and need a board to complete it, shoot me a PM and let me know how to get you some $$. :)
 

im_jeremy5

Community Member
Review score
+0 /0 /-0
View Badges
Joined
Aug 14, 2019
Messages
35
Reaction score
60
Review score
+0 /0 /-0
Anyone have a suggestion for a trustworthy buck converter (or any trustworthy way to convert from 12v 2a to 5v 3a)?

Right now I am using this buck converter, similar to what was used in the adafruit thread. Now that I am up and running and running my entire tank off of it I feel I need something a little more... robust as it is a single point of failure for my entire system (tank included) since the pi runs my heaters and pumps.

I have a 12v 2a power supply coming in that runs the darlington arrays/relays, relay powerstrip (the one from the adafruit thread), some indicator leds etc, then the buck converter that runs it down to 5v to run the pi. It is noticeably warm. However I am assuming that is normal since it has a heatsink on it.

I am just curious if people trust these Chinese generic buck converters to keep everything alive (and not burn the house down) or if there are other better options.
 
OP
Ranjib

Ranjib

7500 Club Member
Review score
+0 /0 /-0
View Badges
Joined
Apr 16, 2016
Messages
9,432
Reaction score
16,302
Review score
+0 /0 /-0
Location
Pleasant Hill, Concord
Afternoon all. I just found this thread and I'm looking to possibly give this a shot. Where would you guys recommend that I start? Are the links on the first post still valid?
Are you thinking of a scratch build, through the guides? or some pre fab board? what type of features you are planning to use? since reef-pi is just a project, there are various ways of building and using it. If you can share some more specifics we can help you better. If you are taking this as electronics hobby, definitely take the scratch build route , except for the power strip (use dli, adj or kasa instead). If you are very new to electronics and want something relatively quick and with less effort, robotank or any of the prefab boards (I'm not sure if brandon or theatrus have any in stock) is better.

Due to supply chain issues, I am also worried about the general availability of electronics parts (raspberry pi, ph boards etc), you may have to do little extra work to get through those..

start a build thread if you plan to invest more time, seek help and learn with us. similar to tank builds it helps us get the context. I love those :0) ,

godspeed
 
Aquarium Specialty - dry goods & marine livestock
OP
Ranjib

Ranjib

7500 Club Member
Review score
+0 /0 /-0
View Badges
Joined
Apr 16, 2016
Messages
9,432
Reaction score
16,302
Review score
+0 /0 /-0
Location
Pleasant Hill, Concord
Anyone have a suggestion for a trustworthy buck converter (or any trustworthy way to convert from 12v 2a to 5v 3a)?

Right now I am using this buck converter, similar to what was used in the adafruit thread. Now that I am up and running and running my entire tank off of it I feel I need something a little more... robust as it is a single point of failure for my entire system (tank included) since the pi runs my heaters and pumps.

I have a 12v 2a power supply coming in that runs the darlington arrays/relays, relay powerstrip (the one from the adafruit thread), some indicator leds etc, then the buck converter that runs it down to 5v to run the pi. It is noticeably warm. However I am assuming that is normal since it has a heatsink on it.

I am just curious if people trust these Chinese generic buck converters to keep everything alive (and not burn the house down) or if there are other better options.
UBEC https://www.adafruit.com/product/1385 are good for 3A or less,
pololu has this https://www.pololu.com/product/2851
and any of the xl4015 ic based converter should be fine. https://www.amazon.com/s?k=XL4015&i=electronics .

The best common power supplies are made by meanwell, a taiwanese company. Cheaper components are generally bad, irrespective of their origin.
 

GaryE

Well-Known Member
Review score
+0 /0 /-0
View Badges
Joined
Mar 12, 2020
Messages
991
Reaction score
1,366
Review score
+0 /0 /-0
Location
Coatesville, Indiana
Anyone have a suggestion for a trustworthy buck converter (or any trustworthy way to convert from 12v 2a to 5v 3a)?

Right now I am using this buck converter, similar to what was used in the adafruit thread. Now that I am up and running and running my entire tank off of it I feel I need something a little more... robust as it is a single point of failure for my entire system (tank included) since the pi runs my heaters and pumps.

I have a 12v 2a power supply coming in that runs the darlington arrays/relays, relay powerstrip (the one from the adafruit thread), some indicator leds etc, then the buck converter that runs it down to 5v to run the pi. It is noticeably warm. However I am assuming that is normal since it has a heatsink on it.

I am just curious if people trust these Chinese generic buck converters to keep everything alive (and not burn the house down) or if there are other better options.

I've been using these for about 2 years with no issues..

I like that they are easily adjustable and have a display to show the output voltage without needing a multimeter..
 

theatrus

Valuable Member
Review score
+0 /0 /-0
View Badges
Joined
Mar 26, 2016
Messages
1,555
Reaction score
2,862
Review score
+0 /0 /-0
Location
Sacramento, CA area
UBEC https://www.adafruit.com/product/1385 are good for 3A or less,
pololu has this https://www.pololu.com/product/2851
and any of the xl4015 ic based converter should be fine. https://www.amazon.com/s?k=XL4015&i=electronics .

The best common power supplies are made by meanwell, a taiwanese company. Cheaper components are generally bad, irrespective of their origin.

"You get what you pay for" is real. Its hard to really screen what you're getting if shopping Amazon since the quality is so variable.

Outside of two AC->DC power supplies (one for 5V one for 12V, connect the grounds) you can also buy quality modules for DC/DC from Meanwell.


If you're wondering why its so much more expensive, outside of the case and terminals, its actually going to survive running at full power over its full temperature range. The little converter boards absolutely don't get the same amount of testing and QA processes. Its also an isolated converter, which does mean you'll need to string the grounds back together. The isolation drives the cost up.
 

im_jeremy5

Community Member
Review score
+0 /0 /-0
View Badges
Joined
Aug 14, 2019
Messages
35
Reaction score
60
Review score
+0 /0 /-0
Hello all,

I have built my reef-pi from scratch on a pi0 with reef-pi 5.1. It has been a blast and I about have this thing dialed in. I am in the process of automating water changes and I have a few questions. Maybe a few bugs? Looking for a work around.

Problem: macro hangs when it is supposed to shut off an ato. Once this happens I have to reboot before I can manually turn on or off any atos.

My setup: I have a float in my salt reservoir (resfloat) to detect if there is enough saltwater made before it starts. I have a float near the bottom of my sump. (Wclowfloat) I have another float at the fill level (wchifloat) and then my normal ato float. The idea is to shut off the sump, drain to a point, fill it back up, turn the sump back on. Make the normal ato float control the salt water fill pump until everything levels back out, then return to normal operation.

I have a wc out pump (wcoutpump) wc in pump (wcinpump) and then the other standard equipment.

Below is a screenshot of my attempted macros. My plan was to have it check the reservoir before starting, so I have a macro that turns on an ato that checks the float in the reservoir, then turns it off seconds later, if the reservoir is full enough, it triggers the wc macro, if not it just shuts back off and does nothing. (I wish I could set this float up with an else/or argument to send me a message if its low and doesn't trigger the macro)

That macro works fine but once the auto wc macro is triggered it seems to hang when it is supposed to shut off the (actual) ATO. My skimmer shuts off, and my temp control shuts off, and thats it. I go to the ato page and it didn't shut off the ato and nothing else happens. And I am no longer able to manually turn on or off any atos until a reboot.
Screenshot_20220123-224726_Chrome.jpg
Screenshot_20220123-224851_Chrome.jpg
Screenshot_20220123-224926_Chrome.jpg


I have been able to reboot and manually trigger the auto wc macro and it worked, once. Other than that it always hangs on shutting of the ato and freezes my ato page.


Thank you for any help or suggestions.
 
Orphek OR3 reef aquarium LED lighting

Peninsula Reef Tanks...

  • I currently have one

    Votes: 90 24.7%
  • I used to have one set up

    Votes: 17 4.7%
  • I would like to try one in the future

    Votes: 180 49.3%
  • No interest

    Votes: 78 21.4%
Reefing Report
Top