Shop OBEX P1 Docs P2 Docs Learn Events
long distance programming issue - Page 3 — Parallax Forums

long distance programming issue

13»

Comments

  • kwinnkwinn Posts: 8,697
    edited 2013-06-20 09:55
    @kwinn
    Are you suggesting we actually include both? I am beginning to think we may have an excellent all-purpose solution for distant Propeller modues.

    If you mean RS485/422 and optoisolators by both, then no, that is not what I was suggesting, although I have done so once for a very long connection. Most of the equipment that needed optoisolators had short runs (20 – 100 feet) so both were not needed.
  • kwinnkwinn Posts: 8,697
    edited 2013-06-20 09:56
    The problem with optos is usually that they are too slow, sure there are faster ones with built-in Schmitt trigger outputs too but a proper twisted-pair balanced line with termination provides very high noise immunity. Better than this though is to have galvanic isolation and balanced drivers. This I do with products using solid-state isolators and 485 line drivers and receivers. The ultimate is to go fibre-optic and I have made Prop products with SMF run up to 40kms.
    …...

    That's a nice circuit Peter, somewhat of a step up on what I use. If a twisted pair is used to drive the led of the opto as I usually do it is also a balanced line, and any voltage or current induced in one wire will be canceled by the voltage /current induced in the other wire of the pair. The major shortcoming of using only the opto is that it can not easily be used as a bus, it is pretty much a point to point system.

    Optos are slow, relatively speaking, but several transistor output units are more than fast enough for the typical speeds used in RS485/422 and propeller programming. If higher speeds are needed there are logic output opto's that go up to 15Mb/s and beyond. I prefer the transistor output units because they can be used for any voltage between 3 and 24V.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-06-20 09:57
    Two transceivers is plenty if you use RS422 parts instead of RS485. (Actually 1 1/2: one for Rx/Tx, the other half for reset.)

    -Phil
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2013-06-20 10:11
    So those would be the 14pin DIPs or a MAX489 or Max491 chip.

    None is stock! Max488 and Max490 are wrong.

    Futurelec has them at $2.60

    http://www.futurlec.com/cgi-bin/search/search.cgi

    And USB to serial solutions

    http://www.futurlec.com/cgi-bin/search/search.cgi
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-06-20 10:41
    A pair of 8-pin MAX488s would work fine, although they're 5V parts. For lower-voltage operation a pair of LTC2863s are pin-compatible and would work in place of the '488s.

    -Phil
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2013-06-20 11:05
    Well here is a nice little chip that does it all... including the isolation that started this thread. Yes it is a bit more expensive, but a very easy build. About $14 USD per chip and you would use 4 total. Can use 3V-5V power.

    http://www.digikey.com/scripts/dksearch/dksus.dll?s=24434&pv404=4&pv276=80&FV=fff40027%2Cfff801a4&k=rs422&mnonly=0&newproducts=0&ColumnSort=0&page=1&quantity=0&ptm=0&fid=0&pageSize=25

    http://www.nve.com/Downloads/il422.pdf
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-06-20 11:22
    Regarding optoisolators, here's a demonstration of relative speed capabilities between one with a simple optotransistor and one with a Schmitt-triggered open-drain logic output. The input frequency corresponds to a serial data rate of 19.2 kBaud:

    attachment.php?attachmentid=102384&d=1371752521

    attachment.php?attachmentid=102385&d=1371752522

    -Phil
    654 x 240 - 10K
    654 x 240 - 10K
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-06-20 11:27
    ... About $14 USD per chip and you would use 4 total.
    'Not sure why you'd need four, since you could use unisolated tranceivers at one end of the cable and still have isolation.

    -Phil
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2013-06-20 12:48
    @Phil
    Thanks for pointing that out. I was just considering that ordering all the same would make construction that much easier.

    The ones from Futurelec for less than $3.00 would work well.... I just wish I could find it all in one-stop shopping and would prefer to use just one manufacturer.

    If only I could buy over-the-counter and in small quatities directly in Taiwan, rather than order from here and there and have to import.... living in the USA or even Europe makes electronics much more feasible as a hobby.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-06-20 13:11
    I think that something like the following will suffice. The H11L1s are less than a buck apiece from DigiKey. You can think of the LED in the optoisolator as a differential receiver in a current-loop configuration. Driven via a twisted pair, it will have excellent common-mode noise rejection.

    attachment.php?attachmentid=102387&d=1371759094

    -Phil
    674 x 527 - 5K
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-06-20 13:38
    If you want optoisolated RS422 but don't want to spend a lot, here's a cheap way out that should work:

    attachment.php?attachmentid=102388&d=1371760662

    -Phil
    746 x 193 - 3K
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2013-06-21 04:12
    Thanks Phil, that is certainly most cost effective for the 19200 baud that the Propeller requires for programing and general communications.

    I spent the day looking at what I could do with what is available locally, and those newer opto-isolators are yet another item I'd have to import. So I think I am going to go for a 'first edition' that will be less than perfect design.

    ~~~~~~~~~~~~~~~~

    This will be a "PROOF of CONCEPT" from junk on hand or that I can get locally and build an all DIP solution.

    A. I will use 3 pairs of RS485 transcievers that are powered by 5 volt and have them hardwired as RS422 receivers and line drivers requiring 3 twisted pairs of wire for full communication.

    B. No opto-isolation as Tacyhon and PropForth both desire to run serial terminals at much higher rates.

    C. I can do this all with my USB2SER device and an extra USB plug to provide +5 to RS485 chips on the end that attaches to the computer.

    D. At the other end, I can easily tap into +5 on a Propeller Proto Board for the RS485 chips and connect where the USB2SER will go.

    E. I will use RJ45 dongles to permit me to grab any length of CAT5 cable that is ready to go. I think I have a 100' or more that I can bench test will.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2013-06-21 06:49
    Phil's circuit in #71 is probably worth a try due to it's simplicity. It certainly will work fine at lower baud rates but programming the Prop is equivalent to communicating at 115200 baud so that will be the test. Here's a circuit I threw together just to illustrate RS422 drive using RS485 parts as these parts are normally more rugged than any of their RS422 cousins etc. I've used a digital isolator that includes it's own DC-DC converter which can provide up to 100ma isolated. As I said it's just a quick circuit and there are probably some refinements necessary but it gives you an idea. I have allowed for all 4 pairs but only 3 are necessary for the Prop to handle full-duplex and support the Spin tool. The reset transistor circuit can be used down the other end which only needs the RS422 components and none of the isolation.
    ISOLATED USB-RS422.jpg
    1024 x 426 - 92K
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2013-06-21 07:54
    Very nice, I'd love to have one rather than bothering with the shopping, ordering, and soldering iron.

    I just came back from buying a half dozen SN75176 chips in 8 pin DIPs. That all that I could find locally. It's time to do a bit of building.

    Personally, I think you could call this the Propeller 'Far Side Programming System' and have another profitable product line for Parallax to offer. It just needs a similar mating interface without the isolation that will connect with the Propeller Project Board and/or the Propeller Proto Board.

    Forth is ideal for this set up as well.... at least during early development. You can have a very flexible remote system that can easily be tweeked whenever one is inspired.

    ++++++++++++++++++
    BTW, the SN75179 chip, not the SN75176 is the ideal 8 pin DIP for this project. You only need two for 4 lines of communication.

    Now that I finally figured out what Phil was asserting, I may have to go back to the store and buy some.
  • FernandFernand Posts: 83
    edited 2013-07-09 22:43
    Do we even know what the interface is in Jonathan's dongles?
    Are they designed/marketed for long distance "extension"?
    Wouldn't it be funny if they were either RS422
    or some other variant of a differential drive?

    Did Jonathan say that his little dongles worked fine most of the time?
    Does it make sense to first try to identify the actual problem?
    What does his "Stuffing" actually mean?
    Could it be spurious data caused by the way his code works
    under specific conditions, and could be remedied in code?
    Inadequate filtering on his inputs, his power on the board?
Sign In or Register to comment.