Go Back

Bluetooth Low Energy (AKA BTSmart)

Saturday, November 09, 2013
I've been working for months with a couple Bluetooth Low Energy chips -- originally the nRF8001 before settling on the Cortex M0 based nRF51822 -- and while there have been some hiccups with the nRF51 chips (anything real time is basically impossible, and I wish some of the peripherals were a bit more robust), it's hard to argue with the price. I'm convinced Nordic really has a winner here!  For <$2 in volume, I'm willing to work around some issues and they apparently have some updates in the pipeline that address the biggest shortcomings of their first generation chips (SPI slave support instead of UART only to talk to the outside world, etc.).

What's really impressed me, though, is BLE itself.  I was already convinced that BLE will become extremely important moving forward now that Android finally got it's act together and added support as of Android 4.3 (seriously, what was up with that?!).  Digging into the specs and design decisions a lot more, though, I've been consistently impressed with the choices they've made at the Bluetooth SIG.  They've made (in my narrow opinion) the right tradeoffs, and seem to have a good understanding of where they wanted to go with this new standard: genuinely low power, low cost, with very small, low data rate sensors in mind and a heavy focus on SmartPhones and coin cells.

It will likely be a while before we unveil a code base and some reference HW or some of the stuff we're working on, but it's pretty exciting technology (definitely the first time anything Bluetooth has seemed exciting in any case)!  It opens up a lot of opportunities for small, lean, nimble HW startups, and the price point and technical barriers have probably never been as low for small personal area sensor networks and anything connecting to a SmartPhone.

If you're looking for a good introduction to BLE, have a look at Bluetooth Low Energy: The Developer's Handbook from Robin Heydon (one of the people involved in the design of BLE so he knows what he's talking about).  It's readable, and does a good job of explaining not just the technology but the thinking behind many of the design decisions.  The data model itself is refreshingly simple, and everything is essentially organized around 'Services' and 'Characteristics', where services are basically just a collection of characteristics that are exposed on the BLE device (server), but it's well presented in the book, and hopefully you'll see more and more BLE tutorials and content in the coming months (including from us)!

Full story  | Comments (3)

LPC1xxx 1GHZ Wireless Board Preview

Thursday, March 14, 2013
It feels like I've been working on these boards forever -- and to be fair there's literally years of effort and >20K EUR in expenses here -- but I finally ordered a first batch of the USB stick and wireless node PCBs this week.  There's always something to improve, but overall I'm very happy with the HW and the related code base, and I think the boards are a significant improvements over any other project that I've posted here.

Admittedly there's nothing whatsoever exciting about yet ANOTHER wireless sensor node or platform, and it's probably more expensive than it needs to be if you went with an integrated MCU + radio, etc., but my goal was never to create a commercially viable board but something that was useful to me and met my own goals of having a rapid wireless prototyping platform based on an MCU family that I liked, and using fully open source stacks and toolchains.

RF1GHZUSB


RF1GHZUSB-REV-A PCB

  • LPC1347 (72MHz ARM Cortex M3, 64 KB Flash, 12KB SRAM, 4KB EEPROM, 12-Bit ADC)
  • Supports USB CDC, HID, and MSC out of the box
  • Easy to use CLI to send and receive data via USB CDC
  • Optionally supports USB HID command set
  • USB Bootloader for easy firmware updates (no extra HW required)
  • 4 layer PCB to keep reasonably clean routing and a clean RF section
  • Designed to fit in an inexpensive USB enclosure if desired (~$3 in single quantities)
  • RF section designed to work equally well at 868MHz (EU) or 915MHz (US), with excellent range and performance
  • SMA connector to attach various types of antennas (directional, small quarter-wave, half-wave, etc.)

I designed this small USB stick to be able to co-ordinate other sensor nodes from anything with a USB slot.  The main goal was to use a Raspberry Pi (Beagle Bone, etc.) as a cheap always-on network co-ordinator, but I also designed them with USB Host in mind.  My thinking was that with a single well-design USB stick I could plug different radios into mid-range MCUs with USB Host (LPC4357, etc.) and support various frequencies, modulation schemes, etc., without having to go through the FCC approval process more than once, and without locking myself into one choice on expensive HW.

RF1GHZNODE


RF1GHZNODE-REV-B PCB

  • LPC11U37 (50MHz ARM Cortex M0, 128KB Flash, 10KB SRAM, 4KB EEPROM, 10-bit ADC)
  • On board SD card with FAT32 file system support (USB MSC can enumerate as a mass storage device pointing to the SD card on the PC)
  • Built in LIPO charger (just plug in a USB cable and the board switches to USB power and charges the LIPO at the same time)
  • Supports USB CDC, HID and MSC, including HID Keyboard and Mouse emulation and auto config for multiple USB profiles (CDC + HID, etc.)
  • Easy to use and extended CLI
  • Out of the box support for many sensors available from Adafruit, including a unified sensor system to make adding new sensors as painless as possible
  • USB Bootloader for easy firmware updates
  • Easy to use radio framework (Chibi) that works out of the box
  • 4 layer PCB with dedicated GND and power planes, and an isolated RF section
  • Designed to fit inside an inexpensive IP65 (water resistant) enclosure (Adafruit Product 903)
  • RF section designed to work equally well at 868MHz (EU) or 915MHz (US), with excellent range and performance
  • SMA connector to attach various types of antennas (directional, small quarter-wave, half-wave, etc.)
  • Switch between 3.3V and 2.2V supplies on the fly (saves power), and board can be run as low as 1.8V

These were intended to be the workhorse, battery-powered sensor nodes. I spent a LOT of time and effort trying to get the lowest current level possible in sleep mode (currently ~20µA with SW wakeup, but this should in theory be able to go lower with more time and effort).

What's the point?

Both of these boards are really just a labour of love.  I love ARM, I love wireless, and I've spent so many years and so much time and money on these boards -- and earlier boards that made these ones possible -- that it just seems a shame to me that no one else was benefitting from all that work and effort.  I designed these boards purely for personal use and as a platform to make rapid prototypes myself ... and I definately have no illusions that there's big money to be made in yet another wireless sensor node platform.  But I'm convinced it's a pretty good bouncing board to test out some ideas, and while these boards and the library are far from perfect, they're a lot better than many of the closed source systems that currently exist.

What about the firmware?

I've signed off on a new combined LPC11U24/LPC11U37/LPC1347 code base that allows you to switch between any of the three MCUs with just a small change in the config file.  I'm just waiting for the (I hope) final PCBs to come in in two weeks time, get a small batch assembled, and then get them into the hands of testers for some feedback.  Once I can work out the major bugs from the first batch, I'll release the board files and code base into the wild ... but I'm extremely happy with the code base as is, and I really think it's an excellent starting point for anyone interested in doing anything serious with ARM and 802.15.4 wireless connectivity.

When will it be ready?

I can't make any promises here.  Again, this is really just a labour of love not a commercial endeavour ... but I hope to assemble a first batch of 100 or so boards in a few weeks, and to send them to some friends and colleagues, then make some quick changes based on that feedback.  I also need to spend some time working on some SW on the Raspberry Pi, etc., to manage the sensor network, and haven't had 5 minutes to do that yet.  Hopefully in 6-8 weeks, though, I can have something ready for a wider audience.

Full story  | Comments (6)

LPC1347/LPC11U37 Update

Sunday, January 20, 2013
LPC 1347/LPC11U37 Wireless Test Boards

I finally found a few minutes to test the latest PCBs for the LPC11U37/LPC1347 and I'm pretty happy with both the test HW and the code base itself.  I think it's a significant improvement over any of the previous code bases posted here, and I think it should be a good starting point for projects moving forward.

Overall, I'm extremely happy with the flexibility offered by the (essentially) pin and register compatible LPC11U24, LPC11U37 and LPC1347.  This trio leaves a lot of room to maneuver optimizing for flash size, performance, price or package size with almost no extra SW development effort.  Making a code base that makes that as painless as possible took a bit of effort, but at least it's a one time expenditure.

I don't want to post many details until the code base is ready to go live, but I think it's all come together pretty well so far, and I hope it will be a decent starting point for a lot of people.  It'll definitely make things easier here to get prototypes off the ground in days or weeks rather than weeks or months.

Full story  | Comments (7)

Converting RF signal strength values

Saturday, March 19, 2011

If you're new to RF and things like signal strength measurements (dB, dBm, RSSI, etc.), the following whitepaper may be helpful: Converting Signal Strength Percentage to dBm Values

Decibals (dB) are used to indicate the ratio of one power level to another. An increase of 3dB doubles the power, so 6dB is equal to 4x the power, 9dB is equal to 8x, etc.

The specific formula is: dB = 10 * log(P1/P2), meaning that for a 4 times difference in power we get:

dB = 10 * log(4/1)
dB = 10 * 0.602
dB = 6.02

The following table shows some key values comparing decibels (dB) and their equivalent increase/decrease factor:

dB Increase Factor Decrease Factor
0 dB 1x 1x
1 dB 1.25x 0.8x
3 dB 2x 0.5x
6 dB 4x 0.25x
10 dB 10x 0.10x
12 dB 16x 0.06x
20 dB 100x 0.01x

dBm is used to indicate transmit and receive sensitivity in milliwatts, and is the power ratio in decibels (dB) of the measured power referenced to one milliwatt (the m in dBm). 0dBm is equal to 1 milliwatt. The following two formulas govern the relationship between dBm and mW:

To convert dBm to mW: P(mW) = 10[P(dBm)/10]

To convert mW to dBm: P(dBm) = log[P(mW)] * 10

For example, if we start with 13dBm, we get the following equivalent value in milliwatts:

mw = 10^[13/10]
mw = 10^1.3
mw = 19.953 (or roughly 20mW)

We can also convert 20 mW back to dBm as follows:

dBm = log[20] * 10
dBm = 1.301 * 10
dBm = 13.01

Some common value can be seen in the table below:

dBm Increase mW dBm Decrease mW
0 dBm 1 mW 0 dBm 1 mW
1 dBm 1.25 mW 1 dBm 0.8 mW
3 dBm 2 mW 3 dBm 0.5 mW
6 dBm 4 mW 6 dBm 0.25 mW
7 dBm 5 mW 7 dBm 0.20 mW
10 dBm 10 mW 10 dBm 0.1 mW
12 dBm 16 mW 12 dBm 0.06 mW
20 dBm 100 mW 20 dBm 0.01 mW

For more information, feel free to look at the Wikipedia pages for decibels and dBm.

Full story  | Comments (7)

  1. 1
  2. 2
  3. Next page