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

thaistalyn

Active Member
View Badges
Joined
Dec 9, 2019
Messages
131
Reaction score
295
Location
Navarre, FL
Rating - 0%
0   0   0
Halide interference? Seems I may be getting some. When my halide switched on reef-pi completely lost my temp sensor until a reboot.

Can any of you smart folks point me to any possible solutions? This would be a show stopper for me.

The pi is roughly 4 feet away from the lights, ballasts, power lines for the halides. Is on the same electrical circuit (I don't want to run a dedicated circuit just for a controller - plus I'm not sure that would fix the interference anyway).

This is the ballast currently running - there will be more eventually. https://www.bulkreefsupply.com/400w-metal-halide-ballast-reef-brite.html

I've experienced RFI (Radio Frequency Interference) from my DC pump starting and stopping and made the suggestion for anyone else to use clamp on ferrite cores (on the pump power supply) to reduce the interference.

In your case, you could do the same, but I think with ballasts in general, the ferrite rings tend to reduce RFI better than the cores. Look into getting Ferrite Ring from Amazon and wrapping the power supply wire a few times around the ring. If you're interested you can do a little technical reading about the use of Ferrite Rings with strong lights here --> Grow Light RFI Kits
 

MangroveCorals

New Member
View Badges
Joined
Jan 5, 2020
Messages
16
Reaction score
29
Rating - 0%
0   0   0
I use this one --> QEBIDUL LM2596S DC-DC Buck Converter DIY 4-40V to 1.25-37V Step-down Regulator Power Module Volt Stabilizer with LED Voltmeter Display
1579289758549.png


Works great, I can see the output voltage and can dial it in.
Thank you! Gonna order it and test it out and lien the output option!
 

Phildago

Well-Known Member
View Badges
Joined
Oct 11, 2019
Messages
854
Reaction score
933
Location
Broad Channel
Rating - 0%
0   0   0
Use journcalctl -u reef-pi.service —since startTime —until endTime
Examples are here:
I didn't have time to get that going today. But I'm really upset about what I came home to. I tested my alk and it was 6.5. It's never been that low. Ever. Im not sure how dangerous that could be and if anything will be feeling the effects.

I immediately went to check the dosing pump. Now here's where it got weird. I watched the equipment trigger in the app with no dosing occurring. Then I manually triggered a dose in the app with nothing. Last night when I checked the same way it was time triggered and munually triggered and dosed corectly while I was sitting there. So I rebooted the pi and tried again. After the reboot the pump dosed when triggered.

So now, I'm quite confident that this is the issue at hand. Why in the world would I dose, then stop and need to be rebooted?

If I can figure out how to check the logs I will, but will it give me any data on how much current was used? If not then I'm at a loss. Any ideas?
 

Phildago

Well-Known Member
View Badges
Joined
Oct 11, 2019
Messages
854
Reaction score
933
Location
Broad Channel
Rating - 0%
0   0   0
Use journcalctl -u reef-pi.service —since startTime —until endTime
Examples are here:


Or a what about if I want to look up specific day from a pin?

Like If I want to check the pins are actually being triggered by the software. Is there any data that ai can access about possible MA usage or even as simple as whether the pin received any signal at all/indicating that the circuit was active?
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
Or a what about if I want to look up specific day from a pin?

Like If I want to check the pins are actually being triggered by the software. Is there any data that ai can access about possible MA usage or even as simple as whether the pin received any signal at all/indicating that the circuit was active?
Before getting too upset..
The doser motor has specific requirements...length of pulse, frequency, duty cycle, current?.
You are focusing on the wrong thing. I have no doubts that reef-pi is triggering when its supposed to.

Is the signal correct?
You could have everything perfect but if you are right on the edge of getting the motor the proper signal/ frequency/ current the motor may not.be turning every time correctly. This is where I would look first.

So to troubleshoot, lets look at this area first.
Try a lower frequency or longer pulse and lets see what happens. Dont go overboard but lets see if we can get small improvements to dial this in.
 

Phildago

Well-Known Member
View Badges
Joined
Oct 11, 2019
Messages
854
Reaction score
933
Location
Broad Channel
Rating - 0%
0   0   0
Before getting too upset..
The doser motor has specific requirements...length of pulse, frequency, duty cycle, current?.
You are focusing on the wrong thing. I have no doubts that reef-pi is triggering when its supposed to.

Is the signal correct?
You could have everything perfect but if you are right on the edge of getting the motor the proper signal/ frequency/ current the motor may not.be turning every time correctly. This is where I would look first.

So to troubleshoot, lets look at this area first.
Try a lower frequency or longer pulse and lets see what happens. Dont go overboard but lets see if we can get small improvements to dial this in.
I'm using a goby hat, and from the goby hat I'm controlling my doser as normal 12 v pins. The signal is on or off for these. In reef pi I have timers controlling each motor as equipment. The timer triggers and the motor responds. It works when I'm sitting there. But I've been noticing my alk is dropping since I wet this thing up.

I set it to trigger automatically with the timer and I watch it and it works. Then I trigger manual and it works. I go to bed, go to work, come home and my alk is dropped drastically. This means it hasn't triggered. So I watch the app and I watch the pumps for the next automatic trigger. No response was seen at the motor. I trigger it manually in the app, nothing at the motor. I reboot it, automatic and munual triggers now activate the pump.

This means that everyday I have had this and think it's working before I go to bed it stops working and then doesn't work until I reboot it. I always like to reboott after changing settings.

But this is a disaster for my tank. My alk can not be sitting at 6.5, and now alothugh I made sure to dose a bit extra tonight these alk swings are going to have implications.

Why would my equipment be triggering in thw app, but not the motor? Then why did it all of a sudden work after the reboot. It makes no sense to me.

Either it should lnt bw triggering in the app, or there should be motor activation. I also have to way of know how many times it trigger and actually worked.

Think of what I'm doing as if you have a relay bowed and are activating the relays to turn on equipment. There's no relay for mine, it's just the motor.
 

Des Westcott

Well-Known Member
View Badges
Joined
May 29, 2018
Messages
646
Reaction score
1,035
Location
Durban - South Africa
Rating - 0%
0   0   0
Think of what I'm doing as if you have a relay bowed and are activating the relays to turn on equipment. There's no relay for mine, it's just the motor.

I think that might be your problem there. The 12V pins direct from the Hat may not have the current to run your doser pump reliably. The Hat puts out low current 12V for relay switching purposes only, not designed for running equipment.

Try hook it up via a relay and proper 12V power supply and see if you still have the same problem.

Des
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
I think that might be your problem there. The 12V pins direct from the Hat may not have the current to run your doser pump reliably. The Hat puts out low current 12V for relay switching purposes only, not designed for running equipment.

Try hook it up via a relay and proper 12V power supply and see if you still have the same problem.

Des
Good catch. To expand on this. On the goby hat if you are using the 12v section you are using the uln2803 to drive your motor. This isnt really what this chip is for. This chip is meant to drive small coils i.e. a relay board. It has built in diode suppression to prevent reverse current spikes thru a coil. Its not really meant to run motor loads.

A motor draws a large current spike for an instant until it starts moving then its current levels off. Without going into a long explanation on motor theory, depending on where exactly the motor stops, this starting current changes the next time the motor starts. You may be on the edge here where most times the motor starts but maybe not every time.

What are the specs on your doser pump?
Its a 12V pump but how much current does it take to run it reliably?

As @Des Westcott says the best way to do this is to have the hat drive a relay and have the relay switch a suitable 12v supply for the pump.
 
Last edited:

Phildago

Well-Known Member
View Badges
Joined
Oct 11, 2019
Messages
854
Reaction score
933
Location
Broad Channel
Rating - 0%
0   0   0
} 11
Good catch. To expand on this. On the goby hat if you are using the 12v section you are using the uln2803 to drive your motor. This isnt really what this chip is for. This chip is meant to drive small coils i.e. a relay board. It has built in diode suppression to prevent reverse current spikes thru a coil. Its not really meant to run motor loads.

A motor draws a large current spike for an instant until it starts moving then its current levels off. Without going into a long explanation on motor theory, depending on where exactly the motor stops, this starting current changes the next time the motor starts. You may be on the edge here where most times the motor starts but maybe not every time.

What are the specs on your doser pump?
Its a 12V pump but how much current does it take to run it reliably?

As @Des Westcott says the best way to do this is to have the hat drive a relay and have the relay switch a suitable 12v supply for the pump.

Okay, so it may be the issue. I certainly can't say it's not. I can say that it produces enough current to run all three pumps simultaneously though.

So then, is there any advantage to a 12 v relay VS 5 v for this purpose?
 

Des Westcott

Well-Known Member
View Badges
Joined
May 29, 2018
Messages
646
Reaction score
1,035
Location
Durban - South Africa
Rating - 0%
0   0   0
} 11


Okay, so it may be the issue. I certainly can't say it's not. I can say that it produces enough current to run all three pumps simultaneously though.

So then, is there any advantage to a 12 v relay VS 5 v for this purpose?

@Michael Lane is the person best qualified to comment I guess

I run all 5V relays because that's what I had when I set mine up. I supply the "12V Input" with 5V to run them off that rail. i know @Bigtrout does the same FWIW
 

Phildago

Well-Known Member
View Badges
Joined
Oct 11, 2019
Messages
854
Reaction score
933
Location
Broad Channel
Rating - 0%
0   0   0
@Michael Lane is the person best qualified to comment I guess

I run all 5V relays because that's what I had when I set mine up. I supply the "12V Input" with 5V to run them off that rail. i know @Bigtrout does the same FWIW
Thanks for your input. Michael had actually recommended not using a relay for this purpose, but maybe you're right with the motor getting stuck in an area where it needs relatively high starting current.

I did a quick read and apparently 12 v supply helps relays work more efficiently. Less heat produced.
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
Thanks for your input. Michael had actually recommended not using a relay for this purpose, but maybe you're right with the motor getting stuck in an area where it needs relatively high starting current.

I did a quick read and apparently 12 v supply helps relays work more efficiently. Less heat produced.
Do you have a volt meter?
If so you could prove this out.
Hook up the voltmeter in place of the doser.
Does it read 12v every time?

Which doser pump are u using?
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
@Michael Lane is the person best qualified to comment I guess

I run all 5V relays because that's what I had when I set mine up. I supply the "12V Input" with 5V to run them off that rail. i know @Bigtrout does the same FWIW
I do run 5v relays and they have been fine. I ran 5 volt relays because i didnt want a seperate 12v supply. Everything in my build runs at 5 volts.

It takes a set amount of power to pull in a coil. In the relay boards on amazon the 5v relays draw 36 miliamps. The power draw is 180 milliwatts The 12 volt relays using the same family of Songle relays draw 15ma and but still use 180 miliwatts.

Less current means smaller wire size and less resistance losses in connections. But the difference between 5v and 12v is not enough to worry about in most cases.
 

Michael Lane

Well-Known Member
View Badges
Joined
Aug 11, 2018
Messages
677
Reaction score
1,123
Rating - 0%
0   0   0
Thanks for your input. Michael had actually recommended not using a relay for this purpose, but maybe you're right with the motor getting stuck in an area where it needs relatively high starting current.

I did a quick read and apparently 12 v supply helps relays work more efficiently. Less heat produced.
@Phildago I'm sorry to hear that you are having trouble with dosing pumps. Either kind of relay will work fine as long as it can get the voltage and current it needs as Bigtrout described.

ULN2803 can be used for small dc motors, but it does depend on how much current the motor needs. It's rated up to 500 mA, but can possibly pass more (and burn up). Keep it under 300 mA or so, and it should be fine. It's also possible to combine pins if you need more current, but I'd recommend relays over combining outputs. Most of the DC peristaltic pumps I've tested run just under 150 mA.

Do you have any data about the pump you are using? I always trust advice from @Bigtrout and @Des Westcott. Running via a relay can rule out this problem.

I did have a problem that I thought was dosing pump related, but ended up being a problem with my SD card. It may not be the problem you are experiencing, but sharing won't hurt. My dosing pumps are scheduled to run every 30 minutes, and I noticed I didn't hear them run at all one night. For me, the whole system had stopped working and I had to power off and back on to get it to reset. The SD card had been corrupted, so it was difficult to track down since the logs weren't being written. I haven't had that problem since I upgraded to a quality SD card.
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
@Phildago I'm sorry to hear that you are having trouble with dosing pumps. Either kind of relay will work fine as long as it can get the voltage and current it needs as Bigtrout described.

ULN2803 can be used for small dc motors, but it does depend on how much current the motor needs. It's rated up to 500 mA, but can possibly pass more (and burn up). Keep it under 300 mA or so, and it should be fine. It's also possible to combine pins if you need more current, but I'd recommend relays over combining outputs. Most of the DC peristaltic pumps I've tested run just under 150 mA.

Do you have any data about the pump you are using? I always trust advice from @Bigtrout and @Des Westcott. Running via a relay can rule out this problem.

I did have a problem that I thought was dosing pump related, but ended up being a problem with my SD card. It may not be the problem you are experiencing, but sharing won't hurt. My dosing pumps are scheduled to run every 30 minutes, and I noticed I didn't hear them run at all one night. For me, the whole system had stopped working and I had to power off and back on to get it to reset. The SD card had been corrupted, so it was difficult to track down since the logs weren't being written. I haven't had that problem since I upgraded to a quality SD card.
Great advice @Michael Lane id like to add one more thing to it. When you use a big darlington like the ULN2803 which is basically 8 darlington transistors you have a voltage loss which is current dependent. This is because of passing current thru the collector emitter junction. The higher the current the higher the voltage loss.
Specs on this show the saturation voltage at .7 to almost 2 volts depending on current. So your 12v motor may only be getting 10 to 11.3 volts depending on its running current. I have no idea how the darlington would pass a large split second starting current on a motor.

This is why power mosfets have become popular. Less voltage loss than an equivalent power transistor.

That being said the uln2803 is still a great old school chip. Cheap and reliable for what it does. It was originally designed to run print heads in old dot matrix printers.
 

Phildago

Well-Known Member
View Badges
Joined
Oct 11, 2019
Messages
854
Reaction score
933
Location
Broad Channel
Rating - 0%
0   0   0
Do you have a volt meter?
If so you could prove this out.
Hook up the voltmeter in place of the doser.
Does it read 12v every time?

Which doser pump are u using?
I do have a multimeter. Its a bit lower than 12v, I'm using a bit less because it was simply spinning to fast and with the full 12v. I have it set around 11 for the output. This voltage gives me very close to 1 ml/second. With 1 second being the smallest unti I could dose at. I'm positive that it is not a voltage issue.

@Phildago I'm sorry to hear that you are having trouble with dosing pumps. Either kind of relay will work fine as long as it can get the voltage and current it needs as Bigtrout described.

ULN2803 can be used for small dc motors, but it does depend on how much current the motor needs. It's rated up to 500 mA, but can possibly pass more (and burn up). Keep it under 300 mA or so, and it should be fine. It's also possible to combine pins if you need more current, but I'd recommend relays over combining outputs. Most of the DC peristaltic pumps I've tested run just under 150 mA.

Do you have any data about the pump you are using? I always trust advice from @Bigtrout and @Des Westcott. Running via a relay can rule out this problem.

I did have a problem that I thought was dosing pump related, but ended up being a problem with my SD card. It may not be the problem you are experiencing, but sharing won't hurt. My dosing pumps are scheduled to run every 30 minutes, and I noticed I didn't hear them run at all one night. For me, the whole system had stopped working and I had to power off and back on to get it to reset. The SD card had been corrupted, so it was difficult to track down since the logs weren't being written. I haven't had that problem since I upgraded to a quality SD card.

My issue sounds exactly like yours. Zero output from the board. I know this because I was manually triggering the equipment and getting nothing. Once I rebooted my pi it was suddenly working again. The issue is, this has been occurring over the course of a few days. My order has been test alk levels, adjust pump settings, reboot.

This time I happened to stumble on the problem because I tested the pump, saw no output, tested the alk, adjusted the pump, still no output, rebooted, retested, and finally had it working again.

My suspition is that it's been failing every day and I just haven't known it because I've been rebooting it before I make my adjustments.

Regardless, I'm going to be getting a relay and power supply because even though I don't think the chip is my issue now, I don't want to overload it.

My pumps are jebao motors, small and although I'm not sure about the mA, I don't think it would do much heat production running for 1 second.

How did you solve your sd card issue? Total factory reset and reinstall or was there something that could be repaired?

I think @Phildago also said he's running 3 x peristaltic pumps. If they come on at the same time they could be too much. Maybe stagger times?

There are three. Each on a different pin/channel. I stagger them so they don't run at the same time: however I have tested that they can run all at the same time without issue. I like to play it on the safe side, so I know they can run together, but don't actually do it at any point in the automated schedule
 

lmm1967

Well-Known Member
View Badges
Joined
Sep 12, 2017
Messages
563
Reaction score
848
Location
North Georgia
Rating - 0%
0   0   0
Can anyone point me to a doc or general direction on the prometheus setup? The prometheus box is checked in the UI - I point Grafana to ../x/metrics as a data source - get a connection - but then queries don't seem to work.

I'm assuming I'm missing a step somewhere.
 

raketemensch

Ape That Likes Fish
View Badges
Joined
Oct 13, 2019
Messages
378
Reaction score
478
Location
Northwest CT
Rating - 0%
0   0   0
Can I get a sanity check before I plug this in and test it?

I'm just verifying with a single outlet right now. The brown wire from the relay is going into the "hot" side of the plug, and the white wire is going into the... well, the one labeled for the white wire :]

IMG_2477.jpeg
 
Back
Top