Maker Pro
Maker Pro

bi directional communication to multiple nodes over 1 wire

Dude22

Mar 30, 2012
66
Joined
Mar 30, 2012
Messages
66
Hi,

I have an idea for a project, and although I "think" it should work, I have no Idea how to implement it. Any help/hints would be GREAT!

Untitled drawing.jpg

As you can see from the image, there is a control module, that is connected to each module with only 1 wire, and just to clarify, that isn't 1 wire for each module, that is 1 wire that every module is connected to. Each module has an led on it, and I want the control module to be able to turn on the leds independently, so for instance, the control module could send out "turn on m3" and although every module would receive that signal, only m3 would turn on.

In addition to that each module has a manual switch, so that you can turn on/off the leds at the module itself. NOTE: this shouldn't be a "kill switch" is should be a bump switch. If that happens the module should send a signal to the control module so that the control module always knows what led's are on/off.

I am wanting the modules to be as compact and simple as possible, the control module doesn't matter as much.

Hopefully this doesn't sound like I am asking for someone to do this for me, I am not asking for that at all. If you have any experience with something like this, or have any idea as to how I could make this work, I would really appreciate any advice you have.

Thanks,
Josh
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Do you mean something like this string of 50 individually addressable colour LEDs?
 

Dude22

Mar 30, 2012
66
Joined
Mar 30, 2012
Messages
66
Do you mean something like this string of 50 individually addressable colour LEDs?

No, thats not quite what I am looking for. The signal should be sent over only 1 wire wire TOTAL. Also I just used leds as an example, what would actually be more likely is that It would be triggering a relay. I have done a LOT of searching for a pre made solution, but, there doesn't seem to be anything even close. So I am looking for some kind of circuit/microcontroller that would let me send a bidirectional signal over 1 wire.
 

davenn

Moderator
Sep 5, 2009
14,254
Joined
Sep 5, 2009
Messages
14,254
I have done a LOT of searching for a pre made solution, but, there doesn't seem to be anything even close.

maybe because in electronics you need 2 wires ??
you need 2 wires to complete a circuit, else there wont be any current flow.

you could use 1 wire and a ground (earth) return

Im not personally aware of any other single wire comms technology
there may be something?

Dave
 
Last edited:

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
Do you intend to have a separate battery in each LED module?

Are you prepared to have a microcontroller in each module? Do you have experience programming microcontrollers?

Is there a global ground connection as well as the single wire? Hint: if not, you'll need to use a very high frequency signal and some kind of detector and transmitter circuits in each module.

From my experience of similar questions over the years on this forum, I've found that having an abstract description of your idea of how it needs to be done just limits us and wastes time. Why don't you tell us all about the project. It's a lot easier for us to suggest options if we know what you're trying to achieve.
 

Lightning

Oct 12, 2013
45
Joined
Oct 12, 2013
Messages
45
Assuming that you have somewhere for the current to flow e.g. a ground connection for each L.E.D/module, you could use a multiplexer to send all the control signals from the control module to their respective destinations down a single wire.

http://en.wikipedia.org/wiki/Multiplexer

I'm sure there are details to work out but it could be a shot in the right direction.
 

Dude22

Mar 30, 2012
66
Joined
Mar 30, 2012
Messages
66
What this will be used for

Ok,

Sorry I didn't just say this from the beginning, what I want to be able to do is control the leds through existing house electrical wiring. The reason I want to use only 1 wire is that sending information over a line with ac power going through it is problematic... I have experience working with mains so I don't need the standard (and very true in a lot of cases): "Working with mains is dangerous you should find another way..."

I have looked at the x10 system, but It is expensive and I think I could design a better system using the ground wire in some way....


Hopefully my clarifications will make it easier for you to recommend solutions.

Thanks,
Josh
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
Yes, thanks for the clarification.

If you "have experience working with mains", you should know that "using the ground wire in some way" would be very unwise and probably illegal for safety reasons. Luckily, there's nothing useful you can do with it anyway, AFAIK.

You will need to use either a separate communication path, e.g. radio, or some kind of power-line carrier system like that used by X10. If you're worried about the prices of commercial X10 devices, you can always roll your own; this MIGHT be economic provided that you don't consider the cost of your time (for example if you want the learning experience).

You might want to check out the NXP TDA5051A power line carrier modem IC: http://www.nxp.com/documents/data_sheet/TDA5051A.pdf

The data sheet includes an example application circuit for non-isolated connection to the power line. You will almost certainly need a microcontroller of some kind - just a very small and simple one, and you will need to come up with a protocol. Each slave will also need a unique address (typically, configured with a DIP or mini rotary switch).
 

Dude22

Mar 30, 2012
66
Joined
Mar 30, 2012
Messages
66
Assuming that you have somewhere for the current to flow e.g. a ground connection for each L.E.D/module, you could use a multiplexer to send all the control signals from the control module to their respective destinations down a single wire.

http://en.wikipedia.org/wiki/Multiplexer

I'm sure there are details to work out but it could be a shot in the right direction.

Cool, thanks, I like the idea of using a multiplexer. As far a you know, could I run data from the control module to the multiplexer, then run the single output to the nodes, where the wire is demultiplexed back into 2 wires...? Or am I not understanding how they are used?
 

Dude22

Mar 30, 2012
66
Joined
Mar 30, 2012
Messages
66
Yes, thanks for the clarification.

If you "have experience working with mains", you should know that "using the ground wire in some way" would be very unwise and probably illegal for safety reasons. Luckily, there's nothing useful you can do with it anyway, AFAIK.

You will need to use either a separate communication path, e.g. radio, or some kind of power-line carrier system like that used by X10. If you're worried about the prices of commercial X10 devices, you can always roll your own; this MIGHT be economic provided that you don't consider the cost of your time (for example if you want the learning experience).

You might want to check out the NXP TDA5051A power line carrier modem IC: http://www.nxp.com/documents/data_sheet/TDA5051A.pdf

The data sheet includes an example application circuit for non-isolated connection to the power line. You will almost certainly need a microcontroller of some kind - just a very small and simple one, and you will need to come up with a protocol. Each slave will also need a unique address (typically, configured with a DIP or mini rotary switch).

Could you please clarify on why using the ground wire as a data line would be unwise.... As far as I can tell with my (limited) electrical knowledge there shouldn't be any problems.

And to clarify, i have enough "experience" to not injure/kill myself when working with 120 AC, and above. But I am in no way saying I am an expert, so There may well be a good reason that data shouldn't be run through ground. If there is I would just like to know about it...
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
That should be very obvious. The earth wire must be a direct and solid connection to earth. Anything you connect in series with the earth connection will compromise this essential function and will be illegal. But in any case it doesn't make sense to say that you would send data "through" the ground wire; electrical signals (excluding high-frequency signals such as radio signals) need an explicit, wired return path - this is why a mains socket has phase and neutral, instead of just phase.
 

Dude22

Mar 30, 2012
66
Joined
Mar 30, 2012
Messages
66
That should be very obvious. The earth wire must be a direct and solid connection to earth. Anything you connect in series with the earth connection will compromise this essential function and will be illegal. But in any case it doesn't make sense to say that you would send data "through" the ground wire; electrical signals (excluding high-frequency signals such as radio signals) need an explicit, wired return path - this is why a mains socket has phase and neutral, instead of just phase.

While I still don't agree that running this through the ground wire would cause issues as you say, I think that I am going to have to go with the TDA5051A as you recommended (or some other similar system). I want to be able to control the leds (or relays) over the internet, I am thinking that I may incorporate a raspberry pie into the control module to act as a server. As I have said before, the size of the control module doesn't matter to me, its the module at the led (or relay) that I want to keep as small and simple as possible. Knowing this is there anything you can recommend? The TDA5051A looks OK, but there might be something better. I have been doing a lot of googling, but haven't managed to come up with much. I just want a simple, reliable system. Do you have any input on this?
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
I don't know. I don't have any experience with sending data over power lines. I found the TDA5051A with a parametric search on Digikey for power-line carrier modems - it's the only one they stock.

The TDA5051A looks good, but any system that sends data over power lines needs a robust protocol, because dropouts and data corruption are inevitable. The TDA5051A at least has the advantage of transferring data at 600 or 1200 bps, unlike X10 which apparently only sends one bit on each zero-crossing, which would limit the data rate to 120 bps. Although using only zero-crossings would give a lower bit-error rate than you would get with the TDA5051A.

I suggest you look into the technical details of X10 as well. A lot of work has gone into producing a workable, reliable system. That is work that you don't want to have to duplicate yourself!
 

Dude22

Mar 30, 2012
66
Joined
Mar 30, 2012
Messages
66
I don't know. I don't have any experience with sending data over power lines. I found the TDA5051A with a parametric search on Digikey for power-line carrier modems - it's the only one they stock.

The TDA5051A looks good, but any system that sends data over power lines needs a robust protocol, because dropouts and data corruption are inevitable. The TDA5051A at least has the advantage of transferring data at 600 or 1200 bps, unlike X10 which apparently only sends one bit on each zero-crossing, which would limit the data rate to 120 bps. Although using only zero-crossings would give a lower bit-error rate than you would get with the TDA5051A.

I suggest you look into the technical details of X10 as well. A lot of work has gone into producing a workable, reliable system. That is work that you don't want to have to duplicate yourself!


All of these systems just seem like overkill to me, I understand how they work, but it seems in some ways unnecessary to me... Even if it means slow speeds (I am only turning on and off leds/relays). There must be some way to do this without always having to communicate at the zero crossing....
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
All of these systems just seem like overkill to me, I understand how they work, but it seems in some ways unnecessary to me... Even if it means slow speeds (I am only turning on and off leds/relays). There must be some way to do this without always having to communicate at the zero crossing....
Well, you're the expert :-/

The TDA5051A doesn't limit itself to zero-crossings. That's why I expect it will have a much higher bit-error rate than the X10 method. I think you would need to use a protocol with strong error detection and retries, or forward error correction.
 
Top