Serial comms on VCC line


Closed Thread
Results 1 to 24 of 24
  1. #1
    Join Date
    Jun 2004
    Posts
    43

    Unhappy Serial comms on VCC line

    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.

  2. #2
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    I did explain the theory and operation on this thread...

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

    Schematic appended.
    Attached Images Attached Images  

  3. #3
    Join Date
    Nov 2005
    Location
    Perth, Australia
    Posts
    429


    Did you find this post helpful? Yes | No

    Default

    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?

  4. #4
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Melanie
    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!
    Keith

    www.diyha.co.uk
    www.kat5.tv

  5. #5
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    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!

  6. #6
    Join Date
    Nov 2005
    Location
    Perth, Australia
    Posts
    429


    Did you find this post helpful? Yes | No

    Default

    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.
    Last edited by Kamikaze47; - 23rd November 2005 at 19:59.

  7. #7
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    Don't worry Melanie, we can fix your car keys problem...


  8. #8
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    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!

  9. #9
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Melanie
    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


    Quote Originally Posted by Melanie
    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
    Keith

    www.diyha.co.uk
    www.kat5.tv

  10. #10
    Join Date
    Jun 2004
    Posts
    43


    Did you find this post helpful? Yes | No

    Default

    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 .

  11. #11
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    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.

  12. #12
    Join Date
    Jun 2004
    Posts
    43


    Did you find this post helpful? Yes | No

    Default

    hm ... can you please be more specific ?

  13. #13
    Join Date
    Nov 2005
    Location
    Perth, Australia
    Posts
    429


    Did you find this post helpful? Yes | No

    Default

    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?

  14. #14
    Join Date
    Jun 2004
    Posts
    43


    Did you find this post helpful? Yes | No

    Default

    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

  15. #15
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Kamikaze47
    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.
    Attached Images Attached Images  
    Keith

    www.diyha.co.uk
    www.kat5.tv

  16. #16
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    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.

  17. #17
    Join Date
    Feb 2005
    Location
    Kolkata-India
    Posts
    563


    Did you find this post helpful? Yes | No

    Red face May I know the exact application

    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

  18. #18
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    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/Progress...Report%208.pdf

    Best regards,

    Luciano

  19. #19
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762


    Did you find this post helpful? Yes | No

    Default

    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?
    ;-)
    regards

    Ralph

    _______________________________________________
    There are only 10 types of people:
    Those who understand binary, and those who don't ...
    _______________________________________________



  20. #20
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    Last edited by Luciano; - 26th November 2005 at 02:01.

  21. #21
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762


    Did you find this post helpful? Yes | No

    Default

    And I have digged out THAT one in addition.
    regards

    Ralph

    _______________________________________________
    There are only 10 types of people:
    Those who understand binary, and those who don't ...
    _______________________________________________



  22. #22
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Luciano
    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.

    ;-)
    regards

    Ralph

    _______________________________________________
    There are only 10 types of people:
    Those who understand binary, and those who don't ...
    _______________________________________________



  23. #23
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    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
    Last edited by Luciano; - 26th November 2005 at 02:19.

  24. #24
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    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

Similar Threads

  1. Serial Comms through TX/RX pair jumbled
    By altech6983 in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 28th July 2009, 21:04
  2. Loop with two motor and 2 sensors
    By MrRoboto in forum mel PIC BASIC
    Replies: 4
    Last Post: - 8th December 2008, 23:40
  3. Some comments on serial comms please.
    By muddy0409 in forum Schematics
    Replies: 1
    Last Post: - 15th June 2007, 09:53
  4. having problems with Hantronix 20x4 lcd
    By Rhatidbwoy in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 22nd December 2005, 12:22
  5. One wire serial comms on +5V line
    By MegaADY in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 21st May 2005, 12:49

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts