Maker Portal

View Original

TinyBlueX - A Low Power Bluetooth Arduino Board

See this content in the original post

See this content in the original post

The TinyBlueX is the main component used in this tutorial, however, several sensors and indicators will be required for testing the functionality of the module. Additionally, one must use a programmer to upload code to the TinyBlueX, which can be done using an Arduino board or USB to In-system programming (ISP) adapter. We will be using an Arduino Uno board to program the TinyBlueX here. Below is the full parts list for the tutorial:

See this product in the original post

A drawing of the TinyBlueX is given below:

The pinout capabilities of the module are also given below:

For further reference, the ATtiny85 pinout is also given below:

See this content in the original post

See this content in the original post

The TinyBlueX requires a USB to ISP adapter in order to upload code to it. An Arduino Uno board works just fine for this using the Arduino as ISP mode on the Arduino IDE. The complete procedure used to upload code to the TinyBlueX is given in this section. First, the the ATtiny85 must be programmed as an Arduino board using the ATtiny package created by David A. Mellis (here is a link to the package on GitHub). The ATtiny package link must be added to the boards manager in the Arduino IDE:

https://raw.githubusercontent.com/damellis/attiny/ide-1.6.x-boards-manager/package_damellis_attiny_index.json

The following screenshots outline the procedure for adding the ATtiny package to the Arduino IDE:

Now the ATtiny Arduino package is installed on the Arduino IDE, which allows user to burn bootloaders and upload code to ATtiny boards. In our case, we will be using the ATtiny85 microcontroller. In the next step, the ‘Arduino as ISP’ code will be uploaded to an Arduino Uno board, which will be required for burning the ATtiny bootloader and uploading code to the TinyBlueX.

Again, make sure to upload this code to the Uno board before continuing with wiring the TinyBlueX. Then, continue on to the wiring diagram below between the TinyBlueX and Arduino Uno board:

Now, the ATtiny85 bootloader can be burned onto the TinyBlueX using the Arduino Uno board. This can be done using the following procedure:

At this point - we have an Arduino and Bluetooth-enabled TinyBlueX board with an 8MHz ATtiny85 microcontroller at the center. In the next section, the wiring will be kept the same and an Arduino program will be uploaded to the TinyBlueX that receives text from an iPhone and transmits the same text back.


See this content in the original post

The TinyBlueX can be tested using a simple BLE chat with the BLExAR iOS app. BLExAR is an integrated app that uses Bluetooth Low Energy to communicate with CC254x-based Arduino boards. BLExAR allows iOS users to control/read all available digital and analog pins on the TinyBlueX Arduino board using the CC254x BLE chip contained within the TinyBlueX module.

Keeping the wiring the same as the bootloader burning diagram above, Arduino codes should be uploaded to the TinyBlueX using the traditional Arduino IDE method. The codes are given here and are also available at the project’s GitHub page:

The BLE chat code is also pasted below:

See this content in the original post

Now, if we open the BLExAR app and navigate to the console window, we can type in messages and send them to the TinyBlueX, which will in turn send them back to the iOS device. If a message is received back on the iOS device - then the TinyBlueX Arduino board is working as expected! The following is the output from the BLExAR app after sending several messages to the TinyBlueX from an iPhone:

A few notes on the chat: The BLE TX length on the BLExAR is 20 characters, which is why we see the message ‘iPhone Test’ clips the ‘t’ after the TinyBlueX sends ‘Received: iPhone Test’ as two lines. This chat method will be the framework for controlling an RGB LED on the TinyBlueX. We will need to handle the RX parsing in the Arduino code, which will be covered in the next tutorials, along with how to read and transmit sensor data from a DHT22 temperature sensor.


See this content in the original post

This is the first tutorial in an introductory series focused around the TinyBlueX board. In this tutorial, the focus was on introducing the TinyBlueX board, its functionality, pinout diagram, and a simple Bluetooth Low Energy (BLE) chat between the board and an iOS device via the BLExAR app. The TinyBlueX board is a low-power Bluetooth-enabled Arduino board with an ATtiny85 as its central microcontroller. There is also a CC254x BLE module wired to the ATtiny85, allowing the board to read sensors, control RGB LEDs, and other actuators via Bluetooth. In the next entry into this series, the TinyBlueX will be programmed such that any iOS device using the BLExAR app will be capable of turning an RGB LED on and off. Additionally, an example datalogging application with a DHT22 temperature and humidity sensor will be used to demonstrate the data transmission capabilities of the TinyBlueX board.

See More in Arduino and IoT:

See this content in the original post