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

robsworld78

Well-Known Member
View Badges
Joined
Feb 14, 2020
Messages
952
Reaction score
1,281
Location
Edmonton, Canada
Rating - 0%
0   0   0
Yeah PSU was from you, It's been good so far. I was thinking maybe I was drawing too much current with the 12v pump? I wasn't sure how much can actually go out through the pi ports. I had a wedding to rush to this weekend, so I wasn't able to investigate yet.
The actual Pi GPIO's can't handle much current but the DC ports are setup for a max of 5 amps on each port or across them all, you should be well under that. I would bet on it being the power supply, the Pi is very sensitive to under voltage and with an extra load on that cheap power supply (sorry) or as it ages that can be the issue, I've seen it from a few of them. If you don't have one here's a link, if you send me an email or PM so I know who you are I'll send some money to cover it.

 

JachPot

Active Member
View Badges
Joined
Feb 12, 2022
Messages
444
Reaction score
665
Location
Colorado
Rating - 0%
0   0   0
The actual Pi GPIO's can't handle much current but the DC ports are setup for a max of 5 amps on each port or across them all, you should be well under that. I would bet on it being the power supply, the Pi is very sensitive to under voltage and with an extra load on that cheap power supply (sorry) or as it ages that can be the issue, I've seen it from a few of them. If you don't have one here's a link, if you send me an email or PM so I know who you are I'll send some money to cover it.


That's what I figured, the GPIO pins are usually in the mA in these kinds of devices. I have the little cheap baby wallwort that doesn't do any real amount of current. I'll go ahead and order this one, no worries!


This one would plug directly into the lighting/dc sensors box right? There's a power supply going to your sensors boxbreakout and the actual PI's breakout if I'm not mistaken.
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,344
Reaction score
1,722
Location
Missouri
Rating - 0%
0   0   0
So I need to figure out a automatic feeder for when I need to leave things unattended, I know @robsworld78 has a diagram for wiring up the Ehiem but was wondering if anyone else had done something differently. Havent made up my mind yet but would be nice to be able to time shutting the pumps off etc when feeding, just thought I would ask. :)
 

robsworld78

Well-Known Member
View Badges
Joined
Feb 14, 2020
Messages
952
Reaction score
1,281
Location
Edmonton, Canada
Rating - 0%
0   0   0
That's what I figured, the GPIO pins are usually in the mA in these kinds of devices. I have the little cheap baby wallwort that doesn't do any real amount of current. I'll go ahead and order this one, no worries!


This one would plug directly into the lighting/dc sensors box right? There's a power supply going to your sensors boxbreakout and the actual PI's breakout if I'm not mistaken.
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.
 

robsworld78

Well-Known Member
View Badges
Joined
Feb 14, 2020
Messages
952
Reaction score
1,281
Location
Edmonton, Canada
Rating - 0%
0   0   0
So I need to figure out a automatic feeder for when I need to leave things unattended, I know @robsworld78 has a diagram for wiring up the Ehiem but was wondering if anyone else had done something differently. Havent made up my mind yet but would be nice to be able to time shutting the pumps off etc when feeding, just thought I would ask. :)
One thing to note on that diagram, it's a straight connection from Robo-Tank to the feeder however if you DIY it you need a NPN mosfet for the GPIO coming from the Pi. Here's a picture of the circuit. The Pi GPIO goes into the Gate (G) of the mosfet with a 10k pulldown resistor attached, a common ground goes to Source (S) of the mosfet and the Drain (D) of the mosfet goes to the feeder as shown in the diagram on my website.

When the manual feed button is press on the Eheim feeder it simply completes a ground path which fires up the circuit in the feeder, that's what this circuit does, when the mosfet is switched from the Pi GPIO a ground is passed to the feeder just like the manual feed button was pressed.

Screen Shot 10-24-22 at 10.31 PM.PNG
 

Sral

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,006
Reaction score
976
Location
Germany
Rating - 0%
0   0   0
One thing to note on that diagram, it's a straight connection from Robo-Tank to the feeder however if you DIY it you need a NPN mosfet for the GPIO coming from the Pi. Here's a picture of the circuit. The Pi GPIO goes into the Gate (G) of the mosfet with a 10k pulldown resistor attached, a common ground goes to Source (S) of the mosfet and the Drain (D) of the mosfet goes to the feeder as shown in the diagram on my website.

When the manual feed button is press on the Eheim feeder it simply completes a ground path which fires up the circuit in the feeder, that's what this circuit does, when the mosfet is switched from the Pi GPIO a ground is passed to the feeder just like the manual feed button was pressed.

Screen Shot 10-24-22 at 10.31 PM.PNG
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.
 

robsworld78

Well-Known Member
View Badges
Joined
Feb 14, 2020
Messages
952
Reaction score
1,281
Location
Edmonton, Canada
Rating - 0%
0   0   0
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
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,344
Reaction score
1,722
Location
Missouri
Rating - 0%
0   0   0

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,344
Reaction score
1,722
Location
Missouri
Rating - 0%
0   0   0
@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:

Sral

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,006
Reaction score
976
Location
Germany
Rating - 0%
0   0   0
@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 ^^
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,344
Reaction score
1,722
Location
Missouri
Rating - 0%
0   0   0
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
View Badges
Joined
Feb 12, 2022
Messages
444
Reaction score
665
Location
Colorado
Rating - 0%
0   0   0
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.
 

robsworld78

Well-Known Member
View Badges
Joined
Feb 14, 2020
Messages
952
Reaction score
1,281
Location
Edmonton, Canada
Rating - 0%
0   0   0
@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:
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,344
Reaction score
1,722
Location
Missouri
Rating - 0%
0   0   0
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
View Badges
Joined
Feb 14, 2020
Messages
952
Reaction score
1,281
Location
Edmonton, Canada
Rating - 0%
0   0   0
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.
 

pais

New Member
View Badges
Joined
Jun 27, 2019
Messages
15
Reaction score
12
Rating - 0%
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

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,006
Reaction score
976
Location
Germany
Rating - 0%
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

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
View Badges
Joined
Feb 12, 2022
Messages
444
Reaction score
665
Location
Colorado
Rating - 0%
0   0   0
@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:

robsworld78

Well-Known Member
View Badges
Joined
Feb 14, 2020
Messages
952
Reaction score
1,281
Location
Edmonton, Canada
Rating - 0%
0   0   0
@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
View Badges
Joined
Feb 12, 2022
Messages
444
Reaction score
665
Location
Colorado
Rating - 0%
0   0   0
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.
 

Being sticky and staying connected: Have you used any reef-safe glue?

  • I have used reef safe glue.

    Votes: 95 88.0%
  • I haven’t used reef safe glue, but plan to in the future.

    Votes: 6 5.6%
  • I have no interest in using reef safe glue.

    Votes: 4 3.7%
  • Other.

    Votes: 3 2.8%
Back
Top