Author Topic: Bluetooth broad-level clarifications; r232 vs. UART, process and interfacing  (Read 1085 times)

0 Members and 1 Guest are viewing this topic.

Offline bfish3385Topic starter

  • Beginner
  • *
  • Posts: 4
  • Helpful? 0
So I've done a lot of reading (and re-reading..) of all the UART tutorials -- both the basic and addition to $50 dollar robot tutorial (and of course built the $50 robot) as well as the bluetooth tutorial and the majority of forum posts and external links. I'm still somewhat confused on high-level interfacing, so I'll try and post my questions clearly so all can follow. Let me start off with some background:

In the tutorial section:
http://www.societyofrobots.com/electronics_bluetooth_robot.shtml,
there's a section that's titled: "Where do I connect bluetooth on my robot?"
And it answers that you do it through an rs232 interface *or* through UART Rx/Tx pins.

And in the tutorial:
http://www.societyofrobots.com/microcontroller_uart.shtml,
it says that "if you wanted bluetooth wireless, get a TTL to wireless adapter"

When do a quick Google search of "TTL to wireless adapter", it brings stuff up like this:
http://www.ecrater.com/p/12400667/mini-bluetooth-wireless-ttl-transceiver. (which seems to use Rx/Tx pins)

So, one of my questions is this:
1) It seems that UART enables the use of Rx/Tx on the microcontroller. Is there a difference between UART and rs232? Or how do you connect a wireless adapter directly into the rs232 part of the atmega8, as mentioned in the tutorial? It seems that following the UART tutorial would enable the use of the Rx/Tx pins in the atmega8, which would allow using the rs232 to bluetooth wireless adapters. (But the first mentioned link talks about UART *or* rs232?).

I understand that rs232 is the old-school connection method that requires a very high voltage...but it seems that every TTL to bluetooth adapter has rs232, and want to know if you have to
a) first follow the UART tutorial and then
b) connect the Rx, Tx pins of the adapter to the Rx, Tx of atmega8 microcontroller and
c) would this be a UART or rs232 communication, or the same thing??


2) Difference between master/slave bluetooth stuff? Is the USB transceiver always the master and the dongles are always the slaves? Can there be two-way communication through both?  For example: In the $50 robot tutorial, there is a programmer that uses the MISO and MOSI parts of the microcontroller and then you get a USB interface (AVR ISP2 Programmer). could you theoretically plug a USB bluetooth transceiver directly into this USB port,then a USB dongle onto your computer and fire up AVR studio and program your microcontroller like normal? And if you do the TTL to bluetooth via Rx, Tx, and had a bluetooth USB dongle at the computer end -- do you have to use a program like hyperterminal, and
a) can you program your chip with this (or only get output?)
b) still program the chip using AVR studio?

Then I realize there's also the possibility of having already programmed your microcontroller, in which you can send it an input from a computer connected via bluetooth (and hyperterminal) and have it respond based on the input (and is this the only thing you can do with the bluetooth connection, or can you program it wirelessly too?)

My basic goal is to have an atmega8 chip that can be programmed wirelessly via bluetooth, using AVR studio -- because lets face it... wires are a pain!

I hope the post isn't too convoluted. I'd be happy to package together a PowerPoint or PDF outlining the step by step details after I gather enough information to get a wireless connection/programming interface working, for all other members to see and benefit from.

Thanks!

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
So, one of my questions is this:
1) [...] Is there a difference between UART and rs232? Or how do you connect a wireless adapter directly into the rs232 part of the atmega8, as mentioned in the tutorial?
That's two ;)
UART (Universal Asynchronous Receiver and Transmitter) is a module that takes care of asynchronous (serial non-clocked) communication.
RS232 (which is correctly named EIA/TIA323 followed by a letter indicating revision) is a protocol set (hardware, logic, voltage) defining a specific implementation of asynchronous comms and anything not following the mentioned protocols are strictly speaking not RS232 - like the serial port on some older lap-tops running "RS232" comms standard on 0V-5V (or even 0V to 3V).
But unfortunately the name sticks to anything even remotely like RS232 and since the protocol is made to accept less than perfect connections, it often works when coupled to a real RS232 DTE or DCE.

There is no RS232 part on an ATmega8.


I understand that rs232 is the old-school connection method that requires a very high voltage...but it seems that every TTL to bluetooth adapter has rs232, and want to know if you have to
a) first follow the UART tutorial and then
b) connect the Rx, Tx pins of the adapter to the Rx, Tx of atmega8 microcontroller and
c) would this be a UART or rs232 communication, or the same thing??
It would be UART, but with the timing and polarity resembling RS232.


2) Difference between master/slave bluetooth stuff? Is the USB transceiver always the master and the dongles are always the slaves? Can there be two-way communication through both?
Yes, simply speaking, the master/slave only defines who has to initiate the comms.
Like an (old school) school teacher and (well behaved) student ;)  You can both talk, but the student better shut his mouth until the teacher adresses him.


  For example: In the $50 robot tutorial, there is a programmer that uses the MISO and MOSI parts of the microcontroller and then you get a USB interface (AVR ISP2 Programmer). could you theoretically plug a USB bluetooth transceiver directly into this USB port,then a USB dongle onto your computer and fire up AVR studio and program your microcontroller like normal?
No. BT is more than just a couple of wires.


And if you do the TTL to bluetooth via Rx, Tx, and had a bluetooth USB dongle at the computer end -- do you have to use a program like hyperterminal, and
a) can you program your chip with this (or only get output?)
b) still program the chip using AVR studio?
a) no
b) yes


My basic goal is to have an atmega8 chip that can be programmed wirelessly via bluetooth, using AVR studio -- because lets face it... wires are a pain!
I love wires... They never fail or get interference and they're cheap (well, compared to wireless at least) :)

You'll not be able to program the ATmega8 wirelessly, unless you build a full blown programmer into the same board, to receive the code and stuff it into the controller.
To get that sort of possibility, you'd at least need a (larger) chip with "self write" capability.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

 


Get Your Ad Here

data_list