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

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,349
Reaction score
1,724
Location
Missouri
Rating - 0%
0   0   0
Looking at the light controller guide on ada fruit I think the actinic LED looks to be the section that I would want to emulate. Would it make sense to use the NPN transistors or use the mosfets. My other question is the resistor that is shown in the Fritz diagram, not sure what value it is, looks like a 10k resistor but not sure. Would the actinic led diagram https://learn.adafruit.com/reef-pi-lighting-controller/circuit-construction be a good starting point to follow for controlling my led lights?

:)
 
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
Looking at the light controller guide on ada fruit I think the actinic LED looks to be the section that I would want to emulate. Would it make sense to use the NPN transistors or use the mosfets. My other question is the resistor that is shown in the Fritz diagram, not sure what value it is, looks like a 10k resistor but not sure. Would the actinic led diagram https://learn.adafruit.com/reef-pi-lighting-controller/circuit-construction be a good starting point to follow for controlling my led lights?

:)
Probably you have already done this, but can you link /share your light details. How you are powering the light? We need to understand the dimming circuit. You mentioned you have a inline dimmer already, can you share an image of that, particularly anything that has technical spec in it
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,349
Reaction score
1,724
Location
Missouri
Rating - 0%
0   0   0
Probably you have already done this, but can you link /share your light details. How you are powering the light? We need to understand the dimming circuit. You mentioned you have a inline dimmer already, can you share an image of that, particularly anything that has technical spec in it

Its from china, actually the led's are pretty decent, they can put off quite a bit of light, https://www.ebay.com/itm/Chihiros-A...108a15d47:m:mwkmZs_vgGludiBf5ipncvw:rk:3:pf:0 for planted freshwater tanks they are pretty decent, I have a 50CM unit and a 20cm unit. Came with the dimmer jumper and a 12v 5amp power supply, it says 5amps but it's really light, not much weight to it at all so I really doubt it could do 5amps. I finally cut the heat shrink off of the dimmer jumper so you can have a better view. I listed on the previous page what the frequency readings were when going from low to high, it still cycled even on the frequency unless you were at max brightness @12v.

Here are the pictures:

IMG_20190102_225909.jpg


IMG_20190102_225914.jpg


IMG_20190102_230522.jpg


IMG_20190102_230500.jpg


Let me know if I need to get a close picture of something, etc...
 
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
use the logic level mosfet circuit and pass your power through it, i.e. you are not sending a control signal to your light (like we do in kessil, where the light has a separate power source), you are actually controlling the main power source directly. Hence we expect high current draw, and a mosfet is ideal for this
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,349
Reaction score
1,724
Location
Missouri
Rating - 0%
0   0   0
use the logic level mosfet circuit and pass your power through it, i.e. you are not sending a control signal to your light (like we do in kessil, where the light has a separate power source), you are actually controlling the main power source directly. Hence we expect high current draw, and a mosfet is ideal for this

Correct since when I looked with the meter even though it was cycling the voltage was going down, so that circuit you have for the arctinic circuit would be what I am after, correct? I think you were using it for the moon light and was just an led strip, my only question is what size resistor do you think I should use?
 
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
Correct since when I looked with the meter even though it was cycling the voltage was going down, so that circuit you have for the arctinic circuit would be what I am after, correct? I think you were using it for the moon light and was just an led strip, my only question is what size resistor do you think I should use?
yes. 1K should be good enough. This is a good tutorial on how to use them https://learn.adafruit.com/rgb-led-strips?view=all
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,349
Reaction score
1,724
Location
Missouri
Rating - 0%
0   0   0
yes. 1K should be good enough. This is a good tutorial on how to use them https://learn.adafruit.com/rgb-led-strips?view=all

That looks like will help, one more question then I am turning in, I'm thinking I probably need beefier mosfets that I purchased, the big led unit has 99 led's in it and the small one has 36 led's. The ones that I purchased today were mosfet 2n7000-h45, based on y initial reading of that article you linked I will probably need a higher rated unit for the bigger unit. I have a kill-a-watt and never hooked it up to see what it pulls at the highest setting, although I will never run it on its highest setting, what size mosfet do you think I will need.

Looks like i will need to go with something like the IRLB8721, would provide plenty of headroom.
 
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
That looks like will help, one more question then I am turning in, I'm thinking I probably need beefier mosfets that I purchased, the big led unit has 99 led's in it and the small one has 36 led's. The ones that I purchased today were mosfet 2n7000-h45, based on y initial reading of that article you linked I will probably need a higher rated unit for the bigger unit. I have a kill-a-watt and never hooked it up to see what it pulls at the highest setting, although I will never run it on its highest setting, what size mosfet do you think I will need.

Looks like i will need to go with something like the IRLB8721, would provide plenty of headroom.
yeah, i think thats not a power mosfet. Logic level power mosfets look beefier, TO-220 packaging instead of TO-92. If you have ULN2803, you can use those as well, they are fairly good till almost 1A, if i recall correctly
 
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, i think thats not a power mosfet. Logic level power mosfets look beefier, TO-220 packaging instead of TO-92. If you have ULN2803, you can use those as well, they are fairly good till almost 1A, if i recall correctly
Just crosschecked, ULN2803a are rated for 500ma
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,349
Reaction score
1,724
Location
Missouri
Rating - 0%
0   0   0
yeah, i think thats not a power mosfet. Logic level power mosfets look beefier, TO-220 packaging instead of TO-92. If you have ULN2803, you can use those as well, they are fairly good till almost 1A, if i recall correctly

Thanks, looks like I will be making a trip back to the store, lol. I think those are the pricer ones, they wanted $4 each for them, he did ask me what I intended to do with them and I wasn't sure, so power it is. I will get the TO-220 ones this time. I only need one per led unit, right?
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,349
Reaction score
1,724
Location
Missouri
Rating - 0%
0   0   0
Just crosschecked, ULN2803a are rated for 500ma

OK, according to that article the IRLB8721 are rated for 60a, I don't need any where close to that but he will know if they have something that will work that is lower. I would think anything that could handle 5-10 should be plenty. Looks like if I want to go cheaper then Tip-120 would also work, they can handle 5 amps.
 
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
Thanks, looks like I will be making a trip back to the store, lol. I think those are the pricer ones, they wanted $4 each for them, he did ask me what I intended to do with them and I wasn't sure, so power it is. I will get the TO-220 ones this time. I only need one per led unit, right?
they should be within 2$. Mine ones cost .75$ . Tell them you want a logic level N channel power mosfet. Logic level means the mosfet can be controlled by logic level voltage (3.3-5 v ), found in most microcontroller, power mosfet means they are optimized for exactly this type of use case.
 
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, according to that article the IRLB8721 are rated for 60a, I don't need any where close to that but he will know if they have something that will work that is lower. I would think anything that could handle 5-10 should be plenty.
Its bit more complicated than that. You should ideally look for watts. which is volt x amp . So, at lower volts they can support higher amps. Its best to use dedicated mosfets per channel if possible. The overall watt used is also helpful in deriving whether you need a heatsink or not.
 

theatrus

Valuable Member
View Badges
Joined
Mar 26, 2016
Messages
2,223
Reaction score
3,632
Location
Sacramento, CA area
Rating - 0%
0   0   0
Its bit more complicated than that. You should ideally look for watts. which is volt x amp . So, at lower volts they can support higher amps. Its best to use dedicated mosfets per channel if possible. The overall watt used is also helpful in deriving whether you need a heatsink or not.

Looking at max power dissipation is important, but sometimes isn't specified since it depends on thermal mounting. Calculating can be harder as well.

The first rule of MOSFETs is to never use them in the linear region - but with a logic level MOSFET and digital on/off control there is no risk there (there are linear FETs - rare and $$).

If you are just switching something on or off infrequently, you can generally ignore the on/off region of the switching time and just look at the MOSFET Rds(on). When fully switched on, a MOSFET acts like a resistor with the specified Rds(on) value. Note that Rds(on) can change quite a bit with gate voltage, so look for curves. Even logic level FETs may only have the lowest on resistance when the gate is above 5V.

If you're using them in a rapid PWM fashion, you need to count the time the MOSFET is transitioning between states (where its in a linear region, and power dissipation can be extremely high for short periods of time), which can vary how hard its driven, and if there is any ringing or other oscillations on the gate. This is hard to measure without proper tools and can be a bear to accurately simulate, so my rule of thumb is to healthily derate current/power by at least 50% when considering PWM applications for a FET.
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,349
Reaction score
1,724
Location
Missouri
Rating - 0%
0   0   0
Looking at max power dissipation is important, but sometimes isn't specified since it depends on thermal mounting. Calculating can be harder as well.

The first rule of MOSFETs is to never use them in the linear region - but with a logic level MOSFET and digital on/off control there is no risk there (there are linear FETs - rare and $$).

If you are just switching something on or off infrequently, you can generally ignore the on/off region of the switching time and just look at the MOSFET Rds(on). When fully switched on, a MOSFET acts like a resistor with the specified Rds(on) value. Note that Rds(on) can change quite a bit with gate voltage, so look for curves. Even logic level FETs may only have the lowest on resistance when the gate is above 5V.

If you're using them in a rapid PWM fashion, you need to count the time the MOSFET is transitioning between states (where its in a linear region, and power dissipation can be extremely high for short periods of time), which can vary how hard its driven, and if there is any ringing or other oscillations on the gate. This is hard to measure without proper tools and can be a bear to accurately simulate, so my rule of thumb is to healthily derate current/power by at least 50% when considering PWM applications for a FET.

Thanks this is good information, one of my concerns is the amp draw over the wiring, I would like to use the existing 12v input, I have a PS that is rated for 5amps @12v and if I do the math correctly if both light were to be on the highest setting they would pull 3.75amps (45w/12v=3.75). The small light is 12w and the larger one is 33w according to the information, I never run them at highest setting in fact the highest setting for me will be 50% but I still want to have some headroom if something were to happen and they both run at the highest setting.

The IRLB8721 https://www.adafruit.com/product/355 look like they are good for high power which would easily work and it appears that I could go with TIP-120 https://www.adafruit.com/product/976 they appear to be good for 5amp of continuous power. Will be heading to the store with more knowledge and hopefully get the correct parts. :)
 

ScottF83

Community Member
View Badges
Joined
Apr 15, 2016
Messages
72
Reaction score
80
Rating - 0%
0   0   0
Hello

I'm trying to source materials, for the power control project, here in the UK but I'm having trouble locating a serial controlled power bank.

Hoping someone here knows the UK market and what I should be looking for and where?

Many thanks
Scott
 

dmolavi

Well-Known Member
View Badges
Joined
Jan 3, 2015
Messages
509
Reaction score
646
Location
United States
Rating - 0%
0   0   0
Hello

I'm trying to source materials, for the power control project, here in the UK but I'm having trouble locating a serial controlled power bank.

Hoping someone here knows the UK market and what I should be looking for and where?

Many thanks
Scott

I don't know if they ship to the UK or not, but Digital Loggers (sells a variety of remotely controlled power strips). I use the Web Pro that is remotely controlled via a web interface (with a variety of APIs available to interface) instead of serial.
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,349
Reaction score
1,724
Location
Missouri
Rating - 0%
0   0   0
Thanks this is good information, one of my concerns is the amp draw over the wiring, I would like to use the existing 12v input, I have a PS that is rated for 5amps @12v and if I do the math correctly if both light were to be on the highest setting they would pull 3.75amps (45w/12v=3.75). The small light is 12w and the larger one is 33w according to the information, I never run them at highest setting in fact the highest setting for me will be 50% but I still want to have some headroom if something were to happen and they both run at the highest setting.

The IRLB8721 https://www.adafruit.com/product/355 look like they are good for high power which would easily work and it appears that I could go with TIP-120 https://www.adafruit.com/product/976 they appear to be good for 5amp of continuous power. Will be heading to the store with more knowledge and hopefully get the correct parts. :)


Back from my trip he did not have IRLB8721 but he did have IRLZ44N which appear to be even better, looks like it can be controlled via 5v if I read the spec sheet correctly and is rated for 55amps. He did not have anything else lower that he thought would work, the only downside was they were $3ea. Here is the data sheet - https://www.infineon.com/dgdl/irlz44npbf.pdf?fileId=5546d462533600a40153567217c32725

For the heck of it I decided to put a killawatt meter on the lights and see what they registered, the tech sheets indicated @12v they would pull 33w for the large unit and 12w for the small unit. The large unit pulled 29w and the small unit pulled 12w, both together pulled 42w and when I switched to amps on the meter it was only showing it pulling .5amp combined at there highest setting. I think the .5amp is based on 110v which is what it sees from the wall then it goes through the transformers to step down to 12v, so I think my calculations are correct that @12v it will be around 3.5amps at the highest setting.

I think these should work now just need to put it together and figure out the layout. I was going to pull the 12v from the hat board, from what I can read 22awg should be good for 7amps, is there any concern about doing that?

Thanks :)
 

rushbattle

Valuable Member
View Badges
Joined
Oct 19, 2016
Messages
1,347
Reaction score
1,647
Location
Equality
Rating - 0%
0   0   0
I just made my first Macro, a Feed Mode for spot feeding Corals. The flexibility is amazing! I have a bunch of ideas now that I have become more familiar with Macros.

Does anyone run the heater control with a hardware temperature controller? It seems like the way to do it is have the heater control threshold set so that the outlet is always on to the temperature controller and then cut off the outlet if it gets too hot? Any other way to do it?
 

b4tn

Valuable Member
View Badges
Joined
Jun 17, 2015
Messages
1,673
Reaction score
2,244
Location
Columbia MD
Rating - 0%
0   0   0
Hello

I'm trying to source materials, for the power control project, here in the UK but I'm having trouble locating a serial controlled power bank.

Hoping someone here knows the UK market and what I should be looking for and where?

Many thanks
Scott

@ScottF83 If you are unable to find one its not terribly difficult to make your own relay controlled outlets with relays from ebay.

https://www.ebay.co.uk/itm/5V-or-12...m=262722739443&_trksid=p2045573.c100505.m3226

I am not familiar with 220v wiring colors but I am sure its the same concept.

Here is the diagram I used for doing my 120v relays.
https://www.reef2reef.com/threads/another-reef-pi-build.506894/page-3#post-5434598
 
Back
Top