HackManhattan’s Nordic nRF51822 breakout board

600px-Nrf51822-tag
Guan Yang of HackManhattan informs us of his efforts in working with a Bluetooth low energy component:

This amazing component is the Nordic nRF51822 that was released last year and is now available for order from Mouser. It’s a Bluetooth Low Energy system-on-chip that includes a transceiver and a Cortex-M0 microcontroller.

Here’s a breakout board I made for it, using a Johanson balun and chip antenna. It takes a little help from the Internet, but I got it to work with Nordic’s SDK and the gcc-arm-none-eabi toolchain. Haven’t tried debugging yet.

Bluetooth Low Energy (or Bluetooth 4.0) is a new protocol that’s much simpler than traditional Bluetooth and optimized for low duty cycle communication such as heart rate monitors, fitness devices and remote control. For iOS, it has the added virtue that apps can use custom Bluetooth devices directly without requiring special hardware approval from Apple and their MFi encryption chip.

The transceiver inside nRF51822 (96.5 dB link budget) supports both Bluetooth Low Energy and Nordic’s proprietary nRF24L01+ protocol, which everyone and their mother seems to be using in their designs these days. The physical layer makes raw packets are made available in a frame buffer. Nordic provides a free S110 “softdevice” stack that handles the Bluetooth protocol.

The microcontroller is pretty nice too: it includes AES encryption, 12-bit ADC, and a switch matrix that allows you to map almost every digital function to any pin. There’s 256 KB of flash (80 KB of which are needed for the Bluetooth softdevice) and 16 KB SRAM.

With chip antennas and integrated passives, it’s never been easier to realize an RF design. Leaving out the 1.9V DC/DC converter (using the on-chip LDO instead), the minimum circuit for nRF51822 has 6 decoupling caps, one pulldown resistor, a balun, an antenna, a 16 MHz crystal and two load capacitors.

Via the contact form.

This entry was posted in components, RF, wireless and tagged , .

Comments

  1. Wm says:

    Wow. That reads like a paid-for gush if ever I read one! The TI and CSR Bluetooth LE parts aren’t so different either…

  2. Guan Yang says:

    Wm: I didn’t even get free samples ;-)

    The TI part is pretty horrible for hobbyists because the interface to the BLE PHY is not documented. It has a similar architecture where Bluetooth LE is handled by a library they provide (which Nordic calls a “softdevice”), but you need an expensive IAR license to link to it. The call conventions are different from what sdcc does. The 8051 microcontroller is also not nearly as nice as the Nordic one. IAR is one of those commercial products that is so expensive that it’s hard to even figure out how much it costs.

    Nordic’s default toolchain is Keil, which isn’t cheap, but as I wrote it does work with gcc.

    I have never looked at theCSR part.

    • Jay Tyzzer says:

      Nice board! What hardware did you use to program the device?

      *The Nordic nRF51822 uses a Cortex Cortex™-M0 processor vs. a 8051.

      Compiler: The Keil ARM-MDK compiler is a free tool chain that allows up to 32k of compiled code to be developed. This compiler may be downloaded from the Keil website. The stacks, AKA the “softdevice”, size does not enter into this number as it is delivered as a precompiled .bineray (.hex) and is loaded by the developer. Nordic is also supporting GCC.

      This device may also be purchased with the ANT protocol already programmed and is labeled the nRF51422.

      • Tim says:

        Guan Yang is right, you really do require the IAR compiler to use the TI part. It costs $3k.

        The Nordic part is much much nicer – I think you’d have to be totally crazy to use the TI part.

        You can buy the nRF51822 dev kit for $100 which includes a segger j-link to program the chip and debug it. It also gives you access to the SDK.

        In my opinion the SDK should be free and you should be able to use any old arduino/bus pirate/etc to program it (and some people have had success with this approach), but $100 is still pretty damn good compared to $3k.

  3. Guan Yang says:

    I should add that Bluegiga BLE112 is a module that includes the TI part. They have their own Bluetooth stack (meaning they got access to the full datasheet), and if you are willing to only code in their scripting language, you can avoid getting an IAR license. The modules are a lot more expensive though.

  4. Wm says:

    Ah, ok. Phrases like “it’s never been easier…” triggered my marketing detector! :-)

    Your comments on TI are interesting too – I had heard that the stack could only be used with their chain. The CSR devkit otoh, is more expensive up front (so a different hobbyist hurdle), but doesn’t have hidden further toolchain costs. Again, it works the same way – link against a stack library, but some parts have that in ROM, saving codespace.

    I’ve not looked at the Bluegiga scripting language, so don’t know how powerful (or limiting) it is, but I guess that kind of approach is the hobbyist ideal…

  5. Guan Yang says:

    I think the zeitgeist these days is for standard parts so your design could potentially be mass produced, and relatively thin layers on top of the underlying hardware or tools so you can get a simple development environment, but still go to the metal if you need to. Arduino is very popular these days, BASIC Stamp not so much.

  6. electronic_eel says:

    Looks interesting this nRF part. Much better than the closed down firmware of the BLE112/113.

    Unfortunately their datasheet is not accessible without login.

    What I’m interested in is the current consumption when sleeping. They claim 530nA in sleep with ram retention. Does that include any kind of oscillator or rtc to wake up after some time, e.g. after a minute or so?

    • Jay Tyzzer says:

      The primary reason for having a lock on the datasheets is so anyone with the Product Key will need to register once (takes a minute or so) and then you will get automatic updates on the datasheets, dev kits and the like as they are made available. You can contact one of the three Nordic Semiconductor distributors or contact Nordic Semiconductor via the support portal for more information on how to obtain a Product Key. Purchasing of one of the $99.00 nRF51822-EK kits will get you the product key (It is located on the lable) . The product key gives you access to documentation, the SDK, hardware files and the development tools that Nordic Semiconductor provides for that particular product.

      Regards,

      Jay Tyzzer

  7. Guan Yang says:

    Eel: Since the radio is documented, it also opens up the possibility of an open source BLE stack instead of Nordic’s softdevice.

    I don’t think it does. I couldn’t find the various sleep modes laid out clearly, but they specify 400nA for the 32.768 kHz oscillator by itself and 200nA for the real time clock.

    There’s also the option of turning off one or more of the 4 SRAM blocks, for additional power savings.

  8. electronic eel says:

    Thanks for your quick answer.

    So it seems like you can get into the range of about 1µA when you want some kind of timed wakeup. This still isn’t too bad.

    I took a look at your files for this breakout on github. Would you mind to add some more component info into the schematic, like for the balun, antenna stuff and inductors? That would make it more easy to get a complete BOM for ordering the parts.

    I’ve seen that you already have a version 2 up which uses a p-fet for reverse battery protection. What kind of fet are you planning to use there? Most models I’ve seen in the sub-3v range have a gs-leakake of around 100nA which I’d like to avoid.

  9. Guan Yang says:

    Eel: As you can tell, version 2 is nowhere near complete. It will use a 3225 crystal and include the 32.768 kHz for a few hundred nA power savings in sleep mode. If there is room I will also put the standard 50 mil 10 pin debugging header so it can be used with the mini Segger debuggers included in the Nordic eval and development kits—might sacrifice a pushbutton for that. I don’t plan to select the p-FET very carefully because I’m not worried about current consumption at that magnitude. Is there a better solution?

    I will update the schematic soon. In the meantime, the balun is 2450BM14A0002 and the antenna is 2450AT18A100E. (The balun footprint might be 5 to 10 mil or so off, but as you can see I managed to solder it.) The inductors are basically what Nordic specifies in their sample circuits, all 5% tolerance. They are only needed if you use the buck converter. There’s also a ferrite bead which is whatever I had lying around.

  10. electronic eel says:

    > I don’t plan to select the p-FET very carefully because I’m not worried about current
    > consumption at that magnitude. Is there a better solution?

    The fet is better with higher consumption during transmit. But it always has a few nA leakage. A Schottky doesn’t have the leakage, but the higher voltage drop, costing you when running the dc/dc. So which is better depends on your sleep/run ratio. But maybe there is a fet out there with really low leakage – that is why I was asking.

    > the balun is 2450BM14A0002 and the antenna is 2450AT18A100E

    Thanks. Seem to be only available at Farnell/Newark, but they don’t have the nRF… :(

  11. Guan Yang says:

    If you don’t mind using up a lot of the battery in case of reverse polarity, you can always put the shunt diode back and add a PTC fuse.

    By the way, that balun is designed for Nordic’s nRF8001, a BLE chip without microcontroller. I assumed that it has basically the same radio as nRF51822, and it works well. The folks at Johanson tell me that they have a new design with a better match for nRF51822, which will be available in the Fall. There is also BAL-NRF01D3 from ST (not sure about the stock situation), and it’s not that hard to solder the 5 0402s you need to create a balun from discrete components. That’s especially true if you use a stencil. I don’t know about you, but I require a stencil and reflow to handle QFNs.

    One big advantage of nRF51822 over nRF8001, apart from the fact that you don’t need a separate microcontroller, is that you don’t need to use the nRFgo Studio software to device services. Everything can be done by talking to the softdevice.

  12. electronic eel says:

    > If you don’t mind using up a lot of the battery in case of reverse polarity, you can always
    > put the shunt diode back and add a PTC fuse.

    Shunted diode yes, but no ptc. Think about the current you can get out of a cr2032. A ptc that triggers at that level would have more resistance in regular operation than your diode drop.

    > There is also BAL-NRF01D3 from ST (not sure about the stock situation),

    That is available nearly everywhere, but is a flipchip/bga package, I haven’t tried yet but guess it is harder to get right than QFN.

    I just put the Johanson parts on my order list, will get them the next time I order something from Farnell.

    > don’t know about you, but I require a stencil and reflow to handle QFNs.

    I use regular solder wire and a hot air tool. Works well, even on home-etched pcbs without solder resist. Like here:
    http://www.youtube.com/watch?v=c_Qt5CtUlqY

  13. Nahua says:

    Hello, I have been playing around with the nRF51822 for the last couple of months. And with your design I am confused on how you make the the antenna match.

    i. how do you know that the antenna is tuned properly with the balun? every PCB will have different ground planes so, how does the balun deal with tuning of the antenna?

    ii. wouldn’t adding sensors and components to the breakout of the board change this ground even further and make the antenna detune as well?

    looking forwards to your comments.

    • Paul says:

      I’d hope to get a reply from the author too. In the meantime, my original analysis.

      > i. how do you know that the antenna is tuned properly with the balun?

      That balun specifically adapts complex impedance as output by Nordic chip to 50ohm. Antenna also has input impedance of 50ohm. So, what’s needed to be done for perfect match is transmission line (microstrip) of same impedance. Such microstrip would be ~3mm think for FR4 of 1.6mm width or half that for FR 0.8mm. Guan Yang has width ~0.7mm, so clearly doesn’t provide 50ohm impedance. However, rule of thumb is that you should bother with impedance matching only for transmission line length of >1/10 wavelength, that’s 1.25cm for 2.4GHz, this PCB has ~2mm length. Overall, that’s why using balun and chip antenna is cool.

      > every PCB will have different ground planes so, how does the balun deal with tuning of the antenna?

      Common recommendation is that there’s no ground plane under antenna. Then rest of PCB’s ground plane will serve as antenna’s ground plane.

      > wouldn’t adding sensors and components to the breakout of the board change this ground even further and make the antenna detune as well?

      Sure, everything has butterfly effect. But if that effect is below <1%, why would you bother? There're other ways to "detune" antenna, for example placing design in a (plastic) box will change electric permittivity *around antenna* (not just around ground plane), and can lead to say 5% "detuning". Solution? Sure, if you have network analyzer on your table, feel free to make zillions of iterations to get out last nanowatt of power. Everyone else just doesn't care. And yes, (small) radios around have losses 20% or maybe even 50%.

  14. MinKu says:

    Hello, I want to use nrf51822 for my research project. Could you tell me or direct me to a link that explains how to program it and use it? Do you need the nrfgo starter kit to program it? Is it possible to just connect few wires to the chip, after all the caps and antenna circuits are in place, and program from a computer?

    • Nahua says:

      go to the downloads tab and check this for a file that would explain:
      http://www.nordicsemi.com/eng/Products/Bluetooth-R-low-energy/nRF51822-Development-Kit

      No, you don’t need any starter kit at all, even though it is recommended. You will need a programmer as well.

      Yes, once you have the basics (chip, caps, antenna, etc) you can just connect SWD and SWO, power, gnd and program the SoC.

      hope it helps a bit.

      PS:

      • Electronic Eel says:

        Are you really sure about not needing the dev kit / starter kit?

        I don’t see how you would otherwise be able to download the BLE stack from Nordic Semi. The download is locked until you enter a license code (which comes with the starter and dev kits).

        Or were you able to download the stack without that? How?

  15. Guan Yang says:

    I highly recommend getting the evaluation kit, for all the reasons discussed. I don’t know if you can somehow get the softdevice without, but I don’t think it’s worth the trouble.

  16. Guan Yang says:

    Oh, and the $300 nRFgo Starter Kit is, in general, not necessary. If you get the development kit (instead of the evaluation kit), it’s the easiest way to power the boards and test them, but if you’re a little creative and look carefully at the schematics you can find a different way to power the two boards included in the development kit.

  17. Paul says:

    Btw, I already started to add nRF51 bindings to OpenSource hardware description lib:
    https://github.com/pfalcon/libperipha/tree/master/arm/cortex-m/nrf51

    Granted, there’s long way to BLE functionality support, but they aim is just that – allow to develop nRF51 (and not only its) apps with OpenSource tools.

  18. Steven says:

    Thank you very much for that nice article!
    I want to use the nRF51822 in combination with another µC. So, of course, I need to program both IC’s. But now I got one question: What if I’d buy myself a Segger J-Link Debugger for educational purpose…how do I program and debug the nRF51822 then? I can’t find any information on the used interface….?

    Thanks and kind regards!
    Steven

    • Mike says:

      SWD (Serial Wire Debug), there’s some brief description here: http://www.segger.com/interface-description.html

      • Guan Yang says:

        Note that Nordic combines the serial wire clock and reset lines. I’m not sure all otherwise SWD capable debuggers can deal with that. At least for getting started with nRF51822, I would highly recommend a Segger J-Link debugger, either the ones included (in various forms) with Nordic’s kits, or a standalone J-Link.

  19. This is a great chip!

    I have an open source setup for gcc and this chip. I also link to an older version of the softdevice binary hosted elsewhere. I hope this is helpful for folks.

    I’m using the dev kit and the Segger programmer. The dev kit is well worth the $100. I am able to program the two other boards (not usb dongle) using included Segger debugger. It’s necessary to externally power the board, use pins 1 (3.3V) and 5 (Gnd) on the P2 connector; this takes 0.5mm 2×40 pin header.

    I’m about to design a board based on Guan’s design. I’m thinking of using PCB antenna because I’m not space constrained, and I’ve read that PCB antenna can be more efficient. I guess it has to be tuned though, so that may be argument against it. I’m a programmer, not an EE, so any tips would be appreciated.

    Thanks for this great resource!

    -c

    • Tyler Casselman says:

      I’m trying to use the nrf51822 development kit without the nrfgo board. I’ve connected 3.3V to pin 1 and ground to pin 5 of P2. When I try to upload from keil I get the error “JLink Warning: RESET (pin 15) high, but should be low. Please check target hardware.”
      The other strange thing is when I measure the voltage from my source without connecting the chip, I get a solid 3.3V. When I connect the dev kit board to the voltage source, the voltage drops to around 1.5V. This maybe what is causing the issues. Any idea why this would be happening?

      • Charles J Gervasi says:

        You must be connecting to the wrong pins. What’s powering the board? Is it a supply with the current limit set low? As soon as you see the voltage drop that much, that’s the problem; you wouldn’t even think of trying to connect to it. It’s been a few months, but I don’t recall having any such problem.

      • Tyler Casselman says:

        Hey Charles, I’m using a 9V battery with a 5V linear regulator and then using some resistors to divide to 3V3 so there shouldn’t be any current limiting that I’m aware of. Looking at the underside of the board, I’m connecting power to the bottom right most pin on the bottom header and GND to the pin 2 to the left of that. What would cause such a significant voltage drop and what would be the repercussions of connecting to it?
        PS couldn’t figure out how to ‘reply’ to your response.

      • Charles J Gervasi says:

        The resistor divider will drop voltage. It’s like having a 3.3V source in series with R1||R2. What are your resistor values? You should get a 3.3V regulator.

      • Tyler Casselman says:

        My R1 = 2200ohm and my R2 = 4700ohm. 4700/(4700+2200)) X 5V = 3.41V Which is what I was seeing when I hooked up the multimeter before adding the dev board to the circuit. I would have thought the 5V regulator would have given me a steady enough Vin that I could use voltage division to get the 3V3. Anyway, I hooked up the board to the 3V3 pin of my rpi instead and was able to flash the devices with no problem. Sounds like I’m missing some fundamentals. Anyway, thanks for the speedy response.

      • Charles J Gervasi says:

        Glad it’s working. Your circuit would look like (Thevenin equivalent) a 3.41V source with a 1.5k series R. If you pull 1mA from it, the 1.5k drops 1.5V, dropping you down to the 1.5V range. Seen another way, if you pull current from a resistor divider, it’s like adding a third resistor to ground, which changes the voltage.

      • Paul says:

        That’s hilarious, people use kiloohm resistors and say “there shouldn’t be any current limiting that I’m aware of.” And these people hack Bluetooth Low Energy. I guess it’s just New Year joke. Funny, indeed.

      • Guan Yang says:

        Oh no, what have I done…

  20. seb says:

    Hi,

    Are there any news regarding this breakout board? is it available somewhere?

    Thanks, regards,

    Seb

  21. Juergen says:

    Hi,

    I’m a little confused… What is necessary to get access to the BLE (s110) stack provided by Nordic? Is the product key of the development kit enough or do I also need to buy the expensive nRFgo starter kit?

    Powering up the devkit standalone should not be very hard…

    Greetinx
    Juergen

  22. JayT says:

    Hello Juergen,

    The product key is located on the Dev kit box or label of the evaluation kit and is all you need to access the area on the Nordic website where the s110 soft device is located as well as other associated files. The soft device is loaded into the nrf51822 SoC via the nRFgo studio utility and the Segger J-link lite programmer / debugger.

    Hope this helped. BTW.”..The Nordic website also has a new developers forum for public discussions such as this..

  23. Charles J Gervasi says:

    I have been playing with the nRF51822 also. It reminds me of CC2540 but with an ARM instead of and 8051. From an RF standpoint, it works similar to the CC2540. I’ve tested CC2540 a lot,, but with the nRF51822, I just walked around the building with a linked board.

    • Jay Tyzzer says:

      Hi Charles.

      Have you had a opprounity to check the Power consumption at different Modes? (standbye, connected, advertising, etc) I would be interested to know what you find.

      JT

      • I’m seeing about 4.4mA running code from flash, about 12-30 uA in sleep, and maybe 50 uA while advertising at a few hertz. The radio power consumption is quite low and can be well controlled by advertising and connection interval settings. It’s really more about your application and what advertising intervals you need, etc. There’s a really nice radio notification feature that you can use to see when the radio is on. There are a few silicon bugs to be aware of that cause higher current consumption, but mostly have work arounds.
        If you haven’t checked out the Nordic DevZone, you should! -c

      • Charles J Gervasi says:

        @JT
        If you follow the link in my post you can see some posts of advertising and the communications at the connection intervals. The sleep current is in the uAs and doesn’t show up in my setup. To measure sleep current, I’d need to not transmit and use a bigger sense resistor. I may do that in the next few weeks. I’m also going to more testing on the new ‘922, which supports BLE and ANT. There are a few more nRF51822 current plots here.
        CJ

  24. Alan Ambrose says:

    Hey Guan,

    V useful blog, many thanks. Can I ask if you have tested / have a feeling for the comparative effectiveness of the various versions (pcb / chip etc) of the balun/antenna combos you’ve tried? Also any hard-won experience from your PCB layout / RF testing? Lastly, do you think the suggestion of halving the antenna track size for 0.8mm is good or unnecessary?

    Many Thanks, Alan

    • Charles J Gervasi says:

      I have done this testing with CC2540 but not this chip. Here is a link to some CC2540 balun testing I did two years ago.

      I found the integrated balun/filter was about 1dB – 1.5dB worse than a discrete network.

      I also tested various trace antennas. I found a meandering trace to be a few dB better than a chip antenna. All traces and chip antennas, no matter how closely I followed app notes, needed significant matching to hit 50 ohms.

      I tested various trace thicknesses: it didn’t obey some easy law like the ticker the better or the longer the better. In fact, one trace I did really long and fat that I knew wouldn’t fit in my enclosure, just to see how good a trace antenna could be, didn’t work as well as thinner traces.

      If you have the time you could make several boards with different trace geometries. Scrape away trace to shorten them until they resonate on the 2.4GHz band. Then tweak the matching to get to the center of the S11 Smith Chart. Do this to all test boards. You’ll find several dB difference in performance.

      If you have plenty of link margin (extra signal strength) just make something that works out to roughly half wavelength on paper and go with it. Spending weeks testing different geometries will only buy you a few dB, maybe 6dB, over some random piece of trace matched to 50 ohms.

  25. Alan Ambrose says:

    FYI I just noticed that ST has a balun specifically for nRF51822 – it’s part # BAL-NRF02D3. Listed but not in stock at Digi-Key yet.

    Alan

  26. Guan Yang says:

    I haven’t tested different combinations myself, and in general things have worked quite well or well enough, so unfortunately (?) I don’t have any hard-won experience.

    If you have a track width calculator handy like the one in KiCad, I would look into using grounded coplanar waveguide instead of microstrip. That’s basically where there is ground plane both on the opposite side of the board and surrounding your transmission line, the way you would do a regular trace through ground plane. The math works out so you can have much thinner traces.

    (I think you meant transmission line track width, not antenna track width for a trace antenna. If you’re doing a PCB trace antenna, track width is probably less important because there’s usually no ground plane underneath, so PCB dielectric matters less. I’m just guessing here, IANAEE.)

  27. Jay Tyzzer says:

    Hello,

    I would need to review however I believe the new 02 Balun you mentioned from St Micro was developed for the nRf51822 in the wafer level chip scale package only?

    Thx,

    Jay

  28. Alan Ambrose says:

    Thanks Guan,

    “I think you meant transmission line track width, not antenna track width for a trace antenna”

    Actually, despite a long ago engineering degree, I remember so little about antennas that I’m not certain what I mean :) Will check out KiCad’s calculator.

    Alan

    • Jay Tyzzer says:

      Hello,

      The BAL-NRF02D3 balun from ST Micro was made for the Nordic Semiconductor nRF51 family for use with the Wafer Chip Scale package (only)

      The BAL-NRF01D3 is for use with the QFN package.

  29. Alan Ambrose says:

    Hey Jay,

    Thanks for pointing that out – I had missed it. So to summarise … the QFN nRF51 package is called nRF51822-QFxxxx and needs the NRF01D3 balun and 2.2nF and 0.8pF capacitors and the BGA nRF51 package is called nRF51822-CExxxx and needs the NRF02D3 balun and just the 2.2nF.

    Curiously, for QF/01 – the January ST balun docs have an unreferenced capacitor ‘XA’ and omit the 0.8pF, whereas the January Nordic reference layout has the 0.8pF and omits the ‘XA’ cap. Work in progress I think.

    Also just noticed “nRF-Sniffer – PC Software and Device Firmware that allow you to see all Bluetooth low energy packets on the air between 2 devices” on the Nordic site.

    I’m interested in how everyone’s progressing with this chip?

    Alan

Leave a Comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Notify me of followup comments via e-mail. You can also subscribe without commenting.