TEMPERATURE PROBES SETUP

Here is the wiring diagram for hookup. Adding the second is quite simple .. you DO NOT have to add a second resistor. Simply wire the other in parallel with the first. Take note of the color coding on the temperature sensor wires. Normally your colors will be red(+) positive, black(-)negative and yellow(GPIO 4 – Pin 7). If you are unsure about this please do not hesitate to ask. you might have two senors wired over each other but you only have one output wire each for GPIO, GND & 3.3v. These sensors and the 1 wire protocol is bus based .. like USB ports .. you can keep chaining them onto each other.

PLEASE NOTE WHAT YOU SEE BELOW IS NOT THE RELAY WIRING, what I used to wire mine up is a terminal block. It makes adding the second sensor easy. Since the second will literally be wired over the first and use the SAME 4.7k resistor. Another does not need to be added.

Once you have your sensors added you need to configure one of the python scripts to pickup where your temperatures are being read. Jayfish is expecting to find two, it was built for this. When you have your 1 wire modules initialized as explained in the software installtion setup.. you should see them listed in the following folder as serial numbers.

/sys/bus/w1/devices
Basically these sensors continually update a file on the Pi with the current temperature … yes you could take a reading every half second if you wanted to 🙂 but the records would get out of control. Let’s list them we need to write down the serial numbers your pi has assigned. Do the following at the command line.
ls /sys/bus/w1/devices
Right .. copy these serial numbers down, you will need to configure them in web interface.

RELAY SETUP – How to wire up an 8 bank relay.

Basically the relay bank requires two types of voltage’s to be used. A +5v to power the entire bank and a +3v to actuate each relay. Single relays are real easy as they normally indicate + – and S for signal. But the large relay banks normally only specifies GND(-) VCC(+)5v and IN1,IN2,IN3,IN4,IN5,IN6,IN7,IN8 quite simply the IN’s are +3.3v

Below is an example of the 8 bank relay, depending on whom you purchased it from, it might look a little different or even labeled slightly differently but essentially they are all the same.

It’s important to note that Jay Fish’s Python programming is running in GPIO BOARD MODE which converts the pins to be referenced in traditional count. LET ME REPEAT THAT – BOARD MODE !!! it means the pins are in natural logical count mode as in .. 1,2,3,4 …

Take a look at the following image and then read the explanation following it. Traditional pin layout of a Raspberry Pi vB(Revision2) As you can see the classic GPIO numbering is all over the place, and what GPIO BOARD mode does is, it references pins according to the natural count. So the pin at the top left (3V3) is pin 1, the next pin to the RIGHT (5V Power) is pin2, going back to the next row starting on the left is pin3 which is GPIO 0 (SDA) and you guessed it .. pin4 is 5V Power … pin 5 would be GPIO 1(SCL) etc …

As long as you understand that GPIO 17 is (Pin 11) you have what you need in “understanding” to proceed.

Selecting Pins for your relays I would suggest the following, GPIO 14, GPIO15, GPIO17, GPIO22, GPIO23, GPIO24, GPIO25, GPIO27 so in BOARD MODE that would be 8,10,11,13,15,16,18,22 … when configuring your Jay Fish GPIO settings you would enter these numbers GPIO BOARD numbers and NOT the traditional layout numbers as seen in the picture.

It’s important that you understand this.

While we are here … GPIO4 is the input pin for the temperature sensors which is …. pin 7 🙂 hope that makes sense. Just remember JayFish’s Python code talks BOARD MODE (I know I’ve repeated myself here a few times .. but it’s important.)

RELAY POWER

Simply connect ANY ground pin to the GND pin on the relay bank and connect one of the 5v Power pins to the VCC pin on the relay board. If your wondering where the v3 comes in .. that would be the GPIO pins … Click on the image below to see highres version. For the SSR Wave Maker Relays they are even simpler to hookup but are wired in very much the same manner. Basically your live lead from your power source will run through the relay to your plug. Here is an example of what I mean. In the following image you can see how the live wire is controlled by going throught the SSR relay, the Pi will simply instruct the line to be interupted. Note its important to wire the correct side. !!! the Pi is the DC side meaning the 3-32VDC input. The following video will help you understand it more in practical application. https://youtu.be/zirxn-_mZog

Here is an additional diagram on how to wire up relays to AC power and DC power.  The first image is an example to understand a simple 110v or 220v hookup.  Basically your breaking the hot wire or live wire.  Never break neutral.  As you can see HOT runs through the relay allowing the relay to be able to break the connection.

The picture after the single is a more complex hookup with multiple plugs and one DC hookup for some custom low voltage (DC based gadget you might have.)  This model you can see bridging taking place to distribute hot to all the hot points in the relays. As you can see the hot leads to each outlet plug which the relay can terminate …  Hope this helps.

 

Below is the design for ATO Type 1, Type 1 expects you to use a small water pump that is submersed in a container and will pump water into the tank when the lower float switch closes … then the pump will push water into the tank based on your settings configured in the webpage.  When the float opens again .. it will stop dispensing water.

The Second float is a little higher … and needs to be in the open state, IF the water rose too much because of failure the float would close and the relay will shut off completely until the problem is resolved.

NOTE THAT WE NOW SUPPORT A THIRD FLOAT WHICH IS OPTIONAL, AND SHOULD BE PLACED IN YOUR TOP UP RESERVOIR, in the DISCONNECTED or OPEN STATE, IF THIS FLOAT CLOSES IT WILL NOT TRY TO PUMP PROTECTING YOUR PUMP FROM BURNING OUT.  THE DIAGRAM BELOW WILL BE UPDATE THIS DECEMBER 2018

Below is the design for ATO Type 2, Type 2 expects you to use a two solenoid water valves in series.  These solenoid valves MUST BE the GRAVITY feed type and the container has to be higher than your sump. When the lower float switch closes the the solenoids will open and let water into the sump tank based on your settings configured in the webpage.  When the float opens again .. it will stop dispensing water. I use two valves in this design for backup resilience.( you can use one high grade one if you prefer, never have a top up container that can flood your house.) The Second float is a little higher … and needs to be in the open state, IF the water rose too much  the second float would close  the switch the relay off stopping the system completely regardless.

NOTE THAT WE NOW SUPPORT A THIRD FLOAT WHICH IS OPTIONAL, AND SHOULD BE PLACED IN YOUR TOP UP RESERVOIR, in the DISCONNECTED or OPEN STATE, IF THIS FLOAT CLOSES IT WILL NOT TRY TO PUMP PROTECTING YOUR PUMP FROM BURNING OUT.  THE DIAGRAM BELOW WILL BE UPDATE THIS DECEMBER 2018

 

There are two ways to manage your lights in Jayfish V4.3, You can use relays to simply connect each power socket to a relay to control on and off action. or in Jayfish V5 You can use PWM lighting with LDD constant current control blocks.

There are a few things you need to understand in order to build your own LED lighting.  This can seem intimidating but it’s really not .. provided someone bothers to explain how and why in a sensible manner.  So here goes.

First you need to buy a PCA9685 board which is a 16 port pulse width modulator.  What that means is, it switches things on and off at such a high speed that it’s not perceivable.  This results in power reduction so to speak, it seems that the LED has dimmed, when in fact it’s power us just being interrupted.  On the PCA9685 we really only need one pin to the LDD, and that is the yellow pin.  There are 16 and the count starts at 0 on the left.  In Jayfish v5 it will  want to know what channel you plugged your LDD in to control it.

Right so what is the LDD, the LDD block made by Meanwell, it an amazing constant current controller, that is flexible in many ways.  The trick is choosing the right one for the application.  They come in a few powers, for example and LDD-350 is a 350mah LDD, and an LDD-1000H is a 1amp or 1000mah LDD.  Now lets put this into perspective.  If you wanted to create an LED unit that has say 7 1w LED’s … we know that 1 single 1w led will draw 300-350mah, so if we wanted to connect a string of 7 1w LED’s we would still only need 300-350mah and NOT 7 x 300-350mah, Why ? because the LDD will ensure regardless of what happens that 350mah is all that is pulled across the 7 LED’s … YOUR Job is just to provide the right amount of volts. So if each 1w led requires 3v you would then need 3 x 7 to power that led string … so you would need 21v at least and one LDD-350.  Technically you can provide 21v-56v because the LDD will ensure that it still only provides the amps needed !!!

Below is an example of a SINGLE LED.  PS: Use VCC not V+

Below is an example of one single LED setup and one Multi LED setup.

 

Now lets look at buying decisions / examples.

I want 3 10w LED’s – What do I buy.

You will buy,

3 x 10w LED’s.
3 x 12v 1amp minimum power supplies, one for each OR 1 x 12 with 3amps ability to power all three.
3 x heatsyncs for the 10w LED’s – 10w’s get really hot !!! so you need heatsync
3 x LDD-1000H (which are 1 amp max each)

Now lets do a complex one.

I want 40 1w LED’s in four groups, so 15 10k LED’s and 15 Actinix LED’s and 5 moon Led’s and 5 sunset/sunrise LED’s

You would buy,

20 x 1w 10-15kelvin LED’s
20 x 1w Royal Blue LED’s
1 x LDD-350H for Group A (15 LED’s = 45volts needed) Daytime – Daylight
1 x LDD-350H for Group B (15 LED’s = 45volts needed) Daytime – Actinic
1 x LDD-350H for Group C (5 LED’S = 15v needed) – Moon
1 x LDD-350H for Group C (5 LED’S = 15v needed) – Sunrise/Sunset
2 x 45-56volt power supplies.
3 x 12-16volt power supplies.

In the above example if you look at the graphic you can now see, that you would use 4 channels for this setup, and J5 will give you insane controls of dimming levels across ALL these LED’s, up to you how you want to mix and match dimming.

 

This is optional, for those who want a touch screen control panel at their aquarium.

Dont forget using the panel is as simple as starting chromium and navigating to http://127.0.0.1/lcd.php then switch it to full screen mode, and you effectively are up and running.  For the moment it will list all your temperature sensors dynamically aswell as reflect on your filter life, current phase and times, some stats about the pi and Manual relay control.  Note that all relays that have not been set to automatic will naturally dynamically appear for manual operation on the manual relays page.  I find this handy for other equipment that is there for my convenience … like a lamp stand .. aswell as circulation pumps so I can stop them for feeding time.