BS2pe Array
jamesksu
Posts: 22
Hello, complete noob question again I'm sure, but I thought I'd put this out there and see if anyone has any thoughts about this:
I would like to have an array of up to 12 BS2pe controllers, each containing a color sensor and PING))) sensor. Upon object detection, a color sensor will take a snapshot of 20 RGB readings. The array of 12 basic stamps will transmit the sensed readings at random times and often concurrently. Ideally, the array will all be connected through a USB hub to a single PC, where the data will be logged and manipulated. Does anyone have thoughts about how this could work? I have been able to fully accomplish the task with one BS2pe connected through PC, but what complications could occur with multiple controllers sending data at the same time?
Thanks.
I would like to have an array of up to 12 BS2pe controllers, each containing a color sensor and PING))) sensor. Upon object detection, a color sensor will take a snapshot of 20 RGB readings. The array of 12 basic stamps will transmit the sensed readings at random times and often concurrently. Ideally, the array will all be connected through a USB hub to a single PC, where the data will be logged and manipulated. Does anyone have thoughts about how this could work? I have been able to fully accomplish the task with one BS2pe connected through PC, but what complications could occur with multiple controllers sending data at the same time?
Thanks.
Comments
If you want to network the Stamps, there's a pair of Nuts and Volts Columns that discusses a Stamp network. I don't remember which Columns, but you could easily spot them browsing through the index (click on the Resources tab on the main Parallax webpage for a link).
Having said that, consider this scenario:
A signal line is pulled up to 5 volts. It is connected to a floating pin on each Stamp. No Stamp will talk if the signal line is low. If a Stamp wishes to talk, it checks the signal line. If its high, it pulls it low to grab priority then sends its message. No other Stamp will interupt while the signal line is low. After talking, the signal line is released. This is described in the programming environment Helpfile under SERIN/SEROUT and is decribed as "open collector".
Personally I'd use one Stamp as a master to poll all the others in a defined pattern. It will simplify the data handling when the data reaches the PC. There are several rs485 control chips that simplify this so a single pair of wires is all thats required to interconnect the Stamps over long distances.
Cheers,
A virtual serial port takes the place of a direct serial connection. They should work the same way.
1. If I have multiple BS2pe boards connected via USB to different USB ports on my PC, can I run different instances of the PLX-DAQ software to read the data of the boards simultaneously?
2. If not, can I network the BS2pe boards together as you mentioned above with the "open collector" scheme using some sort of USB hub/splitter in lieu of using serial cables?
3. In the helpfile you mention above, it states that you must use some sort of resistor among other devices when networking the boards together. Can you point me towards a schematic and/or sample code for using the "open collector" scheme?
The issue is that I need to use the TCS230 color sensor daughterboard and it seems to only function with the BS2PE that only has a mini-USB port. I would like to not have to buy unnecessary adapters, etc.
Thanks!
2) You don't have to use the mini-USB port except for programming the BS2pe. Once the program is working, you don't need it. You could use an "open collector" type of multi-drop network or you could use the RS485 scheme described in the Nuts and Volts Column. The advantage of the latter is that it's spelled out in detail in the articles.
3) It's unclear how experienced you are with electronics or programming. If you're a beginner, I'd stick with something like what's described in the Nuts and Volts articles.
The Propeller Backpack can be used with the TCS230 and already has the resistors you'd need for a simple one-wire multi drop network. You could also plug a TV into each Backpack to monitor the Daughterboard's functioning, but you'd need to do the programming for that and the sensor itself. There are several existing objects in the Propeller Object Exchange that you could use as models for the sensor code.
Also, could I use something like this: http://www.usconverters.com/index.php?main_page=product_info&cPath=75&products_id=314 to interface the RS-485 network to my PC?
Assuming "yes" to the previous question, how do I get the "slave" stamps on the RS485 network? Some sort of breadboard?