Searching \ for 'PIC net' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=pic
Search entire site for: 'PIC net'.

Truncated match.
PICList Thread
'PIC net'
1998\07\09@203720 by ssj

flavicon
face
hello folks!

I'm designing a house monitor/controller and need to put the master
controller
in comunication with slaves displays (both pic'ed).
The master will be a "black box" with only I/O's and one port to communicate

with the remote display(s). I'm thinking in use the mains to make conections

easier and more portable.
Any sugestions on how to interface, schematics and what protocol will be
highly appreciate!


thanks!

Silvio B.
spam_OUTssjTakeThisOuTspamunorpnet.com.br
ICQ:2221034

1998\07\09@234035 by Alberto Smulders

flavicon
Take a look at the topic "PicPoint Net" at URL

    http://www.picpoint.com

for lots of ideas, schematics, software and the like (all free) !!!!
Communication is RS-485 over wire. For using mains communication, look at
SGS Thompson (http://www.st.com) for integrated circuit ST7537 (lots of app
notes) or Philips (http://www.semiconductor.philips.com) for integrated
cicuit TDA5051(A).

You could also look at the US Patent Database
(http://patent.womplex.ibm.com) for many good ideas, especially patents
numbers:

4,864,589
5,278,862
5,090,024
5,263,046
5,684,826
5,241,283

and you can do boolean searches like "power line AND modem", "intellon AND
ocala", etc. to get other useful links to patents.......

By the way, if you want someday to market your products in Europe, forget
all the information about Spread Spectrum Power Line Communications you
encounter, it's not allowed there (only taxpaying in huge quantities is 100%
allowed there, so the burocrats can live without working - let the stupids
work  ...... so bad......:(:(:(:(:(:(:(:(:( ).


Regards,

Albert A. Smulders
InSAD - Encarnacion, Paraguay
.....insadKILLspamspam@spam@itacom.com.py

-----Mensaje original-----
De: T_BoNe <ssjspamKILLspamprimario.unorpnet.com.br>
Para: .....PICLISTKILLspamspam.....MITVMA.MIT.EDU <EraseMEPICLISTspam_OUTspamTakeThisOuTMITVMA.MIT.EDU>
Fecha: Jueves 9 de Julio de 1998 20:38
Asunto: PIC net


>hello folks!
>
>I'm designing a house monitor/controller and need to put the master
>controller
>in comunication with slaves displays (both pic'ed).
>The master will be a "black box" with only I/O's and one port to
communicate
>
>with the remote display(s). I'm thinking in use the mains to make
conections
{Quote hidden}

1998\07\10@070245 by Ake Hedman

flavicon
face
Hi,

I am also building a system to control some equipment in our house/office. I decided against the mains communication primarally beacuse of the problems with differnt phases and pricing and decided to go for 1-wire from Dallas Semiconductor. Cheap and rather easy to implement. Also to have a node where only switching, sensing of one/or to channels, temperature measurement can be implemented at a minimal cost without any type of controler at the node.

By deciding on the 1-wire and wanting the nodes to be low cost I ended up with a master/slave concept where a PC is the heart of the system. This machine monitors all devices and take actions on certain sensor inputs. Also it implements a net interface so I can build a user i/f in the form of a web application. Thus its possible to check tempeartures at different locations, change the boiler temperature etc etc by just clicking around some web pages. Its also very easy to make changes in this user i/f when one needs to add/move a node in the system.

At the moment I am working on a solution that makes it possibel to use a PIC as a slave device on the 1-wire bus without having to use any extra circits like the Dual port Ram Dallas have for this purpose. My though is to use my own private addresses in the same way as the series 192.168..... is used on the Internet.

The Pic is the ideal device for this in my opinion. You put up many low priced self contained nodes and are able to control almost everything.

It would been nice if we ( and others with the same goals ) could share ideas.



{Original Message removed}

1998\07\10@115916 by Peter L. Peres

picon face
On Thu, 9 Jul 1998, T_BoNe wrote:

> hello folks!
>
> I'm designing a house monitor/controller and need to put the master
> controller
> in comunication with slaves displays (both pic'ed).
> The master will be a "black box" with only I/O's and one port to communicate
>
> with the remote display(s). I'm thinking in use the mains to make conections
>
> easier and more portable.
> Any sugestions on how to interface, schematics and what protocol will be
> highly appreciate!
>
>
> thanks!
>
> Silvio B.
> @spam@ssjKILLspamspamunorpnet.com.br
> ICQ:2221034

For mains signalling, you can use a set of ready-made modems (expensive)
or look at FSK carrier modulation using a mutli-vibrator or VCO and a PLL
for detection (both standard CMOS parts). Many in-house intercoms use the
latter method. You should not inject more than 200 mW RF into the power
line no matter what. The usual frequency range is 30-70 kHz.

The line coupling is usually done with a parallel LC tuned to your working
frequency. The coil has a secondary that couples to the circuit. The LC is
coupled to the mains using small value, high voltage capacitors in series
with protection flame-proof resistors. The intended coupling is to be weak
(target 20 dB S/N where signal = 1-10 mV @ 50 kHz and noise = 220 V @ 50
Hz).

For protocol, look at the ASCII version of MODBUS (it does not have to be
ASCII). You need to do something about error detection and retransmit (and
ask the house owner to put chokes on every motor and dimmer that hasn't
got one <G>).

It is not practical to go beyond 2400 Bauds with this type of hardware w/o
ECC and other advanced things, but you can use dictionary compression
(store strings in the displays and transmit indexes only).

Peter

1998\07\11@020102 by Lee McLaren

flavicon
face
Hi all;
I am also working on something similar and would be interested in setting a
standard so devices could be inter-changed. My idea was to not use one type
of physical bus but many with "routers" between them so that the most
appropriate topology is used where it should.
Can we talk about this off the pic list and kick some ideas about? Please
email me direct.

Lee McLaren


{Original Message removed}

1998\07\11@023501 by ssj

flavicon
face
My idea is a device "X10 like" but more powerful, wich can interface with
security system (alarm/dialer)
control electric appliances, input some data like temperature/motion
sensors/etc.
Speed is not a problem, since these devices could communicate each other in a
slow rate (very slow!)
The rs485 is a good choise, but need wire-wrapping around the house, and once
x10 work with relative
reliability, the power line comms seems to be an interesting point of "plug and
play"...
Phase problem can be solved with a single capacitor between the lines.
The price can be a factor of change to rs485, but i've seen some circuits with
an LM567 to decode
the FM signal, and the TX part with a few transistors.


{Quote hidden}

1998\07\11@070108 by Keith Doxey

flavicon
face
Hi Lee,

Why kick this OFF the piclist?

Networking PIC's together for a home automation network is a subject that intere
sts
me greatly and I am sure many others would find the discussion interesting.

It is definately NOT [OT} as the heart of what is being discussed is the PIC.
IMHO I would prefer this to be kept in the list where I may continue to follow i
t.

Just because only two or three people contribute to a thread does not mean that
no-one else is interested. Many people, myself included, subscribe to the Piclis
t
to glean information from _those_in_the_know_ and often find our questions answe
red
BEFORE we ask them.

>From observation of this list over the past few months it seems that when an ong
oing
discussion between 2 people is boring everyone else it seems to generate more tr
affic
flaming it than the original topic.

Please keep this discussion ON the list  :-))

Of course YMMV

Best regards

Keith
http://www.btinternet.com/~krazy.keith
Krazy Keith's World of DIY Home Automation

I am also working on something similar and would be interested in setting a
standard so devices could be inter-changed. My idea was to not use one type
of physical bus but many with "routers" between them so that the most
appropriate topology is used where it should.
Can we talk about this off the pic list and kick some ideas about? Please
email me direct.


Attachment converted: wonderland:WINMAIL.DAT (????/----) (0000F593)

1998\07\12@021537 by ssj

flavicon
face
My idea is a device "X10 like" but more powerful, wich can interface with
security system (alarm/dialer)
control electric appliances, input some data like temperature/motion
sensors/etc.
Speed is not a problem, since these devices could communicate each other in a
slow rate (very slow!)
The rs485 is a good choise, but need wire-wrapping around the house, and once
x10 work with relative
reliability, the power line comms seems to be an interesting point of "plug and
play"...
Phase problem can be solved with a single capacitor between the lines.
The price can be a factor of change to rs485, but i've seen some circuits with
an LM567 to decode
the FM signal, and the TX part with a few transistors.


{Quote hidden}

Silvio Borges
KILLspamssjKILLspamspamunorpnet.com.br
icq:2221034

1998\07\12@052706 by Russell McMahon

picon face
Like several others, I have been thinking along these lines but have done
nothing yet.

I would be happy to have this thread on the list
(for what my opinion is worth :-)).

       Russell

> Hi Lee,
>
> Why kick this OFF the piclist?
>
> Networking PIC's together for a home automation network is a subject that
interests
> me greatly and I am sure many others would find the discussion
interesting.

&

> Please keep this discussion ON the list  :-))
> Of course YMMV
> Best regards
> Keith

1998\07\12@141219 by Mark Willis

flavicon
face
I have thought about using 10Base2-type coax & connectors (NOT full
ethernet, it's a bit too much for house networking!) as if you did it
right the power & ground could come in off the coax & you could
capacitively couple your signals to the coax, 1 cable for all of
everything.  It's at least an interesting thought, never have gotten
around to serious research on it (by now, maybe the 10Base2 glue chips
are cheap & available readily, I should look someday!)  RJ-11 connectors
are good too & you can use 4 wire cables pretty readily...

 This was for a sensor net (it needed a time tick from the master on a
regular basis) that would then be polled in between the time hacks, my
alternative was RS-422 (or 485) but that project's on hold until I do
some serious research & get funding.

 Mark Willis, RemoveMEmwillisTakeThisOuTspamnwlink.com

1998\07\13@043312 by Peter Wilson

picon face
I too am working on home automation and have decided to use the Category 5
UTP cable which is normally used with 10BaseT networks. It contains 4
twisted pairs - I'll use two pairs for full duplex RS485, 1 pair for signal
ground and an intercom, and the last pair for power - probably 24V DC. Cost
is close to that of 50 ohm coax. My network will extend from the front
gate, through the shed and then the house - probably about 120 metres of
cable with about 10 PIC nodes and a PC controlling the lot.

Peter Wilson, spamBeGonearagocomspamBeGonespamozemail.com.au


At 16:40 10/07/98 -0700, you wrote:
{Quote hidden}

1998\07\13@051334 by Andres j Ogayar

flavicon
face
-----Mensaje original-----
De: Keith Doxey <RemoveMEkeith.doxeyspamTakeThisOuTBTINTERNET.COM>
Para: PICLISTEraseMEspam.....MITVMA.MIT.EDU <EraseMEPICLISTspamMITVMA.MIT.EDU>
Fecha: sabado 11 de julio de 1998 13:01
Asunto: Re: PIC net


>Hi Lee,
>
>Why kick this OFF the piclist?
>
>Networking PIC's together for a home automation network is a subject that
interests
>me greatly and I am sure many others would find the discussion
interesting.
>
>It is definately NOT [OT} as the heart of what is being discussed is the
PIC.
>IMHO I would prefer this to be kept in the list where I may continue to
follow it.
>
>Just because only two or three people contribute to a thread does not mean
that
>no-one else is interested. Many people, myself included, subscribe to the
Piclist
>to glean information from _those_in_the_know_ and often find our questions
answered
>BEFORE we ask them.
>
>From observation of this list over the past few months it seems that when
an ongoing
>discussion between 2 people is boring everyone else it seems to generate
more traffic
{Quote hidden}

type
>of physical bus but many with "routers" between them so that the most
>appropriate topology is used where it should.
>Can we talk about this off the pic list and kick some ideas about? Please
>email me direct.
>
>

   I do agree with Keith. This subject is very interesting for me, and
really, 'the arriving point is worthless. It is the way what teaches us'.

   What I mean is that the disussion itself is interesting; PICs will be
used for this networking gadgets, this is PICLIST, ans I (like many others)
joined it to share knowledge (mainly to suck it).

   Best regards,

   Andres j. Ogayar
   Systems Analist
   Malaga, Spain

1998\07\13@062235 by Lee McLaren

flavicon
face
Ok I am happy to keep in on the list, it just may generate a lot of traffic
in the long run...
Anyway I expect we should submit some rfc (request for comments) on the
subject so I will put forward my ideas for comment:

8 bit address        (255 devices per segment)
1 bit                 (R/W)
7 bits                (register select)
==============
16 bits

A master controller talks to nodes (switches, inputs etc) directly on the
segment (this may be 1 wire or main modem etc) and if a change of media is
required then a router is added as a node and the routers node address is
added to the front of the address on the next network, the router strips of
the first byte and sends it out on the network behind it so we are back to
16 bits.
This can go many routers deep so the number of devices is unlimited.
Anyway after the address and register are sent the master in the case of a
read will keep sending clock pulses and the slave (node) will keep sending
the contents of its reqisters starting with the one named in the original
call. This will save a lot of overhead in the case of sequential reads and
writes.

I have done a lot of work regarding broadcasts and interupts as well as
initial config of address's but that can come latter if anyone is intrested.

Please comment

Lee McLaren

1998\07\13@092844 by Ake Hedman

flavicon
face

I think Cat-5 is the correct choice today if one should put in new cable. This gives maximum flexability and the price for the CAT-5 cable is't that heavy either.

I have also thought about RS-485 but is't there a limitation on the number of nodes here? Can someone put in some knowledge on the 485 standard?

I also agree with several others that it would be interesting to come up with a scheme that let us design things that work on each others "Environment Control Systems". CAT-5 sounds OK, 1 pair set aside for 24V DC also sounds OK. 3 Pairs to go......

/Ake

{Original Message removed}

1998\07\13@100230 by Ake Hedman

flavicon
face
I like this. Just need some clarifications.

You dont't specify the size for the register content. I assume 8-bits. ( I REALLY LIKE THE REGISTER WAY TO DESCRIBE A NODE. A node have a couple of registers and an address. Thats it!)

So a read is

       16 bit word clocked out containing address and read bit set and the        selected register one wants to read. The master then runs the clock for
       as many registers it needs to read from the initial one. The slave just        puts out register contents( or maby a one for a non existing register )        until the clock stops.

and a write
       16 bit word clocked out containing address and read bit cleared ( WRITE )        and the selected register one wants to write. The master then runs the        clock for as many registers it needs to write from the initial one. The        slave just accept register contents until the clock stops.
       

There is as I see it, some need for a sequency ( may call it ALERT ) that tells slaves that the master is through reading or sending data. This can be specified as as something that happens on the wire ( clock inactive for x ms etc ) or a packet of some kind on the buss.

I would prefere a packet oriented approach. Thus

! Header ! address ! R/W ! Register ! Data ! CRC !

Very simple and clean. This would also be easy to use in the routing scenaro you discuss which I buy fully. I just would not have the lay the burden of knowing the routes on the master but instead leave that to the routing device.

The header could of course be different for read and write and make the R/W bit obsolete making the register selector a full byte. With a header/packet approach it would also be easy to specify how many registers to read/write.

Different headers would be possible to implement, ALARM ( sent by a unit who needs attention), STATUS ( sent by a data logger for example ) etc.

Also I would like some sort of initial mechanism that finds the devices on the buss and also find the maximim clocking rate for theese devices.

If we go for a Cat-5 bus system we could use ( assuming RS-485 )

Pair 1 - Differential data out ( From master to slaves ).
Pair 2 - Differential data in ( From slaves to master ).
Pair 3 - Differential clock. ( from master ).
Pair 4 - Some AC voltage (32/33V ) Some relays etc needs 24DC so....

It would also been very nice if the clock could have different frequency for different devices the master is talking to. Knowing there capapility from some sort of initial "get to know each other" sequency and then use that clock rate when talking with that device. This indicates some sort of device selection. But the advantage is that one really can make full use of the RS-485 spec. and CAT-5 spec. The device selection phase must also be on the lowest common clock frequency.

OK. just some thoughts....

/Ake



{Original Message removed}

1998\07\13@101303 by Martin Darwin

flavicon
face
On Mon, 13 Jul 1998, Ake Hedman wrote:

> I have also thought about RS-485 but is't there a limitation on the
> number of nodes here? Can someone put in some knowledge on the 485
> standard?

32. You can get more nodes with repeaters or super powered drivers (Maxim
makes some). The speed you can get depends on the standard stuff:
distance, capacitance, etc...

I used to have an nice article rs485 -- I will have to try and
find it
tonite.

MD

1998\07\13@105217 by Timothy D. Gray

flavicon
face
CAT-4 cable is alot cheaper and has the same number of wires.. alot of
wire manufacturers have tons of this stuff as LAN installers aren't
bothering with the low grade and are installing high grade cat-5..

Unless you are running data from your pic's at 100Mbps you dont need the
cat-5 rating.

> I think Cat-5 is the correct choice today if one should put in new cable. This
gives maximum flexability and the price for the CAT-5 cable is't that heavy eit
her.
>
> I have also thought about RS-485 but is't there a limitation on the number of
nodes here? Can someone put in some knowledge on the 485 standard?
>
> I also agree with several others that it would be interesting to come up with
a scheme that let us design things that work on each others "Environment Control
Systems". CAT-5 sounds OK, 1 pair set aside for 24V DC also sounds OK. 3 Pairs
to go......
>
> /Ake
>
> {Original Message removed}

1998\07\13@112752 by Ake Hedman

flavicon
face
Sounds like a good suggestion.

I think in the 1-wire spec. they say telephone grade twisted pair works but use Cat-5 if you can. This is a good starting point at least if one can have a scheme were the clocking speed on the bus is adaptive in some way. Low grade cable = low speed/short distance vs. high grade cable = high speed/long distance.

/Ake

{Original Message removed}

1998\07\13@121116 by Calvin

flavicon
face
You can use Cat-3, Cat-5 is overkill for this application. Cat-5 is used for
100BaseT, and it's more expensive than Cat-3.

Calvin

{Original Message removed}

1998\07\13@170952 by thomas

flavicon
face
A few points:

The Dallas RS-485 chips dont have super drivers, they have low
load receivers.

RS-485 is inherently a 2 wire system.  If you have a 4 wire system,
you have a RS-422 system.  (Think about how you have to wire the
cables to the UARTS -- if you have more than two nodes, you have
to have more than one UART to get full duplex communications.)
A single master with multiple slaves communicating full duplex is
really a RS-422 system.

Check National Semiconductor's site for RS-485.  A lot of good info
here.

National's AN-915 has some good info for dealing with network
contention and collision detection.  (i.e. what happens when one
device is trying to drive the line low and the other is trying to drive it
high?  How do you detect it?)  The system described is similar to
the CAN bus bit level arbitration and conceptually like the I2C
system.  (If the PIC is bit banging the serial I/O, it should be
possible to implement bit-level arbitration.)

Rather than create a whole new protocol, check into existing ones.
The internet protocols are well documented, but would probably be
a little difficult to implement on a 16F84.  The PLC industry has
been using networks for controlling and monitoring power loads for
some time now.  The response time for PLC's is more demanding
than required for home lighting control.  Many of the protocols are
on the net, if you dig enough.  i.e.
http://www.modicon.com/techpubs/intr7.html

Windows 90-Something -- You know you're more productive 'cause you reboot more.
Microsoft will not be held liable for bad code.  (Yeah, the customer will at $30
per hour.)

1998\07\13@194702 by jgmarcos
flavicon
face
Agree with you to be able to operate with a broad of cable grades. This
give the oportunity to cover more home-net applications.

For myself I've wired my house with Cat-5 FTP mainly by two reasons:
  - The final price for the whole system is very close because
    the most of the work (bill if don't do yourself) arise from the
    hand-work for cabling( independent from the cable grade ) and from
    the electronics for the routers and nodes (higher than cable).
  - Taking into account the Moore law I want to keep 'in use' my
    home-net as more years as posible. (Just for saving).

Any case I'm sure there are good reasons to do the things in
other ways and that's way I propose the broad of cable grades.

For assignement of pairs I suggest to use 12V DC in pair #4 because:
 - Can use a battery (car, Ni-Cd, etc) to supply 12 V even if the
   AC mains go off. This is needed to supply sensors and devices
   used in burglar alarms, very typical in 'home-net'.
 - Supply the nodes and routers requires less components and generates
   lower power losses.

Javier

1998\07\13@200123 by David VanHorn

flavicon
face
>For assignement of pairs I suggest to use 12V DC in pair #4 because:
>  - Can use a battery (car, Ni-Cd, etc) to supply 12 V even if the
>    AC mains go off. This is needed to supply sensors and devices
>    used in burglar alarms, very typical in 'home-net'.
>  - Supply the nodes and routers requires less components and generates
>    lower power losses.
>
>Javier


You'd better fuse and/or current limit that, or your lan wiring will become
a
nice in-wall ignition source!

1998\07\13@222334 by Peter Wintulich

flavicon
face
Hi,

I have been looking at using the Pic micro as the base for a home / building automation system.

I have worked out designs for a one wire pair system (caring power & data ) and a two wire pair system  (separate power & data pairs).

I have not used RS485 in my design because I wanted to use a I2C style of BUS ARBITRATION on a differential twisted pair wire.

I have worked out a system where the device that is acting as the master control for the system can run standard rs232 via a level converter with optional optical isolation to the differential bus that the automation points are connected to.

I have since looked at the Pic Net project at PicPoint & am thinking about improvements to the design.

This is a very rough outline of what I have,

The basic protocol allows 128  control points, 64 sub groups for control points, 63 other devices and one Main Host.

Each control point (one pic16c84) could have a theretical maximum of
16 buttons,
16 leds,
12 id switches or digital sensors,
4 analoug inputs (pic16c71),
LCD module
1 general purpose i/o pin (could be used to switch on/off lcd back light or some thing else ?).

The sub groups are intended to reduce the trafic on the system by updating control points that have common configeration.  

The Other Devices is intended to be I/O points, backup system for Main host, bridging units to allow expantion.

The Main Host is intended to do the bulk of the control, by reciving bus activity & sending action commands & updating control opint statuses.

Regards Peter Wintulich

1998\07\14@035452 by Morgan Olsson

picon face
>Rather than create a whole new protocol, check into existing ones.
I agree.

I think the CAN bus is very interesting.
Bit-by-bit arbitration, hardware adress filtering, CRC, automatic
detection-disconnect on lot of errors, high speed, one signal (normally
twisted pair, and some drivers kan work with failure on one line etc), lot
of chips.  There are already lot of higher level protocols built on top of
the CAN, bridges to ethernet, PC-cards with CAN controllers, diagnostic
programs etc.

Mchip will probably release a PIC with CAN later this year, which will be
perfect for the master unit.

For the cheap low-end units i think it is possible to implement CAN in
software in a standard cheap PIC, that have interrupt on port change.

We just have to run the bus slow enough, but we don«t have high speed
requirement, so 1kpbs is porbably much more than needed.

I«ve been thinking on running a system with a single pair or coax, with 48
or 60 VDC supplied, that runs to DC/DC converters in the high power units
(isolated converter if needed).  It will then be possible to get enough
power for servo motors, lots of magnetic valves etc!  

Very simple nodes like fire detectors do not need isolated power nor signal
and can use cheap zener voltage regulator and only cap and protection zener
for signal.

All power is connected through inductors, and the signals through small
caps (and signal transformer if isolation needed, or some bidirectional
optocoupled driver)

One very nice feature aboput CAN is that it was made with thought of
transformer coupling: There is a maximun of five successive bits of same
"polarity" (high or low), or else the transmitter inserts one of opposite
polarity, and the recievers delete the same.  It is built in in the protocol!

The protocol is rather complex, but as it is highly specified and widely
used it is easy to specify as a common standard.

And if someone/a group of us develop a CAN include file, then almost all
work is done, as it even includes error detection, retranslit, bus state
control etc.

Aditionally we only have to specify how to set speed, adress ranges for
different usage etc.

Electically we also have to specify contact configuration, cable impedance,
drive amplitudes etc.

But we can leave that for later as we better (IMHO) first must aim at using
CAN to the basic standard on a spearate twisted pair (driver/reciever
buffers is available for CAN like as for RS232 etc) , and either we decide
for our own how we like to run the power as somebody maybe inly need
totally one watt, but the system I am dreaming in must run an large servo
at 120W... (sun panel rotate)

If we use only the high speed coming PIC with hardware CAN, it is even
possible to get one audio channel (maybe two or more bad quality) to work
as well as the normal control.  So, we can implement a intercom phone, door
phone or whatever :).  Another idea is to transfer pictures from a simple
CCD camera from the door way to see who is knocking, or store to get images
of thieves...

Just my couple of cents summed from a bunch of notes (whishes) on my desk
/Morgan
/  Morgan Olsson, MORGANS REGLERTEKNIK, SE-277 35 KIVIK, Sweden \
\  RemoveMEmrtEraseMEspamEraseMEiname.com, ph: +46 (0)414 70741; fax +46 (0)414 70331    /

1998\07\14@064841 by Lee McLaren

flavicon
face
Thanks for the feedback Ake, the crc is a good idea and will be needed in
one form or another, We could make each "byte" 9 or 10 bits with 8 being
data and 1 or 2 being parity or similar.
For the signaling of start of transmission I was thinking of a "reset pulse"
being a long low like in the 1-wire protocol.
Different speeds would probably be handled by different networks (RS-485
could be the backbone due to its high speed) with 1 wire running at 17K you
could add dallas devices direct to the network and utilize the 3 pin
switches etc just by note using the "family code" of the dallas devices as a
node so all the other devices will ignore the transmission.
I was going to handle interupts by a priorty system where a transmission to
device 255 is read by all nodes and read say register 127. All the devices
with an interupt will answer but the first device with a 1 instead of a 0
will win and all the other devices will stop talking.
This way the master gets the address of the 1st device. Units with sensitive
tasks could be given a higher node address and hence priorty.
If the master reads register 126 this could be a lower priorty interupt etc.
This way you could check for different levels of urgency.
The initial address could be given by sending out the unique 32 or so bit
serial number as a broadcast (255) and an address tacked on the end which
the node remembers, you would only have to do this the first time you turned
on the node and would save on dip switches and programmers.

Comments please.

regards

Lee McLaren

{Original Message removed}

1998\07\14@130343 by Gary T. Pepper

flavicon
face
At 12:50 PM 7/13/1998 +0200, you wrote:
>
>I think Cat-5 is the correct choice today if one should put in new cable.
This gives maximum flexability and the price for the CAT-5 cable is't that
heavy either.
>
>I have also thought about RS-485 but is't there a limitation on the number
of nodes here? Can someone put in some knowledge on the 485 standard?
>
>I also agree with several others that it would be interesting to come up
with a scheme that let us design things that work on each others
"Environment Control Systems". CAT-5 sounds OK, 1 pair set aside for 24V DC
also sounds OK. 3 Pairs to go......
>
>/Ake
>

As far as I know, the number of nodes on an RS-485 network is limited by
the "drive capability" of the RS-485 integrated circuits used.  I've seen
some devices that will support 32, 64, 128 and 256 nodes (e.g. check out
Maxim's devices).  This can be extended to whatever number desired simply
by providing a "repeater" to another section of your RS-485 network.  A
repeater simply consists of an RS-485 transmitter/receiver that connects
two RS-485 network "sections" together and relays any data received from
one section to another.  Each RS485 section might consist of up to 256
nodes.

For an RS485 network, you can use telephone cable (as I did) or can use cat
5 cable (or higher/lower rating) to implement your network.  On my 4
conductor telephone cable, I implemented a half-duplex RS485 network, which
used 2 conductors for DC power distribution and 2 conductors for data
transmission.  Obviously, 4 conductor telephone cable isn't shielded
(usually), so that you cannot expect to obtain data rates that would be
achievable with, say, Cat-5 cable.

BTW, when transmitting DC power throughout your house (or wherever), it is
a good idea to have some sort of protection (fuses etc) in the system.  You
never know when somebody will drive a nail into a wall (e.g. to hang a
picture), which will inevitiably piecrce the cable, resulting in a
short-circuit between the conductors in the cable!  ;-)

Some food for thought....

Regards,
Gary Pepper
Ottawa, Ontario, Canada

e-mail: RemoveMEgpepperspam_OUTspamKILLspamcapitalnet.com

1998\07\14@150707 by thomas

flavicon
face
> Hi,
> I have been looking at using the Pic micro as the base for a home / building a
utomation system.
> I have worked out designs for a one wire pair system (caring power & data ) an
d a two wire pair system  (separate power & data pairs).
> I have not used RS485 in my design because I wanted to use a I2C style of BUS
ARBITRATION on a differential twisted pair wire.

You can use I2C style arbitration on differential twisted pair.
CANbus does it.  The trick is to drive the RS-485 diver enable
signal with the serial Tx line.  Properly done, the driver circuit will
work transparently on any RS-485 network.

See National's Application Note AN-915 regarding the SAE J1708
spec.  http://www.national.com/an/AN/AN-915.pdf

AN-915 makes the case for National's DS36277, since it eliminates
an inverter.  You can still use a 75176 if you use a 2N2222 to invert
the UART output, or if you are bit banging, invert the signal in the
software.

regards
Thomas J Macauley, KD7BDW
RemoveMEthomasTakeThisOuTspamspamadvancedcontrol.com
(208) 362-5858

1998\07\14@162035 by Stuart Broad

flavicon
face
I have been following the discussion about the various methods of
implementing a PIC network with interest and wondered if anyone had
considered using time domain multiplexing of the communication media.
If  the frame period is long enough relative to the clock of the lowest
processor speed of a node, then each node could self calibrate itself on
power up by timing the period between the frame synchronisation pulses sent
by the master controller.
Just toying with the idea at the moment but I thought I'd toss it into the
pot to gauge reaction.

Stuart Broad.

1998\07\14@201752 by Russell McMahon

picon face
> From: Morgan Olsson <EraseMEmrtspamspamspamBeGoneINAME.COM>
> I think the CAN bus is very interesting.
big snip ...

For those interested in CAN bus there is a busy (but not as busy
as PICLIST) mailing list at

       RemoveMEcanKILLspamspamcichlid.com

I haven't the subscribe info but presumably a message to the
above would bring a response (hopefully not too impolite).

1998\07\16@053114 by Ake Hedman

flavicon
face
I'm checking some infos for the picnet before I go on. Has anyone a copy of the SAE J1708 recommendation? In that case can I WOULD BE VERY HAPPY for a copy!

Regards
/Ake

{Original Message removed}

1998\07\16@114007 by ssj

flavicon
face
I'd like to thanks all who posted in response to my question, all very interesti
ng!

The goal of my project is to make an net of PICs (mostly keyboard and LCD displa
y) communicating to an master in the roof (no display or any button).
This is for simplifying the connections between the devices, wich has to be "non
invasive"
to the existing wires of the house, to make installation easy to anyone!

So, i think that a pair of cable or the AC outlet is the best way to work with.
Speed is not a problem, since data can be exchanged with the points at a rate of
150-300 bps or less!

My questions are about the polling within stations and collision avoid.

I'll be glad with your replies!

Thanks again!

Silvio B.
ssjSTOPspamspamspam_OUTunorpnet.com.br
ICQ:2221034

1998\07\18@184225 by ssj

flavicon
face
I'd like to thank all who responded this topic with ideas, they were all
interesting!

Thanks a lot!

Silvio Borges

1998\07\20@063127 by Ake Hedman

flavicon
face
I've been looking around for a while on whats available and there is of course really a lot of stuff around. I make the following notes ( my conclusion is the same as before I read all the comments here... )

CAN and most other protocols i've seen is to complex and most of them need som extra circuits added to the node. CAN is very nice for a 8051/68hc11 or alike but not for a PIC. I don't like that. I can accept the cost for a single RS-485 tranceiver but thats the limit. If I could skip even that cost this would make it possible for me to add some extra nodes and really make it possible to make a distributed system. IMHO a node ( Pic or some other type ) should meet the following design criterias.

1.) It should not cost a lot of money in hardware to implement the i/f to the cable. EASY is the keyword.

2.) The code to handle the i/f should not take all of the processor time nor should the code take up a lot of program memory.

3.) The speed is not a critical parameter for a system like this.

4.) You should be able to use low grade/high grade cable.

5.) It should be a Master/slave system.

6.) It must be easy and cheap to implement the i/f to the cable on a PC (DOS/Linux/Windows) to be able to use a standard platform as a master machine.

7.) The master should be able to dynamically find devices on the buss.

As I sad i have been looking around for a solution that satisfies the points above and I again my selection is the 1-wire from Dallas. To list the points again 1-wire/PIC

1.) None. Just need an Open Collector port.
2.) The code that needs to be written is not very hard nor expensive in size.
3.) Yes its rather slow. Arouns 15 bps. As I see it this is clearly enough.
4.) You can use any cable you like. Twisted/untwisted or whatever you have laying around. The better cable you use the more nodes you can have and you also get a more secure system. 1-Wire needs 2-wires( signal & ground ). If you use CAT-5 you have several other pairs to play around with that you can use for other things such as power, intercom, high speed transfer lines etc.
6.) There is no problem at all to program this part. Several application nodes are available on the subject. Also a Java-kit and one SDK.
7.) This is also handled. The 1-wire specify a very smart method (IMHO) to dynamically  find the devices on the bus)

Another great thing is that there are already many low cost devices that can be hooked to the bus thats already available. The DS-1820 to measure tempearatur in a node. Switch nodes. To name two possible choices. Also several commercial "nodes" can be bought ( se for example http://www.pointsix.com/products.htm )

BUT THERE IS A PROBLEM ! ! !

All nodes in a 1-wire network is identified with a node id (ROM). This is a 64-bit value consisting of a family code ( 1 byte), unique serial number ( 6 bytes)  and a crc ( 1 byte ). The unique serial number is the problem. This is something Dallas is supplying. One can buy the DS1990A which contains this serial number or dual port RAMS but this is not a nice solution for us.

The PIC has the EEPROM memory where we can store the 48 bit serial number/8 bit family code and the crc ( can also be calculated of cource....). Dallas have not ( at least yet ) set a side addresses that one can assign oneself for use in internal systems as the 192.168.0.0 net on the Internet. I hope they will do this in the future but $$$ may be in the way. Anyway if one pick a serial number among the available ones its a low chance that a DS-1820 a switch or whatever also have that serial number. Also its possible to check this before one decide the id for a node. If one can accept this inconvenience the problem goes away.

So my suggestion for the PIC net is to use just one pair and the 1-wire protocol. It's then up to the implementor to use extra pairs for supply current, alarms, intercom etc.

How about the control interface model?

I very much like the register model that Lee McLaren introduced. It is easy to grasp and makes it very easy to program different control models. Write a "register" with a command byte to perform a certain command. Read a "register" to get the input state for certain pins. Write a register to set the state for certain pins etc. We could make code available that makes this model insertable without any programming for the impelementor when it comes to interfacing. The only thing to decide and implement is what register to write/read and the meaning of values/commands.


/Ake







{Original Message removed}

1998\07\20@065415 by Lee McLaren

flavicon
face
Hi Ake,
The Dallas protocol is 17Kb per second not 15bps, I was thinking if I kept
the timing the same you could mix and match Dallas 8byte devices and other
devices on the same network, the Dallas devices would just ignore you if the
first byte was wrong and vic-versa.

regards

Lee McLaren

ps. I have done a lot of work with the Dallas devices and they are a lot of
fun and easy to talk to.

{Original Message removed}

1998\07\20@090156 by Ake Hedman

flavicon
face
Lee,

It's right that the speed is 17 bps but can go down to 11 bps dependent on the master i/f solution (AN-74) and still being within the specs. Anyway this does not matter.

I'm sorry for being a bit slow but should we use the same bit sequences as in the 1-wire protocols to address devices etc ( reset, send-one, send-zero, alarm etc) and define our own things above that?

How do we secure against Dallas changes/additions to the 1-wire protocol?

Can you give an example of a master talking to a slave?

If we should use a family code to identify our selves as "almost 1-wire" devices can we select a family code that we can be sure never will be used by other devices?

Your thoughts are very interesting! I would be very happy to get rid of the serial and at the same time have access to the "button/1-wire" pieces. What more do we gain by moving away from the "standard" 1-wire?

/Ake

{Original Message removed}

1998\07\22@081946 by Ake Hedman

flavicon
face
Sorry,

Sure there should be a "K". My mistake. What my head thinks and what my hands type is not always the same :-(

I'm still very interested in your thoughts about sharing the 1-wire with a protocol of our own. What is the main reason for not using the 1-wire protocol and invent our own?

/Ake

{Original Message removed}

More... (looser matching)
- Last day of these posts
- In 1998 , 1999 only
- Today
- New search...