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

theatrus

Valuable Member
Review score
+0 /0 /-0
View Badges
Joined
Mar 26, 2016
Messages
1,467
Reaction score
2,762
Review score
+0 /0 /-0
Location
Sacramento, CA area
Hi folks,
im thinking of putting a booth in aquashella 2022, Orlando for reef-pi. It will be a nice gathering for hobbyists and fun times for the family. the booth will be mostly for information, demo , exhibit of different reef-pi modules, pre fab controllers etc. @robsworld78 @theatrus @Schreiber i am thinking of adding one of each of your products there. Let me know if it’s ok,. You are more than welcome to join me in the booth (im paying for the booth, so don’t worry about the booth fees ).

i need some help with a small colony or a single rock of coral that can fit into 8”x8” pico tank , 4G. It’ll need it for the exhibit. I’ll carry rest of equipment, but need some one local to help me out with the live stock for three days. I’ll return afterwards.
what you folks think ? ok or too much ?

Always ok, let me know if you're interested in some new prototype stuff :)
 
AS

theatrus

Valuable Member
Review score
+0 /0 /-0
View Badges
Joined
Mar 26, 2016
Messages
1,467
Reaction score
2,762
Review score
+0 /0 /-0
Location
Sacramento, CA area

Tom Bishop

Well-Known Member
Review score
+0 /0 /-0
View Badges
Joined
Jan 1, 2019
Messages
688
Reaction score
1,142
Review score
+0 /0 /-0
Location
Missouri
Forum context missing in the jump.

Is this the Viaspectra adapters? https://www.reef2reef.com/threads/r...ler-based-on-raspberry-pi.289256/post-9739136
Yup, @Michael Lane was making them but no longer, all of the files are up on git and I have been looking at having some boards made but I am a total noob. I know I would like some and I know there are some others as well trying to figure out what is the easiest way to accomplish it. I was looking through the part list and for some items they do not list the detailed part number like for this TL432DBZ SMD-SOT23 but there are quite a few part numbers to choose from. The boards look pretty straight forward but at least for me I would need some better descriptions for some of the parts listed, @Ranjib thought it would be you or @robsworld78 would be able to clarify and or figure out what was needed to order some up.

:)
 

theatrus

Valuable Member
Review score
+0 /0 /-0
View Badges
Joined
Mar 26, 2016
Messages
1,467
Reaction score
2,762
Review score
+0 /0 /-0
Location
Sacramento, CA area
Yup, @Michael Lane was making them but no longer, all of the files are up on git and I have been looking at having some boards made but I am a total noob. I know I would like some and I know there are some others as well trying to figure out what is the easiest way to accomplish it. I was looking through the part list and for some items they do not list the detailed part number like for this TL432DBZ SMD-SOT23 but there are quite a few part numbers to choose from. The boards look pretty straight forward but at least for me I would need some better descriptions for some of the parts listed, @Ranjib thought it would be you or @robsworld78 would be able to clarify and or figure out what was needed to order some up.

:)

The good news is these are all pretty basic parts, and could even be built nearly fully assembled from the parts catalog of JLCPCB's hilariously cheap assembly service. I'll see about getting the centroid/part center/pick and place file out of KiCad.

TL432s come in two basic voltages, but the 2.495V reference is usually considered the standard one.
 

robsworld78

Well-Known Member
Review score
+0 /0 /-0
View Badges
Joined
Feb 14, 2020
Messages
627
Reaction score
843
Review score
+0 /0 /-0
Location
Edmonton, Canada
Yeah I was looking at the 858d clones, some of them say to check the polarity of the power cable but that was the model I was looking at, so I will add it to my list. I am using a @Michael Lane goby hat and it controls the doser via PWM but you may be on to something. The doser module is a separate module that plugs into the doser port - https://www.tindie.com/products/ranthalion/dosing-pump-adapter/ that little board has a uln2803a chip on it and maybe something on that board is what went belly up versus the pca9685, that actually makes more sense. It made me wary of using the dosing via that since I just happen to be around when it happened and was able to remove it from dosing, otherwise it would not have been good outcome. I moved to BRS AC dosing pumps controlled via relay outlet since I fill like i have more control over them vs the dosing setup but now I am leary of the relays in the strips going bad, need to find a more robust relay vs the ones in the DJ housing which is what I am using.

I have a quote out at pcbway.com to see what the board will cost, the PCB are cheap but I have not priced the components but I suspect they should be pretty reasonable also but I have not gone to digikey or anywhere to price up the BOM, he has that listed on the github, it's pretty much ready to go, when I get some more information from them I will let you know what I find out. I have not ordered any PCB's before so lots to learn but if you guys have any insight into where and how to do it I'd like to learn how to do it, etc. :)
I think all those cheap hot air guns are basically the same, mine is actually a Sigma R700 but I wouldn't be too worried about the different brands.

If you unplug the dosing adapter does the pca9685 pin work as expected with a volt meter? If nothing is attached to the pca9685 pin and it still stuck on then it's like the culprit.

I've seen a number of mosfets fail, they are quite sensitive to ESD and voltage spikes. I started adding TVS diodes across the gate and drain and source pins, that'll help a lot. The uln2803 looks like it has some protection built in but something must have got through.

Let us know how it goes with the board.
 
REEFTIDE

robsworld78

Well-Known Member
Review score
+0 /0 /-0
View Badges
Joined
Feb 14, 2020
Messages
627
Reaction score
843
Review score
+0 /0 /-0
Location
Edmonton, Canada
Hi folks,
im thinking of putting a booth in aquashella 2022, Orlando for reef-pi. It will be a nice gathering for hobbyists and fun times for the family. the booth will be mostly for information, demo , exhibit of different reef-pi modules, pre fab controllers etc. @robsworld78 @theatrus @Schreiber i am thinking of adding one of each of your products there. Let me know if it’s ok,. You are more than welcome to join me in the booth (im paying for the booth, so don’t worry about the booth fees ).

i need some help with a small colony or a single rock of coral that can fit into 8”x8” pico tank , 4G. It’ll need it for the exhibit. I’ll carry rest of equipment, but need some one local to help me out with the live stock for three days. I’ll return afterwards.
what you folks think ? ok or too much ?
Wow that's a very generous offer, how can someone say no to that. :) When would you be going? I would love to join you but unfortunately that's no possible, I can send you a package though, you can sell and go towards booth or do whatever.
 

robsworld78

Well-Known Member
Review score
+0 /0 /-0
View Badges
Joined
Feb 14, 2020
Messages
627
Reaction score
843
Review score
+0 /0 /-0
Location
Edmonton, Canada
I was looking through the part list and for some items they do not list the detailed part number like for this TL432DBZ SMD-SOT23 but there are quite a few part numbers to choose from.
Welcome to component land where not much makes sense... 10 parts with basically the same model can really put you in jam. :)
 

robsworld78

Well-Known Member
Review score
+0 /0 /-0
View Badges
Joined
Feb 14, 2020
Messages
627
Reaction score
843
Review score
+0 /0 /-0
Location
Edmonton, Canada
The good news is these are all pretty basic parts, and could even be built nearly fully assembled from the parts catalog of JLCPCB's hilariously cheap assembly service. I'll see about getting the centroid/part center/pick and place file out of KiCad.

TL432s come in two basic voltages, but the 2.495V reference is usually considered the standard one.
If you want to do this you'll know better than me. The one question I have is the adapter wanting 0-3.3v or 0-5v PWM signal. Something tells me ML's board is putting out 3.3v but I could be wrong.
 

Tom Bishop

Well-Known Member
Review score
+0 /0 /-0
View Badges
Joined
Jan 1, 2019
Messages
688
Reaction score
1,142
Review score
+0 /0 /-0
Location
Missouri
If you want to do this you'll know better than me. The one question I have is the adapter wanting 0-3.3v or 0-5v PWM signal. Something tells me ML's board is putting out 3.3v but I could be wrong.
I think he stated in the vipar thread that he was feeding 5v but that the vipar was ok with that voltage, I think he stated it used 3.3 but was ok with 5v.
Here is the reference - https://www.reef2reef.com/threads/controlling-viparspectra-lights.698216/post-7212790
 

robsworld78

Well-Known Member
Review score
+0 /0 /-0
View Badges
Joined
Feb 14, 2020
Messages
627
Reaction score
843
Review score
+0 /0 /-0
Location
Edmonton, Canada
Reef Chasers Aquaculture

GaryE

Well-Known Member
Review score
+0 /0 /-0
View Badges
Joined
Mar 12, 2020
Messages
888
Reaction score
1,225
Review score
+0 /0 /-0
Location
Coatesville, Indiana
a quick update. I was trying to do this all in the arduino, but it seems it's really not up to the task of slurping in all of the metrics, parsing for the right data and then spitting out the right bit.. So... I decided to write a python script to do that part and output to a file, then will have the arduino connect and FTP the files to get the data and then display it. Should be way easier on the ardiuno side that way. Then it's a matter of finding a case and figuring out how I want to power it long term.. Fun stuff!!

On the positive side, this will make the gadget portable. Will not be tied to the tank. Just will need to plug it in somewhere and instant stats!

so far, this is the python code.


import requests

URL = "http://10.167.15.10/x/metrics"
tankTemp = "tank_temp_reading"
sumpTemp = "sump_temp_reading"
boxTemp = "box_temp_reading"

Another quick update.. the python side of things is complete, mostly, just need to figure out where on the PI that the files are going to live, however, everything works as needed.

You can assign any of the metrics that reef-pi emits in the metrics "dictionary" and it'll happily scrape that and plop the value in a text file named for the metric.

Next step will be to figure out the best way to have the arduino connect to the PI and read those files. I'm thinking I'll have to store the files in a separate directory and have the arduino just get a listing of the files and read any it finds.. (with whatever sanity checking I can figure out). Mind you, I am not a C programmer at all. For that matter, I'm not a python programmer, I spent a few minutes in the 90's working with Perl and a couple decades mucking around with PHP though.

# add metrics from the reef-pi/x/metrics end point here that you'd like to display on your # arduino or whatever else may be reading these files metrics = { "tankTemp": "tank_temp_reading", "sumpTemp": "sump_temp_reading", "boxTemp": "box_temp_reading", "boxFan": "equipment_fan_state" } # retrieve the metrics from the server and save them to a variable. from urllib.request import urlopen response = urlopen('http://10.167.15.10/x/metrics') html = response.read() html = html.decode() serverMetrics = html.split('\n') # split everything into lines. # function to remove the metric name from the line found in getTemp() def listToString(s): # initialize an empty string string = " " # return string return string.join(s) # while looping through the metrics dictionary, get the metric value from def getMetric(t, m): for line in m: if not line.startswith(t): # remove commented lines from metrics to reduce size in memory pass else: text = line.split(' ') # split everything into lines. text.pop(0) tempMetric = (listToString(text)) # strip the metric name from the line return tempMetric # loop the dictionary to get the values of the temp readings for key, value in metrics.items(): met = (getMetric(value, serverMetrics)) # get the values from the server metrics if met is None: metric = str("BROKEN!") # in the likely event that a sensor fails, rather than bork the script, return an error else: # all data should be good, so let's write some files... f = open(value, "w") f.write(met) f.close()
 
Last edited:

theatrus

Valuable Member
Review score
+0 /0 /-0
View Badges
Joined
Mar 26, 2016
Messages
1,467
Reaction score
2,762
Review score
+0 /0 /-0
Location
Sacramento, CA area
Yup, @Michael Lane was making them but no longer, all of the files are up on git and I have been looking at having some boards made but I am a total noob. I know I would like some and I know there are some others as well trying to figure out what is the easiest way to accomplish it. I was looking through the part list and for some items they do not list the detailed part number like for this TL432DBZ SMD-SOT23 but there are quite a few part numbers to choose from. The boards look pretty straight forward but at least for me I would need some better descriptions for some of the parts listed, @Ranjib thought it would be you or @robsworld78 would be able to clarify and or figure out what was needed to order some up.

:)

Just as a test, since its a very simple adapter, I dropped a full turnkey order to JLCPCB for 15 units. This means everything except the headers will come pre-assembled on the boards. Due to some aggressive couponing ("please try our service!"), the whole thing was sub $50 including DHL. Its amazing how cheap some simple prototypes have gotten..

The part rotations needed some tweaking, and odds are I'm going to get the board back with all the diodes on backwards. Will report back when I get something in hand :)
 
OP
Ranjib

Ranjib

7500 Club Member
Review score
+0 /0 /-0
View Badges
Joined
Apr 16, 2016
Messages
9,191
Reaction score
15,875
Review score
+0 /0 /-0
Location
Pleasant Hill, Concord
Just as a test, since its a very simple adapter, I dropped a full turnkey order to JLCPCB for 15 units. This means everything except the headers will come pre-assembled on the boards. Due to some aggressive couponing ("please try our service!"), the whole thing was sub $50 including DHL. Its amazing how cheap some simple prototypes have gotten..

The part rotations needed some tweaking, and odds are I'm going to get the board back with all the diodes on backwards. Will report back when I get something in hand :)
whoa.. thank you for doing this.
 

theatrus

Valuable Member
Review score
+0 /0 /-0
View Badges
Joined
Mar 26, 2016
Messages
1,467
Reaction score
2,762
Review score
+0 /0 /-0
Location
Sacramento, CA area
Just as a test, since its a very simple adapter, I dropped a full turnkey order to JLCPCB for 15 units. This means everything except the headers will come pre-assembled on the boards. Due to some aggressive couponing ("please try our service!"), the whole thing was sub $50 including DHL. Its amazing how cheap some simple prototypes have gotten..

The part rotations needed some tweaking, and odds are I'm going to get the board back with all the diodes on backwards. Will report back when I get something in hand :)

Small update: JLCPCB didn't feel like they could load SOD-123 diodes onto an 0805 sized pad (which is fair, its not really the right size). A few hours later, trying with SOD-323 diodes from their catalog. And saved an extra $5 in the process by using some mainland brand parts.


I have to say, if you can fall under the limits of the assembly service (not too many unique parts, using mostly parts already loaded on their machines, etc) the whole thing is a very good value.
 
OP
Ranjib

Ranjib

7500 Club Member
Review score
+0 /0 /-0
View Badges
Joined
Apr 16, 2016
Messages
9,191
Reaction score
15,875
Review score
+0 /0 /-0
Location
Pleasant Hill, Concord
Small update: JLCPCB didn't feel like they could load SOD-123 diodes onto an 0805 sized pad (which is fair, its not really the right size). A few hours later, trying with SOD-323 diodes from their catalog. And saved an extra $5 in the process by using some mainland brand parts.


I have to say, if you can fall under the limits of the assembly service (not too many unique parts, using mostly parts already loaded on their machines, etc) the whole thing is a very good value.
Thats awesome.
It makes a lot of sense to design boards specifically to fit this constrain
 
REEFTIDE

marekd1

Active Member
Review score
+0 /0 /-0
View Badges
Joined
Dec 24, 2019
Messages
123
Reaction score
185
Review score
+0 /0 /-0
How you are moving the metric from reef-pi to influxdb ? You can not assign the metadata in that mechanism ?
it’s bit confusing on reef-pi end to specify those metadata since it’s not pushing metrics anywhere, it just publish the metrics in a handler/endpoint which prom scrapes . Any metadata is associated by the prom scrape config

The metrics re picked up by mosquitto then I pick them up in node red. Then node red populates infulxdb.

Here is the some data but flows are not reef-pi specific as I am still waiting for segregation so I do not have to redo everything

Capture1.JPG Capturedb.JPG mosq-Capture.JPG
 
Last edited:

marekd1

Active Member
Review score
+0 /0 /-0
View Badges
Joined
Dec 24, 2019
Messages
123
Reaction score
185
Review score
+0 /0 /-0
I think I get it now. You are talking about your work node red controller. Reef/pi does not uses any external db like influx , uses its own embedded database called boltdb. In this way reef-pi is significantly less component compared to the stack you are using . A full reef-pi does not need any external host to store metric or visualize charts . It has all those built in, and ships as single Debian package that comes with the entire db, backend, front end . For advance use cases (like arbitrary graphs, long term retention ) reef-pi allows Prometheus integration .

I've posted my flow in another post above. Basically I use the reef-pi as datasource through MQTT. Once MQTT topic is published (in Ree-Pi's case everything is one big clump of data and its not segregated under a specific topic say reef-pi-01 then I can pick this data up from MQTT and do anything I want. no dependency on internals of reef-pi. This method allows data collection from any device that published MQTT and then I can use most optimal platform to do post processing.

Here is an example of how MQTT reef-pi data looks in comparison to other MQTT providers

mqtt JPG.JPG
 

Tom Bishop

Well-Known Member
Review score
+0 /0 /-0
View Badges
Joined
Jan 1, 2019
Messages
688
Reaction score
1,142
Review score
+0 /0 /-0
Location
Missouri
Just as a test, since its a very simple adapter, I dropped a full turnkey order to JLCPCB for 15 units. This means everything except the headers will come pre-assembled on the boards. Due to some aggressive couponing ("please try our service!"), the whole thing was sub $50 including DHL. Its amazing how cheap some simple prototypes have gotten..

The part rotations needed some tweaking, and odds are I'm going to get the board back with all the diodes on backwards. Will report back when I get something in hand :)
Awesome, I have an order on pcbway but not sure on a couple of the components, if you could point me to what I need for d1-TL432DBZ, d2,d3 - 1n4148 and d4,d5 - D_Schottky? I am willing to chip in on the ones you had made, but would like to know how you figure out the part number for those items I listed. I am trying to learn to do more smd work so I am ok with putzing around with stuff.

Let me know how I can help the cause etc, really appreciate you doing this. :)

Update I didn't read down far enough, I think you answered a couple of the questions, man I wish I understood electronics a tenth of what you guys do, like its another language to me.
 

theatrus

Valuable Member
Review score
+0 /0 /-0
View Badges
Joined
Mar 26, 2016
Messages
1,467
Reaction score
2,762
Review score
+0 /0 /-0
Location
Sacramento, CA area
Awesome, I have an order on pcbway but not sure on a couple of the components, if you could point me to what I need for d1-TL432DBZ, d2,d3 - 1n4148 and d4,d5 - D_Schottky? I am willing to chip in on the ones you had made, but would like to know how you figure out the part number for those items I listed. I am trying to learn to do more smd work so I am ok with putzing around with stuff.

Let me know how I can help the cause etc, really appreciate you doing this. :)

Update I didn't read down far enough, I think you answered a couple of the questions, man I wish I understood electronics a tenth of what you guys do, like its another language to me.

Here is a grab from the parts picked on JLCPCB:
1641532378358.png



The part numbers (C####) can be popped into lcsc.com to get the details - in these cases, they're mainland (China) parts.

1N4148: As it says, anything with this part number, but sized to fit a SOD-323 (closest to an 0805).

TL432DBZ: You'll notice this is a TL432ASA.

The first letter is the tolerance, in this case A is worse than B, but no B parts were available and 1% vs 0.5% in this application isn't going to matter:

1641532561331.png


The "SA" is the package code for Diodes Inc for SOT-23-3. I'm unsure what the BZ in the original was after. TL432s come sometimes in a 1.24V version, but I picked the standard 2.495V.

"D_Schottky": Opted for a BAT54 in SOD-323 package. BAT45 is a pretty common "generic" part for a Schottky diode. Rated for 30V (more than enough) and 200mA (also more than enough). Usually, BAT54 is packaged in a SOT-23-3 (three leg part) as well, but there was a mainland brand packaged in a SOD-323, so just rolled with it.
 

im_jeremy5

Community Member
Review score
+0 /0 /-0
View Badges
Joined
Aug 14, 2019
Messages
29
Reaction score
54
Review score
+0 /0 /-0
Thats awesome.
It makes a lot of sense to design boards specifically to fit this constrain
Hey buddy, pal,

Due to some negligent actions on my part I can't access the gui. I need to reset reef-pi to factory settings without access to it. Is there a file location for the settings I can delete/edit? Or a command line way to reset it? Specifically I changed the adress on the configuration page, after that I can no longer access the gui.
 
AquaCave Logo Banner

Have you ever torn down a tank over an issue you couldn't seem to beat?

  • Yes! I have. (Tell us about what issue you faced in the thread.)

    Votes: 183 24.6%
  • No. Thankfully, I haven't.

    Votes: 383 51.5%
  • Nope, but it almost happened. (Share your experience in the thread.)

    Votes: 55 7.4%
  • Not yet, but I'm almost there. (Tell us what you're dealing with.)

    Votes: 61 8.2%
  • If you reef long enough, this will eventually happen to you.

    Votes: 47 6.3%
  • Other

    Votes: 14 1.9%
NYOS
Top