topbanner.gif
October 25 2014 10:25:38
HRO Summer Raffle
Donate
Please enter your site username (if you have one) and your email address (required) to be sent with this donation for tracking and contact purposes.


Site Username
If you don't have a site username, just enter "Guest"


eMail Address **REQUIRED**

Login
Username

Password



Not a member yet?
Click here to register.

Forgotten your password?
Request a new one here.
Navigation
bullet2.gif HOMEROASTERS.ORG
bullet2.gif Active Forums
bullet2.gif ALL FORUMS
bullet2.gif Downloads
bullet2.gif News
bullet2.gif Forum FAQ
bullet2.gif Contact Me
bullet2.gif Photo Gallery
bullet2.gif Search
bullet2.gif User's Voice
Forum Threads
Newest Threads
bullet2.gif Scott Rao's roasting...
bullet2.gif Hi from Björn in Sweden
bullet2.gif Cost of coffee beans...
bullet2.gif My KKTO BUILD...
bullet2.gif TC4 + Clippard EVP P...
Hottest Threads
bullet2.gif What's in Your Ro... [470]
bullet2.gif Modifying a Bread... [115]
bullet2.gif Bread machine build! [77]
bullet2.gif Freshbeans Air-Ro... [70]
bullet2.gif TC4 - Overview an... [59]
Users Online
bullet2.gif Guests Online: 4

bullet2.gif Members Online: 2
tamarian, JackH

bullet2.gif Total Members: 3,466
bullet2.gif Newest Member: rftek
BotSlap Panel
bullet2.gif Last check: 10/25/2014 10:18
bullet2.gif Slap count: 0
bullet2.gif Last checked ID: 3946
View Thread
Homeroasters.org » DATALOGGERS - CONTROLLERS - RATE OF RISE METERS » Dataloggers/Controllers/Rate of Rise Meters
Who is here? 1 guest(s)
 Print Thread
Bluetooth and the TC4
bvwelch
In another thread we're brainstorming about a roasting app for Android phones/tablets, and bluetooth seems a good candidate.

Way back at the start of the TC4 project, RandyG suggested bluetooth for his roaster. At that time, it seemed the consensus was that the Arduino bluetooth modules were too expensive.

Times have changed -- there are some modules as low as $10. I plan to evaluate some of them soon.

It seemed best to start with an expensive module, but one that was known to work well, and get the software going. So, I chose the 'Bluetooth Mate Silver' from Sparkfun. http://www.sparkf...ucts/10393

It worked great on both Windows 7 and Ubuntu. Well, I had a little hair-pulling on Ubuntu, but once installed, it works great. I'll write up the details soon.

Note: Initially, I am only using Bluetooth for logging data -- not for uploading new sketches into the TC4. I still use USB for that. Later we can investigate loading sketches also.

The next modules to evaluate: http://mdfly.com/ and http://www.sparkf...ducts/9913
Edited by bvwelch on 03/12/2011 14:32
 
JimG
Fantastic! I can't wait to see where this wireless link leads.

Jim
 
www.pidkits.com
randytsuch
Just wanted to post my encouragement for this project.

I am starting to think about adding an Arduino to an espresso machine. Someone is making a linux based project, with a wireless interface

http://www.coffee...ods/522346

Got me to thinking about a "headless" PID for a machine. Would make installation much simplier.

Since bluetooth comes in on a serial port, it would make it simplier for me, don't have to implement Ethernet.

My goal is bluetooth interface with iphone, where you could set and read temps from the iphone.

Randy
 
randytsuch
I decided I wanted a wireless version of Kona, so I ordered the cheap bluetooth module from mdfly yesterday, should be trying it out next week. I also ordered a cheap bluetooth usb dongle for my pc, should be here soon also.

The only "trick" I see to connecting bluetooth is it is recommended to convert the serial tx from the arduino going to the rx of the bluetooth, because the arduino is 5v (at least mine is) and the bluetooth is 3.3v. I think I can do it with a couple of resistors.

BTW, from what I read, you can't load new software with bluetooth, you need to use usb for that. I am thinking about adding a switch, so it is easy to switch back and forth. I think you only need to worry about the bluetooth tx signal, but I have to try it and see.

Thanks for getting this going Bill, looks promising.

Randy
 
bvwelch
Hi Randy -- glad to hear you'll be evaluating the cheap module from mdfly. While I am very pleased with the Bluetooth Mate Silver -- with a simple mod: http://bvwelch.co...

it does upload sketches via Bluetooth -- it is too expensive for many folks I suspect. I hope to order some cheap modules too, perhaps the one on Ebay.
 
randytsuch
Hi Bill
I think DTR is actually CTS coming out of the chip, if I read the schematic correctly.

So, what did you do with these signals?

I can wire to RTS and CTS on the bluetooth chip in the MDFLY module, but am not sure where to wire them right now.

Randy
 
bvwelch
Hi Randy,

If you just want to see if you can get serial comms going, and you don't care about trying to upload sketches via BT, then you can probably just leave the BT module's modem leads disconnected, or, if that doesn't work, then jumper them to each other - no connection to the Arduino. Just connect TX, RX, and Gnd to the Arduino. You may have to swap TX and RX.

======= the rest of this post has to do with trying to upload sketches via BT. ======

Apparently early Arduino IDE used RTS and more recent IDE use DTR, from the PC, in order to reset the Arduino whenever the user requests a sketch 'upload'.

I actually did my tests on a JeeNode, which requires an external FTDI 'cable'. In addition, it provides a 0.1uF cap in series with the "RTS" pin and the Arduino's RESET signal. So, when the modem lead wiggles, the edge generates a pulse on the reset line, which invokes the bootloader.

On the Duemilanove, these signals are driven by the onboard FTDI chip, but in the case of Bluetooth, you won't be using the FTDI chip.

For you, the simplest mod might be to just connect your 'modem lead' from your BT module to a 0.1uF capacitor in series with the Reset pin, which you can find on a few different connectors, like the ICSP and also the Power connector.

Now then, we get to the next problem -- on reset, the bootloader does not wait very long at all for a 'sketch upload', before it times out and runs your existing sketch.

Based on all of the unanswered questions on various forums, and also after my own experimentation with Windows 7 and also Ubuntu, it seems that with a Bluetooth module, the modem lead wiggles very early in the process, and the bootloader times out, and sketches fail to upload.

On the Sparkfun Bluetooth Mate Silver, the actual chip is the RN-42 by Roving Networks. As far as I can tell, all of the Roving modules are uniquie in that they have essentially two sets of what we would think of modem control leads -- one set seems to wiggle when pairing happens. The other set wiggles when the remote PC tries to wiggle what it thinks are PC COM port modem control leads. If you use these 'remote modem leads', then sketches upload OK -- occasionally the bootloader times out but rarely.

Let me try and explain again -- the typical Bluetooth module may have 'modem leads', but they only wiggle to indicate pairing. But the Roving Network modules have an extra set of leads -- and an 'out of band' protocol, that allows the remote PC to wiggle these leads remotely, after pairing, and as often as the PC application -- in this case the Arduino IDE wishes.

Now, if you determine that the mdfly module actually provides similar 'remote modem lead' behavior, that would be very good news indeed!
Edited by bvwelch on 04/07/2011 10:32
 
Bhante
bvwelch wrote:bluetooth seems a good candidate...
there are some modules as low as $10.

The cheapest bluetooth available are the USB dongles, which you can get for about 1 US$ including postage from China. That wouldn't work just plugged into the USB port on the Arduino I assume?
 
randytsuch
Bhante wrote:
bvwelch wrote:bluetooth seems a good candidate...
there are some modules as low as $10.

The cheapest bluetooth available are the USB dongles, which you can get for about 1 US$ including postage from China. That wouldn't work just plugged into the USB port on the Arduino I assume?


The cheap bluetooth dongles need to plug into a shield. After you buy a shield, you aren't going to save any money.

Bill
In XP, the outgoing bt serial port is not showing up in the serial port list in processing, so I can't use it.
For example, my outgoing port is COM11
When I list the available serial ports in processing, COM11 is not included.
So, I can talk bt with something like putty, but not with processing.
Did you run into this problem?

Randy
Edited by randytsuch on 04/09/2011 20:50
 
bvwelch
Hi Randy, I didn't try it in XP, but your description reminds me that some versions of Windows have strange syntax requirements for com ports beyond com9, and Putty is smart enough to modify the name on the fly:

http://support.mi.../kb/115831
http://www.chiark...com10.html

Maybe these links will help.

About the bluetooth usb 'dongles' Randy is right that in order to use those, you'll need a shield with the USB 'host' adapter. In addition, there is a fair amount of Arduino code that you'll have to add to implement USB host adapter features. In my view, not cost effective.
Edited by bvwelch on 04/10/2011 11:09
 
randytsuch
bvwelch wrote:
Hi Randy, I didn't try it in XP, but your description reminds me that some versions of Windows have strange syntax requirements for com ports beyond com9, and Putty is smart enough to modify the name on the fly:

http://support.mi.../kb/115831
http://www.chiark...com10.html

Maybe these links will help.

About the bluetooth usb 'dongles' Randy is right that in order to use those, you'll need a shield with the USB 'host' adapter. In addition, there is a fair amount of Arduino code that you'll have to add to implement USB host adapter features. In my view, not cost effective.


Thanks for the info.
I also tried hyperterminal, and that also works. I would think HT would have a problem if it was a windows thing.
I am getting closer, I downloaded better bluetooth driver software, so at least the bluetooth com port (now 25) shows up in the serial list, it just doesn't work :(

Randy
 
bvwelch
Hi Randy, I regret that I can't help with XP -- after a terrible couple of weeks last fall with computer viruses, I no longer run XP on any computers. As I recall, some 3rd-party BT 'stacks' worked better than Microsoft's.

Perhaps you can consider upgrading to Win7? I do have one computer here with Win 7 and it is running BT to the TC4 OK.
 
randytsuch
bvwelch wrote:
Hi Randy, I regret that I can't help with XP -- after a terrible couple of weeks last fall with computer viruses, I no longer run XP on any computers. As I recall, some 3rd-party BT 'stacks' worked better than Microsoft's.

Perhaps you can consider upgrading to Win7? I do have one computer here with Win 7 and it is running BT to the TC4 OK.


I changed drivers to use the bluetooth stack from Toshiba, and things seems to work now. I haven't done any roasts with bluetooth, but at least I can get a processing program to talk to an arduino one now.

The issue I have now is the Toshiba program has a 30 day expiration date, so I need to figure something out before the end of a month

Randy
 
randytsuch
So bluetooth is working fine.

I created a blog of what I had to do to get it working
http://randytsuch...gspot.com/
 
prs16001
randytsuch wrote:
So bluetooth is working fine.

I created a blog of what I had to do to get it working
http://randytsuch...gspot.com/


I ordered the Bluetooth module and dongle today. I have a desktop which is not in the same location as my roaster so being able to log/tune the roasts has been missing until now. Is there a way around the toshiba license?

Thanks again for all the development work you did!
 
randytsuch
There are some issues I should have noted, so I hope it will work in your setup.

I need to have my laptop by the roaster, to make the connection, once it is connected I can move away.

Range appears to be limited. I was playing with range today, and could only move about 30 feet away, but I have it mounted in a metal chassis, and the signal had to go through a window and a wall to get to me.

Randy
 
prs16001
Just to state the obvious I'm in over my head

I have the mdfly bt00417 module and the rf-bt0004 dongle and I'm having trouble just communicating with it vie hyperterm, putty or Tera term. I was going to try my pc at work that is running windows 7. My home pc is xp mce 2005.

I was hoping to get logging wireless.
 
randytsuch
prs16001 wrote:
Just to state the obvious I'm in over my head

I have the mdfly bt00417 module and the rf-bt0004 dongle and I'm having trouble just communicating with it vie hyperterm, putty or Tera term. I was going to try my pc at work that is running windows 7. My home pc is xp mce 2005.

I was hoping to get logging wireless.


Are you using the Toshiba bluetooth stack?
What software are you running in the arduino?
What happens?

You can try this code, if you are using an arduino with just one serial port

void setup()
{
//Serial.begin(57600); //pc
Serial.begin(9600); //pc
}

void loop()
{
char ser_char;

if (Serial.available() >0){
ser_char = Serial.read();

Serial.write(ser_char);

}

}



This software will echo back whatever you type.
If you run this, and then open putty with the bt serial port, you should be able to type, and see what you type echo on the screen.
If you don't have a bluetooth connection, you won't see anything echo back.
I set the serial speed to 9600, which is the default speed for the module, I have changed my module to 57600.

Also, if this is a duemilanove, you need switch, so the USB will also work.

Randy
Edited by randytsuch on 05/01/2011 16:55
 
prs16001
Thanks for the quick reply!

I'm using an UNO and left aKona running on it. I was just trying to see if I could communicate between the pc and the BT module. The pc did find the module when I had it powered via the arduino but assigned one com port for incoming and another for outgoing. The toshiba stack assigned one port for the module. With the Toshiba stack the led would stay lit when I opened the port via putty but I couldnt get any response.

I'll try your code.

Thanks
 
randytsuch
prs16001 wrote:
Thanks for the quick reply!

I'm using an UNO and left aKona running on it. I was just trying to see if I could communicate between the pc and the BT module. The pc did find the module when I had it powered via the arduino but assigned one com port for incoming and another for outgoing. The toshiba stack assigned one port for the module. With the Toshiba stack the led would stay lit when I opened the port via putty but I couldnt get any response.

I'll try your code.

Thanks


If you get the light to come on solid, that's a very good sign, means that a link was established.

If you use the toshiba stack, then you get a little icon in the taskbar when the link is made.

If you are running aKona, then you probably need to change the baud rate to 9600 baud.

Randy
 
Jump to Forum:
Similar Threads
Thread Forum Replies Last Post
BlueTherm™ DUO thermometer with Bluetooth Dataloggers/Controllers/Rate of Rise Meters 3 09/04/2014 13:34
TC4 with Android and Bluetooth Dataloggers/Controllers/Rate of Rise Meters 24 07/29/2014 09:01
Member Poll
Will you roast holiday coffee for family and friends?

You bet I always do.

Maybe, if time permits

Nope, never do I keep it all to myself.

You must login to vote.
Shoutbox
You must login to post a message.

allenb
10/25/2014 10:03
rftek Welcome

ginny
10/24/2014 05:59
Paul, Jack thanks for the kind words... it is good to be somewhat normal. beach

Koffee Kosmo
10/23/2014 21:40
Smooth entry back into the club Ginny greenman

JackH
10/23/2014 16:47
Ginny, so good to see you back! woohoo

JackH
10/23/2014 16:35
Welcome jonskirk Thanks for joining!

ginny
10/22/2014 07:47
Allen, I know but I really need aggressive work, with caution of course. This hip revision was a lot more serious, hell they had to cut open the femur... roar

allenb
10/21/2014 20:01
Hey gin, kinda back is better than not back! Good to hear from ya again. Oh, and go easy on the PT masochist. They have to adhere to the no pain-no gain philosophy. Shock

allenb
10/21/2014 15:59
tekvall welcome cup

ginny
10/21/2014 08:57
well I am back kinda... this is much more work and aggressive PT this time! beach

ginny
10/21/2014 08:53
welcome2 ALL NEW MEMBERS...

JackH
10/21/2014 04:13
welcome cup edtbjon Enjoy the forums!

JackH
10/21/2014 04:12
Welcome dnorris201 To Homeroasters. Thanks for joining!

JackH
10/20/2014 00:52
Welcome sarelwagner to Homeroasters! Thanks for joining! pouring

JackH
10/19/2014 15:34
Welcome kapu to Homeroasters!

allenb
10/18/2014 18:41
mtntrail welcome to forum