Our aim for this instructable is to make a BLE beacon based on nRF51822.
What are Beacons?
A beacon is an intentionally conspicuous device designed to attract attention to a specific location.
In past people used Light, sound etc as beacons, but we will be using Bluetooth low energy RF energy as our beacons. Lets get started.
Step 1: Getting Your Gear
What all things do we need to accomplish this.
- nRF51822 breakout board (you can make your own, its simple just need few caps, crystal oscillator and nRF51822 chip, of course you will need PCB antenna, you can find schematic on Nordic Semiconductor's website) various part are mentioned in image above.
- A programmer which supports single wire programming for Cortex M0 device.
- In case you buy a breakout board you might want a supporting mother board for fanouts and other stuff. (2nd Image)
- Android smart phone (which will catch our beacon frames)
On Software side we will need
- latest Keil MDK-ARM from www.keil.com
latest nRF51822 SDK found on developer.nordicsemi.com
nRF go studio from www.nordicsemi.com
android studio form android developers site
Step 2: Programming NRF51822 With Beacon Code
Now that we have required Hardware and Software, we can write a Bluetooth low energy beacon code using SDK provided by Nordic Semiconductor, You guys might be wondering "Now I shall learn to program another MCU !!!".
NO worries, guys at Nordic has made our job easy by providing us with beacon example code in their SDK, we will use this code to generate beacon frames.
I have attached a video for a bit of walk through the code and keil IDE.
After that job is done you need to build the code and program it to your nRF using nRF go studio and a programmer.
Step 3: Writing Android Application to Read Beacon Frames
Now this is the part which needs a bit of effort, In this part we will be writing Android app to read beacon frames, As writing all things is going to be difficult. I will link a videos which will cover all things in detail. Also I am attaching source file for the application.
Finally Its just short 3 step Instructable, you can experiment with the math formula that suits your environment and breakout board. Thank you for reading the Instructable.