EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

An efficient way to implement bluetooth for an embedded product?

Started by Peter December 15, 2013
I am looking at developing an industrial product which will have BT.

Obviously there are numerous ways to do it, with any microcontroller
and one of the BT modules.

My preference is towards the Atmel ATmega128 because we have some
other projects, currently using a Hitachi H8/323, which will
eventually be migrated to that. Atmel, along with Microchip, seems to
be the only company committed to a long term embedded business, with a
decent continuity of development tools.

But I wonder if anyone here has done it before and found some really
easy way.

Preferably the software should be written in C, maybe with a bit of
assembler for things like interrupt service routines (the product will
also have an RS485 port, 1200-115k baud) and we will need to write
some simple PC software to send out with it, for testing it.

I presume that the BT profile would be something like an FTP server -
it is for transferring values from an A-D converter. 

Currently we use a TI A-D which is 12-bit, with an I2C interface, and
we do actually need the 12 bits (not 10 bits plus rubbish which is
usually the case with on-chip A-D converters).

I'd much appreciate any pointers to some low cost proven stuff which
is widely used.
On Sun, 15 Dec 2013 11:54:59 +0000, Peter wrote:

> I am looking at developing an industrial product which will have BT. > > Obviously there are numerous ways to do it, with any microcontroller and > one of the BT modules. > > My preference is towards the Atmel ATmega128 because we have some other > projects, currently using a Hitachi H8/323, which will eventually be > migrated to that. Atmel, along with Microchip, seems to be the only > company committed to a long term embedded business, with a decent > continuity of development tools. > > But I wonder if anyone here has done it before and found some really > easy way. > > Preferably the software should be written in C, maybe with a bit of > assembler for things like interrupt service routines (the product will > also have an RS485 port, 1200-115k baud) and we will need to write some > simple PC software to send out with it, for testing it. > > I presume that the BT profile would be something like an FTP server - it > is for transferring values from an A-D converter. > > Currently we use a TI A-D which is 12-bit, with an I2C interface, and we > do actually need the 12 bits (not 10 bits plus rubbish which is usually > the case with on-chip A-D converters). > > I'd much appreciate any pointers to some low cost proven stuff which is > widely used.
All of the BlueTooth modules that I've looked at have been primarily serial bridges. It appears that some allow some sort of bit-banging, but I haven't need more than a serial bridge, so I never dug into that aspect of them. If you can live with the Blue Tooth module appearing as a serial port on the PC, then you're done. Of the two that I've actually dropped onto boards, the Blue Radio BR- C46AR appears better by far. If you want a long term commitment to embedded, with a decent continuity of development tools, I suggest that you check out the ARM core. Either Microchip or Atmel could terminate tool development on the whim of a CEO trying to boost this year's bottom line, or choke it off with a new CFO who dismisses it as a "marketing expense". The ARM core, on the other hand is backed by several compiler vendors and the whole Open Source steamroller. The Oceans will need to rise enough to flood San Jose before people stop working on ARM compiler development. -- Tim Wescott Control system and signal processing consulting www.wescottdesign.com
Tim Wescott <tim@seemywebsite.please> wrote

>All of the BlueTooth modules that I've looked at have been primarily >serial bridges. It appears that some allow some sort of bit-banging, but >I haven't need more than a serial bridge, so I never dug into that aspect >of them. If you can live with the Blue Tooth module appearing as a >serial port on the PC, then you're done. > >Of the two that I've actually dropped onto boards, the Blue Radio BR- >C46AR appears better by far.
Many thanks. It looks like a 3.3V UART http://www.blueradios.com/BR_C40_Reference_Design.pdf Probably uses AT commands! (not looked yet)
>If you want a long term commitment to embedded, with a decent continuity >of development tools, I suggest that you check out the ARM core. Either >Microchip or Atmel could terminate tool development on the whim of a CEO >trying to boost this year's bottom line, or choke it off with a new CFO >who dismisses it as a "marketing expense". The ARM core, on the other >hand is backed by several compiler vendors and the whole Open Source >steamroller. The Oceans will need to rise enough to flood San Jose >before people stop working on ARM compiler development.
Sure, although once a tool works you can just keep running it. I am still on Orcad SDT/386 (1994?) and Protel PCB 2.8 (1995). It works...
On Sun, 15 Dec 2013 11:54:59 +0000, Peter <nospam@nospam9876.com> wrote:

>I am looking at developing an industrial product which will have BT. > >Obviously there are numerous ways to do it, with any microcontroller >and one of the BT modules. > >My preference is towards the Atmel ATmega128 because we have some >other projects, currently using a Hitachi H8/323, which will >eventually be migrated to that. Atmel, along with Microchip, seems to >be the only company committed to a long term embedded business, with a >decent continuity of development tools. > >But I wonder if anyone here has done it before and found some really >easy way. > >Preferably the software should be written in C, maybe with a bit of >assembler for things like interrupt service routines (the product will >also have an RS485 port, 1200-115k baud) and we will need to write >some simple PC software to send out with it, for testing it. > >I presume that the BT profile would be something like an FTP server - >it is for transferring values from an A-D converter. > >Currently we use a TI A-D which is 12-bit, with an I2C interface, and >we do actually need the 12 bits (not 10 bits plus rubbish which is >usually the case with on-chip A-D converters). > >I'd much appreciate any pointers to some low cost proven stuff which >is widely used.
We did one batch of demo Zigbee electric meters, "smart power strips", using the AVR Raven module. We used the on-board ADC. The customer was a startup that had a wealthy .com guy who wanted to save energy and change the world. I explained AC power metering to him, and the algorithms that we use, and he coded it all up in a few days. I think Zigbee has more range than Bluetooth. https://dl.dropboxusercontent.com/u/53724080/Hug/DSC04003.JPG -- John Larkin Highland Technology Inc www.highlandtechnology.com jlarkin at highlandtechnology dot com Precision electronic instrumentation Picosecond-resolution Digital Delay and Pulse generators Custom timing and laser controllers Photonics and fiberoptic TTL data links VME analog, thermocouple, LVDT, synchro, tachometer Multichannel arbitrary waveform generators
Hi Peter,

On 12/15/2013 4:54 AM, Peter wrote:
> I am looking at developing an industrial product which will have BT. > > Obviously there are numerous ways to do it, with any microcontroller > and one of the BT modules. > > My preference is towards the Atmel ATmega128 because we have some > other projects, currently using a Hitachi H8/323, which will > eventually be migrated to that. Atmel, along with Microchip, seems to > be the only company committed to a long term embedded business, with a > decent continuity of development tools. > > But I wonder if anyone here has done it before and found some really > easy way. > > Preferably the software should be written in C, maybe with a bit of > assembler for things like interrupt service routines (the product will > also have an RS485 port, 1200-115k baud) and we will need to write > some simple PC software to send out with it, for testing it. > > I presume that the BT profile would be something like an FTP server - > it is for transferring values from an A-D converter.
I'm not sure of your rationalization, there. The advantage of the FTP profile is that it allows for *browsing*, name space hierarchies, etc. in addition to data transfer (pull *and* push!). Do you have a *set* of A/DC's (or, other I/O's) from among which you would like to be able to *select* specific "devices"/channels? Once selected, are you expecting to transfer *an* A/DC reading/sample? Is latency an issue? Bandwidth? I.e., can you "batch" A/DC readings and pull them all at one? Or, does each sample correspond with an observed process variable, etc. (in which case, it typically wants to be seen and acted upon by a control loop before the next sample is taken) [Sorry, my preconceived notions of industrial CONTROL are creeping into how I am approaching your question...]
> Currently we use a TI A-D which is 12-bit, with an I2C interface, and > we do actually need the 12 bits (not 10 bits plus rubbish which is > usually the case with on-chip A-D converters). > > I'd much appreciate any pointers to some low cost proven stuff which > is widely used.
On 12/15/2013 10:31 AM, John Larkin wrote:
> On Sun, 15 Dec 2013 11:54:59 +0000, Peter<nospam@nospam9876.com> wrote: > >> I am looking at developing an industrial product which will have BT. >> >> Obviously there are numerous ways to do it, with any microcontroller >> and one of the BT modules. >> >> My preference is towards the Atmel ATmega128 because we have some >> other projects, currently using a Hitachi H8/323, which will >> eventually be migrated to that. Atmel, along with Microchip, seems to >> be the only company committed to a long term embedded business, with a >> decent continuity of development tools. >> >> But I wonder if anyone here has done it before and found some really >> easy way. >> >> Preferably the software should be written in C, maybe with a bit of >> assembler for things like interrupt service routines (the product will >> also have an RS485 port, 1200-115k baud) and we will need to write >> some simple PC software to send out with it, for testing it. >> >> I presume that the BT profile would be something like an FTP server - >> it is for transferring values from an A-D converter. >> >> Currently we use a TI A-D which is 12-bit, with an I2C interface, and >> we do actually need the 12 bits (not 10 bits plus rubbish which is >> usually the case with on-chip A-D converters). >> >> I'd much appreciate any pointers to some low cost proven stuff which >> is widely used. > > We did one batch of demo Zigbee electric meters, "smart power strips", using the > AVR Raven module. We used the on-board ADC. The customer was a startup that had > a wealthy .com guy who wanted to save energy and change the world. I explained > AC power metering to him, and the algorithms that we use, and he coded it all up > in a few days. > > I think Zigbee has more range than Bluetooth.
Different usage model. Zigbee tends towards lower data rates, longer battery life, etc. BT runs at the higher end of data rates and "expects" batteries to be recharged regularly. E.g., you use Zigbee in a distributed (physical) access control application (low data rates, nonexistent power requirements) but BT in a high fidelity stereo headset (high data rate, battery will be replaced/recharged RSN) [Of course, lots of other differences security models, network topology, etc. but that's the "executive summary"]
John Larkin wrote:
> On Sun, 15 Dec 2013 11:54:59 +0000, Peter <nospam@nospam9876.com> wrote: > >> I am looking at developing an industrial product which will have BT. >> >> Obviously there are numerous ways to do it, with any microcontroller >> and one of the BT modules. >> >> My preference is towards the Atmel ATmega128 because we have some >> other projects, currently using a Hitachi H8/323, which will >> eventually be migrated to that. Atmel, along with Microchip, seems to >> be the only company committed to a long term embedded business, with a >> decent continuity of development tools. >> >> But I wonder if anyone here has done it before and found some really >> easy way. >> >> Preferably the software should be written in C, maybe with a bit of >> assembler for things like interrupt service routines (the product will >> also have an RS485 port, 1200-115k baud) and we will need to write >> some simple PC software to send out with it, for testing it. >> >> I presume that the BT profile would be something like an FTP server - >> it is for transferring values from an A-D converter. >> >> Currently we use a TI A-D which is 12-bit, with an I2C interface, and >> we do actually need the 12 bits (not 10 bits plus rubbish which is >> usually the case with on-chip A-D converters). >> >> I'd much appreciate any pointers to some low cost proven stuff which >> is widely used. > > We did one batch of demo Zigbee electric meters, "smart power strips", using the > AVR Raven module. We used the on-board ADC. The customer was a startup that had > a wealthy .com guy who wanted to save energy and change the world. I explained > AC power metering to him, and the algorithms that we use, and he coded it all up > in a few days. > > I think Zigbee has more range than Bluetooth. >
Not inherently, but there aren't a lot of long-range Bluetooth implementations. This: http://www.bluegiga.com/en-US/products/bluetooth-classic-modules/wt41-long-range-bluetooth--module/ shows "1000+ meter line of sight". Sure, why not? http://www.engineersgarage.com/contribution/zigbee-vs-bluetooth
> https://dl.dropboxusercontent.com/u/53724080/Hug/DSC04003.JPG > >
-- Les Cargill
On Sun, 15 Dec 2013 11:03:20 -0700, Don Y <this@isnotme.com> wrote:

>On 12/15/2013 10:31 AM, John Larkin wrote: >> On Sun, 15 Dec 2013 11:54:59 +0000, Peter<nospam@nospam9876.com> wrote: >> >>> I am looking at developing an industrial product which will have BT. >>> >>> Obviously there are numerous ways to do it, with any microcontroller >>> and one of the BT modules. >>> >>> My preference is towards the Atmel ATmega128 because we have some >>> other projects, currently using a Hitachi H8/323, which will >>> eventually be migrated to that. Atmel, along with Microchip, seems to >>> be the only company committed to a long term embedded business, with a >>> decent continuity of development tools. >>> >>> But I wonder if anyone here has done it before and found some really >>> easy way. >>> >>> Preferably the software should be written in C, maybe with a bit of >>> assembler for things like interrupt service routines (the product will >>> also have an RS485 port, 1200-115k baud) and we will need to write >>> some simple PC software to send out with it, for testing it. >>> >>> I presume that the BT profile would be something like an FTP server - >>> it is for transferring values from an A-D converter. >>> >>> Currently we use a TI A-D which is 12-bit, with an I2C interface, and >>> we do actually need the 12 bits (not 10 bits plus rubbish which is >>> usually the case with on-chip A-D converters). >>> >>> I'd much appreciate any pointers to some low cost proven stuff which >>> is widely used. >> >> We did one batch of demo Zigbee electric meters, "smart power strips", using the >> AVR Raven module. We used the on-board ADC. The customer was a startup that had >> a wealthy .com guy who wanted to save energy and change the world. I explained >> AC power metering to him, and the algorithms that we use, and he coded it all up >> in a few days. >> >> I think Zigbee has more range than Bluetooth. > >Different usage model. Zigbee tends towards lower data rates, >longer battery life, etc. BT runs at the higher end of data >rates and "expects" batteries to be recharged regularly.
There's also Bluetooth/Low Energy, in there somewhere. It's good there are so many standards. Keeps the confusion higher.
>E.g., you use Zigbee in a distributed (physical) access control >application (low data rates, nonexistent power requirements) >but BT in a high fidelity stereo headset (high data rate, >battery will be replaced/recharged RSN) > >[Of course, lots of other differences security models, network >topology, etc. but that's the "executive summary"]
Peter <nospam@nospam9876.com> writes:
> I am looking at developing an industrial product which will have BT. > Obviously there are numerous ways to do it, with any microcontroller > and one of the BT modules.
Look at rfduino.com and the Nordic Semi chip that it uses. They are also planning to do an SMD version of that board for easier embeddability.
On 12/15/2013 5:54 AM, Peter wrote:
> I am looking at developing an industrial product which will have BT. > > Obviously there are numerous ways to do it, with any microcontroller > and one of the BT modules.
Do not use Bluegiga modules.

The 2024 Embedded Online Conference