Pages: [1]   Go Down
Author Topic: Arduino Motor Shield + Wireless Communication from Arduino to my laptop  (Read 2141 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 44
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have my Arduino motor shield set up to run the stepper motor. Now, I want to transmit information wirelessly from the Arduino to the serial monitor on my laptop, because the Arduino+motor shield and my laptop will be in different next-door rooms in the building. How do I get started on this? I've read the shields: Xbee, Arduino Wireless Shield (http://arduino.cc/en/Main/ArduinoWirelessShield). I'm not sure which shield to use.

 I cannot use a USB cable to transmit the information, because my laptop cannot be in the same room as the Arduino+motor shield, which will be placed in a different room. I've never worked with wireless communication with the Arduino before. I know I need to get two Arduinos: one sitting in the far-away room (transmitter Arduino) and another attached to my laptop via USB cable (receiver Arduino), and each Arduino needs a wireless communication shield to act as transmitter + receiver shields. Is that the right idea?

Ultimately, I want 4 different arduinos wirelessly transmititng data to the arduino
connected to my laptop, preferably displaying textual data (ex: "total
# of cycles") on the 4 serial monitors. I can also control the 4
arduinos (start or stop the motor) from a far-away distance in a separate room on my laptop in the building.

Ideas, advice?
« Last Edit: July 11, 2012, 06:24:10 pm by Clown_of_God » Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 613
Posts: 49310
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The Arduino Wireless Shield and one of these, with 2 Series 1 XBees should fill the bill.

Quote
I know I need to get two Arduinos: one sitting in the far-away room (transmitter Arduino) and another attached to my laptop via USB cable (receiver Arduino), and each Arduino needs a wireless communication shield to act as transmitter + receiver shields. Is that the right idea?
No. There is no reason to have an Arduino and XBee shield on the PC end.

Quote
Ultimately, I want 4 different arduinos wirelessly transmititng data to the arduino connected to my laptop
That might make a difference in what kind of XBees to get. If you need bi-directional communication and must use AT mode, you'd need series 2 models. If you can use API mode (most of the time, you can), then the Series 1 models are fine.

Quote
preferably displaying textual data (ex: "total
# of cycles") on the 4 serial monitors.
There will only be one serial connection to the PC, hence 1 instance of the serial monitor application running.

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 44
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Paul,

Thanks for the quick reply! Since I dont know anything about Xbee modules or how to set them up properly or initiate the communication, I have a few more questions. I know I want to control the 4 separate Arduino microcontrollers (each running a stepper motor on a motor shield  w/ a stepper motor and also w/ its own Zigbee shield) using the serial monitor (where '1 to COM1/2/3/4' or '0 to COM1/2/3/4' text input would start or stop any of the 4 microcontroller's motors. Also, the micro-controllers will continuously be displaying textual output data/information on the serial monitor, through which I will be monitoring on my laptop. So, this is indeed bi-directional communication. Should I get AT or API type Zigbee modules? To connect to laptop, all I need is a Zigbee + Zigbee shield + FTDI cable, right? And this ZIgbee connected directly to my laptop gets the data output from all 4 other Zigbees and will be able to selectively transmit commands to any of the 4 other Zigbees.

Of course to start off, since I'm all new to this, I would start with a simpler set-up: just buy 1 Zigbee+Zigbee shield for my laptop and 1 Zigbee+zigbee shield+stepper motor+motor shield+Arduino. Two Zigbees talking to each other, in separate rooms. I already have the stepper motor+motor shield working perfectly. Now, the last step is the wireless communication.

I think API mode (series 1 Zigbee, the 802.15.4 protocol, the most popular type) is the mode I want.
« Last Edit: July 12, 2012, 10:26:15 am by Clown_of_God » Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 613
Posts: 49310
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

There is one serial port between the PC and the XBee at the PC end. You can't send a value to one of 4 different ports and expect it to magically arrive at the correct remote XBee. Unless you want to connect 4 XBees to the PC, that is, which seems unlikely.

Using API mode, you can have one XBee talk to 4 other XBees, one at a time. Each XBee will have a unique ID that messages are sent to. The PC application will specify that when assembling the packet to be sent.

Quote
Should I get AT or API type Zigbee modules?
Any XBee is able to operate in AT mode or API mode.

Quote
To connect to laptop, all I need is a Zigbee + Zigbee shield + FTDI cable, right?
No, you don't need a XBee shield or FTDI cable at the PC end. You need on of the USB devices is linked to.

Quote
And this ZIgbee connected directly to my laptop gets the data output from all 4 other Zigbees and will be able to selectively transmit commands to any of the 4 other Zigbees.
Yes.

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 44
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If I understand this correctly, then the only 3 items I need to make a coordinator Xbee to attach directly to my laptop are these 3 items: http://ladyada.net/make/xbee/wiring.html Im using this guide as reference.
1.Zigbee
2. Zigbee shield
3. FTDI cable

The other easier option is to get a Zigbee stick: http://www.digi.com/products/wireless-modems-peripherals/wireless-range-extenders-peripherals/xstick#overview. Thoughts?
« Last Edit: July 12, 2012, 11:19:56 am by Clown_of_God » Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 613
Posts: 49310
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
If I understand this correctly, then the only 3 items I need to make a coordinator Xbee to attach directly to my laptop are these 3 items
That's one way.

Another is to use one of these: http://www.sparkfun.com/products/8687 which uses a much more common USB cable.

Your choice. Either will work.

Quote
The other easier option is to get a Zigbee stick
Never used one; can't comment on its suitability.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 44
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What is the range of the USB Xbee explorers? Is there a max limit of the # of Zigbees these explorers can talk to? I've found 2 on SparkFun:
http://www.sparkfun.com/products/9819 NO USB cable required, just plug-in directly to laptop or computer.
http://www.sparkfun.com/products/8687 USB cable required, the one that you recommended.

 I dont see a datasheet on the SparkFun website for these devices. Both are the same price so I was thinking of getting 1 Xbee explorer USB, since the dongle USB is the in the wrong orientation for my laptop and thus won't fit.

In addition, I'm trying to decide between different ways to connect my Arduino+Arduino motor shield to the Xbee shield. Here are 2 ways:

1. http://www.sparkfun.com/products/9976 Xbee Shield to plug directly on top of the Arduino motor shield.
2. http://www.sparkfun.com/products/8276 Xbee adapter to plug directly on top of a breadboard.
Which way is best to connect from Arduino+motor shield to the Xbee?

In addition to the first option, I know that Arduino offers 2 wireless shields:
1. http://www.amazon.com/Arduino-Wireless-SD-Shield/dp/B006RATC2E/ref=sr_1_1?ie=UTF8&qid=1342114910&sr=8-1&keywords=wireless+shield+arduino With SD card.
2. http://www.amazon.com/Arduino-Wireless-Shield/dp/B007QXRA4I/ref=sr_1_2?ie=UTF8&qid=1342114910&sr=8-2&keywords=wireless+shield+arduino W/O SD Card.

If I were to get a wireless shield for the Xbee,  what are the pros or cons of getting a shield from Sparkfun or from Arduino?
« Last Edit: July 12, 2012, 12:48:10 pm by Clown_of_God » Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 613
Posts: 49310
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
What is the range of the USB Xbee explorers?
What do you mean by range, for the breakout board? Radios have range. Breakout boards do not.

Quote
Is there a max limit of the # of Zigbees these explorers can talk to?
Yes. One.

That XBee, on the other hand can talk to a very large number of other XBees.

Quote
Both are the same price so I was thinking of getting 1 Xbee explorer USB, since the dongle USB is the in the wrong orientation for my laptop and thus won't fit.
Good idea. No sense buying something that won't fit.

Quote
Which way is best to connect from Arduino+motor shield to the Xbee?
The shield.

Quote
If I were to get a wireless shield for the Xbee,  what are the pros or cons of getting a shield from Sparkfun or from Arduino?
Depends where you live. In the US, sparkfun will be faster. In Europe, Arduino will. Faster generally means cheaper shipping, too.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 44
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Paul,

Ah, I'll get the Xbee shield then.

A quick follow-up question: I already have an Arduino motor shield set up to control one bipolar stepper motor. This motor shield is this one here: http://arduino.cc/it/Main/ArduinoMotorShieldR3

The Xbee shield Im thinking of getting looks like this: http://www.sparkfun.com/products/9976. I live in the USA, so getting this from SparkFun should be fine. But Amazon does shipping even faster.

There should be no pin conflicts for both these shields, is that right? The Xbee shield only uses TX, RX, 5V power, and GND pins on the Arduino. I am thinking of placing motor shield on top of Arduino, and finally placing the Xbee shield on top of the motor shield. Does the order of the shields matter? Does that sound reasonable?

The next step when all the components arrive will be setting up the software. I have the latest version of Arduino software. Do I need any extra software for getting the Xbees to talk to each other?  I know my shield isn't from Arduino, but Ive been reading this guide: http://arduino.cc/en/Guide/ArduinoWirelessShield Will the code still be the same for the SparkFun version of the Xbee shield?
« Last Edit: July 12, 2012, 02:19:55 pm by Clown_of_God » Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 613
Posts: 49310
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
There should be no pin conflicts for both these shields, is that right?
True.

Quote
The Xbee shield only uses TX, RX, 5V power, and GND pins on the Arduino.
If the switch is in the USB position, yes. In the other position, it uses two other pins. The Sparkfun one uses pins 2 and 3.

Quote
Does the order of the shields matter?
Not ordinarily. But, the XBee is a radio with an antenna. Putting that antenna under the motor shield is not a great idea. On top is much better.

Quote
Do I need any extra software for getting the Xbees to talk to each other?
Digi offers a free program called X-CTU that makes it very simple to configure the XBees, including upload newer firmware. Highly recommended, and the price is right.

Quote
Will the code still be the same for the SparkFun version of the Xbee shield?
Identical schematics as near as I can tell. The Arduino software doesn't care. The XBee software doesn't either.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino Padawan
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hi, arduino newbie here. I have a somehow related question to the OT. Is this zigbee shield compabtible with xbee modules? http://www.e-gizmo.com/KIT/ZIGBEE%20SHIELD.html

That's the only zigbee related shield that I can see here in our country. TIA.
Logged

Pages: [1]   Go Up
Jump to: