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
Ok so while waiting on how to actually wire the adapter hooking up just relays, ato, and temperature sensor to a psm with a ground to pi. Also learned i am terrible at soldering, this is an acquired skill.

Waiting on delivery of 5.25” bay panels to complete the exterior of the housing. I did away with the face plate the supplied led screen was a joke. Static “Media Pc” was displayed when turned on lol.
Will attach the 2x16 display to the body itself, just need to remove 1/8” with a Dremel or belt sander.
The reset button works great, this was accomplished by soldering 2 pins on the pi where it says “run” by pushing the button it shorts, safely resetting the pi, this in on all pi b models.
Soldering will improve with practice, but having quality equipment makes a huge difference. A quality soldering iron with the appropriate tip makes things much easier. A low cost/low power soldering iron cant keep it's temperature stable. I dread when I cant use my Weller WES51 and have to use my old under powered radioshack point of sale.
Also, leaded solder is easier to work with, but there are some blends of lead free that are supposed to be better than others.
Quick tips - always clean the iron tip, and get a very small bead on the tip before trying to solder a joint. Pre-tinning wires can help too.

OK, I'll use a timer to turn off the fans - that would be the easiest solution, and that's what I'm doing now for the whole light.

3.5mm plug, yeah that's sophisticated, i haven't stepped up to @Ranjib and @Ryan115 level of sophistication yet but let me look into ti. What's the cheapest / good source for 3.5mm cords with 3 wires. It looks like some stereo plugs have only a red and white cord is that true?

@Ryan115 I have a few more questions listed below in your diagram for reference. Thanks for being patient with me!!!


upload_2018-3-21_18-0-44.png
Most likely your lights will not dim down to off, so the timer would be turning them off as well.

3.5mm stereo cable should have 3 connections. They are known as TRS (tip, ring, sleeve). You can also get some with 4 connectors (TRRS). For cables, amazon or ebay most likely. For separate plugs (the male connector) and jacks (the female connector) you will find some in bulk on both amazon and ebay, or you can look on Digikey/Newark/Mouser/Allied Electronics.

No problem on the questions, that is what these forums are here for. Everyone was new at some point, some people forget that.
The PWM GND should just be able to connect to the GND on the PCA9685 which should be connected to the pi GND.
V- DIM and GND should be the same, can you confirm that on your driver. I doubt that they are isolated.
You should not need to cut the wires that you have now. Can you post a picture of the connector side of the dimming module that you have?
Also, did you check the output of VDM+ to VDM- on the Hz and Duty settings of your multimeter. This should show whether that module is outputting pwm of analog. PWM can "trick" the VDC setting on most multimeters.
 

denierlexiese

Active Member
View Badges
Joined
Jul 7, 2017
Messages
106
Reaction score
68
Rating - 0%
0   0   0
3.5mm stereo cable should have 3 connections. They are known as TRS (tip, ring, sleeve). You can also get some with 4 connectors (TRRS). For cables, amazon or ebay most likely. For separate plugs (the male connector) and jacks (the female connector) you will find some in bulk on both amazon and ebay, or you can look on Digikey/Newark/Mouser/Allied Electronics.
Sounds good. I'll take a look. Do i just get regular 3.5mm cable, and cut it myself. Or should I get terminal block form, or just the connectors to solder and use a spool of bulk wiring? Is there an easy place to get bulk wiring for 3.5mm stereo?
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Sounds good. I'll take a look. Do i just get regular 3.5mm cable, and cut it myself. Or should I get terminal block form, or just the connectors to solder and use a spool of bulk wiring? Is there an easy place to get bulk wiring for 3.5mm stereo?
I just use the panel mount female connectors for the housing, and use any ordinary audio cable with male jacks on both end. Our local electronics store sell those for 3$
 

denierlexiese

Active Member
View Badges
Joined
Jul 7, 2017
Messages
106
Reaction score
68
Rating - 0%
0   0   0
No problem on the questions, that is what these forums are here for. Everyone was new at some point, some people forget that.
The PWM GND should just be able to connect to the GND on the PCA9685 which should be connected to the pi GND.
V- DIM and GND should be the same, can you confirm that on your driver. I doubt that they are isolated.
You should not need to cut the wires that you have now. Can you post a picture of the connector side of the dimming module that you have?
Also, did you check the output of VDM+ to VDM- on the Hz and Duty settings of your multimeter. This should show whether that module is outputting pwm of analog. PWM can "trick" the VDC setting on most multimeters.

The PWM GND should just be able to connect to the GND on the PCA9685 which should be connected to the pi GND.

@Ryan115 it looks like @Ranjib didn't use pwm ground [large picture below], is that correct? Can you use the pwm ground pin next to V+, i thought that was only if we were supply the pca9685 with external power through its terminal block [although it only allows up to 6 volts]

V- DIM and GND should be the same, can you confirm that on your driver. I doubt that they are isolated.
How would i go about checking the driver? What terms should I put into youtube to learn how to check isolation?

Also, did you check the output of VDM+ to VDM- on the Hz and Duty settings of your multimeter. This should show whether that module is outputting pwm of analog. PWM can "trick" the VDC setting on most multimeters.
When dimmer is off reads 60 hz, when dimmer on is around 130-160hz, duty cycle when on is stablish 39% +- 1%. What that tells, you i don't know. Please help.

You should not need to cut the wires that you have now. Can you post a picture of the connector side of the dimming module that you have?

Here's the picture.
upload_2018-3-22_0-45-53.png
upload_2018-3-22_0-46-34.png






breadboard.png
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
The PWM GND should just be able to connect to the GND on the PCA9685 which should be connected to the pi GND.

@Ryan115 it looks like @Ranjib didn't use pwm ground [large picture below], is that correct? Can you use the pwm ground pin next to V+, i thought that was only if we were supply the pca9685 with external power through its terminal block [although it only allows up to 6 volts]

V- DIM and GND should be the same, can you confirm that on your driver. I doubt that they are isolated.
How would i go about checking the driver? What terms should I put into youtube to learn how to check isolation?

Also, did you check the output of VDM+ to VDM- on the Hz and Duty settings of your multimeter. This should show whether that module is outputting pwm of analog. PWM can "trick" the VDC setting on most multimeters.
When dimmer is off reads 60 hz, when dimmer on is around 130-160hz, duty cycle when on is stablish 39% +- 1%. What that tells, you i don't know. Please help.

You should not need to cut the wires that you have now. Can you post a picture of the connector side of the dimming module that you have?

Here's the picture.
upload_2018-3-22_0-45-53.png
upload_2018-3-22_0-46-34.png






breadboard.png
Right, because they are all in the same rail. Note, I do the coversion (5 -> 10v) near Pi, I dont mod the light (kessil). From what I understand you are transferring 5v pwm and then converting it to 10v with a circuit thats close to the light fixture, is that right?
 

denierlexiese

Active Member
View Badges
Joined
Jul 7, 2017
Messages
106
Reaction score
68
Rating - 0%
0   0   0
i haven't decided what I'm going to do yet. The clarity of your fritz diagram makes me lean towards copying your example. @Ryan115 was indicating that using the internal 12 volts circuit provided by the light might save me some wires going to the black box fropm an external 12 volt , low current power supply.
 

denierlexiese

Active Member
View Badges
Joined
Jul 7, 2017
Messages
106
Reaction score
68
Rating - 0%
0   0   0
Is the concern @Ranjib the distance near or from the pi? i was thinking of having the pi, about 2 ft away from the circuit, and having the circuit about 6 inches away from the lights to have the bulk of wires be small near the light. A breaboard with the voltage regulator, transistor, and resistors near the light [6 inches away], and the pca9685 right next to the raspberrry pi about 2 ft away from the light with the pwm 2 channel wires going 2 ft to the breadboard circuit.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Is the concern @Ranjib the distance near or from the pi? i was thinking of having the pi, about 2 ft away from the circuit, and having the circuit about 6 inches away from the lights to have the bulk of wires be small near the light. A breaboard with the voltage regulator, transistor, and resistors near the light [6 inches away], and the pca9685 right next to the raspberrry pi about 2 ft away from the light with the pwm 2 channel wires going 2 ft to the breadboard circuit.
yeah. I worry that the pca9685 my not be able to supply enough current.
 

Ryan115

Well-Known Member
View Badges
Joined
Dec 28, 2010
Messages
586
Reaction score
1,085
Location
Mississippi
Rating - 0%
0   0   0
The PWM GND should just be able to connect to the GND on the PCA9685 which should be connected to the pi GND.

@Ryan115 it looks like @Ranjib didn't use pwm ground [large picture below], is that correct? Can you use the pwm ground pin next to V+, i thought that was only if we were supply the pca9685 with external power through its terminal block [although it only allows up to 6 volts]

V- DIM and GND should be the same, can you confirm that on your driver. I doubt that they are isolated.
How would i go about checking the driver? What terms should I put into youtube to learn how to check isolation?

Also, did you check the output of VDM+ to VDM- on the Hz and Duty settings of your multimeter. This should show whether that module is outputting pwm of analog. PWM can "trick" the VDC setting on most multimeters.
When dimmer is off reads 60 hz, when dimmer on is around 130-160hz, duty cycle when on is stablish 39% +- 1%. What that tells, you i don't know. Please help.

You should not need to cut the wires that you have now. Can you post a picture of the connector side of the dimming module that you have?

Here's the picture.
upload_2018-3-22_0-45-53.png
upload_2018-3-22_0-46-34.png






breadboard.png
As Ranjib said, it doesnt really matter whether the gnd comes from the pi or from the pca9685, they are the same. I pulled mine from the pca9685 so that all 3 wires were coming from the same board (Blue Dim, White Dim and GND).
Did the duty cycle change at all through the dimming? How different at full brightness vs almost off?
To check the gnd and -vdm, with the system not plugged in, check resitance between those two pins.
So the connector that is currently on your dimmer board is this. https://www.digikey.com/product-detail/en/jst-sales-america-inc/B4B-XH-A-LF-SN/455-2249-ND/1651047
If you use that, you would not need to cut the cable if the circuit is internal, you could just swap them out.
Also, I just realized that "stereo cable" may have been a bit confusing. Think headphones, not speaker wire.
I would agree with ranjib, just get double ended 3.5mm and use panel mount jacks. Something like this
upload_2018-3-22_6-35-9.jpeg

yeah. I worry that the pca9685 my not be able to supply enough current.
I am running mine through ~6-8 feet of cable with no issues.
 

denierlexiese

Active Member
View Badges
Joined
Jul 7, 2017
Messages
106
Reaction score
68
Rating - 0%
0   0   0
As Ranjib said, it doesnt really matter whether the gnd comes from the pi or from the pca9685, they are the same. I pulled mine from the pca9685 so that all 3 wires were coming from the same board (Blue Dim, White Dim and GND).
Did the duty cycle change at all through the dimming? How different at full brightness vs almost off?
To check the gnd and -vdm, with the system not plugged in, check resitance between those two pins.
So the connector that is currently on your dimmer board is this. https://www.digikey.com/product-detail/en/jst-sales-america-inc/B4B-XH-A-LF-SN/455-2249-ND/1651047
If you use that, you would not need to cut the cable if the circuit is internal, you could just swap them out.
Also, I just realized that "stereo cable" may have been a bit confusing. Think headphones, not speaker wire.
I would agree with ranjib, just get double ended 3.5mm and use panel mount jacks. Something like this
upload_2018-3-22_6-35-9.jpeg


I am running mine through ~6-8 feet of cable with no issues.

Did the duty cycle change at all through the dimming? How different at full brightness vs almost off?
i don't believe so, i believe it read 39% through all of dimming between the lowest setting and the highest setting. Does that make sense? I can double check tonight if that doesn't make sense.

To check the gnd and -vdm, with the system not plugged in, check resitance between those two pins.
Ah, can't i check continuity ton the multimeter and see if i hear a sound. If they are not isolated the grounds the multimeter should sound right?

So the connector that is currently on your dimmer board is this. https://www.digikey.com/product-detail/en/jst-sales-america-inc/B4B-XH-A-LF-SN/455-2249-ND/1651047
Is there a way to order from digikey to not get dinged on shipping every time? i'll try this, probably could pop into a breadboard and test out.

I am running mine through ~6-8 feet of cable with no issues
Sounds great!!!
 

denierlexiese

Active Member
View Badges
Joined
Jul 7, 2017
Messages
106
Reaction score
68
Rating - 0%
0   0   0
@Ranjib How is your adafruit temperature probe ds18b20 working out? Any rust or malfunction in your 1 year of use? One of my three Vktech cheap $2 crapped out last night after 1 month of use. I believe because i put it next to the heater 250 watt heater [overkill but it's all i had around] in my 10 gallon QT tank, and my guess is the heater killed it. My other two heaters in my sump and main tank [with a bunch of silicon on them] have been tracking accurately for 1 month, and 4 months respectively.

Now i need to figure out if i want to step up to a $16 probe, or go with a cheap 5 pack for $10 and silicone coat them again. Let me know so i can weigh my options. Thanks!!!


One interesting note when running three temp probes of DS18b20, when one crapped out, all three started reading poorly until the bad one was remove. Is there anyway to isolate them more from each other. It looks like the raspberry pi might only support a single one wire bus natively? Any thoughts for when we start running multiple temp probes?
 

denierlexiese

Active Member
View Badges
Joined
Jul 7, 2017
Messages
106
Reaction score
68
Rating - 0%
0   0   0
@Ranjib One interesting note when running three temp probes of DS18b20, when one crapped out, all three started reading poorly until the bad one was remove. Is there anyway to isolate them more from each other. It looks like the raspberry pi might only support a single one wire bus natively? Any thoughts for when we start running multiple temp probes?

I looks like an option might be to connect them to arduino nanos. It looks like the arduino nano might not have a limitation on a single one wire bus....maybe I'm wrong or there is an easier way.


or it looks like if the kernals is past 4.9.28 have support for multiple busses
https://pinout.xyz/pinout/1_wire

It looks like this should tell us what kernal version we are running. I'll check the multiple one wire buses tonight to try to isolate the temp probes.
uname -a
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
@Ranjib How is your adafruit temperature probe ds18b20 working out? Any rust or malfunction in your 1 year of use? One of my three Vktech cheap $2 crapped out last night after 1 month of use. I believe because i put it next to the heater 250 watt heater [overkill but it's all i had around] in my 10 gallon QT tank, and my guess is the heater killed it. My other two heaters in my sump and main tank [with a bunch of silicon on them] have been tracking accurately for 1 month, and 4 months respectively.

Now i need to figure out if i want to step up to a $16 probe, or go with a cheap 5 pack for $10 and silicone coat them again. Let me know so i can weigh my options. Thanks!!!


One interesting note when running three temp probes of DS18b20, when one crapped out, all three started reading poorly until the bad one was remove. Is there anyway to isolate them more from each other. It looks like the raspberry pi might only support a single one wire bus natively? Any thoughts for when we start running multiple temp probes?
How you are running three probes? reef-pi currently support only one
 

theatrus

Valuable Member
View Badges
Joined
Mar 26, 2016
Messages
1,955
Reaction score
3,355
Location
Sacramento, CA area
Rating - 0%
0   0   0
The ds18b20 probes should allow many to be connected to a bus? They should have a unique 64bit serial number for each, though you won't be able to tell what it is without connecting to them.

Unless the Chinese versions don't carry unique serial numbers?

I did some testing a year or so back on these probes from eBay/Aliexpress and basically realized the "stainless" steel is barely even steel and very much not stainless. Real temperature probes that are stainless are much more expensive of course, so I see the recommendation for PlasticDip or similar.
 

denierlexiese

Active Member
View Badges
Joined
Jul 7, 2017
Messages
106
Reaction score
68
Rating - 0%
0   0   0
To check the gnd and -vdm, with the system not plugged in, check resitance between those two pins.
I am running mine through ~6-8 feet of cable with no issues.
.
@Ryan115 Check resistance and continuitty between -vdm [marked in orange] and two mark grounds on the driver board marked in red. [The bottom ground connects to the dc fans]. No audible beep, and the resistance is .7 k ohms, 700 0hms. The continunity between the two red marked grounds [ dc and random labeled ground on the driver] contunity check does beep, and reisstance and is 1 ohm. Alsso on the pca9685 board all the 16 channel ground pins connect to the ground pin on the left side near sla and sda on the pca9685.

So doesn't that mean my vdim - and marked grounds on the driver are indeed isolated?


upload_2018-3-23_2-26-23.png
 

theatrus

Valuable Member
View Badges
Joined
Mar 26, 2016
Messages
1,955
Reaction score
3,355
Location
Sacramento, CA area
Rating - 0%
0   0   0
.
@Ryan115 Check resistance and continuitty between -vdm [marked in orange] and two mark grounds on the driver board marked in red. [The bottom ground connects to the dc fans]. No audible beep, and the resistance is .7 k ohms, 700 0hms. The continunity between the two red marked grounds [ dc and random labeled ground on the driver] contunity check does beep, and reisstance and is 1 ohm. Alsso on the pca9685 board all the 16 channel ground pins connect to the ground pin on the left side near sla and sda on the pca9685.

So doesn't that mean my vdim - and marked grounds on the driver are indeed isolated?

Doesn't look like isolation to me (you would be reading in the megaohms, and it would be across a noticeable barrier). Its most likely a series resistor to limit currents on the pin when connected externally, and can be ignored IMO. That said, its still good practice to connect Vdim- to the ground of the PCA PWM driver (DIM- on such a board would be bussed together ground as its single rail)
 

denierlexiese

Active Member
View Badges
Joined
Jul 7, 2017
Messages
106
Reaction score
68
Rating - 0%
0   0   0
How you are running three probes? reef-pi currently support only one

Basically i was already working on my own raspberry pi temperature reader before i discovered reef pi lastJuly. I knew i wanted 3 - 4 temperature probes to start with so i programmed a simply shell script to get the data and store it.

I didn't mean to side track main reef pi functionality discussions. I suspected that at some point soon reef pi would have the multiple temperature probes capability, so it would be a good discussion to bring up now so we could develop the circuity together as a group and know all the potential pitfalls before software development. I can pm you next time if you want me to keep discussions around upcoming features more private to not distract the general users from core functionality.
 
Last edited:

denierlexiese

Active Member
View Badges
Joined
Jul 7, 2017
Messages
106
Reaction score
68
Rating - 0%
0   0   0
Doesn't look like isolation to me (you would be reading in the megaohms, and it would be across a noticeable barrier). Its most likely a series resistor to limit currents on the pin when connected externally, and can be ignored IMO. That said, its still good practice to connect Vdim- to the ground of the PCA PWM driver (DIM- on such a board would be bussed together ground as its single rail)

Ah that's interesting. i wondered what that 'M' was on my multimeter during some of the resistance reads last night. i need to go google / youtube rails in power supplies and circuits. i would have thought even with resistors, totalling like 700 ohm between grounds points that contiunity would still beep on a multimeter, but maybe not, maybe all that resistance makes the detection between the points so low that the multimeter can't detect its continuity. What do you think?
 

Ryan115

Well-Known Member
View Badges
Joined
Dec 28, 2010
Messages
586
Reaction score
1,085
Location
Mississippi
Rating - 0%
0   0   0
Ah that's interesting. i wondered what that 'M' was on my multimeter during some of the resistance reads last night. i need to go google / youtube rails in power supplies and circuits. i would have thought even with resistors, totalling like 700 ohm between grounds points that contiunity would still beep on a multimeter, but maybe not, maybe all that resistance makes the detection between the points so low that the multimeter can't detect its continuity. What do you think?
Sparkfun has a lot of resources for basic (and some advanced) concepts, with good explanations.
Check this one out to start...https://learn.sparkfun.com/tutorials/how-to-use-a-multimeter
 

Algae invading algae: Have you had unwanted algae in your good macroalgae?

  • I regularly have unwanted algae in my macroalgae.

    Votes: 22 34.4%
  • I occasionally have unwanted algae in my macroalgae.

    Votes: 17 26.6%
  • I rarely have unwanted algae in my macroalgae.

    Votes: 5 7.8%
  • I never have unwanted algae in my macroalgae.

    Votes: 5 7.8%
  • I don’t have macroalgae.

    Votes: 14 21.9%
  • Other.

    Votes: 1 1.6%
Back
Top