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

Des Westcott

Well-Known Member
View Badges
Joined
May 29, 2018
Messages
645
Reaction score
1,034
Location
Durban - South Africa
Rating - 0%
0   0   0
There are many things going on ... be with me, and lets resolve each of them one by one.
1) reef-pi is trying to read a deleted temperature sensor. Its not causing any problem, but the log is polluted with that error, if you can delete the missing sensor then it will be easier to read the log. Sometimes, temperature sensors are not properly detected due to resistor/circuit/wire length etc.
2) the outlet delete operation is failing due to missing ID. I dont know why thats happening, likely to be an UI bug. Are you able to delete equipment ?
3) Did you test your ato sensor during the build. We have to deduce if the ATO issue is related to sensor being bad or reef-pi bug or wrong wiring/configuration. These are some things you can verify:
a) Check the ato sensor wire and GPIO number (inlet) , its physical wiring. Validate from the log that reef-pi is indeed reading the expected GPIO pin
b) Check if that pin is reading 0 and 1 by manually putting the sensor inside or outside water, if this is not happening
c) Finally if all the above things work as expected, then check if reef-pi 's ATO module is kicking of ATO pump (or whatever equipment you have configured) when water level is below

Ranjib

I'm happy to try resolve anything - Just sometimes the time difference can be a delay. Here we go - One by one

1) I can't find any evidence of an "old" temp sensor

2) I still can't delete equipment in 2.0.0 beta 6. I tried my old card with 1.5 and was able to delete equipment and connectors, but the problem persisted and relay would not work once defined anew.

3) This is the strange part. Everything was working perfectly - ATO, Temp, Equipment, everything, and now features are just failing one by one.

a) All good as far as I can see.
b) Log repoirts sensor value as 1 whether in the water or out
c) Not doing that at all.
I'm going to do a fresh install on a clean card and see if it all works. I'll keep this card to try troubleshoot with you though.

Des
 

sjeff35

Active Member
View Badges
Joined
Jun 14, 2018
Messages
172
Reaction score
356
Location
Corrales, NM
Rating - 0%
0   0   0
Yes, you'll get 100% of whatever the supply voltage is, in this case 12V. You are right kessil expects 10V. I use lm2596 (I buy them in 6 packs, so have always few spare) to convert 12V to 10V. But if you dont have those, you can also use a coule of resistor (like one 1K, and one 5K) to create a voltage divider which will convert the 12V to 10V, and then feed that 10V to npn emitter pin , where you have connected the 12v in right now... and voila... you have a spectral controller :)
I am happy that you got thw pi pwm going, you know this is a significant futuristic thing :), earlier this year broadcom (Pi's original CPU chip maker) opened up the pin specification for hardware timer, it took another three months to percolate that information through Raspberry Pi kernel and software stack so that we can use the pwm, and I think sometime in Apirl or May I added the support for Pi pwm.. its fresh from the oven :). Its a big deal I think, because now one can make a two part doser or a kessil controller just using a pi zero, since we have two pwm.. without the need of pca9685 , this reduced the build cost by at least 12$ and less complexity/wiring/power consumption. One of the original goal of reef-pi is to make reef tank controllers affordable, I wont say we are there yet, but this is a significant milestone, and seeing it working for you (we still have some work to do) makes me very very excited :)

thanks again for testing it out


I got this working using the PWM pins on the Pi. I'm able to monitor the voltage. Looking forward to get my Kessil Friday and hook this up!

Thanks again.
 

sjeff35

Active Member
View Badges
Joined
Jun 14, 2018
Messages
172
Reaction score
356
Location
Corrales, NM
Rating - 0%
0   0   0
I really like your build Ranjib, it's really clean and I do like being able to see the wiring like that.

I made a little bit of progress the other night and started on the main enclosure for my build. I was a bit overzealous and just added as many sockets as I could fit and I plan to cut it down to those i will actually use before i print it out :p

So I will have to go back and actually decide what I will actually use and remove some, but if I am not sure I would rather have them there than need to re-print another enclosure in the future.

So far the main enclosure will have ports for (before cutting it down):
- A/C power in (with a fused switch)
- 3x 8-outlet power boards (one RJ-45 socket and 1 DC socket per power board)
- 2x pH ports (I'll only be using one for the tank but I included another for the future if I ever want a calcium reactor)
- 2x other BNC ports for the future if Reef-Pi ever includes ORP and Salinity
- An RJ-45 socket to go to the LED control module (which will be up in the light canopy)
- An RJ-45 socket for an external doser (I am happy with my current 4 channel doser for the big 3 elements, but the port is there if I ever change my mind)
- An RJ-45 socket for some temp probes (one RJ-45 socket should be able to support 3 temp probes correct? or should I split them up and use one socket per probe?)
- 4x other RJ-45 sockets for anything else (I'm considering removing these as I'm not sure if they are needed or not)
- And lastly 10x 3-pin audio sockets (for multiple float switches / optical sensors)

Things I am still trying to decide on:
- Too many power board ports? I put space for a 3rd power board as well but I don't think I will ever use it - or if it is even possible to have more than 16 outlets with Reef-Pi so I will likely take that one away.
- The 4x BNC ports. Is adding 2x pH probes or ORP / Salinity something that will ever be done with Reef-Pi? I'm in no rush and likely won't even want to buy any more than just 1 pH probe for at least a year or more or so but if it is a possibility I'd like the ports to be there.
- I have put an additional 4x RJ-45 sockets there, but I can't actually think of anything to use them for haha If I can't think of anything / no one can think of a use for them I will remove them. Only thing I can think of is if I was to split up the multiple temp probes and give each one it's own socket in which case I would have 3 or 4 (tank, sump, cabinet and maybe room temp?).
- The 10x 3-pin audio sockets. How many float switches / optical sensors could Reef-Pi theoretically support? I can think of a use for almost all 10 if it can eventually support that many (mostly fail safes for skimmer / sump / overflow box etc. and to notify me if there is an issue)
- And lastly, could there be a reason to make space for a Pi-Zero in addition to the Pi3 that I already have? I have a big tank, lots of power outlets, lots of dosing, lots of float switches. If what I have planned is way too much for the Pi3 (as I think there is not enough GPIO pins?) then could I run a Pi-Zero in tandem with the Pi3 for half of the functions I want? Even if I don't need it now it wouldn't be the worst idea for future expand-ability.
Reef-Pi Brain 1.jpg

Reef-Pi Brain 2.jpg

Inside there is currently mounting holes for an A/C to D/C buck converter, a Pi3, a protoboard, and lots of room wiring / other boards if needed.

Hey there @MaccaPopEye

Did you ever build this? This looks cool!
 

sjeff35

Active Member
View Badges
Joined
Jun 14, 2018
Messages
172
Reaction score
356
Location
Corrales, NM
Rating - 0%
0   0   0
@Ranjib

Another question just popped into my head.

Is there a way for the temperature module control anything other than turning on the heat or turning on the cooling? Would it be possible to shut down the lights if the tank reaches a set temp? (i.e. 80°)

Thanks
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,825
Reaction score
17,041
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
I got this working using the PWM pins on the Pi. I'm able to monitor the voltage. Looking forward to get my Kessil Friday and hook this up!

Thanks again.
You did the 10V thing ? Kessil expects 10V . I am looking forward to your results.I have recently added support for customizing pwm frequency. If you notice flickering, try adjust the pwm frequency from.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,825
Reaction score
17,041
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
@Ranjib

Another question just popped into my head.

Is there a way for the temperature module control anything other than turning on the heat or turning on the cooling? Would it be possible to shut down the lights if the tank reaches a set temp? (i.e. 80°)

Thanks
Declare another temperature controller with the same sensor, and instead of heater, select the light, that should do it
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,825
Reaction score
17,041
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Ranjib

I'm happy to try resolve anything - Just sometimes the time difference can be a delay. Here we go - One by one

1) I can't find any evidence of an "old" temp sensor

2) I still can't delete equipment in 2.0.0 beta 6. I tried my old card with 1.5 and was able to delete equipment and connectors, but the problem persisted and relay would not work once defined anew.

3) This is the strange part. Everything was working perfectly - ATO, Temp, Equipment, everything, and now features are just failing one by one.

a) All good as far as I can see.
b) Log repoirts sensor value as 1 whether in the water or out
c) Not doing that at all.
I'm going to do a fresh install on a clean card and see if it all works. I'll keep this card to try troubleshoot with you though.

Des
1) According to your log, a temperature sensor (id 28-000007a0ca5al) configured that does not exist. Go to your temperature tab, and edit the existing temperature controller, the sensor dropdown should show all available sensors, if you dont see anything there, then it means theres no temperature sensor detected.
2) I think you should stop reef-pi, delete the db and start it again.
 

Des Westcott

Well-Known Member
View Badges
Joined
May 29, 2018
Messages
645
Reaction score
1,034
Location
Durban - South Africa
Rating - 0%
0   0   0
1) According to your log, a temperature sensor (id 28-000007a0ca5al) configured that does not exist. Go to your temperature tab, and edit the existing temperature controller, the sensor dropdown should show all available sensors, if you dont see anything there, then it means theres no temperature sensor detected.
2) I think you should stop reef-pi, delete the db and start it again.

Hey Ranjib.

I couldn't find the other temp probe to delete. No matter where I looked.

Anyway, I did a fresh install from scratch on a fresh SD card and everything is working perfectly again.

Long may it last!

Now I can focus back on the lights. I'm going to try the PWM straight off the Pi like you and SJeff35 did and see if that helps.

Des
 

MaccaPopEye

Well-Known Member
View Badges
Joined
Jan 5, 2016
Messages
697
Reaction score
1,232
Rating - 0%
0   0   0
Hey there @MaccaPopEye

Did you ever build this? This looks cool!
Thanks man, I have no idea how Ranjib gets so much done in such a short period of time! There just isn't enough hours in the day :eek:

I did end up printing out a prototype of the main housing that included the base with mounting holes to make sure they were all in the right spots as well as the front I/O panel to make sure all the sockets fit. Only the audio jack holes needed adjustment so that has been fixed on the model and I can now print out the final version.

Before I could print it out I broke the glass plate I use as a build surface while removing a print (for the 4th time now :p) and haven't gotten a replacement yet.

June has been a bit busy with the end of the uni semester, my wife gave birth to our second child, then in-laws visiting and now its the start of the next uni semester! But I'll hopefully go and grab another piece of glass this week and print out the final version (and print out the final versions of the power board too).
 

Brad Cox

Active Member
View Badges
Joined
Mar 18, 2017
Messages
327
Reaction score
391
Rating - 0%
0   0   0
Thanks man, I have no idea how Ranjib gets so much done in such a short period of time! There just isn't enough hours in the day :eek:

I did end up printing out a prototype of the main housing that included the base with mounting holes to make sure they were all in the right spots as well as the front I/O panel to make sure all the sockets fit. Only the audio jack holes needed adjustment so that has been fixed on the model and I can now print out the final version.

Before I could print it out I broke the glass plate I use as a build surface while removing a print (for the 4th time now :p) and haven't gotten a replacement yet.

June has been a bit busy with the end of the uni semester, my wife gave birth to our second child, then in-laws visiting and now its the start of the next uni semester! But I'll hopefully go and grab another piece of glass this week and print out the final version (and print out the final versions of the power board too).

Is there a file?
 

sjeff35

Active Member
View Badges
Joined
Jun 14, 2018
Messages
172
Reaction score
356
Location
Corrales, NM
Rating - 0%
0   0   0
Declare another temperature controller with the same sensor, and instead of heater, select the light, that should do it


I looked at that last night, but wouldn't that just turn on the light? I don't see a way to set the outlet to off.

Maybe I'm just looking at it wrong.
 

MaccaPopEye

Well-Known Member
View Badges
Joined
Jan 5, 2016
Messages
697
Reaction score
1,232
Rating - 0%
0   0   0
reef-pi should work with tentacle shield without any changes. I didnt went that route, as I have no need (or any plan to add support) for EC or ORP probes in immediate future. You can use them for multiple ph probes probably. They are bit pricy, (in fact ph electronics is pricy as well). And since this was my very first stab at ph monitor build, i really wanted just the ph circuit, without anything extra.
Do you see any use of EC or ORP probes? ORP interpretation is bit hard, and it mostly acts as another layer of validation if things go wrong, while EC I think is rarely useful if your ATO is tuned properly (since salinity will be constant)

I do think EC and ORP can be quite useful, at least just as useful as pH is. All 3 are really only another layer of validation. They can also give you some extra info, not anything more important than pH does, but also not really less important either.

They can alert you to multiple potential issues or equipment failures and add extra layers of redundancy which is quite important and often overlooked.

I'd definitely like to be able to monitor all 3 and control equipment depending on their reading (eventually), but I would have to slowly buy one at a time anyway. It's definitely not essential though (but I don't think it's any less important than pH).

Once I get my 3-D printer this week, (after I figure out how to use it and make some test prints) This is going to be my first project. Found it on Thingiverse.com

upload_2018-7-15_16-40-57.png

Good luck! I have massive lists of things I want to print haha one day I will get around to printing it all.

If you ever want to make your own designs etc. and haven't done any 3D modelling before (like me) then download Fusion 360 (it's free) and you can use the things you want to print from thingiverse and essentially copy them to draw your own 3D model from scratch. It's a great way to practice 3D modelling and get better over time. As you improve try copying more complex models etc. That fan mount would be a great first model to try and draw.

Is there a file?
I've been meaning to upload them for a while now. I've got 3 more shifts before my next set of days off so I'll try and get the files up then!
 

MaccaPopEye

Well-Known Member
View Badges
Joined
Jan 5, 2016
Messages
697
Reaction score
1,232
Rating - 0%
0   0   0
Yeah, that would be great. I get my 3-D printer tomorrow! I need projects ;)
haha I'm sure you have plenty of things lined up (including the obligatory calibration cubes, temp towers and stress tests etc.) as well as getting used to your printer and its quirks, hopefully yours fairly plug and play - it does look pretty user friendly (especially compared to my Anet haha).

The FDM process of 3D printing is quite slow so it's easy to set one model up to print and then just spend the next few hours deciding what to print next (prioritising is one of the harder things :p).

Make sure to check out the 3D printer thread here on R2R as well :)
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,825
Reaction score
17,041
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Thanks man, I have no idea how Ranjib gets so much done in such a short period of time! There just isn't enough hours in the day :eek:

I did end up printing out a prototype of the main housing that included the base with mounting holes to make sure they were all in the right spots as well as the front I/O panel to make sure all the sockets fit. Only the audio jack holes needed adjustment so that has been fixed on the model and I can now print out the final version.

Before I could print it out I broke the glass plate I use as a build surface while removing a print (for the 4th time now :p) and haven't gotten a replacement yet.

June has been a bit busy with the end of the uni semester, my wife gave birth to our second child, then in-laws visiting and now its the start of the next uni semester! But I'll hopefully go and grab another piece of glass this week and print out the final version (and print out the final versions of the power board too).
Congrats mate :)
 

philshel

Active Member
View Badges
Joined
Jul 24, 2010
Messages
364
Reaction score
381
Rating - 0%
0   0   0
I do think EC and ORP can be quite useful, at least just as useful as pH is. All 3 are really only another layer of validation. They can also give you some extra info, not anything more important than pH does, but also not really less important either.

They can alert you to multiple potential issues or equipment failures and add extra layers of redundancy which is quite important and often overlooked.

I'd definitely like to be able to monitor all 3 and control equipment depending on their reading (eventually), but I would have to slowly buy one at a time anyway. It's definitely not essential though (but I don't think it's any less important than pH).



Good luck! I have massive lists of things I want to print haha one day I will get around to printing it all.

If you ever want to make your own designs etc. and haven't done any 3D modelling before (like me) then download Fusion 360 (it's free) and you can use the things you want to print from thingiverse and essentially copy them to draw your own 3D model from scratch. It's a great way to practice 3D modelling and get better over time. As you improve try copying more complex models etc. That fan mount would be a great first model to try and draw.


I've been meaning to upload them for a while now. I've got 3 more shifts before my next set of days off so I'll try and get the files up then!


I started an all-in-one enclosure based on the "ultimate box maker" (https://www.thingiverse.com/thing:2938921). The author has been very helpful in helping me add holes to the lid and multiple pcb feet. So far I have roughed out the lid, one end, and feet for a relay, pi3, and two lm2596. It is in .scad which is clumsy but works. Id be happy to offer a copy of the work so far if anyone wants it.
 

sjeff35

Active Member
View Badges
Joined
Jun 14, 2018
Messages
172
Reaction score
356
Location
Corrales, NM
Rating - 0%
0   0   0
I started an all-in-one enclosure based on the "ultimate box maker" (https://www.thingiverse.com/thing:2938921). The author has been very helpful in helping me add holes to the lid and multiple pcb feet. So far I have roughed out the lid, one end, and feet for a relay, pi3, and two lm2596. It is in .scad which is clumsy but works. Id be happy to offer a copy of the work so far if anyone wants it.

That would be great! Please post a link.

Thanks
 

MaccaPopEye

Well-Known Member
View Badges
Joined
Jan 5, 2016
Messages
697
Reaction score
1,232
Rating - 0%
0   0   0
Congrats mate :)
Thank you :)

I started an all-in-one enclosure based on the "ultimate box maker" (https://www.thingiverse.com/thing:2938921). The author has been very helpful in helping me add holes to the lid and multiple pcb feet. So far I have roughed out the lid, one end, and feet for a relay, pi3, and two lm2596. It is in .scad which is clumsy but works. Id be happy to offer a copy of the work so far if anyone wants it.
Awesome! I did consider modding that box to suit my purposes for a while but decided on making my own. As I said above I really like to try and draw my own models (even if they are complete copies of others designs) so I can keep improving my very novice CAD skills.

That and the basic box part of the design is quite simple, doing the component mounting feet and I/O ports is where the work is. The design where the front panel is removable could be handy though, as you add things to your Reef-Pi you just need to print out a new I/O port rather than print a whole new box.

Very keen to see what you come up with though :)
 

philshel

Active Member
View Badges
Joined
Jul 24, 2010
Messages
364
Reaction score
381
Rating - 0%
0   0   0
For anyone who want's to play with this enclosure. You will need the latest "Development Snapshot" of OpenSCAD from here http://www.openscad.org/downloads.html. You will need to mostly edit the code, the "customizer" really does not work with this as it's been modified to add the holes in the top and extra feet for multiple PCBs. File should be attached.
 

Attachments

  • Pi Box All in One - Copy.zip
    7.2 KB · Views: 56
Back
Top