Polarity Insensitive Serial Comms

Go To Last Post
58 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Suppose I have a data-link that can be connected such that the incoming signal can be either polarity, ie idle line is high or low. And that I have no control over which way the connection is made. What would be my best choice of encoding for the data?

 

I don't need much more than 5000 bits/second.

 

One way would be to have an AVR with two USARTs, one of which has an inverter in the data line, and use the one which doesn't show errors. Or Manchester, or NRZI, but those both need extra hardware to receive. I'd like to keep the hardware simple if I can. My data rate is low enough that I could concoct something using pulse-width as a bit value indicator.

 

Thoughts?

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Brian Fairchild wrote:
two USARTs, one of which has an inverter in the data line

Or, if you don't have 2 UARTS, have an XOR gate instead of the inverter - and switch it between inverting & non-inverting ?

 

Could you do something with the configurable logic on some AVRs ?

 

I think there might be some microcontrollers with a configurable-polarity UART?

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Brian Fairchild wrote:
Or Manchester,
Biphase-level is polarity dependent.

Brian Fairchild wrote:
My data rate is low enough that I could concoct something using pulse-width as a bit value indicator.

 

Thoughts?

FSK?

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

"Dare to be naïve." - Buckminster Fuller

Last Edited: Tue. Dec 7, 2021 - 08:15 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Manchestor on github: https://github.com/goldsborough/...

 

 

FF = PI > S.E.T

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Full wave rectify with a schottky bridge into an opto-isolator?

 

Edit: would only work with single ended signal.  True differential would be a no go.

Letting the smoke out since 1978

 

 

 

 

Last Edited: Tue. Dec 7, 2021 - 06:44 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Biphase mark (or space). It's polarity and to some extent (a factor of ten or so) speed independent. An external xor gate simplifies decoding but is no means essential, particularly if you have a polarity-changeable interrupt.

 

https://www.avrfreaks.net/forum/...

 

Neil

 

Edited to add: works best with continuous signal, so fastest with synchronous data and filler bytes, but this isn't necessary: you can easily send the data as if it were a normal idle-high UART signal, and decode with a software UART.

Last Edited: Tue. Dec 7, 2021 - 06:09 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

such that the incoming signal can be either polarity, ie idle line is high or low

You request doesn't quite make sense....if you are making code for both ends (manchester, spi, pwm, whatever)  wouldn't you control the polarity?  Why/how would it change?  Is there a possibility of an inverting  buffer box being used?

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Brian Fairchild wrote:

... Or Manchester, or NRZI, but those both need extra hardware to receive. I'd like to keep the hardware simple if I can. My data rate is low enough that I could concoct something using pulse-width as a bit value indicator.

Thoughts?

 

What is your clock accuracy ?

 

Maybe look at  Single Edge Nibble Transmission ?

 

Addit: https://en.wikipedia.org/wiki/SENT_(protocol)

This can be decode polarity agnostic, the shortest time edge-edge is always the sync or pulse, and the 'other' longer time is the data.

The shorter first allows auto-baud so it should tolerate even a RC OSC.

 

Last Edited: Tue. Dec 7, 2021 - 10:56 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

avrcandies wrote:

such that the incoming signal can be either polarity, ie idle line is high or low

You request doesn't quite make sense....Why/how would it change? 

 

Non-polarised connectors on the interconnecting cable. 

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Non-polarised connectors on the interconnecting cable. 

I was worried your original post wasn't accurate.  The logic is not changing. You are talking about suddenly receiving a negative voltage.

 

0=0V   1=5V    becomes   0=0V   1= -5V

 

That is something much different  ...here a "low" is still "low"

 

Is this reflecting your situation?

 

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

As you were with an XOR gate in the data line but use a spare I/O driving the other input to control whether to invert or not, Send some known pre-amble to determine the polarity and set the polarity inversion signal accordingly.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Brian Fairchild wrote:
Non-polarised connectors on the interconnecting cable. 

Brian Fairchild wrote:
Or Manchester, or NRZI, but those both need extra hardware to receive.

either spend the money on polarized connectors or the h/w on the receive side, seems this is a three legged decision tree again, Good/Cheap/Fast, pick two, you can't have all three...... it seems your going for cheap/fast /= good

 

Jim

 

 

FF = PI > S.E.T

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Is there an idle time that is long enough to identify unambiguously that it is the idle? For example, if start conditions immediately follow stop (with no more than 1 bit time between), then, with async serial, you cannot tell idle from possible valid characters. This would push you to some coding that is inherently polarity insensitive. One of many possible transmission methods that might satisfy this is AFSK (though a bit difficult at 5Kbyte/second and which would likely require additional hardware at each end). 

 

I am, I admit, a bit puzzled about the fixation on an unpolarized connector. Is it because of legacy equipment? If so, do you have a way to modify the encoding used by that legacy equipment? To me, updating firmware in legacy equipment in the field has always been much harder and more costly than replacing a bit of hardware, like a connector, that any journeyman industrial "mechanic" could handle. I spent 15 years in the security industry so I've dealt with similar challenges. The only trick is finding a connector that is simple enough to install in the field without many tools besides a hammer and a pair of channel-locks. They ARE out there!

 

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you use a full wave Schottky bridge it won't matter which way you plug in (assuming you have enough voltage margin)*.  Again, you need to be clear stating logic polarity vs voltage polarity.

 

Now a larger concern is if your reverse the polarity of the connections, you may form a gnd short, if one gnd is not connected to the other gnd (if both lines are not floating with respect to the endpoints).  If either unit is completely floating, there certainly is no issue.  A battery power unit might float, if there are no non-isolated connections to anything externally grounded.

Would help to describe your exact hardware situation!

 

* however that is not giving bidirectional communications, if needed.

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

Last Edited: Tue. Dec 7, 2021 - 09:13 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 2

Morse Code.  Send the signal as alternating current - AC, and use OOK signalling.  S.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

I think there might be some microcontrollers with a configurable-polarity UART?

Including the latest AVRs (mega-0, xTiny, AVR-Dx), which have a per-pin "Invert Enable" that takes effect in between peripherals (if any) and the actual pins.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you claim that both grounds are not connected, we have a security issue. Solution is an opto-coupler, or transformer and xxx protocol.

 

Evitata Charybdi in Scyllam incidi I am affraid.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If using an opto-isolation, an input bridge can be eliminated by using two opto-isolators - reverse paralleled input LEDs with paralleled outputs. That will catch either input polarity.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Brian Fairchild wrote:
Non-polarised connectors on the interconnecting cable. 

Why would you do that?

 

If you have to, could you make the connector symmetrical - so the polarity doesn't  change with changed orientation ?

 

eg, a 3-pin header:

  • centre = GND;
  • both outside pins are signal.

 

 +-------+--------> signal
 |       |
 |       |
 O   O   O
     |
     |
     +------------> GND

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

awneil wrote:
have an XOR gate instead of the inverter - and switch it between inverting & non-inverting ?

N.Winterbottom wrote:
an XOR gate in the data line but use a spare I/O driving the other input to control whether to invert or not, Send some known pre-amble to determine the polarity and set the polarity inversion signal accordingly.

Yes - that!

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

awneil wrote:
Yes - that!

 

Not that.

 

We do not know how the remote device is powered and is it grounded, and if any one is grounded. Security issue it is.

 

So, XOR is possible only on battery operated remote. It means a smd device and a logic to make it usable, for what- going to be a nightmare of design.

 

All so far seems to be the hardware to software foul-play.

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well, the OP spoke specifically about feeding this signal into UART pins - if it can be safely fed into a UART pin, then the XOR approach will work.

 

EDIT

 

Of course, if the original idea of feeding UART pins is flawed, then that exact same flaw will apply to the XOR approach.

 

Or, if the original idea of feeding UART pins assumed some "input conditioning" to get the signal into a suitable form for UART pins, then that same conditioning would be required for the XOR approach.

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Wed. Dec 8, 2021 - 11:02 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

barnacle wrote:

Biphase mark (or space). It's polarity and to some extent (a factor of ten or so) speed independent. An external xor gate simplifies decoding but is no means essential, particularly if you have a polarity-changeable interrupt.

 

Interesting. Thanks. Will have a good read.

 

Who-me wrote:

Maybe look at  Single Edge Nibble Transmission ?

 

Also interesting, thanks.

 

N.Winterbottom wrote:

...Send some known pre-amble to determine the polarity and set the polarity inversion signal accordingly.

 

That would work, and is nicely KISS.

 

ka7ehk wrote:

I am, I admit, a bit puzzled about the fixation on an unpolarized connector. ...

 

Let's just go with the fact that's it's part of the design specification.

 

avrcandies wrote:

...you may form a gnd short, if one gnd is not connected to the other gnd (if both lines are not floating with respect to the endpoints).  If either unit is completely floating, there certainly is no issue.

 

Not an issue. The unit is completely floating and there is no chance of any contact with 'ground'.

 

awneil wrote:

Why would you do that?

 

As mentioned above, it's part of the design specification as an absolute requirement. You'll have to trust me on that.

 

 

grohote wrote:

We do not know how the remote device is powered and is it grounded, and if any one is grounded. Security issue it is.

 

Not grounded, or any danger of it being grounded.

 

 

Thanks for all the suggestions so far. Lots of external links to read.

 

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Brian Fairchild wrote:

Suppose I have a data-link that can be connected such that the incoming signal can be either polarity, ie idle line is high or low. And that I have no control over which way the connection is made. What would be my best choice of encoding for the data?

 

I don't need much more than 5000 bits/second.

I do not know how you will power the remote device, but I am about to know what to do with RX data.

 

Basically, all you need is the input signal re-generator. You can feed one pin with Input, have both-edges interrupt and then on interrupt produce Output signal by simple sbi PIN action. If an input interrupt is silent for more than 3ms, then Output should go high. Output pin is connected to real RXD.

 

If the 200us interrupt is too costly, or you can not meet USART demands- you may use ATtiny13, this is the perfect device for a precise regeneration.

 

 

Last Edited: Wed. Dec 8, 2021 - 01:45 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Perhaps no interrupt is necessary, I just guess that Timer0 with T0 and clever OCR setting and Output on OC0 can do it.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Incidentally, if you're willing to 'hit it hard enough', you can send the power along with the signal.  Just put a little AC on as 'line idle', and transform'n'rectify it into useful DC at the far end.  There will be inefficiencies (thus the 'hit it hard enough' bit) - but do you care?

 

There's a little ecosystem of sensors that do that.  I think they're called 'One-Wire', and yes, they get their power on the signal line (although they do need ground of some sort or other).  S.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

A bridge use proposed in #6 and #15 can do it all, both power and line polarity. The pullup resistor is at the Master, bridge at remote side, and the device can suck a few mAmps from the Data line (another diode and elco necessary), and operate it with Open collector driver.

 

This, of course is solution only IF the remote can be modified. Wish we can know all requirements for serious discussion.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Brian Fairchild wrote:

What would be my best choice of encoding for the data?

 

I don't need much more than 5000 bits/second.

 

One way would be to have an AVR with two USARTs, one of which has an inverter in the data line, and use the one which doesn't show errors. Or Manchester, or NRZI, but those both need extra hardware to receive. I'd like to keep the hardware simple if I can.

5Kbps Is easy to handle with USART. Manchester sling with NRZI used to handle above 19K2bps and yes,need extra hardware.Personally I design usart with 28K4 transmission and successful but no ordinary radios able to handle above 9K2bps.Then I just connected between two terminals plus that 2 modems

www.tokopedia.com/madagang .Buy and Donated cheap electronics and manuscripts.

Last Edited: Thu. Dec 9, 2021 - 02:52 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I skimmed through this thread, and saw nothing mentioned by the OP that the remote device is to be powered by the opposite side.  I also saw nothing to lead me to believe that this is bi-directional data so my misguided thoughts shall focus on a two wire, unidirectional interface.

 

As ghrote mentioned an optocoupler would be the ideal solution.

 

This one:

https://www.mouser.com/ProductDe...

 

Can support up to 10MBaud so thats way over the range needed for the project and had the ability of non polarised input with the back to back LED's in the input stage.

 

Digikey had another one that supported up to 10KBaud, but I am having a tough time finding it and it was darlington output not logic.

 

So, if the non polarised connector is simply feeding SIGNAL, and SIGNAL COMMON, go with Ghrotes suggestion and you should be good to go.

 

Now, if your data is bi-directional and the connector is non polarised, THEN it gets a little sticky.

 

Jim

 

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hmmm, looks like my unpolarized connector comment is proving a distraction, especially if assumptions are being made that one of the pins is ground/signal common. The key question is the one back in post #1 about the protocol.

 

My current explorations are...

 

1) SENT

2) Bi-Phase Mark

3) Standard USART type data format with polarity detection.

 

As some of you might remember I design and manufacture equipment for model railways which use DCC as a communications method. So my 4) is to use something based on extending DCC.

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

DCC?

Last Edited: Thu. Dec 9, 2021 - 03:27 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

https://dcc-ex.com/ ?? or Digital Communcation Conference

www.tokopedia.com/madagang .Buy and Donated cheap electronics and manuscripts.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

grohote wrote:

DCC?

 

All you need to know here...

 

https://www.nmra.org/dcc-rps-sta...

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Anything wrong with running the signal through a full-bridge rectifier?  They're cheap, and fast enough.  S.

 

PS - ever seen the YouTube channel of "The DCC Guy"?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Brian Fairchild wrote:
Standard USART type data format with polarity detection

 

So, a remote does have own power source. Use a bridge on master side, and then no polarity detection is necessary.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Wheres TORBY when you need him?  He's done a lot of projects with that protocol....

 

 

JIm

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

(Bi Phase is only 1/4 of a lesson in a college class, and one can forget almost all).

If remember well, this protocol can be sent through a transformer and be regenerated.

 

It is evident that you need not any Polarity check. See how "1" behave- does have leading High, or Low.

 

 

Last Edited: Thu. Dec 9, 2021 - 07:27 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1


Scroungre wrote:
Anything wrong with running the signal through a full-bridge rectifier?  They're cheap, and fast enough.  S.

 

digitalDan wrote:

Full wave rectify with a schottky bridge into an opto-isolator?

 

Edit: would only work with single ended signal.  True differential would be a no go.

 

Is there an echo in here?

 

Letting the smoke out since 1978

 

 

 

 

Last Edited: Thu. Dec 9, 2021 - 07:56 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The op say he needs to definitely correct for an electrical polarity issue, rather than a logical issue, but perhaps still wants an option to control logic polarity??  Unless using differential signals one is not the same as the other!  So perhaps a combination of these solutions (electrical & encoding) is in order. 

 

avrcandies wrote:

 

such that the incoming signal can be either polarity, ie idle line is high or low

You request doesn't quite make sense....if you are making code for both ends (manchester, spi, pwm, whatever)  wouldn't you control the polarity?  Why/how would it change?  

 

 

Non-polarised connectors on the interconnecting cable. 

 

 

 

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Transformer and S/PDIF mentioned in AoE (TOSLINK also)

The Art of Electronics 3rd Edition | by Horowitz and Hill

Download a sample chapter

[page 19, middle of left column]

14.7.10 Biphase coding 1041

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Echoing #19     For opto-isolation an input bridge can be avoided.

 

 

In Digikey - Search   [as below]

Category: Optoisolators - Transistor, Photovoltaic Output

Input type: AC, DC

Output type: Transistor

Number of channels: 1

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think y'all need to take a BIG step back and start clicking the links the OP left in post #34.

 

THEN

 

rethink your suggestions.

 

Here, I'll post it again:

Brian Fairchild wrote:

All you need to know here...

 

https://www.nmra.org/dcc-rps-sta...

 

Jim

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

jgmdesign wrote:
I think y'all need to take a BIG step back and start clicking the links the OP left in post #34.

 

Ouch, that made my head hurt.  I guess I have nothing to offer here.

Letting the smoke out since 1978

 

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

digitalDan wrote:

Scroungre wrote:
Anything wrong with running the signal through a full-bridge rectifier?  They're cheap, and fast enough.  S.

 

digitalDan wrote:

Full wave rectify with a schottky bridge into an opto-isolator?

 

Edit: would only work with single ended signal.  True differential would be a no go.

 

Is there an echo in here?

 

 

Nah, full differential would work fine, if the grounds were isolated.  S.

 

PS - But yeah, there is an echo in here...  ;-)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

digitalDan wrote:
Ouch, that made my head hurt.  I guess I have nothing to offer here.

 

Once I realised what Brian is working with I too got nuttin'.  Hence my reference to TORBY as he has done all sorts of stuff with AVR's and that communications system.

 

 

Jim

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Scroungre wrote:
Nah, full differential would work fine, if the grounds were isolated.  S.

 

With the circuit I posted? if the bridge was driven from a differential line driver you'd just get DC out of the bridge no?  Sorry, for the sort of OT.

Letting the smoke out since 1978

 

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

digitalDan wrote:
With the circuit I posted?
Indeed.. Is that transmisi in wireline or wireless ?

www.tokopedia.com/madagang .Buy and Donated cheap electronics and manuscripts.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

jgmdesign wrote:
start clicking the links the OP left in post #34

 

Let do it. On this stage, a schematic of Master and Slave (with a black box in-between) can be essential (@OP).

Including the protocol, to stop guessing about bi-polarity, if any.

 

Edit:

Or else, will be as it was so far: As you like it (W. Shakespeare)

Last Edited: Fri. Dec 10, 2021 - 07:37 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

grohote wrote:

jgmdesign wrote:
start clicking the links the OP left in post #34

 

Let do it. On this stage, a schematic of Master and Slave (with a black box in-between) can be essential (@OP).

Including the protocol, to stop guessing about bi-polarity, if any.

 

Edit:

Or else, will be as it was so far: As you like it (W. Shakespeare)

 

why don’t you just click the link instead of being lazy about it?  Asking for a friend.

 

jim

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sorry for wrong impression, Jim.

 

With this one, I have 10 posts in thread.

Call that lazy, if you like- but I know when to stop- and, yes, I will wait for OP answers.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think you are missing my point.  The OP has provided a link to the system they are interfacing with, and it’s not a simple as many here think.  So, rather than make this a longer than already is thread, trying to explain the system, you can click on the link and review the schematics and read the documentation explaining the operation.  Much more efficient than the OP trying to explain things over and over.

lazy is asking for schematics and information, yet not following a link that the OP provides to the requested info.

cheerio,

jim

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ka7ehk wrote:
One of many possible transmission methods that might satisfy this is AFSK (though a bit difficult at 5Kbyte/second and which would likely require additional hardware at each end). 
AVR AFSK is an order-of-magnitude less than the requirement; dsPIC AFSK is doable.

Audio Frequency Shift Keying Demodulator | Digital Signal Processing Performance of the 8-bit AVR® Core

[beginning of second paragraph]

... and therefore a bit rate of 520.83 bits/second. 

[Conclusion has the AVR CPU utilization] 

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

gchapman wrote:

 

Audio Frequency Shift Keying Demodulator | Digital Signal Processing Performance of the 8-bit AVR® Core

[beginning of second paragraph]

... and therefore a bit rate of 520.83 bits/second. 

[Conclusion has the AVR CPU utilization] 

 

 

Thanks for that.

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

jgmdesign wrote:

The OP has provided a link to the system they are interfacing with, and it’s not a simple as many here think.

 

Just to be clear, I gave DCC only as an example of a coding method that is polarity insensitive. I may yet re-purpose it for my actual need as the fact that power is transmitted over the same two wires has a possible use.

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Differential Manchester is in 10BASE-T1L auto-negotiation; can supply at least 1 watt to the remote over 1 kilometer.

Microchip Technology has 100BASE-T1 PHY (automotive use case); don't know the current status of their 10BASE-T1L PHY.

 

The New 10BASE-T1L Standard—Has Anything Changed? | Analog Devices

[after 3/4 page]
Can I Also Implement the Power Supply to the Devices via the “Two Wires”?

Single-pair Ethernet PHY Offers the Industry’s Leading Ultra-low TC10-compliant Sleep Current and is Functional Safety Ready | Microchip Technology

LAN8670/1/2 Family of 10BASE-T1S PHYs (Microchip Technology)

GitHub - Microchip-MPLAB-Harmony/net_10base_t1s: Harmony 10base T1s solutions

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

jgmdesign wrote:
I think you are missing my point. The OP has provided a link to the system they are interfacing with, and it’s not a simple as many here think.  So, rather than make this a longer than already is thread, trying to explain the system, you can click on the link and review the schematics and read the documentation explaining the operation.  Much more efficient than the OP trying to explain things over and over.

lazy is asking for schematics and information, yet not following a link that the OP provides to the requested info.

 

I can take it. Apologize for asking OP for a clear picture.
Milan

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

gchapman wrote:

AVR AFSK is an order-of-magnitude less than the requirement; dsPIC AFSK is doable.

decrease to 4K5bps and get AFSK.

www.tokopedia.com/madagang .Buy and Donated cheap electronics and manuscripts.

Last Edited: Wed. Dec 15, 2021 - 10:07 AM