Serial Output Garbled

Hello,

I'm having trouble with one of my projects and I'm not sure if it's a problem with serial or with power on my Arduino Duemilanova. My basic set up is that I have an ethernet shield on the Arduino and the Rx and Tx pins (0,1) going out to a MAX2322 chip and the MAX2322 connected to a printer. The Arduino checks a webserver for text and prints it on the printer using Serial.print(). I have it working great... as long as my Arduino is getting its power over USB from my computer. When I unplug the USB and plug in a 9V wall adapter to have it run while disconnected from the PC, the serial printer output is garbled. I thought it was a power issue, so I tried powering the board with just a USB power source, and I get garbled output, or sometimes nothing.

I know that you may need more details to help out, but I wanted to check to see what the first hunches were. Am I looking to fix a power issue or a Serial issue?

Thanks,
Matt

Am I looking to fix a power issue or a Serial issue?

As it works with USB power it is defiantly not a serial issue, you have a power issue.
Are you connecting the power to Vin?
Have you connected the grounds correctly?
Is it a 9V DC output AC adaptor?
Can it supply enough current?

Are you connecting the power to Vin?
Have you connected the grounds correctly?
Is it a 9V DC output AC adaptor?
Can it supply enough current?

Yes, it's a 9V AC to DC Adapter that has worked for other projects, but this is the first time I'm using it with the Ethernet Shield and the MAX2322. It might be a current issue, I'll have to play around with it to see what i come up with.

Thanks!

From the symptoms, the most likely cause is a bad ground connection. What pins on the printer do you have connected to the Arduino?

From the symptoms, the most likely cause is a bad ground connection. What pins on the printer do you have connected to the Arduino?

Sorry, I'm new at the electronics thing, so pardon me if I'm not using the right terminology: I have the (-) rails on my breadboard hooked up to the ground on the Arduino with the printer's ground and the MAX3232's ground connected to that, sorry for the bad pic, but here's what the breadboard looks like:

Yes, it's a 9V AC to DC Adapter that has worked for other projects, but this is the first time I'm using it with the Ethernet Shield

The official ethernet shield is a greedy b*gger as far as current goes. It uses around 7-8 times as much power as a naked arduino. If the supply is a bit short of smoothing you could be getting very ragged DC out of it when its feeding the ethernet shield as well as the arduino. If it has a small output,it could be it just isn't man enough for the job.

Thank you everyone for your help. Here's a very basic electricity question: should I then buy a DC adapter that has a higher output voltage or higher output amperes? I know you can supply too much volts to an Arduino. Is it possible to have to have an adapter with too high of an ampere rating?

Based on what I'm learning, I think I should get a DC adapter that outputs 12V and then a higher ampere output. I see mouser.com has 12VDC adapters that output anywhere from 100 mA to 2.0 A. Should I just order the 12V 2.0A adapter?

THANK YOU!

Whatever you connect to the power supply will use as much current as it needs upto the limit of the power supply so a higher rated supply will do no harm. A little warning regarding feeding an arduino with an ethernet shield with 12 volts, the arduino's regulator will get hot. 9 Volt is a safer bet if you're using ethernet.......

I found a 5V 4.0A power supply and tested the voltage with my multimeter, and I was getting 5.27V. Even with this power supply, I'm having the same problems: garbled text.

Could this then be a ground issue? Is there a difference between the ground from the computer (powered USB hub, to be accurate) and a wall wart?

I decided to test the problem a few other ways. I took a different Arduino Duemilanove board without the ethernet shield and wrote a simple "Hello, World!" sketch. Under USB power, "Hello, World" prints fine, but under power from either of my AC adapters (9V 650mA and 5.0V 4.0A), I get no response from the printer most of the time and sometimes garbled text. When I switch back to USB, it might spit out a little bit of garbled text, but then it goes right back to printing "Hello World" the way it should.

If this is a ground problem, how would i fix it?

Thanks again,
Matt

Ok, so Ran Talbott was right, it is a ground issue. I tried powering the Arduino with my wall wart and connecting the USB's ground to the breadboard's ground rail.

Whenever the USB ground is tied into the circuit, it all works perfectly. When I break that USB ground connection, get nothing printed and sometimes garbled text.

If I get an AC-DC adapter that has three prongs that plug into the AC, will this solve my problem? Or is there a way I can fix this this while using the wall warts that I have (only two prongs into the AC). I guess I don't totally understand how the ground is being used. My laptop (which provides the USB ground) only has two prongs going into the wall, so there must be a way, right?

Thanks again,
Matt

Thank you so much to everyone who helped me out with this. I tried connecting the ground to different pins on the back of the printer and finally found one that worked 100% of the time, no matter what the power source.

For some reason, the serial printer DB9/DB25 pin diagrams I found online don't match the printer that I have and the fact that it worked while powered under USB lead me to believe that I was using the right pins all along.

Now I'm back to using the 9V 650mA power adapter that I ordered for the project and it has been working like a champ.

Thank you again for you help,
Matt