Author Topic: Data Logger Responsive...Putting Out Garbled Output  (Read 989 times)

0 Members and 1 Guest are viewing this topic.

Offline bfish3385Topic starter

  • Beginner
  • *
  • Posts: 4
  • Helpful? 0
Data Logger Responsive...Putting Out Garbled Output
« on: May 20, 2012, 06:01:01 PM »

I followed the SoR tutorial for UART...but decided to add a twist by data logging through Bluetooth. (Plus...I tried a hard-wired Rx/Tx to USB converter from Pololu [], but had more and more trouble trying to get their driver authenticated with Windows 7and never got it to work)

I (amazingly enough) got the Rx/Tx to bluetooth (somewhat) working ... I soldered two 1 kOhm resistors directly onto the Rx/Tx ports on the HC-05 bluetooth chip, as well as a ground and 5V wire ...which was very hard considering the half-circle pins on the side were only ~1.3mm apart.

Then I proceeded to go Control Panel --> add new device --> added the HC-05, all the software was plug-and-play and seemed to install just fine.

Then when I followed the directions on the SoR tutorial ( to change the baud rate, add uart and rprintf functions, change the makefile, changed the fuses**see comment at end** etc...)
I used Hyperterminal to connect to the serial port (Note: I have Windows 7 and therefore no Hyperterminal, so I downloaded the files for it that were available on the web. Also note that when using Bluetooth,  to get the connection working it will ask for a paircode ...the default for this device is "1234").

After connecting successfully, the screen instantly started showing output ...but it was totally garbled with seemingly nonsensical characters.

***However, when I covered up the photoresister on the sensor, or shined varying levels of light onto it the nonsensical characters would change with the same pattern (see attached picture: Garbled_Output_Covered_Photoresistor.jpg; the boxed portion is when the photoresistor was covered up)***

Any suggestions as to what could be causing this??

First... ref this: seems like the same problem but I've checked the baud rates

I verified my baud rates are correct (see attached pictures: "BAUD_Settings.jpg" and "BAUD_Settings2.jpg" --  unless there is something I missed in the set of programs included with the $50 dolloar robot tutorial...I don't fully understand all the code)

I also tried using Putty and verified the baud rate on there...still same garbled output

Other things that could make a difference but didn't seem too big to me:

-- As can be seen from screen shots, I disassembled the $50 robot and put the components on a breadboard -- not all components are there (only one photosensor and no servos, and I commented out that portion of the code)

--I have 5V going to the bluetooth HC-05 chip, when I think it's rated at 3.3V (ehhh don't have a 3.3V regulator and....hasn't fried yet...)

--**When I changed the fuses tab, it doesn't look like the tutorial did (but I think I changed it the same way...see picture: "Fuse_Settings.jpg")

--I know the wiring looks messy...I just connected the 6x pins from the isp programmer directly to the chip on the breadboard and left 'em there (sorry!!)

Any help/input would be greatly appreciated! I can try and turn this into a tutorial after I get it successfully working...

Offline bfish3385Topic starter

  • Beginner
  • *
  • Posts: 4
  • Helpful? 0
Re: Data Logger Responsive...Putting Out Garbled Output
« Reply #1 on: May 20, 2012, 10:05:28 PM »
***UPDATE: I just found the source of my hopefully it will help if anyone else is trying to use the HC-05 wireless transceiver Bluetooth module.

There are actually 4x things that need to be done to match the baud rate:

1) Programming baud rate for the microchip (atmega8 in my case)
2) Hyperterminal (or putty) baud rate
3) Devices/printers baud rate
4) The default, pre-programmed baud rate on the chips firmware...which apparently isn't changed when you change the devices/printer settings baud rate for that device!

My problem was that I was using the 38400 baud rate that came from the UART tutorial. And while I checked the specs for the HC-05 Bluetooth transmitter and it could definitely handle that, I did some more internet searching and finally found a good spec sheet at:

The spec sheet provided on their web site pretty much sucks....doesn't give the default pairing code "1234" instead of standard "0000" or the default bit rate, which is apparently preset at 9600!!

After setting it to 9600, the analog reading from the photosensor worked perfectly and the Bluetooth had some great range.

Next... I need to figure out this whole "AT command" thing so I can figure out how to program in a new pairing code and change the baud if anyone had any good articles on that, please pass that my way!

« Last Edit: May 20, 2012, 10:07:53 PM by bfish3385 »


Get Your Ad Here