Pages: [1]   Go Down
Author Topic: Serial Communication stops when battery powered  (Read 1592 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 2
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i'm trying to transmit serial data via pin1 (TX).  i've verified this works just fine when the arduino is powered via USB.  however, when i power the arduino with a fresh 9v battery, TX stops (the TX light no longer blinks!) while other parts of the program (a blinking LED for example) seem to be running fine.  any thoughts/help?

i've already tried a 10k pull up/down on RX and it didn't do anything.

i'm using a new Arduino Duemilanove Atmega328.
Logged

0
Offline Offline
Sr. Member
****
Karma: 0
Posts: 375
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What are you connecting pin 1 to?  Did you remember a common ground from the Arduino to whatever it is?
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 2
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

pin 1 is going to an RF Link Transmitter - 434MHz.  but even if i disconnect pin 1, it still doesn't blink that it's sending data.

and yep, common ground definitely is there.

i have several arduino Duemilanove's and their all doing the same thing.  smiley-sad
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 43
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Do you have decoupling caps?

If you start transmitting without them, the battery is unable to provide all of the current to power the radio and the Arduino.

Try adding caps, then see what happens.

Also, try using an external voltage regulator for the radio, and set it up like this:

+9v---100uF cap---Regulator---10uF cap---+5v
            |                     |            |
            |____________|_______|
                                  |
                                  GND
Logged

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 135
Posts: 6782
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

the TX light on the arduino is driven from the USB chip, not directly from the TX pin of the AVR.  I would think that "no usb connection" means "no blinking tx light", even if serial IO is working just fine...
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 92
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I just noticed that behavior with my duemilanove while troubleshooting my serial connection.  When the usb is plugged, the TX/RX of the AVR are non functionning?

I am having problem with my serial port not using USB.  is there an easy way to test if the TX/RX pins of the AVR are working properly since I cannot rely on the TX/RX light?  
« Last Edit: May 17, 2009, 03:28:35 pm by Mart » Logged

0
Offline Offline
Faraday Member
**
Karma: 8
Posts: 2526
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

As westfw points out, the TX/RX LEDs are a function of the FTDI chip; they are not directly connected to the TX/RX lines.  I wouldn't count on them unless using the USB interface (or do some work with the FTDI datasheet and Arduino schematic to verify one way or the other).

-j

Logged

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 135
Posts: 6782
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

For testing purposes, you can put an LED between pin 1 and GND (preferably with resistor) and see if it blinks (the LED may interfere with operation of whatever you're trying to talk to, but if it blinks you'll know the serial port is still working...)
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 92
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

uhm doesnt seem to work without a resistor...
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 7
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I placed a reistor/led from pin 1 to gnd, solid led. I am having trouble with downloading a program( never finishes),
"L" led flashes twice the "TX" led flashes continually at a high rare. I was able to get a sample program downloaded the first time, after that nothing. I am powering the board with +9V from a power supply and connected to the usb for programming.

 I installed the led prior to opening the program. The led blinked two times when I opened the program.  I pushed the reset button and the led flashed. I waited about 4 seconds and tried to download a program. The led flashe a couple of times and then stayed solid, TX light continually flashing.
« Last Edit: May 19, 2009, 12:46:40 pm by cross1933 » Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 631
Posts: 34473
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I placed a reistor/led from pin 1 to gnd, solid led. I am having trouble with downloading a program( never finishes),

I am not surprised that pin receives data from the USB port to program the processor. You are blocking this signal with the resistor and LED.
Logged

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 135
Posts: 6782
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So I did some experiments as well...
1) On my mac/arduino setup, not only does the TX light not flash when the arduino is battery powered, the TX LED doesn't even flash when the "Serial monitor" is not open.
2) My "add an LED to the TX pin directly" logic was backwards - to see flash when transmitting, connect the LED with its cathod on TX and its anode on +5V.  (for ease of connection, I just used another output pin set to HIGH.) (ON pulses are much easier to see than "off" pulses.)
3) lower bitrates make for longer flashes.
4) It seems to work fine - even though the built-in TX led does not flash, the TX pin does cause flashes on the LED.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 631
Posts: 34473
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

If you look at the schematic you will see that the TX and RX LEDs are controlled by the GPIO pins of the USB to serial bridge chip. That means the flashing of them has nothing to do with serial data going too or from the processor but is driven by the COM port driver in the host PC. I suspect that this is just a cosmetic part of the driver and not related to actual data at all.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 7
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Any ideas on why I am unable to upload a program to the board?
Logged

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 135
Posts: 6782
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Any ideas on why I am unable to upload a program to the board?
Sure.  Like grumpy said, an LED on the TX line can interfere with the serial com back to the PC, so the PC doesn't see the bits that say "yes, your upload is working."  I think I avoided this by using a white LED, but the better solution is not to put the LED there till after the program has uploaded.
Logged

Pages: [1]   Go Up
Jump to: