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

Ryan115

Well-Known Member
View Badges
Joined
Dec 28, 2010
Messages
586
Reaction score
1,085
Location
Mississippi
Rating - 0%
0   0   0
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.
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,349
Reaction score
1,724
Location
Missouri
Rating - 0%
0   0   0
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.
 

Ryan115

Well-Known Member
View Badges
Joined
Dec 28, 2010
Messages
586
Reaction score
1,085
Location
Mississippi
Rating - 0%
0   0   0
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.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
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.
 

Ryan115

Well-Known Member
View Badges
Joined
Dec 28, 2010
Messages
586
Reaction score
1,085
Location
Mississippi
Rating - 0%
0   0   0
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
 

b4tn

Valuable Member
View Badges
Joined
Jun 17, 2015
Messages
1,673
Reaction score
2,244
Location
Columbia MD
Rating - 0%
0   0   0
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?
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
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).
 

Jean-Pierre Renaud

Community Member
View Badges
Joined
Feb 7, 2018
Messages
49
Reaction score
39
Location
Blainville
Rating - 0%
0   0   0
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
 

bishoptf

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

bishoptf

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

Ryan115

Well-Known Member
View Badges
Joined
Dec 28, 2010
Messages
586
Reaction score
1,085
Location
Mississippi
Rating - 0%
0   0   0
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
 

b4tn

Valuable Member
View Badges
Joined
Jun 17, 2015
Messages
1,673
Reaction score
2,244
Location
Columbia MD
Rating - 0%
0   0   0
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.
 

Ryan115

Well-Known Member
View Badges
Joined
Dec 28, 2010
Messages
586
Reaction score
1,085
Location
Mississippi
Rating - 0%
0   0   0
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
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,349
Reaction score
1,724
Location
Missouri
Rating - 0%
0   0   0
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
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
5) Disable the Low ATO
6) Wait few seconds
7) Start the High ATO, which will pour fresh saltware mix and wait for a period little longer than it usually takes to reach the correct level, again you dont have to be precise as the High ATO will turn off the pump controlling new fresh saltwater mix
8) Disable High ATO
9) Wait for few seconds
10) Enable the Actual ATO
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
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
Yes. What yo have to remember is pi has only two pwm pins, if you need just two led channel control, pi is sufficient, for more channels (upto 16) pca9685 is your option. This is choice (pi or pca9685) is solely based on number of pwm channels.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
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...
No worries. I have repeated this multiple times, but I think its encouraging to mention again :), I am not a career electronics engineer, I learned electronics three years before and its pretty much through reef-pi. It was a way for me to stay off internet, and not to overengineer my tank. You are more than welcome to use this project as an opportunity to learn as well, in fact thats why the guides are in adafruit, i literally learned most of the things (and the build components reflect that) from their tutorials and kits. There are bunch of us here who would be happy to help you out. This is a hobby thing, and most of us have a different day job so our response may not be very timely, but we'd definitely lend you a hand in troubleshooting,
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,349
Reaction score
1,724
Location
Missouri
Rating - 0%
0   0   0
Yes. What yo have to remember is pi has only two pwm pins, if you need just two led channel control, pi is sufficient, for more channels (upto 16) pca9685 is your option. This is choice (pi or pca9685) is solely based on number of pwm channels.

I only have 2 lights that have the dimmers so I could go with the pi for now and if I upgrade the other light expand at that time. If I use the pi where do I need to connect it to and then how do i control it with reef-pi, where should I start with my testing number wise for the pwm control?

I actually think this may be easier than I first thought, i understand from looking at the wiring on th transistor how that fits into the circuit just not sure how to tie it into the pi from the pwm stand point. I will need to feed it 12v from the pi, thats easy and then tie it into the pwm circuit. Will go and see if I can figure out which pins are for pwm.

One additional question, I guess if I end up driving both led's from the pi, my current ps is 2.5amps, I am guessing I will need to beef that up, your thoughts? i have lots of power supplies since I do a lot of building of things, I think I have one that will put out 5amps at 12v if needed, just bigger brick to hide, lol.

Thanks :)
 

HAVE YOU EVER KEPT A RARE/UNCOMMON FISH, CORAL, OR INVERT? SHOW IT OFF IN THE THREAD!

  • Yes!

    Votes: 32 45.7%
  • Not yet, but I have one that I want to buy in mind!

    Votes: 9 12.9%
  • No.

    Votes: 26 37.1%
  • Other (please explain).

    Votes: 3 4.3%
Back
Top