Author Topic: bluetooth controlled robots  (Read 22402 times)

0 Members and 1 Guest are viewing this topic.

Offline AdminTopic starter

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: bluetooth controlled robots
« Reply #30 on: June 22, 2007, 08:09:24 AM »
Ok I made some progress in narrowing down the problem.

First, there was some loose connections with my apparently not so l337 soldering skills . . . after figuring that out, I then did a loop back connecting the TX and RX pins on the SF TTL to USB converter CP2103 (gamefreak, this is what Im using to convert the signal).

No matter what I transmit, nothing gets received. So I scoped up the TX line (see first attachment). Yesterday it looked worse, but today you can still see these rounded edges when it shouldnt . . . You can also see that its transmitting at a baud of 20000. The data sent is the letter 'H'

Since Im bypassing the easy radio that means that it isnt part of the problem (well, it could be, but it wouldnt be the only one). I suspect my SF usb thing is broken and I should just buy a new one . . . thoughts?

Now scoping the UART of my ATmega644, I get the second attached image. The square waves are nice clean and sharp. You can see that the baud is also 20000. I think I was sending 'r' but I forgot . . . Unfortunately after sending this clean signal directly to the RX of the USB converter it still doesnt receive data, making me suspect the RX is just fried entirely.

Lastely, I found that if I removed my divide by 8 (and a few other minor code changes) that I can get a baud that is exactly 19200 coming out of my UART. The datasheet says I will get a 7% error if I leave my clock divided by 8 - think this will cause a problem? I'd rather leave it divided . . .

Offline rgcustodio

  • Robot Overlord
  • ****
  • Posts: 217
  • Helpful? 0
  • Use "Search" and ye might find answers!
Re: bluetooth controlled robots
« Reply #31 on: June 22, 2007, 10:38:30 AM »
Quote
Since Im bypassing the easy radio that means that it isnt part of the problem (well, it could be, but it wouldnt be the only one). I suspect my SF usb thing is broken and I should just buy a new one . . . thoughts?
This might enlighten you a little bit http://forum.sparkfun.com/viewtopic.php?t=2479&highlight=cp2103

This might also be of interest:
http://www.pololu.com/forum/viewtopic.php?t=510

Both follow the reference design of the CP21xx chips so both might be affected by the same issue.

Goodluck!
« Last Edit: June 22, 2007, 11:02:46 AM by rgcustodio »
The best thing one can do when it's raining is to let it rain. - H. W. Longfellow

understanding is the path to enlightenment

Offline stinkerbomber

  • Beginner
  • *
  • Posts: 6
  • Helpful? 0
Re: bluetooth controlled robots
« Reply #32 on: June 22, 2007, 11:56:51 AM »
Sorry to butt in as i'm a noob - how about adding a crystal oscillator to the AVR to lock the frequency. You may be having problems getting a stable frequency from the AVR.

Offline dunk

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 1,086
  • Helpful? 21
    • dunk's robot
Re: bluetooth controlled robots
« Reply #33 on: June 30, 2007, 11:53:38 AM »
hi Admin,
so sorry about the delay, missed this post first time round.
also i'm afraid i can't comment on your scope output as i'm stuck with a text only console today. (no pretty pictures...)

so your symptoms seem to point to something being wrong with either the USB to UART module or the setup on the computer it is plugged into.
do you have a regular USB to RS232 dongle you can try testing that your comms package works with USB? (connect RS232 pins 2 and 3 to loopback.)

the only other thing i can think of trying is to test it with one of the standard baud rates. (19200 instead of 20000)
some equipment is funny with non standard speeds.

also consider trying a lower baud rate. the slower the baud rate the less the chance of errors. most equipment will work at 600 baud for testing.

as for the clock devidor, i have got UARTs to work with that sort of error before but your milage may vary.

dunk.

Offline robotvisionary

  • Full Member
  • ***
  • Posts: 94
  • Helpful? 0
  • Lucky I wasn't that driver.
    • Apple Hackz
Re: bluetooth controlled robots
« Reply #34 on: July 08, 2007, 01:52:38 AM »
I think you can use a usb plug like this one http://www.radioshack.com/product/index.jsp?productId=2255702&cp=&sr=1&origkw=USB+plug&kw=usb+plug&parentPage=search

and connect the dongle for the computer to the other one inside the robot and at the end connect the usb and somehow power it with the battery or check if it doesn't need much electricity because the you can solder the electric part to a port in the battery. and there you go.

Also you have to add a female connector to the end of the usb port to fit the bluetooth devise.
I've have not failed, I've just found out 2,000 how a light bulb will not work

                              Thomas Edision.
[youtube]59xcT1dstq4[/youtube]

Offline dunk

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 1,086
  • Helpful? 21
    • dunk's robot
Re: bluetooth controlled robots
« Reply #35 on: July 08, 2007, 05:10:14 AM »
hi robotvisionary,
no. this will not work for reasons allready discussed in this thread.
in short, you would be trying to connect 2 USB devices together with no USB host controller.

dunk.

Offline robotvisionary

  • Full Member
  • ***
  • Posts: 94
  • Helpful? 0
  • Lucky I wasn't that driver.
    • Apple Hackz
Re: bluetooth controlled robots
« Reply #36 on: July 08, 2007, 05:29:11 AM »
Oh Thanks
I've have not failed, I've just found out 2,000 how a light bulb will not work

                              Thomas Edision.
[youtube]59xcT1dstq4[/youtube]

Offline dinzzud

  • Beginner
  • *
  • Posts: 1
  • Helpful? 0
Re: bluetooth controlled robots
« Reply #37 on: August 15, 2007, 09:43:34 PM »
hello im new user here...
now i was thinking to build a bluetooth controlled toy car..  can anyone guide me where do i need to start from??
im new in this bluetooth control..   :)


 


Get Your Ad Here