Author Topic: How to connect modules  (Read 16206 times)

0 Members and 1 Guest are viewing this topic.

Offline cio74

  • Administrator
  • Hero Member
  • *****
  • Posts: 523
  • Karma: 1

+Info

How to connect modules
« on: March 11, 2014, 01:23:05 PM »
I am doing a quick write up of how to connect all modules together. Chris, please edit this post.

Here is a close-up of the Raspberry PI connector P1, the board main connector that we will use to link it to our modules using the I2C bus.


The P1 connector is the 26 pins located on the top right, here is a pin out of the header along with description


I suggest we stick to these colours

5v power supply - red
0v, GND - yellow
I2C SDA - blue
I2C SCL - green

The 1 wire bus, on GPIO 1 at the moment, yet to come up with a colour.

The main diagram shows how to connect the modules we have so far along with the led drivers, led power supply and temperature sensor.


A close up of the RTC (Real Time Clock) module and how to wire it


We keep the same colours whenever we encounter a known signal line (Vcc, GND, SCA, SDL).

The PCA9685 module and the associated connections


I have also added a 2 channels relays module, this will vary widely depending on each setup


We'll need to connect them together, a step by step visual guide. All connections are made via a small piece of breadboard.

First we connect the Raspberry Pi signals to the breadboard, 5v VCC, GND, and the SCL and SDA I2C bus lines


Then connect the wires to the RTC module. To make it easier I use the colours we defined earlier


Getting it wired to the breadboard


PCA9685 close up with the wiring, we are not using the board's blue V+ middle connector for now


Add the wires and connect it to the breadboard


Most users will probably use more than 2 channels relays module, wiring this one for this presentation


Finally, all modules connected together



Please review and add your comments.
« Last Edit: March 11, 2014, 05:38:30 PM by cio74 »

Offline matt20687

  • Administrator
  • Full Member
  • *****
  • Posts: 208
  • Karma: 0

+Info

  • Gender: Male
    • Control your aquarium with a ReefPi!!
Re: How to connect modules
« Reply #1 on: March 11, 2014, 01:28:24 PM »
Ah man that's a good and very helpful guide! I need to get my breadboard and leads as well as the PCA though!


You want more pie? Have some ReefPi!!!
--------------
Matt

Offline perkint

  • Full Member
  • ***
  • Posts: 226
  • Karma: 0

+Info

  • Gender: Male
Re: How to connect modules
« Reply #2 on: March 11, 2014, 01:38:25 PM »
I take it all the I2C devices connect in series rather than parallel?

Tim

Offline Bigguy

  • Administrator
  • Sr. Member
  • *****
  • Posts: 498
  • Karma: 2

+Info

  • Gender: Male
  • Large Fat and Ugley
    • ReefPI
Re: How to connect modules
« Reply #3 on: March 11, 2014, 01:59:54 PM »
Thats Ace Dude
I take it We are only using the 4 wires on the  Pi at the moment And all the devices connect to these 4 wires :)

Offline cio74

  • Administrator
  • Hero Member
  • *****
  • Posts: 523
  • Karma: 1

+Info

Re: How to connect modules
« Reply #4 on: March 11, 2014, 02:20:36 PM »
True, the SCL, SDA, VCC and GND are all on individual lines where the devices connect. In other words, we connect all SCL from all modules together, all SDA form all modules together, and so on. 

Please refer to the other diagram which shown how bus is connected. May do another diagram by myself.

Offline perkint

  • Full Member
  • ***
  • Posts: 226
  • Karma: 0

+Info

  • Gender: Male
Re: How to connect modules
« Reply #5 on: March 11, 2014, 02:45:02 PM »
I take it all the I2C devices connect in series rather than parallel?
Ah, s they don't connect in serial, they connect in paralel. That makes life easier :)

Tim

Offline smudge

  • Full Member
  • ***
  • Posts: 127
  • Karma: 0

+Info

  • Gender: Male
Re: How to connect modules
« Reply #6 on: March 11, 2014, 09:00:27 PM »
Nice Cornel, cant wait for the postman with bits for me to play with

Offline cio74

  • Administrator
  • Hero Member
  • *****
  • Posts: 523
  • Karma: 1

+Info

Re: How to connect modules
« Reply #7 on: March 11, 2014, 09:42:31 PM »
Yes, it will be fun to have all of them connected, I have mine, can control relay and led :)

I am looking forward to build the first PCB, have to resurrect the thread where I was asking the minimum things we want to monitor/control.

Offline smudge

  • Full Member
  • ***
  • Posts: 127
  • Karma: 0

+Info

  • Gender: Male
Re: How to connect modules
« Reply #8 on: March 15, 2014, 10:42:36 PM »
Ok postman has been with some bits. (pca9685 and rtc)

Got these connected, now what

Offline Bigguy

  • Administrator
  • Sr. Member
  • *****
  • Posts: 498
  • Karma: 2

+Info

  • Gender: Male
  • Large Fat and Ugley
    • ReefPI
Re: How to connect modules
« Reply #9 on: March 23, 2014, 11:36:32 PM »
just noticed

the The PCA9685  i2c slc is grey not green same  on relay :)

also the The PCA9685 module can you connect another if needed ? ie daisy chain them ?

or is that not possible

Offline perkint

  • Full Member
  • ***
  • Posts: 226
  • Karma: 0

+Info

  • Gender: Male
Re: How to connect modules
« Reply #10 on: March 24, 2014, 12:42:36 AM »
You can connect multiples. Can't remember what the limit is (cio74 has posted it on here somewhere - 94 springs to mind for some reason?) but it's more than anyone is ever going to need in this context :)

Tim

Offline Bigguy

  • Administrator
  • Sr. Member
  • *****
  • Posts: 498
  • Karma: 2

+Info

  • Gender: Male
  • Large Fat and Ugley
    • ReefPI
Re: How to connect modules
« Reply #11 on: March 24, 2014, 12:45:40 AM »
Thanks Tim
Might Need another one lol

Offline perkint

  • Full Member
  • ***
  • Posts: 226
  • Karma: 0

+Info

  • Gender: Male
Re: How to connect modules
« Reply #12 on: March 24, 2014, 12:56:21 AM »
Personally, I'm thinking two or three, depending on how modular we get. 1. PWM for LEDs. 2. Control for mains/DC switching thru relays/SSRs (could use the I2C MCP chip for this). 3. With an LPF for Jebao pump control.

You could, in most cases, cover this with just one PCA chip, but that can complicate the wiring (but make the solution cheaper).

Tim

Offline ChrisATX

  • Newbie
  • *
  • Posts: 6
  • Karma: 0

+Info

Re: How to connect modules
« Reply #13 on: March 09, 2015, 04:29:27 AM »
Can you guys tell me how PWM module outputs can be used for to control the relays on something that needs a a long duty cycle? For example, a chiller relay?

Offline perkint

  • Full Member
  • ***
  • Posts: 226
  • Karma: 0

+Info

  • Gender: Male
Re: How to connect modules
« Reply #14 on: March 12, 2015, 06:58:20 PM »
The PWM is just a 0-5V signal turned on and off rapidly when between 0% and 100%. When on 0% it's same as a digital output set off. When at 100% it is the same as a digital pin set on. So you can use a PWM signal at 100% to trigger a relay (so long as the relay works at the voltage the PWM is outputting)...

Tim