How to Upload Codes to NRF51822 Using NRF51-DK

Introduction: How to Upload Codes to NRF51822 Using NRF51-DK

About: My name is Bay Yolal, hello everybody!

Today, I am going to show you how to upload codes (alias; firmware) to any Bluetooth beacon has nRF51822 chip from nRF51-DK development kit via wired connection. nRF51-DK can be used to program nRF51822 included Bluetooth Beacon hardwares.

The need list:

1. nRF51-DK

2. Any Beacon module includes nRF51822 chip

3. Tiny breadboard cables

4. Micro usb cable

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: The Connection

nRF51-DK's programming pins are eight. We need only four pins of it. These areas seen on picture above:

RED Wire = VTG (Voltage Triger Pin)



BLACK Wire = GND Detect Pin

Your nRF51822 chip probably on the surface of your product. It should be has got programming pins such as Debug/Debug out named.

You need to insert a battery to your Beacon and battery's positive pin has to get attached to Voltage Triger Pin of nRF51-DK, negative pin of Beacon's battery has to get attached to GND Detect Pin. This is for telling nRF51-DK to don't get a hex file from my computer, this code is not for you, it is for other side's hardware's code (firmware). So, When nRF51-DK detects a voltage source between VTG and GND detect pins, it will send the hex code directly to your Beacon module's nRF51822 chip. This is programming.

You need to use external batteries to supply your Beacon to get trig a voltage between VTG and GND pins.

Now, use micro usb cable to attach nRF51-DK board to your computer, attach your nRF51822 chip included Beacon board to nRF51-DK with tiny breadboard cables. Open nRF51-DK board with it's slide button and power your Beacon with external voltage source.

Step 2: Generate Hex Code on Mbed Compiler

On my early instructable, I told how to use online code developing website to program nRF51-DK, now while you are using mbed compiler, select nRF51822 as your platform to compile your codes for nRF51822 chip to get ready for sending this code to your Beacon via nRF51-DK board is attached to your computer via usb cable. (See the picture above, I add a picture how to select a platform.)

Now, click on compile button to generate a hex file to download to your computer, send this hex file to nRF51-DK from your file explorer there has to be J-Link folder, just drag and drop your hex file to there. I will upload hex file to your Beacon.


That's all !

Step 3: BONUS: Reading This Instructable

NOTE: This instructable's step is aimed for visually impaired people to hear the sentences to learn what's going on here. Watch the video, it explains all steps.

Sensors Contest 2016

Participated in the
Sensors Contest 2016

Be the First to Share


    • Backyard Contest

      Backyard Contest
    • Silly Hats Speed Challenge

      Silly Hats Speed Challenge
    • Finish It Already Speed Challenge

      Finish It Already Speed Challenge

    2 Discussions


    1 year ago on Step 3

    Hello there, i have nrf51822 board with few pins but I do not have any development kit like you.
    And this BLE chip is totally new for me.
    By the i have j - link debugger from segger can you help me to program this module I'm not aware about where to start !



    1 year ago

    Hi, thanks for the tutorial. I'm having a little problem here. I have exactly the same setup as you have in the tutorial I.e nrf51-dk and the exact nrf module you used, but after uploading the code, nothing seemed to happen. Like the program was not even running (blinky sample code). Do I need a pull up on swdio or could I be missing anything ? Please help.