Pages: [1]   Go Down
Author Topic: My cheap bluetooth I/F to arduino saga  (Read 2813 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 5
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I used the Mdfly bluetooth module, and a cheap dongle to get a wireless interface between my arduino setup and my laptop for datalogging.

I made a blog to document what I did to make it work, here
http://randytsuch-bluetooth.blogspot.com/

Since I got a lot of help from this forum for my project, I hope this helps someone else

Randy
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17301
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey thanks for that. I just put off an order for Mdfly module. Sure a lot cheaper then what SparkFun offers.

Now to get a USB dongle.

Lefty

Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 5
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Good luck
One thing I should mention is that I tried to get my Arduino duemilanove talking to the module, but I couldn't get it to work.  I was trying to use the Arduino serial port, connected to the module, and then sending an "AT", and then echoing the response to an LCD, but I never got a response.
With a different serial port, and a mega, it was no problem.

Randy
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 5
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

A couple more disclaimers
(I just added this to my blogger page too)

With my current setup, I have to make the connection with the laptop right next to my Arduino.  Once I have the connection, I can move away.

Distance is limited.  I lost the connection after about 30 feet.  Signal had to go through a metal chassis, a window and a wall to get to me though.

If I had to guess, I think it is the cheap dongle I bought.  I ordered a toshiba bt dongle, will see if that works better.

Randy
Logged

Seattle, WA USA
Online Online
Brattain Member
*****
Karma: 631
Posts: 50065
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Distance is limited.  I lost the connection after about 30 feet.
The maximum range of bluetooth is 10 meters. That's about 30 feet.

Think about what blue-tooth is typically used for - cordless mice, cordless keyboards, and wireless cell phone headsets. Can you even see your computer screen from 30 feet? What good is a headset 30 feet from the phone?

Quote
If I had to guess, I think it is the cheap dongle I bought.  I ordered a toshiba bt dongle, will see if that works better.
I don't need to guess. It won't.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 5
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I understand that bluetooth is limited range. 
The problem I am trying to fix that right now, my PC has to be very close to the module to pair up, and then I can move farther away.

Also, I bought two cheap USB dongles, and one pairs intermittantly, and one works OK, that's why I am a little suspicious of the dongle.

Randy
Logged

Seattle, WA USA
Online Online
Brattain Member
*****
Karma: 631
Posts: 50065
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
my PC has to be very close to the module to pair up
How close?

Are you sure that bluetooth is the correct technology for the problem you are trying to solve? Yes, it's cheap, but remember the programming proverb:
Good, cheap, fast - choose any two.
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17301
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Perhaps someone could list the avalible methods for implementing a reliable full duplex serial wireless link the would be practical to use with an Arduino to PC connection. Say 57600 baud minimum. Costs, range, and other trade-offs could then be compared. This latest posting showed at least I can play with bluetooth for around $25 and see if it seems useful for some applications.

I have just ignored Bluetooth up to now just because of the faily high price for the Bluetooth modem modules, at least from what SparkFun had to offer: http://www.sparkfun.com/search/results?term=bluetooth&what=products


Lefty

« Last Edit: April 25, 2011, 10:23:06 am by retrolefty » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 5
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I played some more with BT and pairing yesterday, and it seems to be better now, maybe because I'm using a newer version of the Toshiba bluetooth stack.

I think I can get up to maybe 10 feet away to pair, but it's not always consistent, sometimes I need to be closer.

If you have a laptop, and can get close to pair, or bring your arduino close to your PC to pair, it works fine.

And this is not the wireless IF for everyone. 
I think it works as a fairly low cost, close range solution.

Randy
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17301
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I played some more with BT and pairing yesterday, and it seems to be better now, maybe because I'm using a newer version of the Toshiba bluetooth stack.

I think I can get up to maybe 10 feet away to pair, but it's not always consistent, sometimes I need to be closer.

If you have a laptop, and can get close to pair, or bring your arduino close to your PC to pair, it works fine.

And this is not the wireless IF for everyone. 
I think it works as a fairly low cost, close range solution.

Randy

Well today I received the Mdfly bluetooth modem module. I also received the cheap PC bluetooth dongle from ebay yesterday. So today I installed it all. I first tried using the windows built-in driver and everything seemed to load ok, but I couldn't establish a link up using a PC terminal program (brey terminal) and the led on the Mdfly never went to steady on. So I then downloaded the toshiba bluetooth drive/stack you identified and everything works fine so far. I haven't given it a real distance test, but I was able to disconnect and reconnect from about 25-30 feet away (man-cave/den to living room). I'll see if can work further distances tomorrow maybe.

 I noticed that the toshiba driver/stack added in addition to the com40 device, also com ports 6,7,15,16,17,18,19,20,21,22.
Do you know if it's OK for me to delete all these except com40?

 Also do you have any idea how much toshiba wants for the licence after the 30 day trial?

Lefty
Logged

italy
Offline Offline
Jr. Member
**
Karma: 0
Posts: 52
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey guy thanks a lot!
you solved my headache...
this toshiba driver WORKS
to send AT commands using duemilanove, I removed the atmega chip and swapped the tx-rx pins
« Last Edit: April 28, 2011, 03:07:17 am by monsterfactory » Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17301
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey guy thanks a lot!
you solved my headache...
this toshiba driver WORKS
to send AT commands using duemilanove, I removed the atmega chip and swapped the tx-rx pins


Next time you want or need to send AT commands it's not nessesary to remove the atmega chip, just wire a jumper from reset pin to ground pin. That will isolate the chip but still allow the FTDI USB convertor chip to function.

So what are your plans after the 30 trial on the Tosiba BT driver is up?

Lefty
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It's possible -- this cheap combo worked for me:

I have an Arduino Uno SMD interfaced with an old RC car's steering and motor control. I uploaded Firmata to to the Arduino and I bought the MdFly Bluetooth module w/ breakout board (has voltage regulation) to provide a wireless serial link. It works perfectly.

This image link will probably work for a while. You can see the RC car, an Arduino Uno (mounted vertically) with the MdFly bt module floating in a mess of wires: http://a1.sphotos.ak.fbcdn.net/hphotos-ak-snc7/314673_10150371643499195_766134194_8333766_1539137813_n.jpg
I've also attached the pic to this post.

I'm running Windows 7 and using an IOGear GBU421 BT dongle.

I did not require any special drivers to establish a connection. I did however have trouble at first because the MdFly BT module is set for a rate of 9600, where as the Firmata sketch and... pretty much everything else runs at 115200. The blue light on the bluetooth module would blink until I tried to send it some data from firmata_test.exe, at which point it would turn on solid but nothing would happen. I eventually used Rhyduino (a firmata library in C#) to establish a 9600 connection to the com port and BAM! it works... such a good feeling.

I still haven't figured out how to change the baud rate on the MdFly bluetooth module; AT commands don't seem to be doing anything -- but I'll figure it out... either way, the core requirement is satisfied. I now have a C# radio controlled car with a panning IR distance sensor smiley

Parts:
1) Arduino Uno SMD: http://arduino.cc/en/Main/ArduinoBoardUnoSMD
2) MdFly Bluetooth: http://www.mdfly.com/index.php?main_page=product_info&cPath=8_47&products_id=428
3) IO Gear GBU421 http://www.iogear.com/product/GBU421/


* 314673_10150371643499195_766134194_8333766_1539137813_n.jpg (116.02 KB, 600x800 - viewed 38 times.)
« Last Edit: November 16, 2011, 02:31:49 am by syntaxerror » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


Next time you want or need to send AT commands it's not nessesary to remove the atmega chip, just wire a jumper from reset pin to ground pin. That will isolate the chip but still allow the FTDI USB convertor chip to function.



This combined with swapping the RX/TX pins (rx -> rx & tx -> tx from the Arduino to the MdFly bt) worked perfectly to change my baud rate. This forum rocks. Thank you everyone!
Logged

Pages: [1]   Go Up
Jump to: