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

elysics

Valuable Member
View Badges
Joined
Jan 15, 2020
Messages
1,695
Reaction score
1,607
Rating - 0%
0   0   0
I can follow the fritz diagram but I am hoping someone can explain how its working, 10v is inbound and then goes through 1k resistor which then goes to the collector and outputs 10v pwm but just not sure I follow how that is working. The blue lines are the 10v pwm output, 5v pwm from the reef-pi hat goes through a 10k resistor to the base pin, just not sure how that is switching the 10v input. Prolly a dumb question just trying to understand how it works. :)

npn.png
In not super correct but maybe easy to understand terms, if the signal line goes high, the transistor becomes conductive and the 10V vanishes into the ground, and because of the 1k resistor the 10V line can't fight the ground (which would be a short). The result is that the output line is at 0V while the signal is high. If the signal line goes low, the connection to ground is cut and the 10V line becomes strong enough again to pull the output high to 10V

A side effect is that this inverts the signal, i.e. if input signal is high then output signal is low and vice versa.
 

dmsc2fs

Well-Known Member
View Badges
Joined
Dec 29, 2021
Messages
513
Reaction score
566
Location
Charleston
Rating - 0%
0   0   0
Hey folks. I have 2 questions. One simple and one I don't know if the answer can be fleshed out as easily.

1. I think I read a post around thread 800 or so that indicated a Raspi 2 would not work for Reef-pi. Is this accurate? As far as I know the resources for a go based web server can't be very resource intensive? Is their a limitation?

1a. if a R-pi 2 can be used from a performance perspective any reason why it wouldn't work in a robo-tank? The pinout on the header should be the same from a 2 to a 3. It should mate without issues?

2. Has anyone setup a reverse proxy with nginx as a frontend to extend reef-pi to the internet? I have the proxy working but I am struggling with reef-pi giving me an invalid credentails when I try to authenticate. This error is only from the proxy and not direct to reef-pi.
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,409
Reaction score
1,726
Location
Missouri
Rating - 0%
0   0   0
Hey folks. I have 2 questions. One simple and one I don't know if the answer can be fleshed out as easily.

1. I think I read a post around thread 800 or so that indicated a Raspi 2 would not work for Reef-pi. Is this accurate? As far as I know the resources for a go based web server can't be very resource intensive? Is their a limitation?

1a. if a R-pi 2 can be used from a performance perspective any reason why it wouldn't work in a robo-tank? The pinout on the header should be the same from a 2 to a 3. It should mate without issues?

2. Has anyone setup a reverse proxy with nginx as a frontend to extend reef-pi to the internet? I have the proxy working but I am struggling with reef-pi giving me an invalid credentails when I try to authenticate. This error is only from the proxy and not direct to reef-pi.
1. According to @Ranjib original adafruit page - https://learn.adafruit.com/reef-pi-installation-and-configuration/parts Pi Zero, 2, 3 any Pi B+ will work.

1a. For robotank questions I would ask @robsworld78 he will know for sure...

2. I would not do a rp or anything like that I would look into Tailscale - https://tailscale.com/ what I came across in these threads and I run my own VPN but its really easy to setup and secure to boot, highly recommend it. Played with it this weekend and took maybe 10min to get it working on the rpi and my phone. If you want to roll your own then nebula would be what I would look into but for most purposes Tailscale should work easily and securely for you.

:)
 

dmsc2fs

Well-Known Member
View Badges
Joined
Dec 29, 2021
Messages
513
Reaction score
566
Location
Charleston
Rating - 0%
0   0   0
1. According to @Ranjib original adafruit page - https://learn.adafruit.com/reef-pi-installation-and-configuration/parts Pi Zero, 2, 3 any Pi B+ will work.

1a. For robotank questions I would ask @robsworld78 he will know for sure...

2. I would not do a rp or anything like that I would look into Tailscale - https://tailscale.com/ what I came across in these threads and I run my own VPN but its really easy to setup and secure to boot, highly recommend it. Played with it this weekend and took maybe 10min to get it working on the rpi and my phone. If you want to roll your own then nebula would be what I would look into but for most purposes Tailscale should work easily and securely for you.

:)
Thanks for the feedback. I’ll take a peak at tailscale but if I go down a vpn route I’ll go OpenVPN and stick with something I’m familiar with. I was hoping to stay away from a vpn solution.
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,409
Reaction score
1,726
Location
Missouri
Rating - 0%
0   0   0
Thanks for the feedback. I’ll take a peak at tailscale but if I go down a vpn route I’ll go OpenVPN and stick with something I’m familiar with. I was hoping to stay away from a vpn solution.
Trust me its not anything like a traditional vpn solution, take a look and I think you will like what you see..
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Hey folks. I have 2 questions. One simple and one I don't know if the answer can be fleshed out as easily.

1. I think I read a post around thread 800 or so that indicated a Raspi 2 would not work for Reef-pi. Is this accurate? As far as I know the resources for a go based web server can't be very resource intensive? Is their a limitation?

1a. if a R-pi 2 can be used from a performance perspective any reason why it wouldn't work in a robo-tank? The pinout on the header should be the same from a 2 to a 3. It should mate without issues?

2. Has anyone setup a reverse proxy with nginx as a frontend to extend reef-pi to the internet? I have the proxy working but I am struggling with reef-pi giving me an invalid credentails when I try to authenticate. This error is only from the proxy and not direct to reef-pi.
rpi 2 should work just fine. 26 pin models wont work. anything Model B (40 pin), including pi zeor, 2 , 3, 4 should all work. robotank should be fine as well

i have not tried nginx based reverse proxy (curious why you need it. reef-pi can do https out of the box). but i would suggest go slow, start with no auth, http only reef-pi setup for nginx. start a thread and share your nginx config we can discuss it separately.
 

robsworld78

Valuable Member
View Badges
Joined
Feb 14, 2020
Messages
1,029
Reaction score
1,293
Location
Edmonton, Canada
Rating - 0%
0   0   0
Hey folks. I have 2 questions. One simple and one I don't know if the answer can be fleshed out as easily.

1. I think I read a post around thread 800 or so that indicated a Raspi 2 would not work for Reef-pi. Is this accurate? As far as I know the resources for a go based web server can't be very resource intensive? Is their a limitation?

1a. if a R-pi 2 can be used from a performance perspective any reason why it wouldn't work in a robo-tank? The pinout on the header should be the same from a 2 to a 3. It should mate without issues?

2. Has anyone setup a reverse proxy with nginx as a frontend to extend reef-pi to the internet? I have the proxy working but I am struggling with reef-pi giving me an invalid credentails when I try to authenticate. This error is only from the proxy and not direct to reef-pi.
Yeah any Pi that has the 40 pin header will work with Robo-Tank.
 

dmsc2fs

Well-Known Member
View Badges
Joined
Dec 29, 2021
Messages
513
Reaction score
566
Location
Charleston
Rating - 0%
0   0   0
i have not tried nginx based reverse proxy (curious why you need it. reef-pi can do https out of the box). but i would suggest go slow, start with no auth, http only reef-pi setup for nginx. start a thread and share your nginx config we can discuss it separately.

I had thought about going with no authentication @ reef-pi. I will probably move to that and verify the process works and try and move back to adding in authentication.

The reasoning for using nginx as a reverse proxy is to enable me to have control/access of two reef-pi's from a single location. I.E. only one hole in my firewall. I am authenticating against nginx before having access to the reef-pi I am testing so removing the authentication @ reef-pi could be acceptable. Someone trying something nefarious on my local lan is no different than walking over to the tank and pulling a cord from the wall. I don't have any guns, gates or guards on prem.
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,409
Reaction score
1,726
Location
Missouri
Rating - 0%
0   0   0
I spent a bit looking at it and decided against it for a number or reasons. Thank you for providing it as an option.
Understand but its waaay more secure than what you are doing with an RP and nginx and would do exactly what you are wanting to do. It was basically developed for slack employees and further refined and taken public. The only current weakness is that they are providing the certs, if you want to be in control of the certs then nebula would be the way to go. The connections through them is secure, its basically running on top of wireguard and they are not even doing IAM, they are using some established IAM provider, its actually really good stuff.

I would be glad to discuss the pro's and con's if you want to further just shoot me a PM, I know you don't know me etc but cyber is what I do for my day job, just trying to help folks do the most secure remote access that they can. :)
 

GaryE

Well-Known Member
View Badges
Joined
Mar 12, 2020
Messages
992
Reaction score
1,321
Location
Coatesville, Indiana
Rating - 0%
0   0   0
I opted for a Wireguard setup on my mikrotik router. I use pihole to block ads on the home network and with Wireguard I am able to extend that to my mobile wherever I am. Plus I get the luxury of being able to connect to any of my internal stuff like reef-pi without issue.
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,409
Reaction score
1,726
Location
Missouri
Rating - 0%
0   0   0
I opted for a Wireguard setup on my mikrotik router. I use pihole to block ads on the home network and with Wireguard I am able to extend that to my mobile wherever I am. Plus I get the luxury of being able to connect to any of my internal stuff like reef-pi without issue.
Yeah Nebula and Tailscale both run on top of wireguard, good stuff.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Yeah Nebula and Tailscale both run on top of wireguard, good stuff.
Exactly . They are same .. kinda .


I am staying with raw port forwarding with https and combination of google wifi to enable /disable it on demand as and when I need it.
generally I think I only need it when I’m on vacation , and that too for checking things out .
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,409
Reaction score
1,726
Location
Missouri
Rating - 0%
0   0   0
Hey @Ranjib on your kessil lighting controller, can you explain how the npn is working with the supplied 10v input? @elysics responded but still not sure I fully understand how it works, I have a kessil coming and looking at making something to control it with reef-pi.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0

iLMaRiO

Well-Known Member
View Badges
Joined
Jun 24, 2020
Messages
601
Reaction score
129
Rating - 0%
0   0   0
@Ranjib can I set a doser to dose in milliseconds ? Or in seconds with a decimal value, like 68.124 seconds.
The error message shown if no duration is set is saying "An integer number >= 1 is required!" so I think i can't use float values. (but they are accepted, but converted from dot to comma ie 12.345 => 12,345 strange for an english app, as decimal part is delimited with dot in english)

To be short, setting 58.812 is converted to 58,812, will I dose for 58 seconds and 812 milliseconds or 58812 seconds ?
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
@Ranjib can I set a doser to dose in milliseconds ? Or in seconds with a decimal value, like 68.124 seconds.
The error message shown if no duration is set is saying "An integer number >= 1 is required!" so I think i can't use float values. (but they are accepted, but converted from dot to comma ie 12.345 => 12,345 strange for an english app, as decimal part is delimited with dot in english)

To be short, setting 58.812 is converted to 58,812, will I dose for 58 seconds and 812 milliseconds or 58812 seconds ?
This is for dc or stepper based doser? for dc motor based doser that uses pwm, it s 58812 seconds
 

iLMaRiO

Well-Known Member
View Badges
Joined
Jun 24, 2020
Messages
601
Reaction score
129
Rating - 0%
0   0   0
This is for dc or stepper based doser? for dc motor based doser that uses pwm, it s 58812 seconds

It's a DC doser, I need to dose a fraction of second, is this possible in some way ?

Other question: i've noticed that when reef-pi shuts down, all dosing pumps start to dose, is anything wrong in my configuration or my controller ? (i'm using Robo-Tank). I did a simple raspberry reboot and all dosing started, forcing me to unplug the cables.
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,409
Reaction score
1,726
Location
Missouri
Rating - 0%
0   0   0
Can you be specific which part is unclear from this guide: https://learn.adafruit.com/reef-pi-lighting-controller?view=all

you can use pi pwm directly instead of pca9685
Yeah its the 10v going through a resistor then we peel off the pwm connection going to the Kessil. I do not understand how that signal is being adjusted since its not going through the NPN, the pwm signal from the PI comes through the NPN and somehow switches the pwm signal to the kessil I just do not understand how its doing it.

I'm using pca9685, @Michael Lane hat or will be once I get the circtui soldered up.
 

robsworld78

Valuable Member
View Badges
Joined
Feb 14, 2020
Messages
1,029
Reaction score
1,293
Location
Edmonton, Canada
Rating - 0%
0   0   0
It's a DC doser, I need to dose a fraction of second, is this possible in some way ?

Other question: i've noticed that when reef-pi shuts down, all dosing pumps start to dose, is anything wrong in my configuration or my controller ? (i'm using Robo-Tank). I did a simple raspberry reboot and all dosing started, forcing me to unplug the cables.
That doesn't sound good, has this happened before? I can't see reef-pi turning on the outputs and the DC ports have a pulldown resistor so they are forced off if no signal is present.
 

TOP 10 Trending Threads

WHAT AMOUNT OF LIVE ROCK AND SAND SHOULD BE PRIORITIZED FOR OPTIMAL BIODIVERSITY/FILTRATION?

  • 100% live rock + bagged sand

    Votes: 37 27.8%
  • 100% dry rock + 100% live sand

    Votes: 45 33.8%
  • 50/50 live/dry rock, 50/50 live/bagged sand

    Votes: 29 21.8%
  • 75% live rock, 25% live sand

    Votes: 12 9.0%
  • 25% live rock, 75% live sand

    Votes: 10 7.5%
Back
Top