Author Topic: [Solved] Garbage from BT / Ard Mini Pro, but not from Uno  (Read 3945 times)

0 Members and 1 Guest are viewing this topic.

Offline jmashburnTopic starter

  • Contributor
  • Posts: 11
[Solved] Garbage from BT / Ard Mini Pro, but not from Uno
« on: June 11, 2014, 03:09:25 am »
Hey guys,

Thanks again for helping. All I do here is ask questions.

I have an Arduino Uno 16mhz.
I have an Arduino Pro Mini 3.3v 8mhz ATMega 328. (http://arduino.cc/en/Main/ArduinoBoardProMini)
I have a Parallax RN-42 Bluetooth. (http://www.parallax.com/product/30086)

I'm programming the Pro Mini through the Uno. Successfully as far as I can tell.

My Uno Serial prints out the correct information ("Press")
My Pro Mini@9600, connected @ 19200, through Uno, prints out ("Press"). But @9600 it printed out garbage.

However, when I remove the Uno, power the Pro Mini by battery and try to connect with the Bluetooth module... I get garbage on any baud.

The rate at which I get it is accurate. Like the delays and the button presses and such, it's on time properly.. but the output itself is just garbage.

I've tested programming the Pro Mini. I get blinks working correctly. I get some serial output correct @ double the serial begin. But my bluetooth connection is just all off (from ASCII standpoint)

I'm really confused on how I can get the proper characters delivered through this BT module. I feel like I'm programming it right. I use SerialTools to test ports and baud, and I've checked every rate on the bluetooth but they all show the same garbage. Why doesn't it turn into different garbage?

What should I be looking at?


---

Mostly solved. It turns out there are some config jumpers that will force the baud to be 9600. Those are set ON by default, which always gives you crap. Disabling those jumpers made things work correctly. They're the ones all the way on the left (out of the 4).

Jumper order: Force Baud, Master mode, Slave mode, Factory reset
« Last Edit: June 13, 2014, 03:33:39 pm by jmashburn »
 

Offline jamesglanville

  • Contributor
  • Posts: 47
Re: Garbage from BT / Ard Mini Pro, but not from Uno
« Reply #1 on: June 11, 2014, 03:27:04 am »
Have you got a logic analyser or oscilloscope to see what the serial lines are actually doing? It sounds very much like you do not have the same baud rate for the pro mini, the bluetooth module and your pc serial port.

If you short the rx and tx lines of the bluetooth module, can you get successful echoes using a terminal program?
 

Offline liquibyte

  • Frequent Contributor
  • **
  • Posts: 475
  • Country: us
Re: Garbage from BT / Ard Mini Pro, but not from Uno
« Reply #2 on: June 11, 2014, 03:28:16 am »
Compiler issues?  What OS are you programming from?  What are you outputting to?

I recently had an issue with an UNO and one of the Noritake displays outputting garbage characters and it turned out that the GCC that ships with Arduino was older / out of date for my OS.  I mv'ed the included GCC and symlinked to a later version and presto, my issues went away.
 

Offline jmashburnTopic starter

  • Contributor
  • Posts: 11
Re: Garbage from BT / Ard Mini Pro, but not from Uno
« Reply #3 on: June 11, 2014, 04:11:44 am »
After reading more:

I tried connecting the Arduino Uno directly to the Bluetooth, then monitoring the Bluetooth via SerialTools. The output is coming out correctly.

So the problem is somewhere in the Pro Mini.. right?


OS X 10.9.2
Arduino 1.0.5

Compiling to the Pro Mini seems to be normal because Blink tests work. It gets the program and it seems to work, everything except the serial output. I'm assuming it's something about the Pro Mini being 8mhz and the Uno being 16mhz.

 

Offline jamesglanville

  • Contributor
  • Posts: 47
Re: Garbage from BT / Ard Mini Pro, but not from Uno
« Reply #4 on: June 11, 2014, 05:18:06 am »
When you upload your code to the mini, have you checked to make sure you have selected the 8mhz option in the arduino boards menu?
 

Offline jmashburnTopic starter

  • Contributor
  • Posts: 11
Re: Garbage from BT / Ard Mini Pro, but not from Uno
« Reply #5 on: June 11, 2014, 04:17:52 pm »
Yeah, my selection in the boards menu is correct.
 

Offline jmashburnTopic starter

  • Contributor
  • Posts: 11
Re: Garbage from BT / Ard Mini Pro, but not from Uno
« Reply #6 on: June 12, 2014, 04:28:10 am »
Here's a video screen cap switching between baud connections and showing that the output is always the same garbage.

mySoftwareSerial is set @ 9600 and prints a line every second in the loop.

Video: http://cl.ly/341L3d1h0u3E
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf