Could use some advice about a single wire communication protocol

I am working on a project with suits (jackets) having a lot of sensors and LED’s and what not. Once I have made some more progress will share the results in a different topic, but at present I would like some advice about a particular aspect of it.

I would like to have the suits communicating via electrodes sewed to the wrists. The idea is that when two people clamp their electrodes together (left hand - right hand) something awesome happens. For example, they “charge up” each other and the LED’s light up more and more. When multiple people connect even more crazy stuff can happen. Standing waves, light creatures jumping from one suit to another.

Now the technical challenge… I need some way to send messages to each other. A little bit more than on or off, because I want different programs to be possible and a variable amount of connected suits. Sending a few bytes in in 1 ms or so would be enough. Since I want to make the connection as easy as possible, I would like a single wire protocol. I realize that I will need to make a common ground connection too.

Sending some bits around is not that difficult, but the problem is the potential occupation of the data line. Secondly, there can’t be a single master with multple slaves configuration because you don’t know which suits are going to be connected. Everybody is a master basically.

So I need the following:

  • a single wire (+ common ground) communication protocol
  • that allows for master to master communication with variable number of masters
  • that can decide if the data line is free and/or some kind of error handling when two masters are sending at the same time or when half messages are received

I have already quite some ideas but I realize I might be reinventing the wheel here. So my question is basically: does something like this exists? Any general comments or advice is welcome too.

What does this have to do with particle photons? nothing in particular, I just like them and use them for this project.


@ChargedParticleLeon, have you considered using wireless IR for the communications? As you mentioned, the issue with a wired solution will be the common ground but also includes wire length, contact resistance, etc. Having an IR TX/RX pair on each side would allow a simple negotiation and exchange of data without necessarily having a master/slave requirement.

A while ago, some local makers created a wearable badge that communicated with others in the same room, modifying their onboard LED blink colors and patterns accordingly. I’ll see if I can dig up the code (I believe it’s open source) if you are interested. :smile:


@peekay123 Thank you for the quick reply!

I have the feeling that contact resistance and wire length should be surmountable because the required data rate is so low. But it is certainly something to worry about and address.

I did not consider IR for this application and I think it is quite a good idea. I am going to look into it.

It would be nice to take a look at the code you are referring too. If only for some inspiration. Thanks.

@ChargedParticleLeon, the project I was referring to is this one though I can’t seem to find any code:

There is also this one on hackaday.