What I am trying to do is to digitally send a signal through a cat5 cable. I wan't to send it digitally so people can't just come along and put a voltage on the wires to activate the circuit. I would like the signal to come from the main control board. Thanks.

  • 1
    \$\begingroup\$ Requirement? Data rate? Latency? Cost? Power consumption? \$\endgroup\$ – user3528438 Sep 24 '17 at 23:00
  • 1
    \$\begingroup\$ You mention "electrical current" and "Ethernet" in the same sentence. Does this mean you are using PoE, even though you didn't mention it? Is Ethernet really involved at all, or are you just talking about an Ethernet cable e.g. CAT5 cable with RJ45 connectors? I recommend that, to avoid confusion, you supply a clear and complete block diagram showing the various devices in your system, the interfaces between them, the various cables involved and all power sources. \$\endgroup\$ – SamGibson Sep 24 '17 at 23:06
  • \$\begingroup\$ I have added an image to show what I want to do. \$\endgroup\$ – TheTrialBot Sep 24 '17 at 23:47
  • 1
    \$\begingroup\$ What are you trying to "secure" here, and from whom? \$\endgroup\$ – duskwuff -inactive- Sep 25 '17 at 0:42
  • \$\begingroup\$ @TheTrialBot - Thanks, although the diagram doesn't answer all of my questions, I've suggested an approach which fits the info given. FYI, you said: "I want to send an electrical current to it via Ethernet" but actually it is now clear that Ethernet (the low-level protocol) is not part of your system - CAT 5 cable (often used for Ethernet, but also other interfaces) is the only slightly Ethernet-related technology involved. Therefore I recommend that you re-word the question to avoid people being misled by the mentions of Ethernet, when I think you mean to say just "CAT 5 cable" or similar. \$\endgroup\$ – SamGibson Sep 25 '17 at 2:44

Depending on your skills, budget and time schedule, then anything we suggest might be too complicated, expensive or time consuming etc. for you to use in your design. However I'll mention one technology which fits your stated desire to "send some bytes" through the cable, to operate the lamp attached to the "Main Box".

You could use the Holtek HT12E (encoder) and HT12D (decoder) to send a coded data stream along the CAT 5 cable. Obviously you would use a matching address selection (effectively that is your code) on both the encoder and the decoder.

Often the HT12E and HT12D are used for wireless links e.g. IR or wireless via OOK modulation modules. However, the "data out" pin of the HT12E encoder can be directly connected to the "data in" pin of the HT12D decoder.

The encoder would be in your "Portable Box", and the switch which you showed would need to also be either fitted to, or at least connected to, that box in order to trigger the encoder to send its coded data stream. A power source would either be in the "Portable Box" or power could be sent to the "Portable Box", along dedicated wires in the CAT 5 cable, from the "Main Box".

In the "Main Box" would be the decoder and, depending on the type of lamp, the exact behaviour desired (e.g. if the light should stay on only when the switch is operated, or whether it should "latch on" for some period etc.) and the power source you provide, then some ancillary components may be needed between the decoder and the lamp.

As a minimum, even if your "Portable Box" contained its own power source for the HT12E encoder, there would need to be two wires used in the CAT 5 cable - the "data wire" linking the encoder and the decoder, and a shared Gnd reference between the two boxes. If the power for the "Portable Box" was coming from the "Main Box", then another wire in the CAT 5 cable would need to be dedicated to that.

Depending on the length of the wire and therefore its capacitance, you would likely want to choose a slow oscillator frequency for both the encoder & decoder, as the data waveform will be distorted by the effects of the cable capacitance.

It might become necessary to add a differential driver (at the encoder) and receiver (at the decoder) - e.g. RS-422 or RS-485 - to increase the reliability of the data reception.

If someone can open either box, or can attach an oscilloscope or logic analyser to the cable, then the code can be discovered & defeated. However within the limit of "not expensive" then this approach is something to consider.

(There might be other encoder/decoder device pairs which are also suitable - I suggested that pair as they are well-known & have public datasheets.)

| improve this answer | |
  • \$\begingroup\$ I edited my question to make it more relevant \$\endgroup\$ – TheTrialBot Sep 25 '17 at 5:10
  • \$\begingroup\$ @TheTrialBot - Thanks; so at the moment you have two answers which fit the details currently given in the question. If those answers are giving you what you need, then great - upvote / accept whichever is "best" for you. If those answers are not giving you what you want, then update your question to add more details and to explain what else you are asking for. Also I recommend that you update your question, to answer the comments by duskwuff and user3528438, as your answers might reveal important details. \$\endgroup\$ – SamGibson Sep 25 '17 at 12:44

You don't want to actually use Ethernet signalling, just use the cable (unless you have some other requirement for Ethernet signalling)

Some simple serial scheme between minimal microcontrollers would work. Annoyingly propriety laptop supplies sometimes do this.

Note that short of a cryptographic scheme it can be reverse engineered easily.

On the simple end, require a known resistor much smaller than the cable resistance to be on an extra wire, or require pulses at a specific rate.

| improve this answer | |
  • \$\begingroup\$ Do you have a diagram or something like that? \$\endgroup\$ – TheTrialBot Sep 24 '17 at 23:26
  • \$\begingroup\$ In the likely implementations it would be mostly software running on whatever low-end MCU you think would be the best combination of effort and unit cost. \$\endgroup\$ – Chris Stratton Sep 24 '17 at 23:27

Not the answer you're looking for? Browse other questions tagged or ask your own question.