Table Functioned Relays

Hello,

I would like to ask if I could use relays to control devices functioning in a table like structure.
I have made an attachment of an image showing 4 devices (D) with Voltage (+) and Ground (-) supply.
The devices are separated in 2 Columns and 2 Rows. So it is like:

D 1.1 | D 1.2

D 2.1 | D 2.2

There are 4 relays. THe 2 of them are used for Voltage and the other 2 are used for Ground.
Devices as shown in image in same Row share same Ground Relays and Devices in same Column share same Voltage.

In this theoritical structure if I want to enable Device 1.1 I enable Relays V1 and G1, if I want to enable Device 2.1 I must enable Relays V1 and G2 etc.
The Voltage Relay Number equals Column number and Ground Relay Number equals Row number.

  1. The major question is: Can I use Relays for Ground instead of Voltage? Is that possible?
  2. Does Voltage cause problems to other Devices that have same Voltage supply and don't have Ground? If I enable Device 1.1 will Device 2.1 have any functional problem since it won't have a Ground? Will it be burned or something?

I want to know if this structure is possible:

D 1.1 | D 1.2 | D 1. X

D 2.1 | D 2.2 | D 2. X

D Y.1 | D Y.2 | D Y. X

Please don't advice me to use a 4 channel relay. This is not the purpose.

Thanks.

Relays-table.jpg

Hi.

A relay is an electrically controlled switch.
Switches are used to close or open a circuit.
You can use multiple switches in series to open or close that circuit.
So if you are closing switch A but not switch B, the circuit is still open.
It doesn't matter where these switches are located.
So if A is in VCC, B is in GND and the load is in between, they are still in series.

I hope this answers your question: yes, you can do that.

This technique you are describing, is multiplexing.
Arrays of LEDs are often controlled in this exact way.
You can look for examples of this.
Charlieplexing is another name for it (it is slightly different from multiplexing), so i suggest you do a search for both.
You'll find a lot of information you can use for your project.

  1. Does Voltage cause problems to other Devices that have same Voltage supply and don't have Ground? If I enable Device 1.1 will Device 2.1 have any functional problem since it won't have a Ground? Will it be burned or something?

If the devices are LEDs, no problem. If they have multiple I/O, you'll need to make sure all connections can't find another path to Ground while the Ground rail is disconnected. To answer your question properly, we really need to know what the devices are (c/w links) and perhaps a schematic of your project.

Can you explain what you are trying to achieve.

Your first example looks like a relay implementation of a H bridge motor driver.
I do not understand the second example.

EDIT

Try to google on state machine to find representations of logical representation.

charavge:
Please don't advice me to use a 4 channel relay. This is not the purpose.

Thanks.

What is your purpose then? A relay matrix? Most relays don't latch, so they won't take as kindly as LEDs to to being charlieplexed.

If only one relay is going to be active at a time, or you can guarantee that only relays in a single row will be active at a time, a matrix is fine. I doubt this will be the case though. If you want a large number of relays to be controlled and allow any arbitrary combination to be on at once, they will need to be independent channels. You can use shift registers or port expanders to reduce the amount of GPIO you use.

Thanks all for your responses.
I want to say that I am not very familiar to electronics but I like experimenting.
I was thinking a way to reduce the quantities of relays in case I want to use multiple devices.

The second structure refers to N devices (as many as you want).
I.e. if I want to use 16 different devices, motors or anything else the normal is to use a relay for each device.
But instead of 16 relays I thought using a table like structure 4x4 could save some relays.
Or with an array of 10x10 using only 20 relays you can control 100 devices. Isn't that right?

I didn't know that this was the idea of multiplexing or H Bridge.
Also I was concerned if devices would burn in case they got only Voltage and no Ground.
I searched in Google for these terms and found some ideas.
Thanks!

charavge:
Or with an array of 10x10 using only 20 relays you can control 100 devices. Isn't that right?

Yes this is exactly how charlie pixelling works.

It would be cheaper/ more convenient though to use transistorss for this though.
How ever care is needed especially for inductive loads.

If you look at a H Bridge or a half bridge , the bottom transistor is the same as your n relay and the top transistor is the p relay.

EDIT The connection method is different though.

Boardburner2:
How ever care is needed especially for inductive loads.

So in this simple structure is it dangerous for motors to destroy?
Giving power without Ground is dangerous to overload motors?

An H bridge for driving motors is used for bi directional control.
A half bridge for unidirectional control.

EDIT
Not strictly correct

With the half bridge it would be split in your case so top half supplies x axis while bottom half supplies y axis.

In both cases there is protection built in.

An inductive load generates back EMF which can damage transistor switches.
Diode(s) are often used to protect the transistor.

As Dlloyd has said we really need to know what you are trying to do.

With led, only one is on at any time , they are switched faster than the eye can see so many appear to be on at the same time.

With motors that is not possible.

Using one of these per motor you should be able to control motors of 500mA or so.
I do not consider them to be too expensive.

http://www.lightinthebox.com/l9110-dual-channel-h-bridge-motor-driver-module-for-arduino_p903443.html?currency=GBP&litb_from=paid_adwords_shopping&utm_source=google_shopping&utm_medium=cpc&adword_mt=&adword_ct=84187195634&adword_kw=&adword_pos=1o1&adword_pl=&adword_net=g&adword_tar=&adw_src_id=1810908567_301579154_21687113474_pla-214570461434&gclid=CJnW5ue-qNACFUVmGwod8bsHHA

charavge:
Or with an array of 10x10 using only 20 relays you can control 100 devices. Isn't that right?

There are caveats to that.

An assembly of 100 digital objects has 2100 different combinations of states it can be in. 20 relays on the other hand can only be in 220 different states at any one moment in time. It is mathematically impossible for 20 digital pins to fully represent all the states of 100 digital objects.

Instead, a matrix is wired up so that one row (or column) can be easily and predictably controller, giving 210 * 10 different states used. This is less than the 220 that 20 pins can represent, but the interconnections of the matrix make turning on more than one row at a time not very useful.

The secret to using the matrix is to cycle through the rows quickly. Activate the first row, then the second, then the third, etc., and loop back to the first when you reach the end. You then have 10 independent assemblies of 10 digital objects, except instead of being controlled at once they are activated in sequence over time. That gives (210)10 states the matrix can represent, which simplifies to 2100. if you switch the rows quickly enough, you won't notice the flicker.

And that is how 20 pins connected in a matrix can control 100 objects.

Remember, the key to it is being able to rapidly switch rows so that it appears that all the elements are turned on at the same time, even when they aren't. This is no big deal for a transistor that is completely electronic with no moving parts, but relays will get burned out switching that often. I would not recommend using a relay-switched matrix unless you only intend one thing to be on at once. Then you can just turn on the pair of relays for that single thing and don't have to cycle through the rows.

Thanks.
There is nothing particular so I can't give an example. There was a reference to LEDs and Motors and since I prefer motors I gave the example of motors in a previous post just to make conversation specific.

I was just making a thought and I needed to discuss it to take some answers from people that know it and have tested it.
I am not very familiar to electronics but like I said above I like to make experiments when I have some time.
All above answers are very helpful. Already I searched most things written above and learned a lot more things than I expected.
Thanks again!