Shop OBEX P1 Docs P2 Docs Learn Events
Help, Setup a stamp to emulate a valve controlled via RS485 buss. — Parallax Forums

Help, Setup a stamp to emulate a valve controlled via RS485 buss.

Greg.GoodGreg.Good Posts: 2
edited 2007-10-17 07:23 in BASIC Stamp
Help, Setup a stamp to emulate a valve controlled via RS485 buss.
·
·
I have a valve that receives control communications on a RS485 buss.· I would like to setup a stamp to listen to the buss.· When it receives the command I would like the stamp to convert the command to the command format that a valve from a different manufacturer will recognized.· I also need to stamp to communicate that the command has been received and started.·
·
I am what I would consider a beginner with the basic stamp.· I do know that in order for a stamp to handle the 485 communications, it will have to have a FIFO buffer – UART attached but I am not sure where to start.· I have in my position MAX3140EEI+, MAX3140CEI+, MAX3100CPD+ and MAX3100EEE+.· I think one of these should be able to handle the communications.· I have a 2P40 stamp for testing purposes but I would like for the final setup to use the less expensive basic stamp OEM module http://www.parallax.com/html_pages/products/basicstamps/basic_stamps_oem.asp .
·
I should be able to handle the coding for decompiling the commands received and recoding to the new valve format but I am pretty much clueless as how to setup the for mentioned chips to handle the communications with the stamp.
·
Any help or pointers will be greatly appreciated.
Thanks
Greg Good

Comments

  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2007-10-16 11:16
    Well, when you say RS-485 buss, several questions come to mind - mostly about the software environment.

    RS-485 can emulate RS-232 bi-directional, but at a longer distance OR RS-485 may be employed with the far more complicated CANbus protocol which broadcasts 8 byte packets upto 100s of nodes which have a 39bit address scheme.

    If you want to use RS-232 serial without the CANbus protocol, it can be done easily. If you want the CANbus, you need to have an additional device. Parallax sells one. But, you will have to learn a lot more to use it properly because of the CANbus addresses and protocol.

    Regarding the MAX3100, you don't really need go use it. It is a UART that goes from SPI to RS-485 without the proper driver chip. The BasicStamp provides its own UART in the firmware.

    But you will need an RS-485 transciever chip to get the correct line signal. The best can switch automatically between send and recieve, thus eliminating the need for a 3rd R/W wire and the software to control that. And since they can use quite a bit of power, the ultral low power version is better for battery operation. Maxim won't let me search right now, but I would look there for the right chip.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "Everything in the world is purchased by labour; and our passions are the only causes of labor." -- David·Hume (1711-76)········
    ···················· Tropically,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan

    Post Edited (Kramer) : 10/16/2007 11:21:08 AM GMT
  • Greg.GoodGreg.Good Posts: 2
    edited 2007-10-16 11:41
    If you would like I can email the manuals for the valves. If so email me moc.lanidrac@doog.gerg I typed my email backwards to prevent crullers from getting my email address. I can tell you that I have been able to use a 485 to 232 converter to listen to the buss with HyperTerminal. There is typically one wired carter before I see the command that I would expect.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2007-10-17 07:23
    So, you don't know it this is CANbus or RS-232? We can exchange emails, but I only want to help out. Decoding a system can require hours of effort.

    It is a big difference in what you need to learn. I can look at your documents, but to learn a whole new CANbus scheme for each manufacturer can take a lot of time if you have all the information, and it can take forever if you don't.

    The simple truth about CANbus is that manufacturers can easily make a proprietory code that is nearly impossible to hack into. The address/control scheme is 39 bits long and analysis is quite hard. Also, you may not know the proper baud rate as it can be non-standard. You may see something using RS-232, but making sense of everything gets difficult.

    What is a 'wired carter'? Is it a wierd character? And are you getting real ASCII strings?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "Everything in the world is purchased by labour; and our passions are the only causes of labor." -- David·Hume (1711-76)········
    ···················· Tropically,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
Sign In or Register to comment.