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

crusso1993

7500 Club Member
View Badges
Joined
Oct 21, 2018
Messages
8,671
Reaction score
44,651
Location
SW, FL, USA
Rating - 0%
0   0   0
+100. Community is key when it comes to help each other, share and learn
I look out for common pitfalls across threads. I have received some positive feedback for the guides and I know that’s because it is backed by past two years of learning here across different threads and few failed attempts , that goes way beyond my own builds . These are invaluable

Giving you a big high 5!
 

Ryan115

Well-Known Member
View Badges
Joined
Dec 28, 2010
Messages
586
Reaction score
1,085
Location
Mississippi
Rating - 0%
0   0   0
@Ranjib I have been testing out this pump as a replacement for my aqualifter, and running it straight off of the motor driver hat. So far I have been happy with it, as it is quiet and moves quite a bit of water, even at 5v.
I would like to implement it as my ATO pump in reef-pi, but I dont believe there is anyway to set one of the PCA9685 pins as an outlet, or to set ATO control on a jack instead. Is this possible, or is it something that is already planned in a future release?
This also got me thinking that this could be an easy way of adding more "GPIO" pins. If you can essentially set PCA9685 pins as high/low it could allow people to use many of the other channels that are currently unused just from lighting.
On the hat I am using, some of the PCA9685 pins are tied straight to the PWM and INPUT pins on the TB6612s.
 

stefanm

Active Member
View Badges
Joined
Oct 11, 2017
Messages
360
Reaction score
397
Location
Sweden
Rating - 0%
0   0   0
Guys, does it matter which version of raspbian to install?

I downloaded the raspbian stretch with desktop and recommended software.

I was watching a youtube guide and the user downloaded raspbian stretch lite, as I'm going headless should I download that or doesn't it make any difference?
 
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
Guys, does it matter which version of raspbian to install?

I downloaded the raspbian stretch with desktop and recommended software.

I was watching a youtube guide and the user downloaded raspbian stretch lite, as I'm going headless should I download that or doesn't it make any difference?
if you are not familiar with linux terminal, then desktop version is the way to go. It takes little more sd card space (700MB extra) and significant CPU to run the desktop. You can always disable the GUI and run it in headless later, once you configure everything to reclaim the CPU usage. If you are on pi zero, headless is the way to go. I run everything headless, irrespective of Pi 3 or Pi zero, but I am comfortable with linux/terminals etc.
 

rushbattle

Valuable Member
View Badges
Joined
Oct 19, 2016
Messages
1,347
Reaction score
1,647
Location
Equality
Rating - 0%
0   0   0
if you are not familiar with linux terminal, then desktop version is the way to go. It takes little more sd card space (700MB extra) and significant CPU to run the desktop. You can always disable the GUI and run it in headless later, once you configure everything to reclaim the CPU usage. If you are on pi zero, headless is the way to go. I run everything headless, irrespective of Pi 3 or Pi zero, but I am comfortable with linux/terminals etc.
I am only vaguely familiar with Linux through terminal only, and I thought headless raspbian install was pretty easy. Even getting wireless going with the pi zero wasn’t super challenging. Just took a bit of time.
 

stefanm

Active Member
View Badges
Joined
Oct 11, 2017
Messages
360
Reaction score
397
Location
Sweden
Rating - 0%
0   0   0
if you are not familiar with linux terminal, then desktop version is the way to go. It takes little more sd card space (700MB extra) and significant CPU to run the desktop. You can always disable the GUI and run it in headless later, once you configure everything to reclaim the CPU usage. If you are on pi zero, headless is the way to go. I run everything headless, irrespective of Pi 3 or Pi zero, but I am comfortable with linux/terminals etc.

No worries, I'll get comfy, so far I've installed raspbian and made an Ubuntu boot drive, it's past 2 am now so I'll get back on it in the morning.
 
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
@Ranjib I have been testing out this pump as a replacement for my aqualifter, and running it straight off of the motor driver hat. So far I have been happy with it, as it is quiet and moves quite a bit of water, even at 5v.
I would like to implement it as my ATO pump in reef-pi, but I dont believe there is anyway to set one of the PCA9685 pins as an outlet, or to set ATO control on a jack instead. Is this possible, or is it something that is already planned in a future release?
This also got me thinking that this could be an easy way of adding more "GPIO" pins. If you can essentially set PCA9685 pins as high/low it could allow people to use many of the other channels that are currently unused just from lighting.
On the hat I am using, some of the PCA9685 pins are tied straight to the PWM and INPUT pins on the TB6612s.
There is no reason why PCA9685 can not be used as on/off digital output. It cant be a GPIO equivalent since it can never be an input (like reading ato sensor). Currently reef-pi does not allow this, but we are changing that as part of the hardware abstraction layer work that I and @theatrus is doing.
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,349
Reaction score
1,724
Location
Missouri
Rating - 0%
0   0   0
Well I managed to melt a few holes in my breadboard, lol my new breadboard. Looks like i also fried one of my fets, at $3ea I'd like to avoid that. Playing with the lighting controls I think I have things wired correctly wiring it per this https://learn.adafruit.com/assets/2693 and not sure what was not correct but when my jumper wire started to melt against the fet heatsink I pulled the power. I hope I didn't do any further damage to the pi etc.

I connected things back up but in a way with alligator clips to where I could touch the jack terminal to get a voltage reading, it appears to be playing nice now I have no idea since i thought it was connected the same way. One problem I have now is that the rpi pwm doesnt seem to actually be pwm. I have it hooked up to a meter and it just reads like its normal voltage it doesn't cycle the voltage like I was expecting it to but this may be normal, since I am in uncharted territory for me. My other issue is when on the lighting control, on the fixed setting, when I increase it to one, it starts out at 9.75V, thats way to high for 1, if I increase it to 50 it's close to 12v, although nothing is melting now so at least thats a step forward. ;)

Looking for what I need to do differently, I did notice that if I changed the option from active high to active low that it was 12v no matter the sliding scale. Anyone have any suggestions let me know, was hoping I could get this to work for my lights.

Picture of my melted breadboard, what its not supposed to look like :)

IMG_20190104_143402.jpg
 
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
Well I managed to melt a few holes in my breadboard, lol my new breadboard. Looks like i also fried one of my fets, at $3ea I'd like to avoid that. Playing with the lighting controls I think I have things wired correctly wiring it per this https://learn.adafruit.com/assets/2693 and not sure what was not correct but when my jumper wire started to melt against the fet heatsink I pulled the power. I hope I didn't do any further damage to the pi etc.

I connected things back up but in a way with alligator clips to where I could touch the jack terminal to get a voltage reading, it appears to be playing nice now I have no idea since i thought it was connected the same way. One problem I have now is that the rpi pwm doesnt seem to actually be pwm. I have it hooked up to a meter and it just reads like its normal voltage it doesn't cycle the voltage like I was expecting it to but this may be normal, since I am in uncharted territory for me. My other issue is when on the lighting control, on the fixed setting, when I increase it to one, it starts out at 9.75V, thats way to high for 1, if I increase it to 50 it's close to 12v, although nothing is melting now so at least thats a step forward. ;)

Looking for what I need to do differently, I did notice that if I changed the option from active high to active low that it was 12v no matter the sliding scale. Anyone have any suggestions let me know, was hoping I could get this to work for my lights.

Picture of my melted breadboard, what its not supposed to look like :)

IMG_20190104_143402.jpg
breadboard jumpers/pins are rated for less than 2A (1A to be safe) current draw. That can be one issue. The permaproto boards have little higher capacity, but its always recommended to solder solid core 22AWG jumper wires on places where high current draw is expected
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,349
Reaction score
1,724
Location
Missouri
Rating - 0%
0   0   0
breadboard jumpers/pins are rated for less than 2A (1A to be safe) current draw. That can be one issue. The permaproto boards have little higher capacity, but its always recommended to solder solid core 22AWG jumper wires on places where high current draw is expected

Understand, my breadboard says 3a but something was not correct since it was doing more than that. It basically smoked the fet, it appears to be stuck at 12v all the time. It should not have any current draw, all I have hooked up to the jack is my meter to look at the voltages. I wanted to see the voltages and how things worked before hooking up a light. Any suggestions on what I am doing wrong with the PWM settings since the range appears to be between 9.75 and 12v. Doesn't appear to be pulsing either...

I guess I am trying to figure out where to go from here, do I need to figure out the existing frequency for the existing dimmer so then I can duplicate, where should I go from here. Looking like its more difficult than I first thought, bummer. If anyone has any ideas let me know.

Thanks :)
 
Last edited:

crusso1993

7500 Club Member
View Badges
Joined
Oct 21, 2018
Messages
8,671
Reaction score
44,651
Location
SW, FL, USA
Rating - 0%
0   0   0
Well I managed to melt a few holes in my breadboard, lol my new breadboard. Looks like i also fried one of my fets, at $3ea I'd like to avoid that. Playing with the lighting controls I think I have things wired correctly wiring it per this https://learn.adafruit.com/assets/2693 and not sure what was not correct but when my jumper wire started to melt against the fet heatsink I pulled the power. I hope I didn't do any further damage to the pi etc.

I connected things back up but in a way with alligator clips to where I could touch the jack terminal to get a voltage reading, it appears to be playing nice now I have no idea since i thought it was connected the same way. One problem I have now is that the rpi pwm doesnt seem to actually be pwm. I have it hooked up to a meter and it just reads like its normal voltage it doesn't cycle the voltage like I was expecting it to but this may be normal, since I am in uncharted territory for me. My other issue is when on the lighting control, on the fixed setting, when I increase it to one, it starts out at 9.75V, thats way to high for 1, if I increase it to 50 it's close to 12v, although nothing is melting now so at least thats a step forward. ;)

Looking for what I need to do differently, I did notice that if I changed the option from active high to active low that it was 12v no matter the sliding scale. Anyone have any suggestions let me know, was hoping I could get this to work for my lights.

Picture of my melted breadboard, what its not supposed to look like :)

IMG_20190104_143402.jpg

If it were me, I wouldn't say I melted the BB. I would say I made some radical modifications!
Happens to the best of us.
Hey - did you happen to check out @Diamond1 build? He worked his OR 247 into it. Maybe he can give you some input with your lights.
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
breadboard jumpers/pins are rated for less than 2A (1A to be safe) current draw. That can be one issue. The permaproto boards have little higher capacity, but its always recommended to solder solid core 22AWG jumper wires on places where high current draw is expected
Can u post your circuit, if you dont drive a fet correctly and it works in the linear region(not fully on or off) they can get pretty hot. Are you trying to drive a large fet directly from a pwm pin?

Since you are new to electronics, may I make a suggestion?

Get a premade mosfet power module that can be driven from 3.3 or 5.5 logic level.
Post back with your specifics and I can make a suggestion. You need to know whether you are switching your light on the positive side or the negative side. I have to drive my light on the high side and a opto isolated p channel mosfet board is only 4 dollars and will do 1khz pwm frequency and can hook right to the pwm pin of the rpi or the pca.
 
Last edited:
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
Can u post your circuit, if you dont drive a fet correctly and it works in the linear region(not fully on or off) they can get pretty hot. Are you trying to drive a large fet directly from a pwm pin?

Since you are new to electronics, may I make a suggestion?

Get a premade mosfet power module that can be driven from 3.3 or 5.5 logic level.
Post back with your specifics and I can make a suggestion. You need to know whether you are switching your light on the positive side or the negative side. I have to drive my light on the high side and a opto isolated p channel mosfet board is only 4 dollars and will do 1khz pwm frequency and can hook right to the pwm pin of the rpi or the pca.
I use the exact same circuit as I described in the lighting controller guide. Its based on n channel logic level power mosfet, and its driving a 12W , 12V led strip, a moonlight, which is use sporadically.
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,349
Reaction score
1,724
Location
Missouri
Rating - 0%
0   0   0
Can u post your circuit, if you dont drive a fet correctly and it works in the linear region(not fully on or off) they can get pretty hot. Are you trying to drive a large fet directly from a pwm pin?

Since you are new to electronics, may I make a suggestion?

Get a premade mosfet power module that can be driven from 3.3 or 5.5 logic level.
Post back with your specifics and I can make a suggestion. You need to know whether you are switching your light on the positive side or the negative side. I have to drive my light on the high side and a opto isolated p channel mosfet board is only 4 dollars and will do 1khz pwm frequency and can hook right to the pwm pin of the rpi or the pca.

I am using this diagram - https://learn.adafruit.com/assets/2693 which is from this guide - https://learn.adafruit.com/rgb-led-strips?view=all#wiring
The article talks about using a TO-220 fet and lists this one - IRLB8721, my local electronics place did not have that particular fet but he had this one which should be as good IRLZ44N, another TO-220 low level logic fet. Right now I have no load I just have my meter connected to the output and I see constant voltage, it's no cycling at all and when I set the light to 1, the meter shows 9.75 volts and increases from there.

I am trying to control a chihiros led light, I havve 2 of them, one with 99 led's and one with 36 led's, they have an in line jumper that allows you to step down or up the intensity, 7 steps. When I hooked my meter up to the output of the dimmer, it was constant at 12v on its highest setting, but when you went down the voltage went down accordingly but cycled, it was not constant, see this post for dimmer details - https://www.reef2reef.com/threads/r...-on-raspberry-pi.289256/page-441#post-5539596

I did try to take a reading from my meters' frequency setting (20K HZ setting) and this is what it showed:
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

Yeah I as just wanting to control the intensity throughout the day along with the time, I can order the pre-made controller but somehow would like to know if that is the answer before hand. I did try both PWM pins from the pi and they should the same results, I'm just trying to figure out where to go from here from a testing perspective to help figure things out.

Thanks for the information and if there is any additional information that is needed just let me know. :)
 
Last edited:

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,349
Reaction score
1,724
Location
Missouri
Rating - 0%
0   0   0
If it were me, I wouldn't say I melted the BB. I would say I made some radical modifications!
Happens to the best of us.
Hey - did you happen to check out @Diamond1 build? He worked his OR 247 into it. Maybe he can give you some input with your lights.

Yeah I'm glad it didn't fry anything else like my pi, its a 3 a+, if it had been a zero I would not have cared, I can get them for $5 from microcenter and probably should get one of those to test with, then it's not a big deal. The 3 a+ are only $19 but $5 is a little more tolerable. :)

I'm do like to tinker and do stuff so ya just have to keep learning and moving forward. :)
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,349
Reaction score
1,724
Location
Missouri
Rating - 0%
0   0   0
I use the exact same circuit as I described in the lighting controller guide. Its based on n channel logic level power mosfet, and its driving a 12W , 12V led strip, a moonlight, which is use sporadically.

Yeah but you didn't get the smoke effect :)

Is there anywhere I can read about or look at the code for the PWM stuff, I know when I google pwm and pi there is a good bit of information, and just wasn't sure what the code was passing to the pi behind the scenes. Scratching my head right now trying to figure out where to go from here...
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
Since I love to void my warranty ;) I opened the small led unit, looks like I did the soldering work, lol :)

IMG_20190104_184753.jpg


MVIMG_20190104_184821.jpg
Ok, they are standard 5730 led strip lights in the fixture.

First question, im assuming the power supply is 12v? When you put the npn mosfet inline, you put it on the negative line in to the fixture?
 
Back
Top