 |
 |
| View previous topic :: View next topic |
| Author |
Message |
temtronic
Joined: 01 Jul 2010 Posts: 9638 Location: Greensville,Ontario
|
|
Posted: Thu Jun 05, 2014 4:56 pm |
|
|
We haven't seen a schematic of what you're doing but I suspect (as others) that you don't have a good signal level on the 'control' line.
You should try using the MAX232 to 'drive' the control wire as well as xmt/rcv. This is standard practice with CTS/RTS type signalling.
I know it worked 15 years ago, don't see why it won't now.
hth
jay |
|
 |
Ttelmah
Joined: 11 Mar 2010 Posts: 20066
|
|
Posted: Fri Jun 06, 2014 1:41 am |
|
|
Agreed.
Thinking about what I 'hypothesise' he wants to do, and the problems I see, I'd suggest the following:
1) Use two 4-16 decoders to generate the drive lines. Find ones that give _open collector_ drive outputs. The old 74159, or a more modern equivalent.
2) Have the receiver in the 'slave' for this, be the LED of an opto coupler, with a suitable power line, and current limiting resistor.
This way you control a _current_ to the slave device to tell it to send, rather than trying to use a voltage. Choose your resistor so it has a good margin. Perhaps something like 10mA loop current, and an opto that switches with perhaps 2mA. This was a few ohms change in resistance won't matter, nor will a bit of induced voltage on the loop. I really do think this is probably the most likely cause of problems with the RS232 approach.
3) Then 'forget RS485'. You are trying to use a tool that is designed to allow multiple devices on a bus, and probably gains you nothing (unless your distance is very long). Use RS423. This is similar to RS232 (one sending device only), and uses just one signalling wire in each direction. It uses lower voltages than RS232, and conveniently there are octal receivers available for this. Have your bus receiver output switched through a multiplexer to the receive input of the PIC.
4) Consider linking two wires in your plug, so that the master device can tell if a 'slave' is not present, without having to try a communication at all, by detecting these pins not being linked.
5) Grounds. This is the second area where problems might well appear. Remember the master receiver needs to be referenced to the ground on the slave devices. Possible ground loops etc.. One solid thought, is to forget RS anything, and instead use a current loop in a similar way to the 'trigger' line, feeding back into an opto coupler on the master board. When using RS485 to control multiple devices in an industrial network, I usually optocouple the actual drivers, with an isolated power supply. |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|