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

OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
stepper.png
 

theatrus

Valuable Member
View Badges
Joined
Mar 26, 2016
Messages
2,223
Reaction score
3,632
Location
Sacramento, CA area
Rating - 0%
0   0   0
It will ? I am trying with 0.0208s delay, without much cpu cost. I can try reducing it by half and see how that goes

Not terribly slow, no. 20ms wakeup is reasonable for just a sleep task, but without microstepping that is about 0.24 RPS or about 14 RPM (assuming a 200 steps per revolution motor). You can get motors as low as 40 steps per revolution, so its possible this is running faster. Wakeups below 1ms start introducing larger and larger jitter (which you'll actually be able to hear). Add microstepping and you're crawling. The little brushed DC motors with their shaft reduction are probably 10x the speed (though, not consistent).

As long as you're not trying to go fast, its plenty. The problem with using a PWM as built in ReefPi is duty cycle doesn't matter, so frequency needs to be adjusted. All tradeoffs. Nothing wrong with some basic bit-banging to get going.
 

gordan101

New Member
View Badges
Joined
Dec 16, 2020
Messages
8
Reaction score
7
Location
uk
Rating - 0%
0   0   0
Found something new and interesting on 5.1-83-g3c22d04b... (edit.. problem is present in 5.0 also)


1642389458276.png


What's the minimum acceptable threshold ?


1642389534966.png

because 50 would be too much.. ;)
I had the same thing off you add a chiller controlling a dud outlet it will work
 

Sacrifice

Community Member
View Badges
Joined
Jun 13, 2020
Messages
61
Reaction score
65
Rating - 0%
0   0   0
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?
 

theatrus

Valuable Member
View Badges
Joined
Mar 26, 2016
Messages
2,223
Reaction score
3,632
Location
Sacramento, CA area
Rating - 0%
0   0   0
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
View Badges
Joined
Feb 14, 2020
Messages
985
Reaction score
1,325
Location
Edmonton, Canada
Rating - 0%
0   0   0
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
View Badges
Joined
Mar 26, 2016
Messages
2,223
Reaction score
3,632
Location
Sacramento, CA area
Rating - 0%
0   0   0
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.
 

robsworld78

Well-Known Member
View Badges
Joined
Feb 14, 2020
Messages
985
Reaction score
1,325
Location
Edmonton, Canada
Rating - 0%
0   0   0
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
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
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
View Badges
Joined
Mar 26, 2016
Messages
2,223
Reaction score
3,632
Location
Sacramento, CA area
Rating - 0%
0   0   0
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.
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,349
Reaction score
1,724
Location
Missouri
Rating - 0%
0   0   0
@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:

pais

New Member
View Badges
Joined
Jun 27, 2019
Messages
15
Reaction score
12
Rating - 0%
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
View Badges
Joined
Mar 26, 2016
Messages
2,223
Reaction score
3,632
Location
Sacramento, CA area
Rating - 0%
0   0   0
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.
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,349
Reaction score
1,724
Location
Missouri
Rating - 0%
0   0   0
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
View Badges
Joined
Aug 14, 2019
Messages
41
Reaction score
61
Rating - 0%
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.
 

HAVE YOU EVER KEPT A RARE/UNCOMMON FISH, CORAL, OR INVERT? SHOW IT OFF IN THE THREAD!

  • Yes!

    Votes: 32 45.7%
  • Not yet, but I have one that I want to buy in mind!

    Votes: 9 12.9%
  • No.

    Votes: 26 37.1%
  • Other (please explain).

    Votes: 3 4.3%
Back
Top