PDA

View Full Version : Serial comms on VCC line



MegaADY
- 23rd November 2005, 13:41
Hello ! I have a little problem. I have two devices interconected by two wires ( the power lines GND and +5V ) and I have to transmit small ammount of data between them. I must not use rf modules. The cable length is 2 metters. In fact the master device poewres the slave. I have to put a PIC in the slave and send some data to a PIC in the master device using the +5v line. I thought about poewring the slave device with 9 volts ( and inside the slave to pass the voltage through 7805 ). Before 7805, in the slave, to put a transistor, and in the master device, on the power line, another transistor,In this way, I think I can modulate somehow the voltage, and, using a kind of Manchester coding scheme, .... to solve somehow the problem. This is just a theoretical ideea. Does anyone have another ideea ? Or do you think that my ideea might work ? Any schematic would beHIGHLY apreciated ).
Thank you very much for your time.

Melanie
- 23rd November 2005, 16:59
I did explain the theory and operation on this thread...

http://www.picbasic.co.uk/forum/showthread.php?t=1761

Schematic appended.

Kamikaze47
- 23rd November 2005, 17:09
i can draw you a circuit diagram that should work, but just to clarify that this is what you want to do:

power the slave pic via the master pic with a +ve and ground wire
transmit data from the master to the slave via those wires
no transmission from the slave to master (one way from master to slave only)

is that right?

keithdoxey
- 23rd November 2005, 18:47
I did explain the theory and operation on this thread...

http://www.picbasic.co.uk/forum/showthread.php?t=1761

Schematic appended.

Hi Melanie,

I just took a look at the thread you referenced and got a strange feeling of Deja Vu.

Reading the start of the thread I got the feeling I had read it before, then I realised.

Both threads were started by the same person asking exactly the same question (apart from one extra sentence)!

Aside from that, can I ask how you remember what you have typed before and in what thread. I know you are a dab hand with the search function but remembering which of your post is which is a pretty impressive feat!

Melanie
- 23rd November 2005, 19:39
Ah... in this case it was easy...

MegaAdy earlier today asked me for a schematic off-list reminding me of that thread... as I was about to reply I noticed he had posted the question again on-list as well, so I posted the schematic publicly. So no great feat of mental prowess in this instance... and all this from a girl who mislays her car keys a dozen times a week!

Kamikaze47
- 23rd November 2005, 19:55
Just looking at that schematic, it may be necicary to note that you will get a voltage drop accross the R1 resistor as well as a voltage drop across the diode. You would want to make sure the voltage getting to the slave pic is sufficient.

As for the large capacitor, you can get 5v, 0.047F (or 47000uF) caps. They are small, quite cheap, and will maintain power for your PIC for a number of seconds.

Luciano
- 23rd November 2005, 19:57
Don't worry Melanie, we can fix your car keys problem...

http://www.iua.upf.es/~berenguer/cursos/interact/android.jpg

Melanie
- 23rd November 2005, 21:17
Surgically implanted obviously! Great idea. Now all I got to do is get all the locks in my life changed to be chip proximity activated.

Kamikaze...

The Voltage drop across R1 will be negligible once C1 has charged since the micropower PICs draw only a few uA. However I do have issue with Caps that size... they'll take forever to charge and the voltage rise-time at the Slave end will be so slow that the PIC will not initialise for the best part of a minute! Just work out the CR time constant!

keithdoxey
- 23rd November 2005, 22:29
Ah... in this case it was easy...

MegaAdy earlier today asked me for a schematic off-list reminding me of that thread...

You disappoint me Melanie :(

After all those superb code examples, I thought you had some magical formula for finding previously written information




So no great feat of mental prowess in this instance... and all this from a girl who mislays her car keys a dozen times a week!

Good to know you suffer from the same problems as the rest of us. :)

I have lost count of the number of times I have put down a screwdriver and two minutes later when I go to pick it up it isnt there!

Nice solution to the problem BTW. My initial thoughts were for a choke at each end and use a carrier to modulate a tone onto the power rail. Much higher component count and cost.

Regards

MegaADY
- 24th November 2005, 08:33
Thank you for schematic Melanie ! You were right, I posted this question some months ago. You didn't understand my setup here. So, once again,
I have two devices ( not pics ). A master device, and a slave device that get power from the slave (5v, 3-400 mA ). Now, I want to put a PIC in the slave device which should send to the pic I put in the master device a few bytes ( 1200 baud ). The problem is the power consumption of the slave ( 4-500mA). And I can not use too big caps like ... 4700u@25v. I can not test the schematic right now, but I got the ideea. But do you thing it will work in the context I explained you ? The power on that slave device ( and the transmitting pic also ) should be kept as close as it can to 5V. Thank you .

Melanie
- 24th November 2005, 08:51
If your Slave device is power hungry, then the only way is to modulate a signal onto the Power Supply lines as suggested by Keith. The schematic I've posted would not be appropriate in that instance.

MegaADY
- 24th November 2005, 08:57
:( hm ... can you please be more specific ?

Kamikaze47
- 24th November 2005, 10:09
I dont think you can even use the modulation technique in this instance because its the slave device he wants sending the data (i.e. the device that doesnt have a power supply).

You can use the mondulation technique if you were transmitting data from the master to the slave, but not slave to master.

If you already have 2 wires between the 2 devices, whats so hard about running a 3rd wire for data?

MegaADY
- 24th November 2005, 10:23
You got the point ! That's why I thought it might not work ! Although, someone did it, I don't know exactly how... Forget the 3rd wire...I just can not use more than 2 wires :)

keithdoxey
- 24th November 2005, 11:12
I dont think you can even use the modulation technique in this instance because its the slave device he wants sending the data (i.e. the device that doesnt have a power supply).

You can use the mondulation technique if you were transmitting data from the master to the slave, but not slave to master.

If you already have 2 wires between the 2 devices, whats so hard about running a 3rd wire for data?

I beg to differ.

The data would be used to turn on and off a carrier which would become an AC signal. This can be superimposed on top of a DC signal quite easily.

It doesnt matter which direction power or data are heading. They simply use the same piece of wire as their connection.

A phantom powered electret microphone effectively does what is requested here. Power is fed from the mixer (MASTER) whilst the audio (or Data) is fed along the exact same wires by the Microphone (SLAVE).

See attached diagram for how data and power would be connected. I havent draw the modulator and demodulator as I dont have a suitable design to hand but generating the signal could be as easy as running the PWM on the SLAVE PIC ad using a transistor driven the the TX data pin to modulate it. At the MASTER end you would need a circuit to detect the carrier and provide a logic level to drive the RX data pin on the Master Pic.

The inductors allow DC power to pass but block the AC carrier so that PSU compoments dont attenuate the carrier.

The capacitors allow the AC carrier to pass but block the DC supply voltage.

Melanie
- 24th November 2005, 11:17
No, it's irrelevant which end is supplying the power and which end is transmitting the data. Quickly, for example as I'm under pressure at the moment...

Slave is a 16F628 (building block of the modern world!). HPWM an output at say 40kHz... hardware cross-connect that back into one input of one of the on-board comparators. Take Hardware Serial out of USART or Software Serial out of any other pin. Hardware cross-connect that into your other Comparator Input. Take Hardware comparator output pin via Capacitor onto your Supply Line (yes, the supply will need a blocking choke). This will then transmit your modulated data signal back to the Master end. At the Master end, take via a Capaitor (PSU will need a blocking choke as well) into a demodulator (which if you chose the values correctly could be as simple as a Diode and a Capacitor), take it's output into USART or Software Serial pin. In it's raw basic form it's not exactly going to pass EMC specs but who cares anyway! It's not noise immune either, but repeat the data five times with a check-digit. Anyone with a problem with this concept, go read basic AM radio theory.

sougata
- 24th November 2005, 18:40
Hi there,

Can you please specify the following :

1. Does the slave consumes a fairly constant current ?

2. What is the baud rate required ?

3. Repetition rate of communication ?

4. Multi-Master / Multi slave needed ?

5. Exact scenario or implementation ?

6. Are you seriously involved or just a casual thread ?

Regards
Sougata

Luciano
- 25th November 2005, 10:57
Hi,

See these links.

DC-BUS transceivers

http://www.yamar.com/index.html
http://www.yamar.com/products.html


Reduced Cable Smart Motors Communicating Over the DC Power Bus-Line

http://darbelofflab.mit.edu/ProgressReports/HomeAutomation/Report3-3/No3-3%20Report%208.pdf

Best regards,

Luciano

NavMicroSystems
- 25th November 2005, 18:05
Luciano,

thanks for the yamar links!

I have requested the full datasheets.
Samples will not be available befor end of Feb.

What I can tell so far is:
It is not going to be a cheap solution and will require some PCB space as there is quite some external components required.
(It's not the "single-chip" solution I was hoping it was)

So for MegaADY this is certainly some sort of overkill if he has to transfer just a "few" bytes at "low" speed over a "short" distance.

BTW.
How do you collect all those links?
Are you searching the web all day?
;-)

Luciano
- 25th November 2005, 18:47
Ralph,

My Internet digging machine has returned one more link.

SSC P485 PL Tranceiver IC

http://www.intellon.com
http://www.intellon.com/products/ssc/p485.php
http://www.intellon.com/pdfs/SSCP485PL_Technical_Brief.pdf
http://www.intellon.com/pdfs/SSCP485_Ref_Design.pdf
http://www.intellon.com/products/ssc/P485.zip

My Internet digging machine:
http://www.kazimages.com/uploads/9370e41a0e.jpg

Best regards,

Luciano

NavMicroSystems
- 25th November 2005, 18:53
And I have digged out THAT one (http://www.maxim-ic.com/powerline.cfm) in addition.

NavMicroSystems
- 25th November 2005, 18:58
Ralph,

My Internet digging machine has returned one more link.

Luciano

and where did you find that image?

I know those machines, we have some of them in our neighbourhood, but they dig for coal, I'm not sure they can be configured to dig for information.

;-)

Luciano
- 25th November 2005, 20:26
Hi,

The cable length is 2 meters.
I know that it was already asked, but why not a new cable with 3 or more wires?
Can you describe the purpose of the devices?

Luciano

Luciano
- 26th November 2005, 10:04
Is that the power line of a credit card reader?

Also in this forum you have started another thread
about "PicBasic text compress routine".
The format of the data is similar to the TRACK 2 of a credit card.

Thread about "PicBasic text compress routine"
http://www.picbasic.co.uk/forum/showthread.php?t=2813

I hope I am wrong.

Luciano