Electronics > Microcontrollers

Power and data thru 2 wires?

(1/7) > >>

Erwin Ried:
Hey! There is a chance to transfer power and bidirectional data thru only 2 cables between 2 microcontrollers? I remember the times with analog phones where you had only 2 wires and the phone had a screen and it was certainly bidirectional.

In my imagination I can see like 2 atmegas microcontroller, you use 6 to 4V and some kind of converter to logic levels (like mapping it to 3.3-0V range) for the RX, a 3.3V regulator for the power and the same line with a step up-DAC circuit as TX with some kind of protocol (to avoid collisions) but sounds fairy complex to do. Someone knows a simpler approach?

I am making several DIY stuff I want to control (2 home made electric courtains, 1 global remote control, 1 coil in the power panel to measure the consumption of the house for now), so instead of using ethernet cable maybe I can use ultra thin and cheap phone cable for everything and a 1 dollar attiny in the end :D

Any hint?

IanB:
Well, sure. Power and data over two wires is exactly what telephone circuits do.

You put a DC voltage on the wires to provide power, and then you superimpose a small AC data signal on top for communications.

At the downstream end you can use a filter and regulator to draw clean power for the microcontroller, and separately read and demodulate the data signal for your commands. If you want bidirectional I think you can either use two different carrier frequencies for send and receive or you can use a protocol method where sender and receiver cooperate by using assert/free commands (a bit like speaking over a radio where you say "over" when done).

NiHaoMike:
A rather easy way to do it that doesn't require any Tiffany Yep DSP tricks is to put a DC voltage (like 12V) on the line through an impedance and switch in a current sink (with a current much larger than the total demand by the nodes) to transmit. Then use comparators to receive and detect collisions (if two current sinks switch on, the voltage would be abnormally low) and use the UARTs built into the microcontroller to interface to the bus.

Erwin Ried:

--- Quote from: NiHaoMike on August 04, 2012, 04:56:34 am ---A rather easy way to do it that doesn't require any Tiffany Yep DSP tricks is to put a DC voltage (like 12V) on the line through an impedance and switch in a current sink (with a current much larger than the total demand by the nodes) to transmit. Then use comparators to receive and detect collisions (if two current sinks switch on, the voltage would be abnormally low) and use the UARTs built into the microcontroller to interface to the bus.

--- End quote ---

in terms of components, what should  I use to do  a "current sink"? I don't quite understand what you wrote  :(

SeanB:
Simplest is a resistor and a switching transistor to give the increased current pulse.  You supply the circuit via a resistor and use the voltage across the supply resistor to feed the comparator.

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version