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

can you send me a pic? and do you know how to solder? it sounds like the relays arc welded. and once it starts it continues. what was the amp rating on the relay? most are 2 amp. also what is the power draw on the item plugged into it?
Sure thing. I bought an 8 relay unit and a 4 relay unit off Amazon Amazon product ASIN B00KTELP3I
 

Attachments

  • Screenshot_20210210-203553_Amazon Shopping.jpg
    Screenshot_20210210-203553_Amazon Shopping.jpg
    94.5 KB · Views: 54
Its controlling AC 120. Yes I know how to solder. Not great, but well enough for connectors and plugs.
 
does uart control steps and everything? I just thought it controlled the settings. but still used the old standards for enable direction and and step? if 2 pins control everything then that would be the way to go. is 4 drivers a hard limit or just what youre using? most printers use 4 drivers while some use 5. (dual z in my case not wired in series or parralle had 6 drivers so used 5 on a fysec f6) Ive never looked into how printer boards work just compiled the marlin. but have looked into controling steppers, and looked at what the pins do on older drivers. also what would be easier to code? 1 wire per dosing pump or serial bus control? also is 2209 uart? or spi? i2c? i know 2208 is 1 and 2209 is the other. think spi and i2c is the same
Tmc2209 is UART. You can set the speed using the serial interface and it maintains that indefinitely. That’s how I use them. You can address up to 4 drivers on one UART bus by setting address bits on the drivers themselves. They are sophisticated devices. I haven’t explored all their features and maybe there’s a way to address even more. For the noise, I agree with dosing it’s not a big deal. For AWC the steppers move pretty fast and noise becomes an issue. I haven’t tried the 8825, but the a4988 really fills the room when you run it that fast.
 
Its controlling AC 120. Yes I know how to solder. Not great, but well enough for connectors and plugs.
ive used that brand before with no issues, but with chinese knock offs who knows if i had real, or if yours are real. I also never used mine with much power it was an amp or 2 of 12v dc. heres a compatible part ( https://www.digikey.com/en/products...er-brumfield-relays/ORWH-SH-105D1F000/4925028 ) from a repitable supplier, but the cost it might be worth buying another and hoping it was just a fluke.
 
Tmc2209 is UART. You can set the speed using the serial interface and it maintains that indefinitely. That’s how I use them. You can address up to 4 drivers on one UART bus by setting address bits on the drivers themselves. They are sophisticated devices. I haven’t explored all their features and maybe there’s a way to address even more. For the noise, I agree with dosing it’s not a big deal. For AWC the steppers move pretty fast and noise becomes an issue. I haven’t tried the 8825, but the a4988 really fills the room when you run it that fast.
well my thing is I think I would need atleast 8 if not 9 dosers for everything. I dont know if pi has multiple uart pins. and the number of dosers needed is why i was wondering if pca9685 could be used to deliever the pulses. each 9685 has 16 output and can be chained together to give massive number of outputs using just i2c. and If i design a board it can have 48 output easy, which should be more than enough for dosers and anything else that the and the pwm powers the doser, the faster the pwm the faster the doser doses, but think the pi uses 1 pwm for everything, so not sure how it works on that side, or how to limit the number of pulses.
 
ive used that brand before with no issues, but with chinese knock offs who knows if i had real, or if yours are real. I also never used mine with much power it was an amp or 2 of 12v dc. heres a compatible part ( https://www.digikey.com/en/products...er-brumfield-relays/ORWH-SH-105D1F000/4925028 ) from a repitable supplier, but the cost it might be worth buying another and hoping it was just a fluke.
Those aren't too bad. Only way I would want to just rebuild is if any of the issue may be due to the
ive used that brand before with no issues, but with chinese knock offs who knows if i had real, or if yours are real. I also never used mine with much power it was an amp or 2 of 12v dc. heres a compatible part ( https://www.digikey.com/en/products...er-brumfield-relays/ORWH-SH-105D1F000/4925028 ) from a repitable supplier, but the cost it might be worth buying another and hoping it was just a fluke.
Is there muxh chance any part of the board would cause it? That would be an argument to rebuild. Otherwise the digikey relays aren't very expensive.
 
Those aren't too bad. Only way I would want to just rebuild is if any of the issue may be due to the

Is there muxh chance any part of the board would cause it? That would be an argument to rebuild. Otherwise the digikey relays aren't very expensive.
if its sticking till you tap it its arc welded. the tap breaks the weak weld. but once it arc welds, it builds carbon, and then then it becomes more prone to arc due to increased resistance from the carbon causing it circle and get worse. i was looking at 8 port you bought for $9 where the digikey are $12 for just the relays plus shipping.
 
if its sticking till you tap it its arc welded. the tap breaks the weak weld. but once it arc welds, it builds carbon, and then then it becomes more prone to arc due to increased resistance from the carbon causing it circle and get worse. i was looking at 8 port you bought for $9 where the digikey are $12 for just the relays plus shipping.
No worries I would pay 20 if I could just buy a whole board with good relays already on it.
 
and I think the mosfet blew again.. or something equally stupid. The wife just texted me and that light has no blues on right now. I'd like to swap out the driver with a meanwell, but I have yet go find one that matches the specs closely enough to make me feel good about doing it.
That stinks, good thing you're handy. This one is 500ma up to 90v, getting close.

 
Anyone interested in how hot your pi CPU is running you can schedule this with krontab and send your self an email at the frequency of your choosing. Save as a .py file and run as python.

Code:
# coding=utf-8
#import time
import os
import smtplib
from email.mime.text import MIMEText

critical = False

high = 50
too_high = 80

# At First we have to get the current CPU-Temperature with this defined function
def getCPUtemperature():
    res = os.popen('vcgencmd measure_temp').readline()
    return(res.replace("temp=","").replace("'C\n",""))


        # Now we convert our value into a float number
temp = float(getCPUtemperature())

        # Check if the temperature is above 60°C (you can change this value, but it shouldn't be above 70)
if (temp > high):
        if (temp > too_high):
                critical = True
                subject = "Critical warning! The temperature is: {} shutting down!!".format(temp)
                body = "Critical warning! The actual temperature is: {} \n\n Shutting down the pi!".format(temp)
        else:
                subject = "Warning! The temperature is: {} ".format(temp)
                body = "Warning! The actual temperature is: {} ".format(temp)


else:
        subject = "LousReef Controller at Normal Temp"
        body = "LousReef running at {}".format(temp)

# Enter your smtp Server-Connection
server = smtplib.SMTP('smtp.gmail.com', 587) # if your using gmail: smtp.gmail.com
server.ehlo()
server.starttls()
server.ehlo
# Login
server.login("your email", "your password")

msg = MIMEText(body)
msg['Subject'] = subject
msg['From'] = "you"
msg['To'] = "whoever"

# Finally send the mail
server.sendmail("from", "to", msg.as_string())
server.quit()

# Critical, shut down the pi
if critical:
        os.popen('sudo halt')
 
With the L293D it is possible to control Stepper motors. The L293D is already part of Reef-Pi for the normal Doser motors.

Here a link as an example:


Some additional coding will be needed...

The only limitation is the current.
 
I would really really advise against people trying to control steppers without a proper chopper driver, and not even the super cheap 4988 ones.

Unless you have your setup far away in the basement where you can't hear it, you really don't want to do that.

There is a reason that video has music instead of sound.

Not to mention that you won't be getting the accuracy you presumably bought the more expensive and less convenient stepper motors for if you don't use a proper driver and on top of that control it properly by telling it to run a certain amount of steps rather than for a certain time at a certain speed.
 
Last edited:
That stinks, good thing you're handy. This one is 500ma up to 90v, getting close.


Seems to have been just a bad connection.. need a real male-male jst adapter.. for now I have it plugged back into the board with the pot and it's "working".. Just a little dimmer than the other at lower levels, probably due to the resistance on the pot. But it does dim properly, so that's a plus..

This is just odd looking

1613040298310.png
 
Btw has anyone figured out how to stop the timeline on the graphs from overlapping and being messed up after rebooting the pi? I thought adding a realtimeclock would fix it and added a DS3231, but that either doesn't help or i have it set up wrong.
 
well my thing is I think I would need atleast 8 if not 9 dosers for everything. I dont know if pi has multiple uart pins. and the number of dosers needed is why i was wondering if pca9685 could be used to deliever the pulses. each 9685 has 16 output and can be chained together to give massive number of outputs using just i2c. and If i design a board it can have 48 output easy, which should be more than enough for dosers and anything else that the and the pwm powers the doser, the faster the pwm the faster the doser doses, but think the pi uses 1 pwm for everything, so not sure how it works on that side, or how to limit the number of pulses.
I think any digital pins can be used for the serial bus, at least with the Arduino boards. I looked again at the TMC2209 datasheet. You can have 4 drivers individually addressed on one bus. Of course, if you want two drivers to behave in the same way (say for two dosing pumps that you run in unison) then you can just give them the same address. Another way to scale is to add a transistor that switches the serial interface from one set of four drivers to another set of four. So if you want to communicate with 4x drivers, you need 1+x pins (2 for the serial bus + 1 to drive the transistor for each set of additional 4 drivers). But this would add even more complexity to the reef-pi code...
 
Btw has anyone figured out how to stop the timeline on the graphs from overlapping and being messed up after rebooting the pi? I thought adding a realtimeclock would fix it and added a DS3231, but that either doesn't help or i have it set up wrong.
Can you send a screen shot ?
 
I think any digital pins can be used for the serial bus, at least with the Arduino boards. I looked again at the TMC2209 datasheet. You can have 4 drivers individually addressed on one bus. Of course, if you want two drivers to behave in the same way (say for two dosing pumps that you run in unison) then you can just give them the same address. Another way to scale is to add a transistor that switches the serial interface from one set of four drivers to another set of four. So if you want to communicate with 4x drivers, you need 1+x pins (2 for the serial bus + 1 to drive the transistor for each set of additional 4 drivers). But this would add even more complexity to the reef-pi code...
Stepper capability is important. I’m won’t worry about the code bits if we have a robust strategy (open source , affordable, good circuit/drivers and solves dosing workflows )
 
Can you send a screen shot ?
1613064268872.png

1613064317979.png

1613064346189.png


New data is written inbetween old data instead of at the very right, the graph then flickers back and forth between new and old data. Happens every time i reboot the pi. If i reboot it again, all previous data is magically sorted again, but the newly arriving one will be broken again. After some time in the range of an hour or two, the problem stops, and new data is appended at the right again.

Same exact behaviour at the same exact timings is happening in health, temperature, and ph graph as far as i can tell. Others had this problem as well iirc.
 
I have an optical sensor hooked to an ATO where the pump relay is reversed. Its set up this way so that I can add saltwater and have the ato empty down to the desired level. That work well, but after its complete the ato will keep triggering intermittently and eventually leave the sensor dry and the pump running.

The pump should not be on when the sensor is dry. Anyone understand whats happening?
 

TOP 10 Trending Threads

ARE YOU READY TO CONFESS TO CRAZIEST, DUMBEST, FUNNIEST THING YOU’VE EVER DONE IN REEFING?

  • Yeah, I'll confess! (Share your story in the comments!)

    Votes: 33 55.9%
  • Nah, I'll keep mine a secret...(Don't be like that, share with the class!)

    Votes: 26 44.1%
Back
Top
Home
Post thread…
Market
What's new