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

robsworld78

Well-Known Member
Review score
+0 /0 /-0
View Badges
Joined
Feb 14, 2020
Messages
893
Reaction score
1,180
Review score
+0 /0 /-0
Location
Edmonton, Canada
Personally, I would also recommend an additional gate resistor of something like 1k, charging the gate might otherwise result in current spikes that the GPIO or the PI don't like.
I forgot to mention that, thanks. I do have those resistors except 220 ohm, I use them on all outputs. PWM0 is going to that feeder circuit above. The BSS138 I'm using also has diodes built in for 2k ESD protection.

Screen Shot 10-25-22 at 01.51 AM.PNG
 
World Wide Corals

Tom Bishop

Well-Known Member
Review score
+0 /0 /-0
View Badges
Joined
Jan 1, 2019
Messages
940
Reaction score
1,370
Review score
+0 /0 /-0
Location
Missouri

Tom Bishop

Well-Known Member
Review score
+0 /0 /-0
View Badges
Joined
Jan 1, 2019
Messages
940
Reaction score
1,370
Review score
+0 /0 /-0
Location
Missouri
@robsworld78 or anyone else, I have 2 NPN's in my circuit junk box, I think either would work but let me know, I have PN2222a or 2n7000 that I could use, let me know if it matters or one would work better than the other, thanks. :)



I think either would work the other issue I need to figure out is how I am going to feed 3.3v, all I have is 5v, here is his board layout - https://www.tindie.com/products/ranthalion/ml-reef-pi-hat-goby/#specs
 
Last edited:
AquaSD

Sral

Active Member
Review score
+0 /0 /-0
View Badges
Joined
May 2, 2022
Messages
361
Reaction score
429
Review score
+0 /0 /-0
Location
Germany
@robsworld78 or anyone else, I have 2 NPN's in my circuit junk box, I think either would work but let me know, I have PN2222a or 2n7000 that I could use, let me know if it matters or one would work better than the other, thanks. :)



I think either would work the other issue I need to figure out is how I am going to feed 3.3v, all I have is 5v, here is his board layout - https://www.tindie.com/products/ranthalion/ml-reef-pi-hat-goby/#specs
Either should work according to @robsworld78 , in the post you linked here shows the npn bipolar transistor method (PN2222) and he mentioned to me that a n-channel MOSFET would work as well (2N7000). You simply need to put the right resistor between the I/O and the transistor.

for the 3.3v: if you do not have a 3.3V regulator lying around, you could try something with the npn bipolar transistor. Simply give him the 5V stepped down to 4.2V through a diode and a resistor to ground and feed that 4.2V into the transistor base. This will allow a maximum voltage of something like 3.1-3.4V at the transistor emitter. I’ll give you a schematic tomorrow if you like. Buying a 3.3V regulator would be safer though ^^
 

Tom Bishop

Well-Known Member
Review score
+0 /0 /-0
View Badges
Joined
Jan 1, 2019
Messages
940
Reaction score
1,370
Review score
+0 /0 /-0
Location
Missouri
Either should work according to @robsworld78 , in the post you linked here shows the npn bipolar transistor method (PN2222) and he mentioned to me that a n-channel MOSFET would work as well (2N7000). You simply need to put the right resistor between the I/O and the transistor.

for the 3.3v: if you do not have a 3.3V regulator lying around, you could try something with the npn bipolar transistor. Simply give him the 5V stepped down to 4.2V through a diode and a resistor to ground and feed that 4.2V into the transistor base. This will allow a maximum voltage of something like 3.1-3.4V at the transistor emitter. I’ll give you a schematic tomorrow if you like. Buying a 3.3V regulator would be safer though ^^
Yeah the board I have only has 3.3v on the temp probes and I am using all of those, everything else is 5v. I am also wondering if it really matters, could I get away with just feeding 5v, by the time it makes it to the board it will be less than that, would 1v be to much, hard to say. I think I read @Des Westcott feeding 5v to his feeder - https://www.reef2reef.com/threads/diy-auto-feeder-with-reef-pi.701874/ doing a 3.3v regulator just something else to purchase and wire up..maybe i just forgo the reef-pi integration altogether and just use the timer, but woul dbe nice to cut power when its not supposed to be in use and log feedings etc...where is that dang easy button :)
 
Last edited:

JachPot

Active Member
Review score
+0 /0 /-0
View Badges
Joined
Feb 12, 2022
Messages
444
Reaction score
662
Review score
+0 /0 /-0
Location
Colorado
Sounds good, let me know how it goes. The main controller and lighting/DC module does required a power supply however you should have gotten a Y cable for the power supply. With that you can plug the power supply into the Y and then you'll have a plug for both pieces. The sensor extension doesn't require a lot of power so that's sent through the Ethernet patch cable from the controller but as the DC equipment module can use lots of current it's not possible to use the Ethernet cable that's why it has it's own DC input plug.
Totally forgot there was a Y until when I looked last night. PSU came in today. So I'll check it out tonight.
 
Tidal Gardens

robsworld78

Well-Known Member
Review score
+0 /0 /-0
View Badges
Joined
Feb 14, 2020
Messages
893
Reaction score
1,180
Review score
+0 /0 /-0
Location
Edmonton, Canada
@robsworld78 or anyone else, I have 2 NPN's in my circuit junk box, I think either would work but let me know, I have PN2222a or 2n7000 that I could use, let me know if it matters or one would work better than the other, thanks. :)



I think either would work the other issue I need to figure out is how I am going to feed 3.3v, all I have is 5v, here is his board layout - https://www.tindie.com/products/ranthalion/ml-reef-pi-hat-goby/#specs
I would go with the 2n7000, the other is a BJT which is current driven and maybe the Pi doesn't have enough to switch it properly, the 2n7000 mosfet is voltage driven so easier to use.

For the 3.3v technically you don't need it if your ok with powering the feeder with batteries, that just replaces them which is nice. The other way would be as @Sral mentioned or a 3.3v low dropout (LDO) regulator. And of course as you mentioned you can just use 5v and hope for the best. :)

where is that dang easy button :)
Robo-Tank. :grinning-face-with-sweat:
 

Tom Bishop

Well-Known Member
Review score
+0 /0 /-0
View Badges
Joined
Jan 1, 2019
Messages
940
Reaction score
1,370
Review score
+0 /0 /-0
Location
Missouri
I would go with the 2n7000, the other is a BJT which is current driven and maybe the Pi doesn't have enough to switch it properly, the 2n7000 mosfet is voltage driven so easier to use.

For the 3.3v technically you don't need it if your ok with powering the feeder with batteries, that just replaces them which is nice. The other way would be as @Sral mentioned or a 3.3v low dropout (LDO) regulator. And of course as you mentioned you can just use 5v and hope for the best. :)


Robo-Tank. :grinning-face-with-sweat:
Yeah I hear ya but I have way to many of the Lane hats and really for what I need it's meets my needs...I always steer folks your way for sure...I assume this would do what I need for the voltage regulator..https://www.amazon.com/dp/B09PRD393H/?coliid=I2J8KSJ89MBFS0&colid=3483ETTLL38EF&psc=1&ref_=lv_ov_lig_dp_it

I may do like you said and just skip the 3.3v feed and just power it with some rechargeable batteries, now looking at it dropping the 3.3v would make it pretty easy, will have to think about it..I still do not have the feeder, need to find a cheap one on hand.

BTW, you were going to get back to me about that second PH module that I have, you were going to give me some scripts to run on it etc....let me know when you have time to mess with it...
 

robsworld78

Well-Known Member
Review score
+0 /0 /-0
View Badges
Joined
Feb 14, 2020
Messages
893
Reaction score
1,180
Review score
+0 /0 /-0
Location
Edmonton, Canada
Yeah I hear ya but I have way to many of the Lane hats and really for what I need it's meets my needs...I always steer folks your way for sure...I assume this would do what I need for the voltage regulator..https://www.amazon.com/dp/B09PRD393H/?coliid=I2J8KSJ89MBFS0&colid=3483ETTLL38EF&psc=1&ref_=lv_ov_lig_dp_it

I may do like you said and just skip the 3.3v feed and just power it with some rechargeable batteries, now looking at it dropping the 3.3v would make it pretty easy, will have to think about it..I still do not have the feeder, need to find a cheap one on hand.

BTW, you were going to get back to me about that second PH module that I have, you were going to give me some scripts to run on it etc....let me know when you have time to mess with it...
Thanks, I appreciate that and I was just playing, couldn't resist. :)

That regulator is perfect, if you can get free shipping it's the same price as batteries. Those header pins should make it easy to connect as well.

Sorry not long ago I realized the code I was using for the pH circuit got changed along the way and seems I messed up the other commands for onboard calibration etc so you can only use it like the original.
 
Top Shelf Aquatics

pais

New Member
Review score
+0 /0 /-0
View Badges
Joined
Jun 27, 2019
Messages
14
Reaction score
11
Review score
+0 /0 /-0
Hello everybody, I have a problem with interferences. When I turn on led lights witch Chinese power supply, the current regulator as in the figure, I get pH measurement bad and temp sensors also turn offline. Can you suggest me if a different power supply can help me ? I did a bit of research and found @Bigtrout had a similar issue, so I wish he can help me. Thanks !
Hb4527986a0aa4d1daf6620999a92a7cck.jpg
 

Sral

Active Member
Review score
+0 /0 /-0
View Badges
Joined
May 2, 2022
Messages
361
Reaction score
429
Review score
+0 /0 /-0
Location
Germany
Hello everybody, I have a problem with interferences. When I turn on led lights witch Chinese power supply, the current regulator as in the figure, I get pH measurement bad and temp sensors also turn offline. Can you suggest me if a different power supply can help me ? I did a bit of research and found @Bigtrout had a similar issue, so I wish he can help me. Thanks !
Hb4527986a0aa4d1daf6620999a92a7cck.jpg

Generally speaking, yes absolutely.
In europe for example there is legislation in place that all eqipment with a switch mode power supply above 80W needs to fulfill certain electro magnetic compatibility requirements, e.g. that they don't radiate or feed too much interference back into the supply. If your's is especially cheap or erroneous it might very well cause these problems.
 

JachPot

Active Member
Review score
+0 /0 /-0
View Badges
Joined
Feb 12, 2022
Messages
444
Reaction score
662
Review score
+0 /0 /-0
Location
Colorado
@robsworld78 Might have a bug, if you hit reboot while the DC pump is on, it remains on. I'm not sure how much that matters, but something worth noting.


After I remembered to put the NC jumper on, my NC sensor started working... (Once I flipped it to "reverse") and now I have an ATO!

My only complaint now is I hate the chart so far, for that particular device. Trying to track how much it runs right now. I'll report back.


I also keep getting over use macro emails. Saying my timeout of 60 seconds is being hit. Even though the pump isn't on? I'm pretty confused about that.
^this might be due to me being a *******, I've tuned the sensor some more with a screwdriver behind the panel, we'll see!
^Yeah the alert keeps going off, but the pump isn't running. Probably because the sensor is in reverse?


Edit: Weird, it's still sending alerts even after the alerts are turned off for the macro. I had to turn telemetry off entirely.
 
Last edited:
BRS

robsworld78

Well-Known Member
Review score
+0 /0 /-0
View Badges
Joined
Feb 14, 2020
Messages
893
Reaction score
1,180
Review score
+0 /0 /-0
Location
Edmonton, Canada
@robsworld78 Might have a bug, if you hit reboot while the DC pump is on, it remains on. I'm not sure how much that matters, but something worth noting.


After I remembered to put the NC jumper on, my NC sensor started working... (Once I flipped it to "reverse") and now I have an ATO!

My only complaint now is I hate the chart so far, for that particular device. Trying to track how much it runs right now. I'll report back.


I also keep getting over use macro emails. Saying my timeout of 60 seconds is being hit. Even though the pump isn't on? I'm pretty confused about that.
^this might be due to me being a *******, I've tuned the sensor some more with a screwdriver behind the panel, we'll see!
^Yeah the alert keeps going off, but the pump isn't running. Probably because the sensor is in reverse?


Edit: Weird, it's still sending alerts even after the alerts are turned off for the macro. I had to turn telemetry off entirely.
Looks like you did hit a bug. The DC ports are setup to turn off if no signal is present so I just did a test, when reef-pi is rebooted the pca9685 isn't reset or turned off.

How are you using the DC port?

@Ranjib I tested this with v5.3 by setting up a dosing pump in reef-pi using a pin from the pca9685, if the dose is running and reef-pi is rebooted the signal from the pca9685 is still present when it comes back online keeping the dose running until the next schedule comes around to turn it off. Might be rare that happens but could be serious if/when it does. To test have the dose running then in admin tab press the reboot button and you'll see it.

Sorry can't help with the emails, something isn't right, maybe @Ranjib has some thoughts.
 

JachPot

Active Member
Review score
+0 /0 /-0
View Badges
Joined
Feb 12, 2022
Messages
444
Reaction score
662
Review score
+0 /0 /-0
Location
Colorado
Looks like you did hit a bug. The DC ports are setup to turn off if no signal is present so I just did a test, when reef-pi is rebooted the pca9685 isn't reset or turned off.

How are you using the DC port?

@Ranjib I tested this with v5.3 by setting up a dosing pump in reef-pi using a pin from the pca9685, if the dose is running and reef-pi is rebooted the signal from the pca9685 is still present when it comes back online keeping the dose running until the next schedule comes around to turn it off. Might be rare that happens but could be serious if/when it does. To test have the dose running then in admin tab press the reboot button and you'll see it.

Sorry can't help with the emails, something isn't right, maybe @Ranjib has some thoughts.
I have the 12v pump with the cable cut and plugged into the green connector. It goes to DC port 1. I have a legit float valve connected in the float valve spot. Sensor is in No contact with the NC jumper.

The sensor did have to be flipped to "reverse" to work properly.

Macro is sensor 2 - turn on DC1, 1 second interval. Alarm at 60 seconds.

Right now it's not even working. I might have tuned it too high on the detection level. It's a bit finicky.
 

robsworld78

Well-Known Member
Review score
+0 /0 /-0
View Badges
Joined
Feb 14, 2020
Messages
893
Reaction score
1,180
Review score
+0 /0 /-0
Location
Edmonton, Canada
I have the 12v pump with the cable cut and plugged into the green connector. It goes to DC port 1. I have a legit float valve connected in the float valve spot. Sensor is in No contact with the NC jumper.

The sensor did have to be flipped to "reverse" to work properly.

Macro is sensor 2 - turn on DC1, 1 second interval. Alarm at 60 seconds.

Right now it's not even working. I might have tuned it too high on the detection level. It's a bit finicky.
Thanks, I was thinking you were using it for ATO, that's great you added the float switch to the DC1 backup port, that will turn off the DC port no matter what and would stop the pump in the reboot scenario you came across.

It is normal to have to change the "reverse" setting for the non-contact sensor, that's just how they work for ATO usage. I forgot to mention about that screw in the back of the sensor, it seems to be for the sensitivity of the sensor but when turned to much it can act a little strange. If the red light goes on/off based on water or your hand it should be ok. As you have the backup float switch installed it's important that's always in the correct position or the DC port won't turn on.

For the macro maybe try using the "equipment" selection in the ATO settings instead of the macro. When you change to equipment you can select DC1 and setup alerts from it, shouldn't need to use the macros for that.
 
Top Shelf Aquatics

Sral

Active Member
Review score
+0 /0 /-0
View Badges
Joined
May 2, 2022
Messages
361
Reaction score
429
Review score
+0 /0 /-0
Location
Germany
Looks like you did hit a bug. The DC ports are setup to turn off if no signal is present so I just did a test, when reef-pi is rebooted the pca9685 isn't reset or turned off.

How are you using the DC port?

@Ranjib I tested this with v5.3 by setting up a dosing pump in reef-pi using a pin from the pca9685, if the dose is running and reef-pi is rebooted the signal from the pca9685 is still present when it comes back online keeping the dose running until the next schedule comes around to turn it off. Might be rare that happens but could be serious if/when it does. To test have the dose running then in admin tab press the reboot button and you'll see it.

(...)
That's not a bug, it's a "feature". The PCA9685 is a stand-alone chip, as long as it has power, it will continue running the PWM signals it has been set to put out.

Only if you cut power or if Reef-Pi is programmed to reset all I2C components on reboot/power off, you will see these turn off. Maybe you could integrate that in Reef-Pi itself and in the drivers @Ranjib ? E.g. all drivers get a reset message from Reef-Pi on reboot/power off (maybe even make this an option, as you might not want this for some drivers) and drivers with output then reset all outputs, like the PCA9685 ?
 

robsworld78

Well-Known Member
Review score
+0 /0 /-0
View Badges
Joined
Feb 14, 2020
Messages
893
Reaction score
1,180
Review score
+0 /0 /-0
Location
Edmonton, Canada
That's not a bug, it's a "feature". The PCA9685 is a stand-alone chip, as long as it has power, it will continue running the PWM signals it has been set to put out.

Only if you cut power or if Reef-Pi is programmed to reset all I2C components on reboot/power off, you will see these turn off. Maybe you could integrate that in Reef-Pi itself and in the drivers @Ranjib ? E.g. all drivers get a reset message from Reef-Pi on reboot/power off (maybe even make this an option, as you might not want this for some drivers) and drivers with output then reset all outputs, like the PCA9685 ?
Yeah for sure resetting the pca9685 is a feature of it, calling it a bug in reef-pi isn't accurate, more like an oversight, I just tend to call anything unexpected a bug. There's a command that can be sent to the pca9685 which will turn off all outputs or another to reset it, if that was added to the startup function it would be nice, I don't think leaving it like this is good.
 
Last edited:
Top Shelf Aquatics

MikeSpike

Community Member
Review score
+0 /0 /-0
View Badges
Joined
Jan 2, 2019
Messages
60
Reaction score
51
Review score
+0 /0 /-0
Hi all,

Word of warning for all Reef Pi users. I went away for a couple of weeks with a neighbour watching over my tank and feeding every couple of days together with close my close monitoring via Reef Pi. He alerted me that the tank was a little quiet a couple of days ago, I tried to logon to Reef Pi (via VNC) but it didn't work (I didn't think anything of it and I assumed it was something with VNC). Unfortunately I retuned last night to a tank at 35/95 Celsius/Farenheight and full of dead livestock.

I tried logging into the app via the usual home WIFI - but I still couldn't and had to power cycle the whose raspberry pi and which point I was able to login and I received a flurry of emails that the temperature was too high.

It appears the app/raspberry pi crashed with the heater in the 'on' position. For reference, I'm using a full system built by robo-tank (although to be clear this wasn't hardware related - the relay is working perfectly).

This isn't a complaint or moan I am very grateful to Ranjib and all the other developers of this free platform but:

1. I would strongly advise everyone to invest in an audible temperature alarm (can be bought off Amazon for < $10). I have literally lost 000's of dollars by not having this.
2. I would advise against using a non-thermostatic heater (i had a 500W titanium heater)
3. I would be happy to share any files/more information from my Reef Pi instance that would help prevent this happening again
 

elysics

Valuable Member
Review score
+0 /0 /-0
View Badges
Joined
Jan 15, 2020
Messages
1,298
Reaction score
1,218
Review score
+0 /0 /-0
Hi all,

Word of warning for all Reef Pi users. I went away for a couple of weeks with a neighbour watching over my tank and feeding every couple of days together with close my close monitoring via Reef Pi. He alerted me that the tank was a little quiet a couple of days ago, I tried to logon to Reef Pi (via VNC) but it didn't work (I didn't think anything of it and I assumed it was something with VNC). Unfortunately I retuned last night to a tank at 35/95 Celsius/Farenheight and full of dead livestock.

I tried logging into the app via the usual home WIFI - but I still couldn't and had to power cycle the whose raspberry pi and which point I was able to login and I received a flurry of emails that the temperature was too high.

It appears the app/raspberry pi crashed with the heater in the 'on' position. For reference, I'm using a full system built by robo-tank (although to be clear this wasn't hardware related - the relay is working perfectly).

This isn't a complaint or moan I am very grateful to Ranjib and all the other developers of this free platform but:

1. I would strongly advise everyone to invest in an audible temperature alarm (can be bought off Amazon for < $10). I have literally lost 000's of dollars by not having this.
2. I would advise against using a non-thermostatic heater (i had a 500W titanium heater)
3. I would be happy to share any files/more information from my Reef Pi instance that would help prevent this happening again
Best practice is to always have two controls on any heater. If you've got a heater without thermostat that means heater+inkbird+reef-pi for example

Curious why it crashed though
 

Does it matter to you whether your fish are captive-bred or wild caught?

  • I only buy captive bred fish.

    Votes: 94 14.4%
  • It matters, but I will buy either captive-bred or wild-caught.

    Votes: 457 70.2%
  • I think wild-caught fish are the better option.

    Votes: 16 2.5%
  • I don’t care where the fish were bred.

    Votes: 84 12.9%
Reef Breeders
Top