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

b4tn

Valuable Member
View Badges
Joined
Jun 17, 2015
Messages
1,679
Reaction score
2,227
Location
Columbia MD
Rating - 0%
0   0   0
I'm not using the LM2596 (yet), I power the RP Pi (5V) and Reef-PI_HAT separately with 12V. I've bought components to integrate the LM2596 on the Reef-PI_HAT, but first I have to understand why the Reef-PI_PWM module is not working as expected. With the Reef-PI software I got very strange behavior in the user interface, when I started to control the PWM module directly (Python) it did seem to work however (think it's related to the used NPN transisors). Have ordered an oscilloscope to measure what comes out of the PCA9683 chip. Also 'recycled' an old oscilloscope, but not sure if that one still works (>30 years old).

J8 is an 'I2C' bus with 5 and 12V to connect to other boards. That's were I'm having some problems now, the I2C bus communicates with the PWM chip, but I don't get the expected output voltages (0-10V) yet.

Ahh ok, that makes sense. I have not read a schematic since High school lol so I am a bit rusty.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
I'm not using the LM2596 (yet), I power the RP Pi (5V) and Reef-PI_HAT separately with 12V. I've bought components to integrate the LM2596 on the Reef-PI_HAT, but first I have to understand why the Reef-PI_PWM module is not working as expected. With the Reef-PI software I got very strange behavior in the user interface, when I started to control the PWM module directly (Python) it did seem to work however (think it's related to the used NPN transisors). Have ordered an oscilloscope to measure what comes out of the PCA9683 chip. Also 'recycled' an old oscilloscope, but not sure if that one still works (>30 years old).

J8 is an 'I2C' bus with 5 and 12V to connect to other boards. That's were I'm having some problems now, the I2C bus communicates with the PWM chip, but I don't get the expected output voltages (0-10V) yet.
can you explain bit more on whats not working on the pwm side, I'd love to know and help anyway I can
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Trying to understand this schematic because minus ATO #2 and the second ULN2803 ( I only need 8 outputs) its exactly what I am looking to build. I see and understand the Motor driver for the dosers and the relay outputs. But where is the LM2596? What is J8 on the top right and why do the PWM outputs go to it?

Also...
Can anyone link me to the PH monitoring circuit and board?
LM2596 is used to convert 12V to 5V (when powering builds with 12V supply, you'll need one of these to get 5V for pi) or 12V to 10V (for 10V pwm generation).

reef-pi uses atlas scientific ph kit (ezo circuit) . I'll publish the guide sometime later this month, but till then you can use the ezo datasheet to connect to pi, its dead simple (standard i2c wiring)
 

speedstar

Well-Known Member
View Badges
Joined
Sep 18, 2018
Messages
704
Reaction score
1,029
Location
Grand Rapids
Rating - 0%
0   0   0

Thanks for the links, I have read through about 190 pages up to the PH sensor but didn't take good notes or save out links. I was asking about general GPI as I don't plan on using the water sensor for a direct ATO, but rather a backup to the float switch on my cheaper tunze nano ATO, basically just want to cut power to it if water reaches the sensor that I will install above the float. I dose Kalk in my top off so really want to keep it on two different systems to account for a single failure of either.
 

wykat

Active Member
View Badges
Joined
May 23, 2018
Messages
182
Reaction score
421
Rating - 0%
0   0   0
can you explain bit more on whats not working on the pwm side, I'd love to know and help anyway I can
I first wanted to solve my own problem(s), but I can give you my memory and maybe somebody can do the same with a PCA9685 module:

When I added the ports in 'Configuration/Connectors', Reef-PI suddenly didn't accept the input ports anymore. I think after I entered the 7th port, the 8th port was set back to 7th (duplicate). Also the sequence started to get strange:
Jacks
p0
0
pca9685
p8
8
pca9685
p9
9
pca9685
p10
10
pca9685
p11
11
pca9685
p12
12
pca9685
p13
13
pca9685
p14
14
pca9685
p15
15
pca9685
p1
1
pca9685
p2
2
pca9685
p3
3
pca9685
p4
4
pca9685
p5
5
pca9685
p6
6
pca9685
p7
7
pca9685

So I had to enter an existing port number and then edit it to become the correct one.

In Lightning I discovered that the ports/channels were completely messed up, so I deleted most of them, but couldn't get a signal on channel 0, nor port 0/7/8/15. That's when I changed to directly control the PCA9685 directly via Python. This seemed to work, but couldn't get a clear picture with a multimeter. Need to understand this first.

At the other hand it would be interesting to know when people use the PCA9685 module, what happens if they add more then 8 outputs. Somehow this looked very strange to me. I'm also not clear about the meaning of 'channel'

Thanks for your support, but as mentioned I don't want to create doubt's until I've discovered why my PWM module doesn't work. Needs some time as I'm missing the equipment at the moment.
 

b4tn

Valuable Member
View Badges
Joined
Jun 17, 2015
Messages
1,679
Reaction score
2,227
Location
Columbia MD
Rating - 0%
0   0   0
I am dizzy from reading lol. But I got Reef-pi installed, VNC, and remote access all worked out and am ready to start planning the build. I have read so much info today my brain feels like mush but I looked over all the schematics and am confident with power control, temp, and ATO on parts to buy and and how to build it. @Ranjib I looked over the EZO datasheet and its very straight forward and should be an easy addition I do have a few questions and I hate to ask these this far along because I am sure they are repeats.

The EZO uses pins 3 and 5 So I am a little hazy on building a doser circuit using PWM if you are using a PH probe. This one appears to make use of the scl pin 5 https://www.reef2reef.com/threads/r...-on-raspberry-pi.289256/page-304#post-5069339 but the adafruit lesson appears to use a software based PWM and a regular input?

I already have a BRS lab grade probe. Is this sufficient or do I need to get a new one?

I have been through the documents over and over again. I cannot find if you are using a LM2596 to break out the power where the 5 volt lead connects to on the rasberry itself. In the diagrams it goes to the lower 5 volt power bar and stops. Do you have to cut up a micro usb cable?

I really liked the idea of the perma prot hat but I dont think its going to have enough room to set up PH, power, ATO, temp, and doser. I am thinking to build everything on a full size Perma bread board. Does a standard IDE cable by chance fir the Rasberry pins?

I see a lot of builds using 2 LM2596's is there a reason for this as two separate power supplies due to total power consumption?
 

Brad Cox

Active Member
View Badges
Joined
Mar 18, 2017
Messages
346
Reaction score
399
Rating - 0%
0   0   0
Is there a slim = 1 percent or better chance that any smart service (alexa) or (siri) would be intergrated into reef-pi?
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Is there a slim = 1 percent or better chance that any smart service (alexa) or (siri) would be intergrated into reef-pi?
Actually , this should be trivial. I have a amazon echo at home, but not using it. Since reef-pi has API, i think we just have to write an alexa skill for reef-pi using that.
 

Brad Cox

Active Member
View Badges
Joined
Mar 18, 2017
Messages
346
Reaction score
399
Rating - 0%
0   0   0
Actually , this should be trivial. I have a amazon echo at home, but not using it. Since reef-pi has API, i think we just have to write an alexa skill for reef-pi using that.

O that would be sweet! Even if its just to cut the pumps off for maintaince. It would be sweet!
 

Zekth

Community Member
View Badges
Joined
Mar 18, 2016
Messages
57
Reaction score
92
Location
France
Rating - 0%
0   0   0
O that would be sweet! Even if its just to cut the pumps off for maintaince. It would be sweet!

As far as i know, Alexa API is based on Amazon Lambda functions which is not free and cloud tied.
Another solution instead of smart device like this could be to have shortcuts for macros on a mobile APP. Is that what you need/want? Also publishing mobile apps cost money but it's not consumption based like lambda functions.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
As far as i know, Alexa API is based on Amazon Lambda functions which is not free and cloud tied.
Another solution instead of smart device like this could be to have shortcuts for macros on a mobile APP. Is that what you need/want? Also publishing mobile apps cost money but it's not consumption based like lambda functions.
Dang! What about google aiy voice kit?
https://aiyprojects.withgoogle.com/voice/
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
reef-pi dashboard on adafruit.io (external). Lighting is set to diurnal cycle
Screen Shot 2018-10-03 at 1.10.34 PM.png
 

pickupman66

5000 Club Member
View Badges
Joined
Aug 10, 2010
Messages
6,032
Reaction score
1,165
Location
Winchester, TN
Rating - 0%
0   0   0
Ok. I want that. how do I get that? I have figured out the ATO but my temperatures are not showing data.

ato usage.JPG
 
Last edited:
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Ok. I want that. how do I get that? I have figured out the ATO but my temperatures are not showing data.

ato usage.JPG
Can you see latest temperature reading in your reef-pi dashboard? If so, it means something has change . There was a bug in reef-pi which will impact the data emission if temperature sensor name is updated. Its fixed now, but as an work around , if you restart reef-pi it should recreate the new feeds (with new names). If this is the case, you should see errors in reef-pi log (Failed to emit data to adafruit.io ... etc)
 

TOP 10 Trending Threads

WHAT AMOUNT OF LIVE ROCK AND SAND SHOULD BE PRIORITIZED FOR OPTIMAL BIODIVERSITY/FILTRATION?

  • 100% live rock + bagged sand

    Votes: 38 26.6%
  • 100% dry rock + 100% live sand

    Votes: 48 33.6%
  • 50/50 live/dry rock, 50/50 live/bagged sand

    Votes: 32 22.4%
  • 75% live rock, 25% live sand

    Votes: 15 10.5%
  • 25% live rock, 75% live sand

    Votes: 10 7.0%
Back
Top