ablab

Hello Readers, welcome to my Blog - A Blog For Bloggers By A Blogger. I'm Arun, an entrepreneur Blogger from India.

HC-06 Bluetooth Module Interfacing with ATmega32

26011
7
Mark as Favourite

In this project, we will learn How to interface a HC-06 Bluetooth Module with AVR ATmega32 microcontroller. Here, we will connect the HC-06 Bluetooth and Android Mobile through Bluetooth and we will send data from HC-06 Bluetooth to Android Mobile.

The communication between HC-06 Bluetooth Module and ATmega32 microcontroller takes place through UART serial communication protocol. The ATmega32 microcontroller will send the string “ABLab Solutions” first and then “www.ablab.in” to the HC-06 Bluetooth Module. The HC-06 Bluetooth Module transmits the received strings to the Android Mobile through bluetooth and the Android mobile displays the received strings in the Bluetooth Terminal App window. After sending each string, the microcontroller sends the carriage return and new line character to HC-06 Bluetooth Module. The carriage return and new line are sent to display “ABLab Solutions” and “www.ablab.in” in two different lines in the Bluetooth Terminal App. The ASCII value of carriage return is 0X0D and new line is 0x0A.

Softwares Required

Hardwares Required

Name Quantity
AVR Trainer Board-100 with ATmega32 1pc
AVR USB Programmer 1pc
12V, 1A DC SMPS Adaptor 1pc
HC-06 Bluetooth Board 1pc
RG1602A 16X2 Alphanumeric LCD Green 1pc
1 to 1 Connector-Female to Female 7pc
10 to 10 FRC Female to Female Connector 2pc

Circuit Diagram

Video

Connection Guide

The step-by-step connection guide for HC-06 Bluetooth Module Interfacing with ATmega32 is as follows

  • Steps - 1 ( 0f 11 )

    Insert the DC Pin of 12V, 1A DC Adapter to the DC Socket of AVR Trainer Board-100.

  • Steps - 2 ( 0f 11 )

    Connect the VCC and GND pins of HC-06 Bluetooth Module with the 5V(VCC) and GND header pins of AVR Trainer Board-100 respectively with 1 to 1 Connectors.

  • Steps - 3 ( 0f 11 )

    Connect the TXD and RXD pins of HC-06 Bluetooth Module with PD0 and PD1 pins of PortD header of AVR Trainer Board-100 respectively with 1 to 1 Connectors.

  • Steps - 4 ( 0f 11 )

    Connect the ISP header of AVR Trainer Board-100 with AVR USB Programmer header of AVR USB Programmer with a 10 to 10 FRC Female Connector.

  • Steps - 5 ( 0f 11 )

    Connect the AVR USB Programmer to the PC/Laptop's USB Port directly or with the help of USB AM-FM Cable.

  • Steps - 6 ( 0f 11 )

    Download the HC-06 Bluetooth Module Interfacing ATmega32 Hex file to AVR Trainer Board-100 with the help of SinaProg Hex downloader and AVR USB Programmer.

  • Steps - 7 ( 0f 11 )

    Switch on the power with the help of Power Switch of AVR Trainer Board-100.

  • Steps - 8 ( 0f 11 )

    Pair the HC-06 Bluetooth Module with Android Mobile. Default PIN of HC-06 is 1234.

  • Steps - 9 ( 0f 11 )

    Open the Bluetooth Terminal App in the Mobile and Connect the HC-06 Bluetooth Module with it.

  • Steps - 10 ( 0f 11 )

    Reset the AVR Trainer Board-100 using its Reset switch.

  • Steps - 11 ( 0f 11 )

    See the output in the Bluetooth Terminal Window.

  • Insert the DC Pin of 12V, 1A DC Adapter to the DC Socket of AVR Trainer Board-100.

    Steps - 1 ( 0f 11 )

  • Connect the VCC and GND pins of HC-06 Bluetooth Module with the 5V(VCC) and GND header pins of AVR Trainer Board-100 respectively with 1 to 1 Connectors.

    Steps - 2 ( 0f 11 )

  • Connect the TXD and RXD pins of HC-06 Bluetooth Module with PD0 and PD1 pins of PortD header of AVR Trainer Board-100 respectively with 1 to 1 Connectors.

    Steps - 3 ( 0f 11 )

  • Connect the ISP header of AVR Trainer Board-100 with AVR USB Programmer header of AVR USB Programmer with a 10 to 10 FRC Female Connector.

    Steps - 4 ( 0f 11 )

  • Connect the AVR USB Programmer to the PC/Laptop's USB Port directly or with the help of USB AM-FM Cable.

    Steps - 5 ( 0f 11 )

  • Download the HC-06 Bluetooth Module Interfacing ATmega32 Hex file to AVR Trainer Board-100 with the help of SinaProg Hex downloader and AVR USB Programmer.

    Steps - 6 ( 0f 11 )

  • Switch on the power with the help of Power Switch of AVR Trainer Board-100.

    Steps - 7 ( 0f 11 )

  • Pair the HC-06 Bluetooth Module with Android Mobile. Default PIN of HC-06 is 1234.

    Steps - 8 ( 0f 11 )

  • Open the Bluetooth Terminal App in the Mobile and Connect the HC-06 Bluetooth Module with it.

    Steps - 9 ( 0f 11 )

  • Reset the AVR Trainer Board-100 using its Reset switch.

    Steps - 10 ( 0f 11 )

  • See the output in the Bluetooth Terminal Window.

    Steps - 11 ( 0f 11 )

Post a Comment

    • AbhishekSingh
      I am seeing ???? in my bluetooth terminal app
      2017-04-23 11:05:13
      Reply
    • rakhibherwani
      The correct output is not shown in Bluetooth terminal app. I am just getting diamonds with question mark on the output screen. Please help me out asap.
      2017-05-13 20:41:18
      Reply
      • Arun Kumar Garg

        Please chech the frequency of the microcontroller. It should be 8MHz.

        2017-05-24 15:58:26
        Reply
    • mostafa
      koosh linkesh? |:
      2017-08-31 19:23:13
      Reply
    • Azzam
      Can I get the code at my mail. azzamasif47@gmail.com
      2017-08-17 10:40:49
      Reply
    • dewduni
      How can I get the code
      2019-10-02 12:34:12
      Reply
      • Arun Kumar Garg

        Register in the website and then download the code.

        2019-12-04 12:12:27
        Reply