Skip to main content

DigiSpark ATtiny85 with HC 05 Bluetooth Module

DigiSpark ATtiny85is small but very effective breakout board. This board is very popular because of its size and easy to use offerings. If you want to know about DigiSpark visit digistump.com for more products information.



In this blog post I will show how to connect the ATtiny85 module with HC-05 Bluetooth module and blink an LED using Android phone.

For this project you would need the following components.
  1. DigiSpark ATtiny85 breakout module (1x)
  2. HC 05 Bluetooth module (1x)
  3. LED any color (1x)
  4. 220 Ohms register (1x)
  5. Breadboard 
  6. Some jumper wires 

Schematics:


Connections:

HC-05 Tx           =>        DigiSpark  ATtiny85 P1
HC-05 Rx           =>        DigiSpark  ATtiny85 P2
LED Anode        =>        DigiSpark ATtiny85 P4
LED cathode      = >       GND via 220 Ohms register
HC-05 Vcc         =>        +5 Volts Supply
HC-05 GND       =>        GND


Before making the connection, you must configure your HC05 Bluetooth module to accept the AT commands. I will write another post of how to configure HC05 AT mode.

Once you wire up the circuit and power on, HC 05 will start blinking quickly. Roughly once in a second. This indicates that module is ready to pair with your smart phone. Now open your smartphone's Bluetooth option and search for HC05 as a named device. Tap to pair it. the default passkey is '0000' OR '1234'.

Now its time to upload some code in ATtiny85 module so remove it from the circuit for a while. Use Arduino IDE to upload the sketch. Make sure that you have selected the correct board type. For this example it should be DigiSpark ( 8Mhz- No USB).

Loading ....


Now you have to install the Android Application for Bluetooth terminal. Here is the link to download the app.

Now reconnect the ATtily85 module back to the circuit and power on. Open the smartphone Bluetooth and pair it with the HC05 module. Once it will be paired the led of HC05 module will blink twice with some interval.

Now open the Bluetooth terminal app in your smart phone and send any text and your LED should turn on and off.



Comments

  1. Its work for me..thx..but how to get data from digispark to android?i use bluetooth.write() but i failed..please help me..thx

    ReplyDelete

Post a Comment

Popular posts from this blog

Experience with SIM800L GSM/2G module

In this I would like to share experience with a cheep SIM800L GSM module that I purchased from my local supplier. This is a very nice and useful module that supports GSM/GPRS using 2G spectrum. You can also make calls and send SMSs using either AT commands or using Adafruit FONA library. You can download the FONA library from github page. Connection is very simple and a basic sketch uses only TX , RX, and RST pin.  This module is designed to power somewhere between 3.7 to 4.8 volts but I powered up with 5 Volts external supply. Initially I tried to give power from my Arduino UNO 5 Volt pin. It initialized, but soon I got to know that my SIM is not getting registered in network. A quick googling gives me the answer that I would need a external power source as Arduino 5 Volts pin does not have enough power so that SIM get registered. It consumes a good amount of current for network search and registration. Also I also connected my modules GND pin to Arduino GND pin

Arduino Install Folders

Arduino files are found in 3 locations: The installation folder, the sketchbook folder, and the Arduino15 folder. The installation folder should be removed when you uninstall but the other two folders remain so you will need to remove those also to get a completely clean install. The Arduino15 folder is located at: On Mac OS X: /Users/(username)/Library/Arduino15 On Windows: Arduino IDE 1.6.5r5 and previous: C:\Users\(username)\AppData\Roaming\Arduino15 Arduino IDE 1.6.6 and later: C:\Users\(username)\AppData\Local\Arduino15 On Linux: /home/(username)/.arduino15    (a.k.a. ~/.arduino15) If you delete this folder then you will need to reinstall any Boards you have installed using Boards Manager after you reinstall the Arduino IDE. The sketchbook folder location is set in  File > Preferences  if you have any sketches or libraries that you want to save in there then back them up before removing it.