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

Pca9685 is 12bit which maps to 0-4095 equal steps, which reef-pi again maps to 0-100% (and can be a fraction value). Check with multimeter what voltage reading you are getting at 0,1,50,99 and 100%
I did some messing arround with it this morning, it is defianatly not maping to 12bit. Had blues set to 0 at 6am, and 2 at 8pm. they clicked on at 7pm, when it would be exactly 1
 
I did some messing arround with it this morning, it is defianatly not maping to 12bit. Had blues set to 0 at 6am, and 2 at 8pm. they clicked on at 7pm, when it would be exactly 1
They were on with full brightness ? It would be easier to texts if you just manual change the intensity with ui and measure the voltage
 
The problem is threefold:
Is the sensor a real ds18b20?
Is it real stainless? What grade?
How did they crimp/seal the end?

As in all things china made there is alot of variance.
The adafruit ones are more expensive but get good reviews.
I bought 2 from drok before xmas that had a nice double crimp at the end, silicone cable insulation, and are shielded...made in Canada, but alas they are gone on amazon.

With the sub dollar ones, questions 1 and 2 are very much no and “crap” :). The end is potted into the pill, I haven’t cut one apart yet (soon!). No cables shields and generic PVC jacket.

The adafruit ones look very similar, I’ll buy one and do some destructive testing.
 
Thank you for the kind words and a warm welcome to reef2reef.
The adj power strip does not have a guide that explains the pinout (which pin in db9 connector controls which outlet). I had to do something similar (create all 8 outlet, create 8 equipment with those and then connect a table lamp in one of the outlet and alternatively turn them on in ui to figure out which one maps to which). This is a one time effort during the setup and I don’t know if the setup is same across all power strips.
I’ll look into the light and get back to you .
I use a tape to stick the components on perma board while soldering then in upside down position. Sometime I just lay them flat on the soldering table directly . I had to learn this hard way as well. I think a video tutorial will help with things like this.
We could use all the help you can offer around coding or testing or documentation. Let me know if you are interested , just drop your email in a PM to me and I’ll add you in the developer slack channel where we do most of the development chattering

Happy new year and thank you for giving reef-pi a shot

I checked out the dimmer attachment with my multimeter, its a seven step dimmer, at full blast its putting out 12.19v, when I step it down one notch it doesnt stay constant, its always moving although you can see that it has lowered the voltage. It cycles from 10.9 to 12, always moving and does this with each step down. Looks like the bottom setting is 5.9 to 7 or there abouts kind of hard to get the readings since it cycles constantly. This will probably make sense to electronic users but looks like they step down the voltage which is what I assumed but not sure why it cycles like it does.
 
I checked out the dimmer attachment with my multimeter, its a seven step dimmer, at full blast its putting out 12.19v, when I step it down one notch it doesnt stay constant, its always moving although you can see that it has lowered the voltage. It cycles from 10.9 to 12, always moving and does this with each step down. Looks like the bottom setting is 5.9 to 7 or there abouts kind of hard to get the readings since it cycles constantly. This will probably make sense to electronic users but looks like they step down the voltage which is what I assumed but not sure why it cycles like it does.
Does your multi-meter have Frequency setting? My guess would be that it is jumping around because it is PWM and multi-meters can jump around when measuring PWM on regular DC setting.
 
Does your multi-meter have Frequency setting? My guess would be that it is jumping around because it is PWM and multi-meters can jump around when measuring PWM on regular DC setting.
Yeah probably not its a HF cheap meter, https://www.harborfreight.com/11-function-digital-multimeter-with-audible-continuity-61593.html always looking for an excuse to purchase more tools if there is a better one that will give e more options that is *cough* affordable let me know. I am tempted to cut the dimmer section open to look at it and see what is inside, its just a shrink wrapped jumper section.
 
Yeah probably not its a HF cheap meter, https://www.harborfreight.com/11-function-digital-multimeter-with-audible-continuity-61593.html always looking for an excuse to purchase more tools if there is a better one that will give e more options that is *cough* affordable let me know. I am tempted to cut the dimmer section open to look at it and see what is inside, its just a shrink wrapped jumper section.
Turns out that it does. Test the signal using the Hz setting and let us know what it says.
 
Yeah probably not its a HF cheap meter, https://www.harborfreight.com/11-function-digital-multimeter-with-audible-continuity-61593.html always looking for an excuse to purchase more tools if there is a better one that will give e more options that is *cough* affordable let me know. I am tempted to cut the dimmer section open to look at it and see what is inside, its just a shrink wrapped jumper section.
I think its ok even if you don't know the frequency, we can test it out on the software side. You have to know the required control signal voltage range, and operating current (amp ) . Generally the common three steps for build led control circuit is:
- Generate pwm using pca9685 or pi (5v or 3.3v)
- Use lm2596 to generate the target pwm range (in your case 12v, so you may not need a lm2596 at all, and just do away with 12v straight from wall wart power supply, assuming you are powering your build with 12V)
- Use common npn transistor for low current output (say less than 70ma) or power mosfet/meanwell driver for high current output (3 amp)
thats all..,. proceed systematically and let us know what help you need at each step. Verify as you progress with a multimeter the expected voltage, at each junctions of your circuit.
 
A few observations from my memory issues...
I have been reloading every few day to keep on top of it.
upload_2019-1-1_17-50-34.png

However, if the memory usage gets too high it will not let me reboot or reload through the UI.
Code:
Jan 01 17:48:10 raspberrypi reef-pi[7833]: 2019/01/01 17:48:10 Reloading reef-pi controller
Jan 01 17:48:10 raspberrypi reef-pi[7833]: 2019/01/01 17:48:10 ERROR: Failed to reload reef-pi. Output:. Error: fork/exec /bin/systemctl:    cannot allocate memory
Jan 01 17:48:10 raspberrypi reef-pi[7833]: 2019/01/01 17:48:10 ERROR: GET /api/admin/reload Failed to reload reef-pi. Output:. Error: fork   /exec /bin/systemctl: cannot allocate memory
Jan 01 17:51:44 raspberrypi reef-pi[7833]: 2019/01/01 17:51:44 ERROR: Failed to reboot reef-pi. Output:. Error: fork/exec /bin/systemctl: cannot allocate memory
Jan 01 17:51:44 raspberrypi reef-pi[7833]: 2019/01/01 17:51:44 ERROR: GET /api/admin/reboot Failed to reboot reef-pi. Output:. Error: fork/exec /bin/systemctl: cannot allocate memory
The error shows up in the UI when unable to reboot, but nothing is generated on the error from reload
upload_2019-1-1_17-53-17.png
 
A few observations from my memory issues...
I have been reloading every few day to keep on top of it.
upload_2019-1-1_17-50-34.png

However, if the memory usage gets too high it will not let me reboot or reload through the UI.
Code:
Jan 01 17:48:10 raspberrypi reef-pi[7833]: 2019/01/01 17:48:10 Reloading reef-pi controller
Jan 01 17:48:10 raspberrypi reef-pi[7833]: 2019/01/01 17:48:10 ERROR: Failed to reload reef-pi. Output:. Error: fork/exec /bin/systemctl:    cannot allocate memory
Jan 01 17:48:10 raspberrypi reef-pi[7833]: 2019/01/01 17:48:10 ERROR: GET /api/admin/reload Failed to reload reef-pi. Output:. Error: fork   /exec /bin/systemctl: cannot allocate memory
Jan 01 17:51:44 raspberrypi reef-pi[7833]: 2019/01/01 17:51:44 ERROR: Failed to reboot reef-pi. Output:. Error: fork/exec /bin/systemctl: cannot allocate memory
Jan 01 17:51:44 raspberrypi reef-pi[7833]: 2019/01/01 17:51:44 ERROR: GET /api/admin/reboot Failed to reboot reef-pi. Output:. Error: fork/exec /bin/systemctl: cannot allocate memory
The error shows up in the UI when unable to reboot, but nothing is generated on the error from reload
upload_2019-1-1_17-53-17.png

Just curious. Is this the build with the new Adafruit motor driver hat?
 
A few observations from my memory issues...
I have been reloading every few day to keep on top of it.
upload_2019-1-1_17-50-34.png

However, if the memory usage gets too high it will not let me reboot or reload through the UI.
Code:
Jan 01 17:48:10 raspberrypi reef-pi[7833]: 2019/01/01 17:48:10 Reloading reef-pi controller
Jan 01 17:48:10 raspberrypi reef-pi[7833]: 2019/01/01 17:48:10 ERROR: Failed to reload reef-pi. Output:. Error: fork/exec /bin/systemctl:    cannot allocate memory
Jan 01 17:48:10 raspberrypi reef-pi[7833]: 2019/01/01 17:48:10 ERROR: GET /api/admin/reload Failed to reload reef-pi. Output:. Error: fork   /exec /bin/systemctl: cannot allocate memory
Jan 01 17:51:44 raspberrypi reef-pi[7833]: 2019/01/01 17:51:44 ERROR: Failed to reboot reef-pi. Output:. Error: fork/exec /bin/systemctl: cannot allocate memory
Jan 01 17:51:44 raspberrypi reef-pi[7833]: 2019/01/01 17:51:44 ERROR: GET /api/admin/reboot Failed to reboot reef-pi. Output:. Error: fork/exec /bin/systemctl: cannot allocate memory
The error shows up in the UI when unable to reboot, but nothing is generated on the error from reload
upload_2019-1-1_17-53-17.png
I'll try to reproduce this tonight. I am really curious whats taking up most memory. From the chart at least, it does not look like memory is unavailable (100Mb is 1/10 the of total available memory).
 
It is still accurate, but its always a good idea to start a thread or let us know the things you want and the BOM and we can review it for you

you can declare an inlet in reverse mode (theres a checkbox for it), and then declare an ato to associate that inlet with the equipment you want, and since you have deliberately specified the inlet in reverse mode, it will act opposite, i,e. turn on the equipment when water is above the level and turn it off if the water is below the expected level. Is that what you want? It will be easier to think about alternatives if you can describe what you are trying to achieve instead.

Thanks, what i am trying to do is this :

i have 2 level sensor installed,

the top one is use on ATO

the 2nd one is lower and i want it for auto water change

When i activate my water change macro i need :

main ATO deactivated
then water pump on AC4 is activated to remove water from the sump until it reaches the lower sensor that cuts off the AC4 pump

Then the AC2 pump in my new saltwater is activated until the level reaches the top level Main ATO sensor.

After that, the normal ATO is reactivated and the RODI water is added when needed
 
Turns out that it does. Test the signal using the Hz setting and let us know what it says.

First time I did it I thought it was giving me useful information but here is what it reports when set to the frequency setting. Here is what I saw:

Full power - step 1 - 0
step 2 - .02-03 cycles from here out
step 3 - .-4-.05
step 4 - .06-.07
step 5 - .06-.08
step 6 - .07-.09
step 7 - .08-.10
 
I think its ok even if you don't know the frequency, we can test it out on the software side. You have to know the required control signal voltage range, and operating current (amp ) . Generally the common three steps for build led control circuit is:
- Generate pwm using pca9685 or pi (5v or 3.3v)
- Use lm2596 to generate the target pwm range (in your case 12v, so you may not need a lm2596 at all, and just do away with 12v straight from wall wart power supply, assuming you are powering your build with 12V)
- Use common npn transistor for low current output (say less than 70ma) or power mosfet/meanwell driver for high current output (3 amp)
thats all..,. proceed systematically and let us know what help you need at each step. Verify as you progress with a multimeter the expected voltage, at each junctions of your circuit.

I followed first three guides, powering with a 12v 2.5amp power supply. I will need more guidance since im not familiar with the components, I don't mind reading to come up to speed but it may take me a little while to get my head wrapped around what I need to do. First question would be which is cheaper and/or better to use? I have access to a good electronics store that will have just about anything I need, just need to know what I need to go purchase. From what I read I need to get a pca9685 and a npn transistor or mosfet/meanwell driver. would it help to cut open the current dimmer component to see what its using?

Thanks for the help...
 
Last edited:
Just curious. Is this the build with the new Adafruit motor driver hat?
Yes it is. Though not sure why it would be different from a regular pca9685. Does the pi do anything different when a hat is connected, reading an eeprom on the hat?

I'll try to reproduce this tonight. I am really curious whats taking up most memory. From the chart at least, it does not look like memory is unavailable (100Mb is 1/10 the of total available memory).
Thanks. Let me know if you need anything else on my end. This is running v2.0-2-gae06032
 
Yes it is. Though not sure why it would be different from a regular pca9685. Does the pi do anything different when a hat is connected, reading an eeprom on the hat?


Thanks. Let me know if you need anything else on my end. This is running v2.0-2-gae06032

I’m not really sure to be honest. But I wonder if the same thing would happen if you where to rule it out by trying the pca9685 break out board? Just thinking out loud.
 
Also just noticed something interesting when I had to reboot the system through terminal rather than the UI.
The dates jump back and forward in time on a few of the charts.
upload_2019-1-1_21-41-49.png
 
I think its ok even if you don't know the frequency, we can test it out on the software side. You have to know the required control signal voltage range, and operating current (amp ) . Generally the common three steps for build led control circuit is:
- Generate pwm using pca9685 or pi (5v or 3.3v)
- Use lm2596 to generate the target pwm range (in your case 12v, so you may not need a lm2596 at all, and just do away with 12v straight from wall wart power supply, assuming you are powering your build with 12V)
- Use common npn transistor for low current output (say less than 70ma) or power mosfet/meanwell driver for high current output (3 amp)
thats all..,. proceed systematically and let us know what help you need at each step. Verify as you progress with a multimeter the expected voltage, at each junctions of your circuit.

I followed first three guides, powering with a 12v 2.5amp power supply. I will need more guidance since im not familiar with the components, I don't mind reading to come up to speed but it may take me a little while to get my head wrapped around what I need to do. First question would be which is cheaper and/or better to use? I have access to a good electronics store that will have just about anything I need, just need to know what I need to go purchase. From what I read I need to get a pca9685 and a npn transistor or mosfet/meanwell driver. would it help to cut open the current dimmer component to see what its using?

Thanks for the help...

I think I have a better understanding after reading through this https://www.instructables.com/id/A-Simple-Introduction-to-Transistors-and-PWM-Puls/

If I want to use the Pi to generate the pwm then I would just need to just need to get a npn transistor, I think based on that article I have a better feel for what I would need to do. Basically I could feed 12v from reef-pi which goes to the transistor and then have pwm feed from the pi. Am I missing anything?

Thanks
 

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: 26 65.0%
  • Nah, I'll keep mine a secret...(Don't be like that, share with the class!)

    Votes: 14 35.0%
Back
Top
Home
Post thread…
Market
What's new