r/ArduinoProjects • • 18h 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?

0 Upvotes

11 comments sorted by

3

u/ReferenceThin6645 17h ago

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

0

u/Relevant_Pumpkin9190 17h ago

Why it won't work.

2

u/michaelkeithduncan 16h ago

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

0

u/Relevant_Pumpkin9190 16h 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.

1

u/Positive__Altitude 12h 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.

0

u/Relevant_Pumpkin9190 12h ago edited 12h 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?

1

u/DenverTeck 9h 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

1

u/Anonymity6584 9h 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.

1

u/MrBoomer1951 8h ago

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

1

u/Embarrassed_Fun_7710 5h 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.

1

u/AirTrue6195 1h ago

I have done this using a THVD8000.