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

-MerlyN-

New Member
View Badges
Joined
Feb 29, 2020
Messages
4
Reaction score
27
Hello. Still waiting for ML's goby hat, which is delayed at customs, so making very little progress with my own build.
However I set up a temp sensor for a very simple first look test. Ok, works :D
I dont get the dashboard, however. The health and temp graphs are adjusting fine. The graph for 'Temperature(historical)' does not adjust correctly. How can I fix that?
test_graph.jpg
 
Top Shelf Aquatics

Kerinin

Member
View Badges
Joined
Jun 8, 2020
Messages
15
Reaction score
15
I've been working on how to use an Arduino to drive the step/dir interface of stepper drivers, and I ran across the Firmata Protocol. Firmata is designed to allow control of an Arduino over a serial interface, for instance you can read an analog pin's value, or set a pin high/low. The protocol has extensions for a number of different features; my interest is primarily the interface for the AccelStepper library. The AccelStepper interface allows control of up to 10 steppers running on the Arduino.

Unfortunately I don't see a Go implementation of the AccelStepper interface. I'm working on a implementing the missing pieces - it doesn't look too complicated. Once that's complete, it should be possible to load the Firmata sketch onto an Arduino and then use Go to control steppers (or stepper drivers) connected to the Arduino in Go over a serial connection from the "host" computer. Planning to look at extending the reef-pi to use this communication layer once the Firmata pieces are all working.
 

SDchris

Member
View Badges
Joined
Mar 3, 2015
Messages
91
Reaction score
135
Location
Sydney
One of my priorities is minimizing stepper noise, so I've been looking at the Trinamic TMC-series stepper drivers. They claim to be able to run silently at lower speeds. The two drivers I've been looking at are the TMC2130 and TMC5160. The TMC5160 is basically a more powerful version of the TMC2130 that includes a step/ramp generator controllable via UART.

My first thought was to use the rpi's serial pins to drive the *5160, allowing multiple drivers to be controlled via a shared serial bus. The problem with the approach is that it could lead to uncontrolled dosing: the reef-pi could instruct the *5160 to ramp up to a given velocity with the intention of instructing it to ramp back down the future, then fail somehow, and leave the driver running for an indefinite amount of time (power loss, OOM, unhandled panic, etc).
If you use SPI you can access the on board motion controller TMC5160. That way you only need to send it the amount of steps you want to move and the TMC takes care of the rest. Including ramp generation and speed. That way it doesn't matter if the PI fails.

Last I looked TMC5160 step sticks don't have access to the motion controller. You need the TMC5160-bob.
 

elysics

Member
View Badges
Joined
Jan 15, 2020
Messages
44
Reaction score
42
By the way, is it planned to have actual calibration for dosing volume as part of the dosing pump settings going forward? Or is that omitted on purpose because right now the dosers can only do full second increments?
 

Kerinin

Member
View Badges
Joined
Jun 8, 2020
Messages
15
Reaction score
15
If you use SPI you can access the on board motion controller TMC5160. That way you only need to send it the amount of steps you want to move and the TMC takes care of the rest. Including ramp generation and speed. That way it doesn't matter if the PI fails.
You're right, I didn't realize until after I posted that the "target" mode could be used to drive an arbitrary number of steps (I misunderstood the "target" as describing the angle of the rotor). I still think I'm going to go the Arduino route though, mostly because it's not specific to a specific driver board. The Arduino should be able to control any stepper driver using the step/dir interface. SPI also eats up a lot of GPIO pins on the Pi, for instance I'm planning to drive 7 pumps on the project I'm currently working on.

By the way, is it planned to have actual calibration for dosing volume as part of the dosing pump settings going forward? Or is that omitted on purpose because right now the dosers can only do full second increments?
My plan was for the dosers to be controlled by "steps", and for the Pi to be responsible for translation steps into fluid volumes. So there would be a calibration in the Pi mapping a single "step" into a fluid amount, but the Arduino would only ever know about steps.
 
Aquarium Specialty - dry goods & marine livestock

buddy.

Active Member
View Badges
Joined
May 16, 2018
Messages
277
Reaction score
574
Location
Australia
I think the most simple way is to run it through a ULN2803. This is the design I use on my dosing pump adapter. It's an open source design, and you can find files at https://github.com/Ranthalion/JebaoDosingAdapter.

It shouldn't be necessary to double up the channels on the ULN, but they are available and I've another reefer had issues with a single motor pulling much more current than expected.

C1 and R1 are totally optional. My pump is running without those, but I figured they wouldn't hurt...

1592764920144.png


1592764850454.png
Made one of these up today and it works great! Thanks for your help.
 

buddy.

Active Member
View Badges
Joined
May 16, 2018
Messages
277
Reaction score
574
Location
Australia
Just setup another ato controller with the upper sensor and same pump
Will do, thanks.
Another question... I guess the optical sensors need light to work properly? My sump area is very dark and the sensor can detect when the water drops but it does not detect when the sensor is submerged again, so that the ato pump stays on.
 

Bob Tiffany

Member
View Badges
Joined
Nov 4, 2015
Messages
15
Reaction score
5
I’ve been looking everywhere for help on this and I’m not finding anything online.

I’m setting up the telemetry settings in Reef Pi, specifically the Adafruit.IO settings. I’ve got my free IO account setup and I’ve entered my IO key in the Reef Pi telemetry settings, and it’s sending feeds and data to my IO account.

My problem, is there is no Equipment feed, showing which equipment is on or off. Does Reef Pi not send that data to IO? Is there something in the “Feeds” section that I’m missing?

Thanks!!
 

Bob Tiffany

Member
View Badges
Joined
Nov 4, 2015
Messages
15
Reaction score
5
To go with this question, I’ve got all of these errors on Reef Pi now, all seem to be related to equipment reporting.

497B7D21-174F-4C9C-9F63-99CF2121187C.jpeg
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,075
Reaction score
2,597
To go with this question, I’ve got all of these errors on Reef Pi now, all seem to be related to equipment reporting.

497B7D21-174F-4C9C-9F63-99CF2121187C.jpeg
It does not send equipmemt feeds.

Also for a free account it only uses 10 feeds amd you dont get to choose...it sends the first 10 setup in reef pi. The rest error out.
 

marekd1

Member
View Badges
Joined
Dec 24, 2019
Messages
97
Reaction score
166
Ranjib,

Tried to program my feeder to run on day 1,3,5,7 but it appears that day 7 is not allowed. Is this a bug or am my missing something? Please see the attached screenshots.

Also, I've noticed that some time back you have removed use of fractional seconds to full second stepping for Duration on Dosing.
Would it be possible to reenable this option as it provides more accurate means of tuning to say 1ml, 2ml, 3ml. Speed by itself does not always allow for this level of tuning. In the past I was able to select say 1.2 or 1.5, etc. seconds for duration and in conjunction with speed adjustment this worked really well. In the current one second increments I can never calibrate my pumps to 1ml, or 2ml, etc exact dosage. Instead setting turns out to be anything but like 1.3, 1.6, etc.

day 1357.JPG error day 1357.JPG
 

Michael Lane

Well-Known Member
View Badges
Joined
Aug 11, 2018
Messages
596
Reaction score
1,018
Will do, thanks.
Another question... I guess the optical sensors need light to work properly? My sump area is very dark and the sensor can detect when the water drops but it does not detect when the sensor is submerged again, so that the ato pump stays on.
The optical sensors typically use an integrated IR LED, so they do not need to be in a lit environment. I'm not sure why your sensor does not recognize when the water level is raised again. Usually, the problem with optical sensors is the other way around, a droplet stays on the sensor which causes it to not recognize the level drop.
 

Michael Lane

Well-Known Member
View Badges
Joined
Aug 11, 2018
Messages
596
Reaction score
1,018
Ranjib,

Tried to program my feeder to run on day 1,3,5,7 but it appears that day 7 is not allowed. Is this a bug or am my missing something? Please see the attached screenshots.

Also, I've noticed that some time back you have removed use of fractional seconds to full second stepping for Duration on Dosing.
Would it be possible to reenable this option as it provides more accurate means of tuning to say 1ml, 2ml, 3ml. Speed by itself does not always allow for this level of tuning. In the past I was able to select say 1.2 or 1.5, etc. seconds for duration and in conjunction with speed adjustment this worked really well. In the current one second increments I can never calibrate my pumps to 1ml, or 2ml, etc exact dosage. Instead setting turns out to be anything but like 1.3, 1.6, etc.

day 1357.JPG error day 1357.JPG
Cron uses 0 as the starting number for days of the week, so 7 would be out of range. Take a look at crontab.guru to test some expressions (even though it does parse 7 as Sunday...).
 
Top Shelf Aquatics

Tom Bishop

Active Member
View Badges
Joined
Jan 1, 2019
Messages
444
Reaction score
895
Location
Missouri
I keep getting this error, been running over 1 week now:
1D0DC6E1-B484-47AD-96B7-4B8D74EFE806.png

The error is there for a few seconds, then goes away, and will reappear later.
What version of reef-pi are you running, several us have had temp probe issues with the latest 3.4 code, you can roll back to 3.3 and see if it corrects the issue, that is what I did and I have had no more temp probe issues. Not sure if @Ranjib or anyone ever figured out the issue in 3.4 but several of us were seeing the issue.

:)
 

Tom Bishop

Active Member
View Badges
Joined
Jan 1, 2019
Messages
444
Reaction score
895
Location
Missouri
I have some time on my hands and thinking about trying to do something in regards to documentation. I know we have the build threads but thought it might be nice to have something per function that goes over all of the options and what and how they can be used. Does anyone know if this has been started or if anyone is working on something like this?

Would this be something that others would be interested in? Would love to have it on a wiki page but I guess those are old school but that would be a nice way to host it and allow updates.

Let me know what folks think!

:)
 

waynel

Member
View Badges
Joined
May 22, 2020
Messages
52
Reaction score
73
Location
Kentucky
What version of reef-pi are you running, several us have had temp probe issues with the latest 3.4 code, you can roll back to 3.3 and see if it corrects the issue, that is what I did and I have had no more temp probe issues. Not sure if @Ranjib or anyone ever figured out the issue in 3.4 but several of us were seeing the issue.

:)
Yes, 3.4
 
OP
Ranjib

Ranjib

Valuable Member
View Badges
Joined
Apr 16, 2016
Messages
8,020
Reaction score
14,320
Location
Palo Alto, Bay Area
Will do, thanks.
Another question... I guess the optical sensors need light to work properly? My sump area is very dark and the sensor can detect when the water drops but it does not detect when the sensor is submerged again, so that the ato pump stays on.
Nope, I don’t think optical sensors require light. They should work in dark places just fine.
 
OP
Ranjib

Ranjib

Valuable Member
View Badges
Joined
Apr 16, 2016
Messages
8,020
Reaction score
14,320
Location
Palo Alto, Bay Area
I have some time on my hands and thinking about trying to do something in regards to documentation. I know we have the build threads but thought it might be nice to have something per function that goes over all of the options and what and how they can be used. Does anyone know if this has been started or if anyone is working on something like this?

Would this be something that others would be interested in? Would love to have it on a wiki page but I guess those are old school but that would be a nice way to host it and allow updates.

Let me know what folks think!

:)
I would super duper appreciate any and every help on documentation side. Let me know if I can be of any help. It will be awesome if we can do it in a way where community users can incrementally add their learnings
 

Woud you rather start a tank with dry rock or live rock from the ocean?

  • Dry Rock

    Votes: 164 40.7%
  • Live Rock

    Votes: 136 33.7%
  • Combo of both

    Votes: 95 23.6%
  • Other (please explain)

    Votes: 8 2.0%

Online statistics

Members online
2,318
Guests online
5,125
Total visitors
7,443
Top