Pages: [1]   Go Down
Author Topic: Standalone Arduino Serial Communication  (Read 965 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Full Member
***
Karma: 1
Posts: 146
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey Guys,

I have hooked up a standalone Arduino just as shown in this website.
http://arduino.cc/en/Main/Standalone

I double checked the voltage and got a regulated 5.05 volts across all the components so the regulator is working. The code that is running has two lines of code. One of which is in the setup function:

Serial.begin (9600);

The other in the loop function:

Serial.println("Hello World");

I have the serial port (RX/TX Pins) hooked up to an XBee module. To clarify, the arduino RX Pin is connected to the Xbee TX Pin and the arduino TX Pin is connected to the XBee RX Pin. Why doesnt it work? It doesnt send anything.
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 216
Posts: 13702
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Can you post the whole code (as short as it may be)?

Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

0
Offline Offline
Full Member
***
Karma: 1
Posts: 146
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Here is the code:

Code:
void setup(){
 Serial.begin(9600);
 
}

void loop(){
 
  Serial.println("HELLO WORLD");
  delay(1000);
}


Also the circuit is exactly the same as this picture: http://arduino.cc/en/uploads/Main/arduinobb_08.jpg
Except it also has an Xbee connected which takes 4 connections : 5v, ground, RX, and TX
Logged

Toronto, Canada
Offline Offline
Edison Member
*
Karma: 2
Posts: 1234
"Keep it R.E.I.L. - "Research, Experiment, Investigate and Learn"
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The breadboard look fine. But I did not see the positive +5 V connect with the other +5 V rail. Same goes to the gnd rail. I hope you did that. And you forget a reset button. The resistor at reset pin is OK.

For a standalone project, it look OK, beside the two rail ( + 5 and GND )  not being connected... maybe you did ? 
After that, you connect the FDTI board ( RX, TX, DTR ---> 0.1 uF ---> reset ) to load up your code, and to power up the AT chip , oh yeah, disconnected the +5 V from the regulator if you use the FDTI board.

You check you code by using the serial monitor .... That is the FDTI board job, if you got a message, than your code is working.

THAN you connect the +5 V regulator, disconnected the FDTI board, re-connect your X-Bee board. Power up the AT chip.

If that did not work ( It look that way ) , well the X-Bee is : Not transmitting or  The receiver is not receiving... my guess
Logged

0
Offline Offline
Full Member
***
Karma: 1
Posts: 146
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

See the thing is I didnt have to do half of that. I removed the chip, plugged it into my arduino board, programmed it, removed it and put it back in the circuit. I tested it with the regular Arduino ports and everything worked perfectly fine.

But then I tried it without the serial communication. I disconnected the RX and TX connections and uploaded a blink sketch:

Code:
const int ledPin =  13;      // the number of the LED pin

void setup() {
  // set the digital pin as output:
  pinMode(ledPin, OUTPUT);      
}

void loop()
{
  digitalWrite(ledPin, HIGH);
  delay(1000);
  digitalWrite(ledPin, LOW);
  delay(1000);
}

And this failed to work as well.

Here is a picture of my circuit:


By the way, I tried multiple chips brand new and they all didnt work. I tried several batteries as well. I've replaced every component and breadboard too.
« Last Edit: May 03, 2012, 01:42:10 pm by iRagDoll » Logged

Offline Offline
Faraday Member
**
Karma: 65
Posts: 2504
Now, More Than Ever
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Looks like you have those two crystal caps shorted: one has both leads in row 25 and the other has both its leads in row 26. 
Also you have row 25 and 26 connected to Ground. 
And, you have IC pins 9 and 10 connected into row 25 and 26 (respectively).

So none of that's "just as shown in this website. http://arduino.cc/en/Main/Standalone"


Logged

"Hello, I must be going..."
"You gotta fight -- for your right -- to party!"
Don't react - Read.
"Who is like unto the beast? who is able to make war with him?"

Offline Offline
Faraday Member
**
Karma: 65
Posts: 2504
Now, More Than Ever
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You're missing that pull-up resistor on IC pin#1, too.
Your D13 LED needs a limiting resistor (unless it's a "LED Lamp".)

Concerning my previous reply --
Logged

"Hello, I must be going..."
"You gotta fight -- for your right -- to party!"
Don't react - Read.
"Who is like unto the beast? who is able to make war with him?"

0
Offline Offline
Full Member
***
Karma: 1
Posts: 146
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yea the capacitor was the problem. Sorry about that. I never realized that I shorted it. I have no idea why it didnt register to me.

Thanks so much!
Logged

0
Offline Offline
Full Member
***
Karma: 5
Posts: 237
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You mentioned you were supplying 5 V to the XBee, you should probably put a regulator to take that down to 3.3 V as that is what XBees like.
Logged

Offline Offline
Faraday Member
**
Karma: 65
Posts: 2504
Now, More Than Ever
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I think the little board that the XBee xcvr is mated to in the OP's pic takes care of that 5V situation on-board.
Logged

"Hello, I must be going..."
"You gotta fight -- for your right -- to party!"
Don't react - Read.
"Who is like unto the beast? who is able to make war with him?"

Pages: [1]   Go Up
Jump to: