Interfacing two basic stamps
silviu.lita
Posts: 13
I was thinking of parallelising my boe bot with two boards running at the same time.
One could take care of motion while the other process sensor signals.
Then the question on how to interface them.
One option would be serial communication which I try to avoid.
I was then thinking of pin to pin communication. What I have in mind is when the first board senses, say, something on the Ping ) sets pin A on high. Pin A is directly connected to pin B on the second board.
The second board then could see the signal.
Would this second solution work?
Do I need to power the 2 boards from the same source or separate sources could work too?
Thanks,
Silviu
One could take care of motion while the other process sensor signals.
Then the question on how to interface them.
One option would be serial communication which I try to avoid.
I was then thinking of pin to pin communication. What I have in mind is when the first board senses, say, something on the Ping ) sets pin A on high. Pin A is directly connected to pin B on the second board.
The second board then could see the signal.
Would this second solution work?
Do I need to power the 2 boards from the same source or separate sources could work too?
Thanks,
Silviu
Comments
Then others can see what you are doing and give you guidance on what to do next.
Rather than going through the trouble of try to add a 2nd Stamp to your BOE-Bot, use a ServoPal.
A ServoPal can control 2 servos and it only take a few pulses to get the ServoPal started.
The ServoPal will then keep sending those same pulses to your servos, freeing up your Stamp to do other things.
You can also command the ServoPal to stop sending pulses and if want the servos to do something different just send the ServoPal a new series of pulses.
The ServoPal is very easy to use and it's also inexpensive.
http://www.parallax.com/product/28824
Suggestion to Parallax: Would it be possible to bring back a Spin Stamp but add 5v IO, and make a PBASIC interpreter for it? That way you'll run out of SXs later, and be able to make much more powerful stamps. You don't have to be able to program the other 7 cogs, instead their functions would be standardized - PWM, oscillator, sigma-delta, etc. Obviously, more advanced users should be able to program it as a Propeller.
electrodude
EDIT: What kind of sensors and motors are these? I'm guessing they're standard BOE-Bot sensors and motors? Usually, one BS2 can handle both of these together if programmed right. Do you really need two stamps? If you only need one, don't bother with a propeller (yet).
That's why I suggested the ServoPal because it can be easily added and it doesn't cost much.
The BS2 is very easy to use and most of the texts were written for it.
I was thinking of the ServoPal too but the issue is that I might have to send different pulse values (adjustments) in order to move the bot in straight line, or make 90 degrees turns.
Note that everything is open loop, I'm not using encoders although I was looking to use Compass but not working well eigher.
I'm using PING, Compass, Sound Impact at the moment but planning to add also motion detection and Bluetooth (used to receive commands from a smartphone that does voice recognition).
All of this on one board is too much due to RAM and EEPROM limitations.
Clearly one option would be to move away from BS2. Would getting a BS2px (more RAM and EEPROM) be also an alternative?
Thanks.
Silviu
What exactly are you trying to do because maybe you don't need all that stuff or you need a more powerful chip.
As we speak, the BS2PX, which is the fastest of all the BS2s, is on sale for the price of a regular BS2. The BS2PX has a lot more memory and is a lot faster than a regular BS2.
The timing of the BS2PX is different from the BS2 so any time related instructions such as RCTIME and PULSOUT need to be adjusted.
The BS2PX also has its memory broken into 8 slots of 2K each. Think of it as 8 BS2s worth of program space.
You could place the program for each accessory into a different slot and then call each slot as needed.
Oh, and the BS2PX has a lot more variable space.
The sale price on the BS2PX will be good until Parallax opens up Monday morning so think about it and definitely buy it you want to stick with PBASIC.
Thanks for the tip. I have just ordered it , cheaper than getting the propeller board + chip.
Silviu
As I am learning, the Propeller is very powerful but the programming is considerably different.