View Full Version : 3 or More Stamps
10-08-2008, 04:05 PM
Hobby project: connect 3 or more BS2 stamps together using two lines – flow control and serial data. One stamp is the master, two or more are slaves for reporting sensor readings. The circuit for 2 stamps is shown in the N&V Column #81 diagram. Does the rough sketch for 3 stamps look ok?
Post Edited (humanoido) : 10/10/2008 5:26:58 AM GMT
I forget exactly where it is but there's a parallax document with info on hooking up three BS2s... it talked about using a pullup
resistor and... I can't remember what all. I have a printout of the schematic and it seems pretty much like what you have
but with no resistors cept one pullup on the Rx line... I'd include your resistors just for the safety factor.
The printout is Figure 73 on page 255 of Chapter 6: Additional Applications (I have no clue which book).
It also later talks about the SNAP protocol if that jogs anyone's memory.
10-09-2008, 07:27 PM
Looking at 3stamp_question, the "slave" on the far right is "slave" to the "slave" in the middle.· The Master should transmit to both and receive from either, if your intentions are along the lines of a star network.
10-09-2008, 09:16 PM
There's a pair of Nuts and Volts Columns on networking several Stamps together.
10-10-2008, 12:04 PM
The posted diagram can be redrawn as shown in the first two rough sketches. So these are on two ports per stamp, one for send/receive and one for flow control. But what happens without flow control? - the third diagram is from the Basic Stamp Syntax and Reference manual. It uses only one line for communications routed to one port per stamp. The other line shown is ground. I believe this is the most simple. The most simple design, both in wiring and software, is needed. Which to use, inverted or noninverted?
Post Edited (humanoido) : 10/10/2008 5:28:03 AM GMT
10-10-2008, 12:15 PM
These days either inverted or noninverted work fine. Some years ago, the noninverted was easier because you could use NPN open collector transistors which you needed because the logic circuits couldn't provide enough current by themselves. Now you can sink or source adequate current (20mA or so) with a Stamp I/O pin by itself.
10-10-2008, 12:37 PM
if you dont have flow control, you will get collisions, where two stamps talk at the same time, and who knows what the third will hear. if you code the software to run a checksum or the like, it would be fine. Or if there was a timer setup, and you had the master send a synch command every x minutes, so the timers wouldnt get out of synch
10-10-2008, 12:53 PM
The idea is to use software and not allow two or more stamps to talk at the same time. All slaves will continue to take sensor readings and keep quiet until the master asks one to speak. When a slave speaks, it will report one reading and it's duration of reporting time will be known. The master will keep quiet during the reporting duration of the slave. After the master polls the slave, or after the slave stops talking, is a timeout required or any software need to reset?
Post Edited (humanoido) : 10/10/2008 6:09:59 AM GMT