Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Multiple relay with controllers

Status
Not open for further replies.

venkates2218

Full Member level 6
Joined
Sep 30, 2016
Messages
354
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,298
Activity points
4,306
In my project,there are 8 relays use.To reduce the usage of I/O pins from PIC controller.I tried to use multiplexer and shift registers.
If the multiplexer is used means I can't switch ON pair of relay at same time.
If the shift register is used means,while shifting the data all the relays are switching on.

How to switch ON pair of relay either by multiplexer or by using shift register(Without switching on other relays while shifting)
Or is their any other way to solve this issue..?
 

You need a latched shift register - one that has independent shift function and latch function. They let you set the bit pattern (any number or combination of bits) then when it has been shifted out of the PIC, presents it to the relay in one operation.

Look for latched shift registers for examples.

Your code would shift the required pattern into the shift register then use another control signal to momentarily operate the latch so the pattern appears on the output pins.

Brian.
 
Hi,

If the shift register is used means,while shifting the data all the relays are switching on.
Where is this information from?
What shift register are you talking about?

One of the cheapest shift registers is a 74HC595 ... it has built in latches to avoid false relay switching
Then there are SPI port expanders and I2C port expanders, and there are (octal) relay drivers with serial interface.
Everything you wish to have is available.
Just go to a distributor's (or semiconductor manufacturer) internet site and use their online selection guides.
Read datasheets .... and find the best solution for you.

You also could do an internet search for "8 relay serial interface schematic" to get some ideas how others did it before.
Be thankful to have internet, we did not have it ... 30 years ago. So use it.

Klaus
 
Hi,
If the shift register is used means,while shifting the data all the relays are switching on.
Klaus

I built an circuit by using 74HC164N shift register.While testing the board,got the result like this..
 

The 74HC164 is not latched, that is why you found all the relays operated.

A latched shift register lets you shift the bits to the desired places, THEN transfer them all and hold them at the output pins simultaneously.

Brian.
 

Hi,

check this:
* NXP 33879
* 6B595
* NCV7240
* NPIC6C595
* TPL9201
* BL310
...

But even a HC164 solution should work with fast enough data transfer .. without false relay switching.
Data transfer can be in the MHz range..but usual relays need several milliseconds to switch.

Klaus
 

image_001.jpg

Is this circuit is correct..?
Shall we leave the 12th pin idle..?
 

NEVER leave pins idle, they could adopt any state and change randomly.

However your schematic isn't quite right, the ~OE pin enables or disables the output pins, you want them enabled all the time so connect ~OE to 0V.
The latch signal goes to pin 12. Whatever is in the shift register is transferred to the output pins on the rising edge of the pulse on pin 12 so keep it low until the shifting is finished then drive it high then low again. As it goes high, the signals you want will appear on the output pins and they will stay there until the next time you drive pin 12 high again.

Brian.
 

image_002.jpg

Now it is correct..?
Does series resistor is required between the PIC and shift register pins..?
 

Hi,

may I ask why you .. don´t look for internet circuits.
... and even don´t look into the datasheet. Ok - I agree - this might be boring - but all professionals need to do this, too.

Everything is available. No need to re-invent the wheel.
Even complete projects with code....

Klaus
 

Hi,

may I ask why you .. don´t look for internet circuits.
... and even don´t look into the datasheet. Ok - I agree - this might be boring - but all professionals need to do this, too.

Everything is available. No need to re-invent the wheel.
Even complete projects with code....

Klaus

I'm looking on Internets and searching for my doubts.Lot of results are available in internet..
From that results I'm building on my own at first,in that i'm making some mistakes and i'm trying to solve the issue by seeking help from experts...I'm willing to learn even an single technical points regarding my work.Solution for some errors are not available in google search.So i'm asking here.
 

... but yes, it is now correct.
You don't need the resistor on the latch signal if the MCU is actively driving it.

Brian.
 


In multiplexer ICs both VEE and GND pin are connected to GND supply...
In this case what is the difference between VEE and GND pins...?
 
Last edited:

In multiplexer ICs both VEE and GND pin are connected to GND supply...
In this case what is the difference between VEE and GND pins...?

VEE is the negative limit for the switches and it can be connected to a negative voltage if signals going below GND are switched.
 

If VEE is connected with GND means we can switch negative voltages(-1,-2,-3...,) also..?
If VEE is connected with +5V means only positive signals are switched..?
 

If VEE is connected with GND means we can switch negative voltages(-1,-2,-3...,) also..?
If VEE is connected with +5V means only positive signals are switched..?

Please read the data sheet. The signals to be switched must be between VCC and VEE. VEE can be lower than GND.
 

Image_0054.jpg

I tried the above circuit.The output from 74HC595 is always in on condition.So removed R4,R9,R13 and tried.But facing the same issue..
How to solve this..?
 

Hi,

A standard procedure for debugging circuits:

* Measure the HIGH and LOW voltage levels at the HC595 inputs...
* cross check with datasheet whether they comply with the specifications.

Klaus
 

Hi,

A standard procedure for debugging circuits:

* Measure the HIGH and LOW voltage levels at the HC595 inputs...
* cross check with datasheet whether they comply with the specifications.

Klaus

Ok I will once again check it.Is this circuit is correct..?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top