Hi Eric, I think everyone has this dream about having an automated house with all sorts of gizmos built by their own hand.. Even I have one and may be it will come true with PICmicros :-) My comments are as follows 1. If you have your PC as the ultimate master to control and monitor, you need to have the PC on all the time :-(. 2. Have your PC for configuring the master controller/monitor. The master in turn will send and receive information to and from the nodes. (you are right) 3. Half duplex communication is ok from my experience of two projects. 4. Polling the slaves is also ok, since the master can poll many slaves within a second. Here how it goes - The master sends - ":01?*" ( a colon, 2 digit address, a question mark and a star ) The colon is for synchronisation, 2 digit will address 99 slaves, question mark for query and a termination character. The salve responds - ":SS*" The colon is for synchronisation, 2 character status with many combination for status and a termination character. The number of bytes transmitted and received are 5 + 5 = 10 for each slave. At 2400 N 8 1, you can query 24 slaves. ( 10 bits per byte, 10 bytes per slave gives you 24 slaves ). Am I right with this calculation ? 5. Using one pair for signalling the master is a waste of driver chip and cabling. 6. The slaves can draw power from local power outlets. The wiring from the master to slaves can be only two wire. 7. If you still want to supply power through the cable, send around 15V to take care of line drops if any. Have 5V or 12 V regulators on board the local slaves modules. 8. Have all the communication commands in ASCII so that you can test individually developed modules through a PC before inserting into the network. 9. Have a RS232 to RS485 convertor for testing the modules. You can build these convertor modules for as low as $5. I have implemented two projects in this fashion and they are working well. Project A A PLC is connected to a Z80 based master controller (MC). This master controller communicates with 70 slave modules (16C63) (SM). There are four wires running from the MC, two for half duplex and two for 9 V dc power. The SM have on board 5 V regulators. The MC to SM communication is as follows at 4800 N 8 1. MC ":SRAACS* ( colon, Single Read, 2 digit Address, CheckSum and *) SM ":AADDDD* (colon, 2 digit Address, 4 digit data and *) MC ":SWAADDDD* (colon, 2 digit Address, 4 digit data and *) You can develop your own protocol and command format. Project B This is a 48 channel temperature scanner as a single unit. Card A - Display card with 16C55 (2400 N 8 1) 8 digit displays, 4 keys and a buzzer Card B - Master Controller with 16C63 (4800 N 8 1) UART for Slave module communication and bitbang for PC communication Card C - 16 channel analog inputs (16C63) - 3 numbers. Card D - 8 relay driven by 16C54 (2400 N 8 1) The Master sends all the setpoints and other info relating to each channel to the slaves on power up. The local slaves acquire the thermocouple info, RTD info and the 4-20 mA info, linearise and process the data and send it to the master on request. The master does further processing and sends the data for display and the PC. In both the projects, since the modules had only half duplex RS485 interface I used the RS232 to RS485 convertor to communicate and test each type of slave from the PC for all bugs. On integration, they worked at the first try. (Unfortunately I had to use two PC's for this since one was running my terminal software the other an ICEPIC.) With this experience now I can venture into realising my dreams just like yours :-) I would like to use 12C508's for slaves. Best wishes for your project and regards. Pailoor Eric Oliver wrote: > Well, someday I'm gonna build that dream house and, while I dream, I'm > constantly coming up with new ways for complicating things. I would like > to build an RS485 based network to connect various gadgets throughout the > house. So I've been doing a little reading and I have a few questions. I > thought I would post what I have in mind for review to make sure I'm on the > right track. > > First, I figure I'll have a master node that provides the link between my > PC and the RS485 net. At this point, to keep it simple, I figure the > master can poll slave nodes to avoid collisions. In addition, the master > can store configuration data, etc. so that the network can operate without > the PC. > > This brings up my first question. Should I go with half duplex chips and > forget about it, go with full duplex chips but use half duplex > communication for now to keep my options open, or is there a simple means > of implementing collision detection and do you think that I should bite the > bullet and set it up as full duplex communication from the get go. > > The only thing I don't like about polling in a master/slave relationship is > that it's kinda like a uC without interrupts. I don't mind using a > master/slave setup, but I _would_ like a way for a slave to tell the master > it needs attention. Maybe I could use one pair for half duplex RS485 and > the second pair as some sort of attention line ? Any ideas ? > > Next is the wiring. I am planning to use twisted pair CAT5 cable. As I > understand it, I'll only need one pair for half duplex or two pair for full > duplex. That leaves two unused pair. So my thoughts turned to using the > extra wiring to carry power. What are your thoughts on this ? > > There are some devices that will use 5V and some that will use 12V. Am I > asking for trouble if I use a power supply that outputs both 5V and 12V and > put them both on the unused wiring ? What kinda of gotchas will get me > ? > > This isn't mission critical stuff but, at the same time, I don't want to be > working on it all the time either so I'd like to build reliability from the > ground up. > > Any thoughts appreciated.. > > Eric -- Website : http://business.vsnl.com/chiptech Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf" Content-Transfer-Encoding: 7bit Content-Description: Card for Ravi Pailoor Content-Disposition: attachment; filename="vcard.vcf" Attachment converted: wonderland:vcard.vcf (TEXT/CSOm) (0000AF1D)