electrical idiot builds a controller - a reef pi build

OP
OP
Mikeneedsahobby

Mikeneedsahobby

Well-Known Member
View Badges
Joined
Sep 16, 2018
Messages
516
Reaction score
922
Rating - 0%
0   0   0
Hey this is awesome. @pickupman66 you can set this up to get notification in case pi does.
@Mikeneedsahobby for context, we were debating how to get notified when reef-pi/raspberry pi dies, since it wont be sending notification. I tried adafruit.io trigger but it didnt work out for me . But your approach is bit different, and if its working we should just recommend it to everyone. Together with reef-pi 's builtin notification and adafruit.io as external monitor , its a robust failsafe.

Glad I could help! I need to rename everything to something fun. I think adafruit is using goblins to watch my trolls. Because they have magic to watch from a long distance away. I want my email to say “the goblins spy the trolls on strike. “ i wonder if I can do that.
 
OP
OP
Mikeneedsahobby

Mikeneedsahobby

Well-Known Member
View Badges
Joined
Sep 16, 2018
Messages
516
Reaction score
922
Rating - 0%
0   0   0
Sometimes I think I am prophetic.

Last night I was thinking about potential failures. I setup the adafruit goblins to watch my trolls and I fixed my email in reef-pi so it could send me alarms if the temperature got out of control. (this required creating a temporary password for my email in hotmail). I also mentioned yesterday that my cats were getting along well with my trolls.

...

Today at 10:35am I looked at my email I had 5 emails from reef-pi that my temp sensor failed!!!!

It started at 9:55 and sent me an email every 10 minutes (my temperature is set to update every 10 minutes). Oh crap I thought. Others have had major issues with temp sensors not connecting. I reloaded the trolls. no sensor. I rebooted the trolls. no sensor. So I shut down with the intention to check the probe connector. The silly thing was unplugged. The cats like to sit next to my sump in the stand. They must have caught the wire and unplugged it!

I plugged it back in, restarted the trolls and all is well again. The tank lost about 0.75 degrees in 45 minutes.

Without the emails I wouldn't have known this happened for a long period of time. Tank would have cooled to ambient. ~70 during day and 65 at night.

Get your telemetry setup people!
 
OP
OP
Mikeneedsahobby

Mikeneedsahobby

Well-Known Member
View Badges
Joined
Sep 16, 2018
Messages
516
Reaction score
922
Rating - 0%
0   0   0
I have begun building a sweet water-pi!;Nailbiting
9DC164AD-7A83-40E4-8817-D037C6F1EE14.jpeg


Thanks a lot @Bigtrout ;Bored It was your awesome pictures and stories that made me do this.

Get ready trolls. ;Troll
 
Last edited:

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
Woohoo...is that an fspec light?
If so I can tell you how to control it with pwm.

Trolls are happier with good lights !
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
Ok thats a great light too, its the same just 6500k instead, the lights are circuited the same. In fact I debated getting one fspec and one 6500k.

What are your normal water parameters from the tap? Im asking because its alot easier build your tank to suit your water than to contantly fight water parameters.
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
What filtration are you thinking of going with? Being a salty you are going to laugh when I tell you how my tank gets filtered but it works great, although these saltwater boards have convinced me of the advantages of a sump. I have a 40 breeder all baffled up waiting for some nicer weather to install.
 
OP
OP
Mikeneedsahobby

Mikeneedsahobby

Well-Known Member
View Badges
Joined
Sep 16, 2018
Messages
516
Reaction score
922
Rating - 0%
0   0   0
Ok thats a great light too, its the same just 6500k instead, the lights are circuited the same. In fact I debated getting one fspec and one 6500k.

What are your normal water parameters from the tap? Im asking because its alot easier build your tank to suit your water than to contantly fight water parameters.

My tap water is very hard 20kh, 30gh, and runs in the low 8s ph in a freshwater tank. I don’t use tap water. Instead I have an rodi with 0 TDS. I run this in the tank. And occasionally add tap water to not run too soft. I am stable now with 3-5 gh and kh. Ph is mid 7s. I also have a large chunk of driftwood in the tank. Water is light yellow with tannins.
 
OP
OP
Mikeneedsahobby

Mikeneedsahobby

Well-Known Member
View Badges
Joined
Sep 16, 2018
Messages
516
Reaction score
922
Rating - 0%
0   0   0
What filtration are you thinking of going with? Being a salty you are going to laugh when I tell you how my tank gets filtered but it works great, although these saltwater boards have convinced me of the advantages of a sump. I have a 40 breeder all baffled up waiting for some nicer weather to install.

So the tank isn’t new. I have had this 20g fresh running for around 3 yrs. I have an eheim canister for filtering. Inside is mostly ceramic bio stuff and sponges of different weights.

What is new for me is lights and the intent to grow plants. There is a small plant in there now. It grows slow.
image.jpg
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
My tap water is very hard 20kh, 30gh, and runs in the low 8s ph in a freshwater tank. I don’t use tap water. Instead I have an rodi with 0 TDS. I run this in the tank. And occasionally add tap water to not run too soft. I am stable now with 3-5 gh and kh. Ph is mid 7s. I also have a large chunk of driftwood in the tank. Water is light yellow with tannins.
Sounds good, you can go for most plants and fish with that type water.
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
So the tank isn’t new. I have had this 20g fresh running for around 3 yrs. I have an eheim canister for filtering. Inside is mostly ceramic bio stuff and sponges of different weights.

What is new for me is lights and the intent to grow plants. There is a small plant in there now. It grows slow.
image.jpg
You are 3/4 of the way there then...i use my canisters the same way...sponges and bio. I found that when I went to good lighting and the black diamond blasting sand substrate that my tank took off...sounds weird but i actually sought out malaysian trumpet snails...they keep the substrate stirred and loose and the plants have responded positively.
 
OP
OP
Mikeneedsahobby

Mikeneedsahobby

Well-Known Member
View Badges
Joined
Sep 16, 2018
Messages
516
Reaction score
922
Rating - 0%
0   0   0
You are 3/4 of the way there then...i use my canisters the same way...sponges and bio. I found that when I went to good lighting and the black diamond blasting sand substrate that my tank took off...sounds weird but i actually sought out malaysian trumpet snails...they keep the substrate stirred and loose and the plants have responded positively.
I saw that in your thread. I will do the same once I get the substrate switched out. I am going to start removing the big red/white/blue sand I have this weekend. I'll only take a small amount out per week. Once half gone I'll begin adding in the black blasting sand. Then I'll add snails and plants. For fish, I have 7 ruby nose tetras, 1 bristlenose pleco, and 3 cherry shrimp. I will use this tank later to hold mollys and ghost shrimp for use in feeding lionfish.

I also of course need to build a sweet-water pi.

I like to progress slowly one little thing at a time. Tonight, getting power to the pi. So here is my plan.

This time I'll be using Mike Lanes pi-hat board, and a meanwell 12V power supply. I think Mike's board is powered by 12v. I purchased a C13 power cable and C14 panel mount plug. This is a standard PC computer cable and receptacle. I'll use this to supply 120V AC to the pi housing.

Next to get power from the receptacle to the meanwell RD65A AC/DC transformer I will use 18 gauge white, black, and green wires that are soldered to the receptacle and attached by a screw to the transformer. I am using 18 gauge as that is the wire size in the C13 power cable.

From the transformer to the Pi-Hat I struggled. I think it requires a 2 wire JST jumper. My transformer is capable of 12V at 3 amp so I believe I need 18 gauge wire. And I think it connects to the J5 12V power on the pi-hat. There is also a 5V J13, and 5V power 1, and power 2. But I don't think I need to provide power on these pins.

maybe I need this thing...
https://www.amazon.com/HJ-Garden-Co...onnector+kit&qid=1552014884&s=gateway&sr=8-39

Is this right, smart people? I don't want to fry my trolls.
IMG_9990.JPG
 
Last edited:

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
From the transformer to the Pi-Hat I struggled. I think it requires a 2 wire JST jumper. My transformer is capable of 12V at 3 amp so I believe I need 18 gauge wire. And I think it connects to the J5 12V power on the pi-hat. There is also a 5V J13, and 5V power 1, and power 2. But I don't think I need to provide power on these pins.
Ok glad I caught you, you need to power J13 with 5V and thats what powers the pi thru the hat. The 12v J5 power header is standalone to power the uln2803 which is what will be used for your power controller relays...if you use and american dj board you use 12V there, if you use a 5v relay board it can be powered with 5v instead...
The power 2 header pins are the voltage from J5 and all the outputs from the uln2803 chip. Power 1 is has 5v(from j13) a Ground, and 8 outputs from the pi. It can be used if you want another relay board.
Do you have a schematic for the board..i found it for you
2019-02-28T04_09_54.250Z-reef-piHat-schematic.png
 
Last edited:
OP
OP
Mikeneedsahobby

Mikeneedsahobby

Well-Known Member
View Badges
Joined
Sep 16, 2018
Messages
516
Reaction score
922
Rating - 0%
0   0   0
HA ! Okay thank you. Saved me some headaches for sure.

I appreciate the schematic. I stared at it for a while but I would have never got from it what your words told me.

It sounds like I may have got the wrong transformer. I will need two 5v supplies and mine provides 1 12v and 1 5v. I guess instead of buying a relay and plugs, I should buy another ADJ strip so I can still use my transformer.
 

Michael Lane

Well-Known Member
View Badges
Joined
Aug 11, 2018
Messages
677
Reaction score
1,123
Rating - 0%
0   0   0
Bigtrout beat me to it! What a great resource to the community!

As mentioned, the 12v input is used only for the ULN2803 (and can be any reasonable voltage you'd like to control with the ULN2803). I'll try to come up with a better label since I can definitely see how it can be confusing.

Feel free to tag me if you have any questions or want another set of eyes on anything.
 
OP
OP
Mikeneedsahobby

Mikeneedsahobby

Well-Known Member
View Badges
Joined
Sep 16, 2018
Messages
516
Reaction score
922
Rating - 0%
0   0   0
Bigtrout beat me to it! What a great resource to the community!

As mentioned, the 12v input is used only for the ULN2803 (and can be any reasonable voltage you'd like to control with the ULN2803). I'll try to come up with a better label since I can definitely see how it can be confusing.

Feel free to tag me if you have any questions or want another set of eyes on anything.

Thanks Mike!

So I think I have the power supply figured out thanks to the help from Trout and Mike to confirm. I have parts on order.

Lets see if I have major parts understood.

Lights 1 - 3 & Doser : attached to PCA9685PW
- This provides PWM output. This is gives a variable pulse 5v output to control things like lights and motors. I will use these to feed a mosfet and control my light

Mosfet: something I still need to make or buy to control the lights. I need 2 for my light. This takes a low voltage PWM signal to control the power being applied to a higher voltage/higher current circuit.

PH1/PH2: Outputs to a separate PH board. This is I2C interface (computer talking language). I won't mess with this until after reef-pi 3.0 is released.

J13 5V power: Main power input to the pi-hat.

ATO 1 & 2: Inputs to the PI. I think it needs to be a continuity connection or not. Senses off or on. I don't need to figure this out now.

Temp 1 - 3: 1 wire connection to temp sensors. This piece I know how to do.

J5 12V power: Power for the ULN2083A. Can be any voltage depending on what I need out from the ULN2083A. I will use 12V

ULN2083A: On / Off switches. When On it applies 5V to the power 2 pins. When Off it doesn't. Reef-pi tells the ULN2083A to turn off or on.

Power 2: outputs from the ULN2083A. There are 10 pins. 1 is ground. 8 are controlled by the ULN2083A. One isn't connected to anything. I will take these pins and route them to the ADJ power strip to control AC devices.

Power 1: Extra pins from the rasberry Pi that be can be used in the future. I won't use these most likely.


I ordered my temp probes. I got the double crimp red wires. So I won't to need pot them in epoxy. I will run 2. I don't really like the audio connectors because I have heard of people having shorts when plugging in or out while powered. I decided to use mini xlr connectors instead.
https://www.amazon.com/Connector-Audio-Microphone-Adapters-Chassis/dp/B01C3QTS5Q/ref=sr_1_2?crid=2TYC6E9SMTH8V&keywords=mini+xlr+panel+mount&qid=1552090664&s=gateway&sprefix=mini+xlr+pan,aps,167&sr=8-2

For the connection from ULN2083 to the ADJ power strip I bought a DB9 male panel mount and a female to female DB9 wire. This should make it just like the pi baseboard I have from Theatrus.

So the last thing left is the light controls. I see @Bigtrout used P-channel MOSFET break out boards.
https://www.amazon.com/Gravity-Controller-Suitable-Circuits-Equipment/dp/B07BVDKG8Q/ref=sr_1_fkmrnull_5?crid=8VL3IMD5Q7F5&keywords=gravity+mosfet+power+controller&qid=1552091270&s=gateway&sprefix=gravity+mosfe,electronics,160&sr=8-5-fkmrnull. I ordered 2. I'm not sure how to use them yet. I know I feed something from the light pins to it, and I think I send 15V DC to the MOSFET. I found a laptop 19V 8a adaptor. I wonder if I could use this. Then I will send the output of the mosfet to the light somehow. I'll figure it all out later. For now I'll just buy the MOSFETs.

hmm... I haven't mentioned the trolls in my reef-pi Theatrus base board pi in a while. They are doing great! No complaints. I notice my memory % is creeping up. I am still running Ver 2.2. I am at 45% of memory usage so I am ok for a bit longer.
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
Looks like you did your studying quite well.

On the light issue, you dont need a power supply...the light already has one. You will just need 2 of the drok boards which have the p channel mosfets.

To simplify for you for now.
PCA9685 pin gives a PWM signal to mosfet board. Power from your light goes thru the mosfet on the board and back to the white(blue on the second board) led channel. Pwm signal turns the mosfet on and off giving the leds PWM power.

The beamswork lights(and alot of finnex) are wired like a car, such that all the led groups have one common ground. We cannot switch the ground (unless you want to have the entire light dim both channels together) so we have to put our mosfet on the positive wire side of things. This means a p channel mosfet. You dont have to understand this completely yet but the drok boards are an easy way to do this without soldering and fussing about.

My beamswork came with a 15v 4 amp power supply...I didnt need anything additional.

Your light has a 4pin port on one end for use with a timer. This 4 pins are 15V(or whatever your light is...maybe slightly different on a 30 inch), GND, the return wire to run the White channel and the return wire to run the blue channel. To get the proper connector i sacrificed the beamswork timer and extended its wire to my pi.

Look at the power brick for your light...what does ot say for Volts, Amps and Watts?

I really need to do my light writeup with some pics, but this coming week is busy with work and some planning. The woman turns the big 50 next weekend and im planning a suprise party. Like the trolls its best to keep her happy. The next day is St. Patrick's Day which happens to be our anniversary. Its easy to remember that way plus its a good beer drinkin day ;)
 
Last edited:
OP
OP
Mikeneedsahobby

Mikeneedsahobby

Well-Known Member
View Badges
Joined
Sep 16, 2018
Messages
516
Reaction score
922
Rating - 0%
0   0   0
The power supply my Beamswork came with is 15V 3 amp. It is a 24" light. It looked pretty whimpy. But I guess I can use it. My light is the same as yours for connections. One side is two pin plug for the power supply. The other has is capped 4 pin connector. I don't have the timer. It looks like a standard connector. Maybe I can buy one if I can figure out what the connector is called. (edit. I think it is a M12 threaded connector)

So I would have two mosfets. Each attached to the pi and 15V from the power supply. Each mosfet supplies one output to the 4 pin connector on the light.

The power supply is split into 3. Each mosfet is fed and the light is fed directly. Then I have ground from power supply to mosfet and ground from mosfet to light.
 
Last edited:

Creating a strong bulwark: Did you consider floor support for your reef tank?

  • I put a major focus on floor support.

    Votes: 53 40.2%
  • I put minimal focus on floor support.

    Votes: 27 20.5%
  • I put no focus on floor support.

    Votes: 48 36.4%
  • Other.

    Votes: 4 3.0%
Back
Top