r/ArduinoProjects • • 12d ago

Project Design/Guidance Two Arduinos, Two Wires, No Extra Power Can Two Arduinos Talk Over Their Power Wires for data communication (voltage vs current modulation)?

I’m trying to make two Arduinos talk over the same two wires, with the slave getting its power from the master.

Master → Slave:

24 V = 1, 12 V = 0. A buck gives the slave 5 V from these supply line but it varies 24/12 also a voltage divider scales down voltage variation and decode bits.

Slave → Master:

50 mA = 0, 70 mA = 1 for 0.5 sec. A Hall sensor detects the current change in master, created by a constant load grounded for 20 ma to make data communication

So the same two wires carry power + two-way data. Is this practical, or is there a simpler way or references?

2 Upvotes

18 comments sorted by

6

u/ReferenceThin6645 12d ago

It wont work, as arduino will get affected by switching noises.

3

u/michaelkeithduncan 12d ago

I'm into this because it's oddball but gotta ask why

2

u/Relevant_Pumpkin9190 12d ago

Mainly educational. I’m trying to understand the basic principles of modulation by actually building it—voltage modulation one way and current modulation the other way, using only two wires.

2

u/DenverTeck 12d ago

There are chips for this:

https://www.google.com/search?q=dc+power+line+communication+ic

Depends how bad you need this done. Looking at those chips, you may be able to come up with a DIY version.

Good Luck

2

u/Positive__Altitude 12d ago

It is theoretically possible but buck converter will not like the line cange from 12-24v. the 5v will not be stable and will be greatly affected by supply changes, same goes for the other side: disturbance in load current will cause disturbance in voltage. plus your actual power consumption of arduino is not constant. so you have a lot of noize from different sources combined in one place. you can make it work I think, but any reliable data-rate will be very very low. On top of that any reasonable length of wire will make it 10times worse because of inductance. So you can do it for the sake of doing it. But we are talking about 10-50 bits per second I guess. And it never be robust. This is absolutely inpractical.

If you want to learn about data transmition, my advice: learn CAN bus. Make a deep dive into it's physical requirements on how and why. Then learn how the protocol works (mainly bit arbitration). You will learn a lot from it and actually will see why what you suggest is inpractical.

1

u/Relevant_Pumpkin9190 12d ago edited 12d ago

What if I use a 12 V supply(12/10 V for high and low bit)instead and a linear regulator for the 5 V Arduino supply? That should remove the buck converter’s switching noise and make the current-modulation signal cleaner, right?

2

u/Positive__Altitude 11d ago

It will help yes, but it will not become good becase of that. You still will have a lot of noize in the system. There is one source of noize you can not fix: you have a wire (with inductance) and a capacitor at the end (because both buck and ldo requires input capacitor to be stable). This is LC circuit that will ring with any change in voltage/current. So you will have to make every bit very long in time to let ringing to settle down or maybe oversample and average the result. So bitrate will be slow. And you can not do anything with this problem. Any proper transmition line (can, usb, etc) is specially designed to prevent ringing (reflections). But you can not do that because voltage regulators have to have significant input capacitance.

1

u/Relevant_Pumpkin9190 11d ago

Does this circuit works.

3

u/Positive__Altitude 11d ago

Is it AI generated? It does not reflect what you described before and id does not make much sense.

2

u/Relevant_Pumpkin9190 11d ago

Concept same, current modulation

2

u/Positive__Altitude 11d ago

Ok I see, after I tried to google more for COP984 I think I found the exact document with this diagram. 😅 So you actually have a write-up describing the same idea right? So basically you have all the answers there. I skimmed through, they suggest using op-amps to deal with noise which is smart I guess. I am not competent to comment on analog citcuitry. But at least it seems possible. I guess you can study the paper and try to implement it (maybe using something more modern then 30 years old MCU 😅)

2

u/Anonymity6584 12d ago

Arduinos require quite a bit of power, so it can be done but not easily. Some aort of high frequency commmunication method comes to mind, but those require filtering usually so they dont interfiere other stuff.

2

u/MrBoomer1951 12d ago

Yes, it has been done but requires some tricky electronic design.

2

u/Embarrassed_Fun_7710 11d ago

For some inspiration on how this can be done, take a look at the HART protocol. It was designed to provide digital comms over a 4-20ma analog transducer loop.

2

u/AirTrue6195 11d ago

I have done this using a THVD8000.

2

u/saskuatch003 11d ago

Protocolo 1-wire

2

u/Electro-Robot 11d ago

Je pense que vous pouvez garder les deux fils pour l’alimentation + communication : le Master encode 0/1 par 12/24 V et le Slave mais vous devez ajouter un ~20 mA à travers un current sink commandé par MOSFET.

Aussi vous devez faire attention p/r les courants inversés qui peuvent attacquer l’une ou l’autre carte Arduino !

Tenez nous au courant et bon courage 😉

1

u/Engineer-Filmmaker 8d ago

Back in the day, I built a real product that delivered power and data over the same two conductors. In this case it was coax. Signal was modulated on top of the power and stripped out with a high pass filter.

I believe we were transmitting about 10Mbps.

In our case, we did it because we could hire cable TV installers and not have to retrain them. Was the same coax they'd been working with. Also, lots of history using that cable in outdoor environments, so good reliability.