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

Michael Lane

Well-Known Member
View Badges
Joined
Aug 11, 2018
Messages
677
Reaction score
1,123
Rating - 0%
0   0   0
Are all LED's dimmable using PWM? For example https://www.amazon.com/gp/product/B...title_srh_1?ie=UTF8&psc=1&smid=A19PINGUYHMOO6 says its not dimmable but does that mean non-voltage dimmable but PWM would work?
LEDs are dimmable via PWM, but many of the drivers/power supplies may not support it direclty. The lights you linked to just seem to be a strip of LEDs pre-configured to work with 12v; they don't include a power supply. You should be able to use a mosfet or even ULN2803 to dim these kinds of strips with your own 12v supply.
 

AquaRaider44

#Reef4Life
View Badges
Joined
Apr 19, 2019
Messages
526
Reaction score
823
Location
Brevard County
Rating - 0%
0   0   0
LEDs are dimmable via PWM, but many of the drivers/power supplies may not support it direclty. The lights you linked to just seem to be a strip of LEDs pre-configured to work with 12v; they don't include a power supply. You should be able to use a mosfet or even ULN2803 to dim these kinds of strips with your own 12v supply.
That's what I thought. Maybe I'll buy those or some other one.
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
That's what I thought. Maybe I'll buy those or some other one.
Get a strip of 5730 led or a cheapy light based on the 5730 they are brighter than the 3528s ...they will dim nicely and are bright enough to add some blue kick during the day if you need it
 

AquaRaider44

#Reef4Life
View Badges
Joined
Apr 19, 2019
Messages
526
Reaction score
823
Location
Brevard County
Rating - 0%
0   0   0
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

On the pico board, can I use the pins in the header for the ato? although I only have 5 volts?
yes, both simple float switches or dfrobot photoelectric sensors should work
@Ranjib I see that you have a Coralife lunar light over your tank like this one https://www.amazon.com/Coralife-Energy-Savers-ACL15608-Biocube/dp/B0088ZJ4U6. How dim does this get? Can you post some pictures and experiences with it?

Does anyone else have some lunar lights that they use that get super dim and can be run off of the reef pi?
I use the coralife strip that came with the biocube, and power it with 12v 1A power supply, using pi pwm + a logic level power mosfet.
 
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
OK I was just about to ask that so I can use either a ULN2803 or an N-channel MOSFET. Since I already have a ULN2803 @ 12v with 4 free slots I suppose I should try to maybe find 12v led lights and use the existing setup.
Yes. you can use darlingtons (unl2803) or power mosfets . The later are rater for higher current, while unl2803a is only good if your overall current draw is less than 700ma. Meanwell drivers are the one that are rated for even higher current and optimized for LED usage (constant current)
 
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
Are all LED's dimmable using PWM? For example https://www.amazon.com/gp/product/B...title_srh_1?ie=UTF8&psc=1&smid=A19PINGUYHMOO6 says its not dimmable but does that mean non-voltage dimmable but PWM would work?
Should be, its not exactly dimming that we are doing with pwm, its more like very fast on/off .. at least with the lunar lights, since im controlling the power directly, while for kessil we only provide the control signal, i dont know internally its mapped to variable voltage (say 0-90W) or pwm (very fast on/off, and the % of on is controlling the dimming effect)
 
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
With many of these devices having power monitoring, would it be possible to get some validation checks on whether devices are actually turned on/off when reef-pi tells them to? Additionally some monitoring of pumps and such as they start pulling more power when they are getting dirty.
Should be. Something i am willing to consider post 3.0. not before that .. unless anyone else willing to do the engineering work :)
 
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
LEDs are dimmable via PWM, but many of the drivers/power supplies may not support it direclty. The lights you linked to just seem to be a strip of LEDs pre-configured to work with 12v; they don't include a power supply. You should be able to use a mosfet or even ULN2803 to dim these kinds of strips with your own 12v supply.
Spot on.. i have those and i dim everywhere.. :) kitchen, bathroom., wife's closet .. its not needed.. but why not :) , it will be cool to simulate storm effect in every corner of the home during halloween
 
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 When is temperature offset/calibration going to be added? I would think this should be stupid simple to add.
Sometime before the 3.0 final release (thanksgiving). It's not priority right now.. but yes it's a simple logic to add but due to the complex nature of software development the actual work is lot more than that (UI, tests etc). So its better to get started with this while we work on some other temperature controller feature such as hysteresis
 

bala murugan 00500

Community Member
View Badges
Joined
Oct 16, 2018
Messages
34
Reaction score
90
Location
coimbatore ,India
Rating - 0%
0   0   0
Hi friends ....
i'm planning to use one cheep PWM driver from china for moon lighting. In this i'm really not happy to connect my PWM (5v) from pca9685 to my led Driver (5v pwm)
If the drive fail, high volt from driver will burn the pca9685 or pi . So is it necessary to isolation pwm power between them... if so how to do it ...

3W-5-35V-LED-Driver-700mA-PWM-Dimming-DC-to-DC-Step-down-Constant-Current.jpg

here is the product link

https://www.tanotis.com/products/ta...vMapxB9UUJJax70K0dBTvfMc1Xp-orWoaAgnKEALw_wcB
 

AquaRaider44

#Reef4Life
View Badges
Joined
Apr 19, 2019
Messages
526
Reaction score
823
Location
Brevard County
Rating - 0%
0   0   0
Hi friends ....
i'm planning to use one cheep PWM driver from china for moon lighting. In this i'm really not happy to connect my PWM (5v) from pca9685 to my led Driver (5v pwm)
If the drive fail, high volt from driver will burn the pca9685 or pi . So is it necessary to isolation pwm power between them... if so how to do it ...

3W-5-35V-LED-Driver-700mA-PWM-Dimming-DC-to-DC-Step-down-Constant-Current.jpg

here is the product link

https://www.tanotis.com/products/ta...vMapxB9UUJJax70K0dBTvfMc1Xp-orWoaAgnKEALw_wcB
Hello, welcome to R2R and I'm glad to see you found the Reef-Pi.

I recommend that you use a PCA9685 to generate the pwm signals then scale to the voltage needed using a mosfet as per the guide here https://learn.adafruit.com/reef-pi-lighting-controller/circuit-construction "The power MOSFET based control circuit for the 12V actinic LED strip is mounted on a small Mint Tin size perma proto board. A common N channel logic level power MOSFET is used, with the PCA9685 PWM output connected to the Gate pin (green wire), the Source pin connected to the -Ve end of the LED strip (blue wire) and the Drain pin connected to GND." This will work for most applications and if your moon lighting is not 12v just replace the 12v on the diagram with what you need.
 
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
Hi friends ....
i'm planning to use one cheep PWM driver from china for moon lighting. In this i'm really not happy to connect my PWM (5v) from pca9685 to my led Driver (5v pwm)
If the drive fail, high volt from driver will burn the pca9685 or pi . So is it necessary to isolation pwm power between them... if so how to do it ...

3W-5-35V-LED-Driver-700mA-PWM-Dimming-DC-to-DC-Step-down-Constant-Current.jpg

here is the product link

https://www.tanotis.com/products/ta...vMapxB9UUJJax70K0dBTvfMc1Xp-orWoaAgnKEALw_wcB
From the initial look, I think this circuit already has those safety nets and you can use it readily, but we need specs (Datasheet) for that chip to be sure. I'll let others who know more chime in..
 

AquaRaider44

#Reef4Life
View Badges
Joined
Apr 19, 2019
Messages
526
Reaction score
823
Location
Brevard County
Rating - 0%
0   0   0
@Ranjib After working this many ways I have finally found a way to implement the parabolic lighting pattern which replicates the sun's constantly changing intensity. As per https://www.advancedaquarist.com/2013/12/lighting and many other studies and the chart posted by @Bigtrout a while back

y = a(x-U)2 + E

Reef-Pi Settings Which I use for example
Min 0 - Q
Max 70 - E
Start 10 - W

Start time 9 - R
End time 21 - T

Middle of day (needs to be calculated) - U

U=((T-R)/2)+R
U=((21-9)/2)+9
U=(12/2)+9
U=6+9
U=15

Now we start to fill out and solve

y = a(x-U)^2 + E
y = a(x-15)^2 + 70

To find a, plug in the values to (x,y) from the known start point (R,W) (9,10):

y = a(x-15)^2 + 70
W = a(R-15)^2 + 70
10 = a(9-15)^2 + 70
10 = a(-6)^2 + 70
10 = 36a + 70
-60 = 36a
a = −1.666666667

The final equation is

y = −1.666666667(x-15)^2 + 70

y is now the intensity %
x is now the time where hours are whole numbers and minutes are a decimal for example 9:30 is 9.5

e36038dad589677678222616a98439ed.png
 

AquaRaider44

#Reef4Life
View Badges
Joined
Apr 19, 2019
Messages
526
Reaction score
823
Location
Brevard County
Rating - 0%
0   0   0
@Ranjib the dernal cycle also has a bug where when I set the minimum to 0 and the start to 10 because 10 is the starting threshold of the mars aqua's working it is not ending at 10% at 21:00 or starting at 10% at 9:00 instead it appears to ignore the starting value and is ending at 0 at 21:00 which shuts off the lights early and too quickly as it should ramp down from 70 to 10 with the last bit being the slowest and instead it blows throught 10% and shut the lights off at 8:25 by going under the 10%

12ffa72121f8d5525f97b395263a43bd.png
 
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 the dernal cycle also has a bug where when I set the minimum to 0 and the start to 10 because 10 is the starting threshold of the mars aqua's working it is not ending at 10% at 21:00 or starting at 10% at 9:00 instead it appears to ignore the starting value and is ending at 0 at 21:00 which shuts off the lights early and too quickly as it should ramp down from 70 to 10 with the last bit being the slowest and instead it blows throught 10% and shut the lights off at 8:25 by going under the 10%

12ffa72121f8d5525f97b395263a43bd.png
Can test with setting the min 10 and start at 0. I’m planning to remove the start setting
 
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 After working this many ways I have finally found a way to implement the parabolic lighting pattern which replicates the sun's constantly changing intensity. As per https://www.advancedaquarist.com/2013/12/lighting and many other studies and the chart posted by @Bigtrout a while back

y = a(x-U)2 + E

Reef-Pi Settings Which I use for example
Min 0 - Q
Max 70 - E
Start 10 - W

Start time 9 - R
End time 21 - T

Middle of day (needs to be calculated) - U

U=((T-R)/2)+R
U=((21-9)/2)+9
U=(12/2)+9
U=6+9
U=15

Now we start to fill out and solve

y = a(x-U)^2 + E
y = a(x-15)^2 + 70

To find a, plug in the values to (x,y) from the known start point (R,W) (9,10):

y = a(x-15)^2 + 70
W = a(R-15)^2 + 70
10 = a(9-15)^2 + 70
10 = a(-6)^2 + 70
10 = 36a + 70
-60 = 36a
a = −1.666666667

The final equation is

y = −1.666666667(x-15)^2 + 70

y is now the intensity %
x is now the time where hours are whole numbers and minutes are a decimal for example 9:30 is 9.5

e36038dad589677678222616a98439ed.png
I have recently introduced a sine wave profile as part of the pwm profile work, which gives very similar effect (0 to pi )
 

AquaRaider44

#Reef4Life
View Badges
Joined
Apr 19, 2019
Messages
526
Reaction score
823
Location
Brevard County
Rating - 0%
0   0   0
Can test with setting the min 10 and start at 0. I’m planning to remove the start setting
Seems like that works. Seems as if the settings are confused or maybe I am lol. I assumed min was to keep it on a minimum light at all times regardless of timer and start was how you wanted it to start or something. Idk lol.
 
Back
Top