More Testing with the nRF08001 Bluetooth LE

Note: The nRF8001 sends out packets of data, 20 bytes at time. Keep this in mind if you want to send a lot of data it will be packetized into chunks of 20. You can of course send less than 20 bytes.

Exploring Mobile Interface

After initial setup and software tests, I was able to explore the Adafruit developer smart phone application found in the android market, “BlueFruit LE”. (APK file linked here

Much like Serial you can use the .write and .print functions allow us to send data out to the connected device:

Features included in Bluefruit LE App

 


Home screen of the "Bluefruit LE" smartphone applicationHome screen of the "Bluefruit LE" smartphone application

Home screen of the “Bluefruit LE” smartphone application


Display after connection with Bluetooth moduleDisplay after connection with Bluetooth module

Display after connection with Bluetooth module

Info

Displays MAC address and other relevant Device Information


Screenshot_20170412-101741.pngScreenshot_20170412-101741.png

 

UART


Screenshot showing a message being transmitted to the Arduino from my smartphone Screenshot showing a message being transmitted to the Arduino from my smartphone 

Screenshot showing a message being transmitted to the Arduino from my smartphone 

The “UART” function allows a basic text message interface from smartphone to the Arduino Series monitor. However, after testing it was apparent that although the application allows infinite characters of transmission, the messages are broken apart into 20 character fragments due to the data transmitting capabilities of the bluetooth chip.


Snip showing successful reception of the message from my smartphone to the Arduino seriel monitorSnip showing successful reception of the message from my smartphone to the Arduino seriel monitor

Snip showing successful reception of the message from my smartphone to the Arduino seriel monitor

 

 

Pin I/O

The Pin I/O section of the mobile phone application allows the user to control input and output of pins (both analog and digital) on Arduino shield. However, this particular function required significant code modification in order to allow functionality on Android enabled devices. Once the code is finalized it will be published and linked here. In order to display this faciniating functionality a small demo was contructed in order to deminstate the smart phone interfaces capabilities. 


With just a slide of my finger I am able to modify the signal strength being admitted from the Arduino With just a slide of my finger I am able to modify the signal strength being admitted from the Arduino 

With just a slide of my finger I am able to modify the signal strength being admitted from the Arduino 


The Blue LED is only lightly illuminated due to low PWM signal as specified by the photo on the left The Blue LED is only lightly illuminated due to low PWM signal as specified by the photo on the left 

The Blue LED is only lightly illuminated due to low PWM signal as specified by the photo on the left 


The PWM slider was moved all the way to right to allow for maximum signal strengthThe PWM slider was moved all the way to right to allow for maximum signal strength

The PWM slider was moved all the way to right to allow for maximum signal strength


The increased signal strength as shown on the left caused the LED to shine brightlyThe increased signal strength as shown on the left caused the LED to shine brightly

The increased signal strength as shown on the left caused the LED to shine brightly

This section of the Bluefruit LE application appears to be very useful, unstable and will require further explanation.

Controller

Streams sensor data from smart phone sensors (Quaternion (6-axis accelerometer), Accelerometer, Gyro, Magnetometer, Location)

Beacon

Puts smartphone in a state to receive pop-up text messages from serial monitor up to 20 characters  


Snip from the Arduino Serial Monitor during transmission testingSnip from the Arduino Serial Monitor during transmission testing

Snip from the Arduino Serial Monitor during transmission testing


Screenshot of the recived message from the Ardiuno Screenshot of the recived message from the Ardiuno 

Screenshot of the recived message from the Ardiuno 


          Messages are restricted to only 20 characters           Messages are restricted to only 20 characters 

          Messages are restricted to only 20 characters 

Neopixel

Needs further exploration.

 

Conclusions

**Initial testing of connectivity shows an approximate range of 20 feet for reliable signal strength.**

After initial testing it would appear that  the Pin I/O will have the most practical capabilities and research of its functionality will continue. 

 

– Tom DeBell, Beginning Researcher Support Program researcher

Getting Started with the nRF08001 Bluetooth LE chip

 

Initial setup for this project began early this week starting with soldering header pins onto the nRF08001 Bluetooth LE (Low Energy) breakout board so that a physical connection could be made with an Arduino Uno module to begin testing. A valuable resource that helped getting started can be found at adafruit.

The wiring of the Bluetooth board to the arduino was done as follows. 

Wiring Schematic


Wiring Schematic via Adafruit Wiring Schematic via Adafruit 

Wiring Schematic via Adafruit 


Wiring completed on April 5th to begin testingWiring completed on April 5th to begin testing

Wiring completed on April 5th to begin testing

  • VIN connects to the Arduino 5V pin (Red Wire)
  • GND connects to Arduino ground (Black Wire)
  • SCK connects to SPI clock.  (Blue Wire)
    On Arduino Uno/Duemilanove/328-based, thats Digital 13
    On Mega’s, its Digital 52 and on
    Leonardo/Micro its ICSP-3 (See SPI Connections for more details)
  • MISO connects to SPI MISO. (Yellow Wire)
    On Arduino Uno/Duemilanove/328-based, thats Digital 12
    On Mega’s, its Digital 50 and on
    Leonardo/Micro its ICSP-1 (See SPI Connections for more details)
  • MOSI connects to SPI MOSI. (Teal Wire)
    On Arduino Uno/Duemilanove/328-based, thats Digital 11
    On Mega’s, its Digital 51 and on
    Leonardo/Micro its ICSP-4 (See SPI Connections for more details)
  • REQ connects to our SPI Chip Select pin. We’ll be using Digital 10 but you can later change this to any pin. (Grey Wire)
  • RST connects to Digital 9 – this is for resetting the board when we start up, you can later change this to any pin. (Orange Wire)
  • RDY is the interrupt out from the nRF8001, we’ll connect to Digital 2 but be aware that if you want to change it, it must connect to an interrupt capable pin (see this Arduino page for which pins are interrupt-capable. Digital 2 is OK on Uno/Leonardo/Micro/Mega/etc.) (White Wire)
  • Note: Wire colors refer to first wiring diegram

Initial Testing

After wiring was completed testing of bluetooth transmissions and functionality began with positive initial results. By running a sample arduino code found on GitHub we were able to communicate to the arduino via the “Bluefruit LE” android application and likewise was able to transmit data from the command line of the arduino workspace directly to a smart phone via the bluetooth module.  Further Testing will contiuno next week.


Snip from the Arduino Serial Monitor during testingSnip from the Arduino Serial Monitor during testing

Snip from the Arduino Serial Monitor during testing

– Tom DeBell, Beginning Researcher Support Program researcher