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

theatrus

Valuable Member
View Badges
Joined
Mar 26, 2016
Messages
2,049
Reaction score
3,441
Location
Sacramento, CA area
Rating - 0%
0   0   0
How much draw does the MH light have in amps?
What are your relays rated at?

I ask because a metal halide ballast is a highly inductive load. When power is cut quickly on a highly inductive load, a voltage spike is produced that can damage a relay contacts.
To combat this, a diode can be connected across the load to limit this spike, its called a flyback or freewheeling diode.
With inductive loads, its better to oversize the relays and use a protection diode.

Not a diode (thats for the coil) but instead an RC Snubber circuit. Sizing these requires some calculations.
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
Not a diode (thats for the coil) but instead an RC Snubber circuit. Sizing these requires some calculations.
Yes thats correct, my mistake(long day today) there, hes controlling an AC load, but yes rc network can be used here, along with oversizing the relay.
There is also a special bi directional diode called a TVS diode that can be used across the contacts. Similar to these;
https://m.littelfuse.com/products/tvs-diodes/leaded/ak1.aspx
 
Last edited:

theatrus

Valuable Member
View Badges
Joined
Mar 26, 2016
Messages
2,049
Reaction score
3,441
Location
Sacramento, CA area
Rating - 0%
0   0   0
So I am having a couple of problems that hopefully I can sort out.

Firstly, my temperature sensors drop out randomly. Today they randomly dropped out while I was not home and the heater got stuck on and my tank got to 102F.
It also failed to send an alert (alerts had been working previously)
I use a titanium heater that usually runs from its own controller but I decided to try reef-pi t control it.
If I power off my reef-pi and turn it back on, all the sensors are working again.

The other problem is that my metal halide does not turn off when I shut the relay off in the equipment tab. I tried other equipment on that outlet and it works perfectly, just seems the MH gets stuck on.

tempfail.PNG

As for the e-mail, did you turn on 2-factor authentication on Google since setting this up? If so, you need to use an app specific password to authenticate with the mail servers:

https://support.google.com/accounts/answer/185833?hl=en
 

buddy.

Active Member
View Badges
Joined
May 16, 2018
Messages
291
Reaction score
617
Location
Australia
Rating - 0%
0   0   0
How much draw does the MH light have in amps?
What are your relays rated at?

I ask because a metal halide ballast is a highly inductive load. When power is cut quickly on a highly inductive load, a voltage spike is produced that can damage a relay contacts.
To combat this, an RC network or MOV can be connected across the load to limit this spike.
With inductive loads, its better to oversize the relays and use some type of protection.

The metal halide is a 250w with a magnetic ballast. Running on 240v so that would be about 1 amp?
Interestingly, If a shut off the MH after it has been on only for a few minutes it will switch off. If the MH has been on for a while I found that if I toggle the relay off and on several times it will eventually turn off.
Im using these relays https://www.amazon.com/JBtek-Channel-Module-Arduino-Raspberry/dp/B00KTELP3I

In respect to your temp sensors, how are they wired...have you checked all connections? How long are the cables and how many sensors? What size resistor did you use as a pull up resistor?
Try disconnecting the sensors one at a time to see if one sensor may be causing the problem. Troubleshoot further from there.
I am using wykats hat board which incorporates the resistor. I have wired my sensors like this (from wykats documentation).

tempwireing.PNG

I am using 5 sensors. 3 are on their own mini xlr plugs and the other two sensors are wired together and share a mini xlr plug. These have also been extended about 500mm. The sensor that controls the heater is on the shared plug.
They will work for days and days with no problem and then suddenly drop out. I will unplug all the sensors except the shared one and see if it still drops out, but this may take a few days to confirm.
 

buddy.

Active Member
View Badges
Joined
May 16, 2018
Messages
291
Reaction score
617
Location
Australia
Rating - 0%
0   0   0

theatrus

Valuable Member
View Badges
Joined
Mar 26, 2016
Messages
2,049
Reaction score
3,441
Location
Sacramento, CA area
Rating - 0%
0   0   0
The metal halide is a 250w with a magnetic ballast. Running on 240v so that would be about 1 amp?
Interestingly, If a shut off the MH after it has been on only for a few minutes it will switch off. If the MH has been on for a while I found that if I toggle the relay off and on several times it will eventually turn off.
Im using these relays https://www.amazon.com/JBtek-Channel-Module-Arduino-Raspberry/dp/B00KTELP3I


I am using wykats hat board which incorporates the resistor. I have wired my sensors like this (from wykats documentation).

tempwireing.PNG

I am using 5 sensors. 3 are on their own mini xlr plugs and the other two sensors are wired together and share a mini xlr plug. These have also been extended about 500mm. The sensor that controls the heater is on the shared plug.
They will work for days and days with no problem and then suddenly drop out. I will unplug all the sensors except the shared one and see if it still drops out, but this may take a few days to confirm.

Magnetic ballasts will have a huge kick back, and the relay probably just doesn't have enough force to separate the contacts in this case. You can try cascading a relay using a larger 240V coil relay as one option, or wire in an RC snubber or other transient suppressor as @Bigtrout suggested.

Do you have the schematic handy for Wykat's board? You're not the only one with problems using multiple sensors and the board, and I want to try suggested a few mods to improve comms reliability.
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
The metal halide is a 250w with a magnetic ballast. Running on 240v so that would be about 1 amp?
Interestingly, If a shut off the MH after it has been on only for a few minutes it will switch off. If the MH has been on for a while I found that if I toggle the relay off and on several times it will eventually turn off.
Im using these relays https://www.amazon.com/JBtek-Channel-Module-Arduino-Raspberry/dp/B00KTELP3I
The relays on those are rated at 10amps. But it almost sounds like that relay is weak or defective, does it act the same plugged in to a different relay position?

On the temp sensors, double check all your connections, maybe you have an intermittent connection on the double sensor.
 

theatrus

Valuable Member
View Badges
Joined
Mar 26, 2016
Messages
2,049
Reaction score
3,441
Location
Sacramento, CA area
Rating - 0%
0   0   0
The relays on those are rated at 10amps. But it almost sounds like that relay is weak or defective, does it act the same plugged in to a different relay position?

On the temp sensors, double check all your connections, maybe you have an intermittent connection on the double sensor.

Looks like 3A limit on inductive loads, if I can read the really bad formatting on this correctly. Still in range, but maybe somewhat marginal at the edges. A warmed up ballast and bulb combo on a magnetic ballast will have a horrific power factor and be mostly inductive.

https://www.mycomkits.com/reference/Songle_SRD(T73)_Relay.pdf
 

buddy.

Active Member
View Badges
Joined
May 16, 2018
Messages
291
Reaction score
617
Location
Australia
Rating - 0%
0   0   0
Magnetic ballasts will have a huge kick back, and the relay probably just doesn't have enough force to separate the contacts in this case. You can try cascading a relay using a larger 240V coil relay as one option, or wire in an RC snubber or other transient suppressor as @Bigtrout suggested.

Do you have the schematic handy for Wykat's board? You're not the only one with problems using multiple sensors and the board, and I want to try suggested a few mods to improve comms reliability.
Thanks, I have no clue about adding in another relay or subber so I would need more help there :D

Here is the schematic, let me know if it is too small to see.
sch.PNG


The relays on those are rated at 10amps. But it almost sounds like that relay is weak or defective, does it act the same plugged in to a different relay position?

On the temp sensors, double check all your connections, maybe you have an intermittent connection on the double sensor.
Thanks I will double check. I am pretty confident with my soldered connections and I did a continuity check on everything but it could be that!
 

geekengineer

Active Member
View Badges
Joined
Feb 10, 2019
Messages
427
Reaction score
538
Location
South Aurora
Rating - 0%
0   0   0
Interesting! I assume you use this on a sump? Also interested in any pics of your controller setup.

I used it for ATO tank level on my first tank, but the reef controller was Ardunio based of @doughboy 's setup. Only problem for reef-pi is you need a separate processor (or something that can measure time of a pulse accurately) to find the distance consistently since linux is not a real time OS.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,847
Reaction score
17,071
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
I thought I would mention that on this page -- https://reef-pi.github.io/guides/intro/ -- The "Dosing Controller" link is wrong. I put a PR in github to change it but I am not sure anyone monitors that github account.

Also on this page -- https://learn.adafruit.com/reef-pi-guide-5-dosing-controller/circuit-construction -- The fritzing diagram is slightly wrong. In the top middle the yellow wire is connected to the wrong line. The line it shows it shows is ground. It should moved one pin to the right. The pictures of the actual board are correct.
components_Screen_Shot_2018-11-12_at_10.01.13_AM.png
the github/website guide is not maintained, since i started hosting the guides to adafruit.com. Thank you for pointing out the circuit bug, I'll get fix it.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,847
Reaction score
17,071
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Hi all, I wanted to mention that adafruit.io has a very nice “notification” setting in the feed section. It will notify by e-mail if the reef-pi data feed (in my case temp) does not arrive as expected. My temp is updated every 2 min, and I have Adafruit set to notify me if goes more than 10 min without an update. It’s nice to know that my network, power, and reef-pi are all up and running.
Thank you for sharing this. This is extremely useful. I just noticed the same information in @Mikeneedsahobby 's thread as well. I am planning to update the official guide in adafruit.com .
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,847
Reaction score
17,071
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
So I am having a couple of problems that hopefully I can sort out.

Firstly, my temperature sensors drop out randomly. Today they randomly dropped out while I was not home and the heater got stuck on and my tank got to 102F.
It also failed to send an alert (alerts had been working previously)
I use a titanium heater that usually runs from its own controller but I decided to try reef-pi t control it.
If I power off my reef-pi and turn it back on, all the sensors are working again.

The other problem is that my metal halide does not turn off when I shut the relay off in the equipment tab. I tried other equipment on that outlet and it works perfectly, just seems the MH gets stuck on.

tempfail.PNG
So sorry to hear this. How is the livestock doing? please setup a adafruit.io notification.
 

buddy.

Active Member
View Badges
Joined
May 16, 2018
Messages
291
Reaction score
617
Location
Australia
Rating - 0%
0   0   0
So sorry to hear this. How is the livestock doing? please setup a adafruit.io notification.
Luckily its just a cycling tank so nothing to worry about :) The high temp might have made some die off and increased the cycle time but that is fine. All my stock is happy in a temporary tank at the moment.
Ill get the adafruit account shortly.
 

Mikeneedsahobby

Well-Known Member
View Badges
Joined
Sep 16, 2018
Messages
516
Reaction score
922
Rating - 0%
0   0   0
Thank you for sharing this. This is extremely useful. I just noticed the same information in @Mikeneedsahobby 's thread as well. I am planning to update the official guide in adafruit.com .
I knew I read somewhere about someone doing this. I just forgot where. Thanks @16Reefer170
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,847
Reaction score
17,071
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Hi reef-pi builders, I know some of you have build blackbox controller with reef-pi. @neilp2006 here is trying to build a blackbox controller with reef-pi and would like to get some pointers.
I think I have mentioned this earlier, but this must be a very common use case, having a dedicated article or post on this will be awesome :)
 

User

2500 Club Member
View Badges
Joined
Aug 15, 2017
Messages
4,523
Reaction score
7,477
Rating - 0%
0   0   0
Hi reef-pi builders, I know some of you have build blackbox controller with reef-pi. @neilp2006 here is trying to build a blackbox controller with reef-pi and would like to get some pointers.
I think I have mentioned this earlier, but this must be a very common use case, having a dedicated article or post on this will be awesome :)

Thanks so much! I hadn’t realized you were ‘reef-pi Ranjib’ until after we PMd.

I’d be looking to use a coralux storm controller, which is 0-5v dimming, but a 10v converter is available. Wondering if I’d have to switch out the drivers on a viparspectra 165 or if they are ready to go. I have a bunch of 1000mA LDD meanwells already.

Thanks
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,847
Reaction score
17,071
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Thanks so much! I hadn’t realized you were ‘reef-pi Ranjib’ until after we PMd.

I’d be looking to use a coralux storm controller, which is 0-5v dimming, but a 10v converter is available. Wondering if I’d have to switch out the drivers on a viparspectra 165 or if they are ready to go. I have a bunch of 1000mA LDD meanwells already.

Thanks
If I recall correctly, viparspectra can be used as it is without any additional driver.
 

jtma4914

Community Member
View Badges
Joined
Aug 29, 2017
Messages
33
Reaction score
14
Location
Milwaukee, Wi
Rating - 0%
0   0   0
Yea, I have been posting about this for quite a while, and really have not been able to work on it much. Ranjib puts me to shame with how much he gets done.
But as of today, the circuit is finally outputting 0-10V! Well a few mV-9.9V. I tested it running off of the PCA9685, and connected to my DMM. Hopefully this weekend I can actually implement it in the light fixture. Before that I need to assemble the second board, and find cable and connectors to run to the light.
I dont feel that the fritzing breadboard really explains it well as the components all block what you are trying to see. So hopefully this explains it a bit better. Let me know if anything is un-clear. I dont care for the layout, and would much prefer a printed board, but for perma-proto I can live with it.
upload_2018-1-31_20-25-16.png

upload_2018-1-31_20-24-6.png
So i'm 100% brand new to all things pi, and microcircuitry related.
I'm attempting to reproduce the circuit quoted that was created by Ryan, but i'm having some difficulty determining what needs to be connected to what on the reverse side of the board, would anyone be able to provide some insight?
 

bishoptf

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

Managing real reef risks: Do you pay attention to the dangers in your tank?

  • I pay a lot of attention to reef risks.

    Votes: 100 43.9%
  • I pay a bit of attention to reef risks.

    Votes: 77 33.8%
  • I pay minimal attention to reef risks.

    Votes: 37 16.2%
  • I pay no attention to reef risks.

    Votes: 12 5.3%
  • Other.

    Votes: 2 0.9%
Back
Top