element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Experts, Learning and Guidance
  • Technologies
  • More
Experts, Learning and Guidance
Ask an Expert Forum Need help connecting Raspberry Pi to old Com-trol MCS-4000 boards.
  • Blog
  • Forum
  • Documents
  • Leaderboard
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Experts, Learning and Guidance to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Suggested Answer
  • Replies 17 replies
  • Answers 3 answers
  • Subscribers 290 subscribers
  • Views 3181 views
  • Users 0 members are here
  • raspberry
  • pi
Related
See a helpful answer?

Be sure to click 'more' and select 'suggest as answer'!

If you're the thread creator, be sure to click 'more' then 'Verify as Answer'!

Need help connecting Raspberry Pi to old Com-trol MCS-4000 boards.

Former Member
Former Member over 11 years ago

Hi All,

 

I have a Raspberry Pi V2 that I'm trying to see if I can connect them to an old Com-trol MCS-4000 control boards.

The Com-trol system had digital & analog input boards and relay output boards. The input and output board use the same IC chip. The IC chip is a p87c51sbpn. It uses UART to communicate.

The Com-trol system is powered with a 24vac transformer. They connect to the boards as (12vac, ct, ground, 12vac).

Then boards are then connected together and to the main console (MCS-4000) via the local bus. The local bus is a serial type communication.

 

How do I check to see if I can connect it to my Pi?

How would I get them to talk to each other?

If I can't us the boards can I just use the p87c51sbpn IC chip.

 

I do have PDF's for the Com-trol system if anyone needs them. They are very hard to find.

 

Teeterbuilt

 

Message was edited by: Teeterbuilt Added PDF's 12/27/13.

Attachments:
imageF_27262_4.pdf
imageF_28077_1.pdf
imageP87C51SBPN datasheet.pdf
  • Sign in to reply
  • Cancel
  • Former Member
    0 Former Member over 11 years ago

    Hi,

     

    If the communication is based on Rs485, just Google or look at  RS232 to RS485 Converter and Adapter Wiki

    There is a RS 232 port on the Pi (probaly jus 5V or 3.3, check it)

     

    Your have to use an adaptor chip to connect the pi to the RS485 bus.

     

    Do you have the protocol spec ??

     

    greetings Robert

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 11 years ago in reply to Former Member

    Hi Teeterbuilt,

     

    I was little bit short on time.

     

    How do I check to see if I can connect it to my Pi?

         It should but there is some work to do:

              -     The Phi has an RS232 serial bus, your Com-trol system uses an RS485 bus (see your specs)

                   On the RS232 the transmit and receive line are separated, on the RS485 they are combined. But this problem can be overcome

                   -     On the marked are convertor modules available or convertor chips (just what you want, see RS232 to RS485 Converter and Adapter Wiki)

                   -     Just use an convertor or build jour own convertor (its not that complex)

    How would I get them to talk to each other?

                  -         First you have to deal with the hardware (see How do I check to see if I can connect it to my Pi?)

                   -     Then you have to figure out the protocol,( I haven't seen this specs yet, a quick Google search reviled no specs on the protocol)

                   -     For the protocol, try an email comtrol for the protocol specs...

    If I can't us the boards can I just use the p87c51sbpn IC chip.

              -     I think its not useful, the program ROM is a OTP (One time programmable).

     

    I hope this info is of help.

     

    greetings Robert

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • michaelkellett
    0 michaelkellett over 11 years ago in reply to Former Member

    Somehow this discussion seems to be in two places - never mind !

     

    The problem with the RPi RS232 port is that it doesn't actually have one - it has a logic level serial port which can be converted to RS232 (btw RS232 specifies the hardware and signalling voltages and timing of a serial port) by means of an additional chip or board. You could then use one of the readily available RS232-RS485 convertors.

    The big problem is the protocol - if you can't get the supplier (TAC is part of Schneider) to give you documentation you are faced with a big task in reverse engineering it and you would need a complete working system.

    Are you planning on using these boards for a new job or do you have existing installation that you must support ? Is there any reason why you can't just use the original software on a PC ?

     

    MK

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • Former Member
    0 Former Member over 11 years ago in reply to michaelkellett

    MK,

         I acquired the full Com-trol system from a remodel job a few years back. I have the main control panel and the input and output boards. I recently had the idea to see of I could use it for model railroading or possibly small home automation. I was just hoping that I could use my RPi to run the input and output board to make them easier to use. The main Com-trol panel is rather difficult to use.

     

    Thanks,

    Teeterbuilt

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 11 years ago in reply to Former Member

    Robert,

         Thank you for a well organized explanation. I do not have the protocol specs for the Com-trol system. I do know that Com-trol went out of business.

     

    Thanks,

    Teeterbuilt

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • robotop
    0 robotop over 11 years ago

    Hello, looking at the PDF you supplied, the communications acts via RS485 interface, with baud rate of 19200 or 38400 BPS. You can simply use an USB to RS485 interface that can be recognized by the Raspberry PI board, then use it in your program as TTYUSB0 (or similar), setting the appropriate baud, bits and parity parameters. Note that if you use an FTDI based interface, the handling of the bus direction (RS485 is always half-duplex) is done directly by the interface, so you have just to write to the serial channel or read from it, without the need for the direction control (usually involving one output line as TX enable). The FTDI chips have an automatic "1 bit before start" activation of transmission and "1 bit after stop bit" release of the bus. So, when you don't transmit any data, the receiver is enabled, and when you transmit data, the transmitter is enabled just for the requested time, freeing the bus immediatly after the data has been transmitted. Obviously, the hardware part is very simple, but you must know the protocol for sending and retrieving data. Note that the RS485 bus is multi-point, so every device connected has its own "address". I noted on the schematic that there are two rotary switches to set the address for the peripheral. However, if you don't have the protocol specs (a list of commands and the packet structure) it's almost impossible to handle it. It may be "easily" decoded if you have some controller that actually works with the device. In such case, you can use the USB to RS485 interface as a "sniffer" on the bus, capturing the packets that go from the controller to the device and vice-versa. Hope this helps...

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • Former Member
    0 Former Member over 11 years ago in reply to robotop

    Emilio,

         I am in the process of looking for a rs485 adapter. Since I do not have documentation on the protocols I was planning to use the rs485 as a sniffer. Thank for describing how the rs485 works. Yes there is one address rotary knob on the board 0-F.

     

    Thanks,

    Teeterbuilt

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 11 years ago in reply to Former Member

    Just popping up:

     

    When your sniffing the protocol, just check the MODBUS protocol. Its widely used and plain ASCII, documents are easily found on the internet.

     

    good luck !

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 11 years ago

    I found a rs485 adapter on amazon. The adapter is for an Arduino. I would like to know if I can use it with my RPi and how to, or do I need to get a usb rs485 adapter.

    Amazon.com: HOSSENRegistered UART TTL Serial Port TO RS485 Converter Adapter MAX485 SMD SOP8 For Arduino: Computers & Accessories.

     

    Teeterbuilt

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • robotop
    0 robotop over 11 years ago in reply to Former Member

    Hello, no, that isn't the right device. It's just a "ttl to rs485 interface" and needs to be controlled by a txd, rxd and tx-enable signals. That means you must use the ttyS0 (or ttyS1, if present) com port on your Raspberry and add a real-time control (one spare output pin) for handling the data direction. If you just want to "sniff" the protocol (so if you are always in receive mode), this can be easy accomplished by putting a zero level on the tx-enable line; in this way the interface will be always in "receive mode". However, when you (after having sniffed the protocol) would need to send data, the tx-enable signal control may be an "hard job", if you can't program your Raspberry at "real-time" level. For these reasons, I strongly recommend to search for "USB to RS485 interface", preferably equipped with FTDI chip (like FT232RL or similar). There are some on ebay, at a price around 7 euros (the cheapest). Hope this helps, bye

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube