1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

dont know how to use bluetooth module hc-05

Discussion in 'Arduino' started by toni.zul, Jan 20, 2018.

  1. toni.zul

    toni.zul Member

    Joined:
    Jan 20, 2018
    Messages:
    47
    Likes:
    0
    i connect it to arduino, upload program conect it to android and it doesent do anything
     
  2. toni.zul

    toni.zul Member

    Joined:
    Jan 20, 2018
    Messages:
    47
    Likes:
    0
    i need help fast
     
  3. Les Jones

    Les Jones Well-Known Member

    Joined:
    May 15, 2015
    Messages:
    1,593
    Likes:
    202
    Location:
    Lancashire UK
    You would get better help if you provided more information. What program are you using on the Android device to communicate with it's bluetooth interface ? What program are you running on the Arduino and which version of Arduino is it ? Have you configured the baud rate of your HC-05 to match the baud rate the program running on the Arduino is set to ? On the Blutooth configuration on the Android device does it show as connected to the HC-05 ? My first test would be to link Rx and TX on your HC-05 and run a terminal emulator program (I use Blueterm.) on the android device. If the link is working then you should see what you type displayed on the screen. (If you remove the connection between RX and TX on the HC-05 then the characters you type should not appear on the screen.)

    Les.
     
  4. dave miyares

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    2
    Likes:
    -10


     
  5. toni.zul

    toni.zul Member

    Joined:
    Jan 20, 2018
    Messages:
    47
    Likes:
    0
    I use 1.0.5 arduino version and i tried more programs and non of them worked
     
  6. toni.zul

    toni.zul Member

    Joined:
    Jan 20, 2018
    Messages:
    47
    Likes:
    0
    and i cant read anythin in serial monitor
     
  7. toni.zul

    toni.zul Member

    Joined:
    Jan 20, 2018
    Messages:
    47
    Likes:
    0
    i have 1.0.5 arduino version
     
  8. dave miyares

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    2
    Likes:
    -10


     
  9. alec_t

    alec_t Well-Known Member Most Helpful Member

    Joined:
    Jul 10, 2011
    Messages:
    9,730
    Likes:
    1,277
    Location:
    Cardiff, Wales
    Are you sure that all the connections are correct and effective?
     
  10. toni.zul

    toni.zul Member

    Joined:
    Jan 20, 2018
    Messages:
    47
    Likes:
    0
    i watched yt videos and i did all as them.
    and u watched great scoot on yt about bluetooth
    i have 6pin module
     
  11. toni.zul

    toni.zul Member

    Joined:
    Jan 20, 2018
    Messages:
    47
    Likes:
    0
    i connected rx-tx ,tx-rx, gnd-gnd and 5v-5v
     
  12. Les Jones

    Les Jones Well-Known Member

    Joined:
    May 15, 2015
    Messages:
    1,593
    Likes:
    202
    Location:
    Lancashire UK
    Here is a method I used to configure an HC-05 using AT commands with an Arduino uno and the Arduino IDE.

    "
    Using the Arduino Uno to configure an HC05 Bluetooth module.


    Either remove the ATMEGA328P or program it with this sketch which will not enable the TX pin on the ATMEGA328P. (It just runs a tight loop doing nothing.)


    Connect the RX pin on the Aduino board to the RX on the HC05 module via a potential divider consisting of a 5K6 restistor from the RX pin on the Arduino and a 10 K resistor to ground. NOTE Connecting the RX pin to the RX pin seems strange but the RX pin on the Arduino board is actualy the TX pin on the ATMEGA16U2.

    Connect the TX pin on the Arduino to the TX pin on the HC05 together with a 3.3 volt zenner to ground. (+ to TX pin - to ground.)


    In the Arduino window click on the "Tools" dropdown box and select "Serial monitor"

    In the "serial monitor window" set the baud rate to 38400 bauds. In the box to the left of the baud rate box select "Both NL & CR"
    Type the required AT command in the send window then click send.
    You will see the response in the main part of the serial monitor window.

    NOTE The baud rate for AT commands is always 38400"

    This is basically using the Arduino Uno as a USB to serial converter and using the serial monitor as a terminal emulator.

    Les.
     
  13. toni.zul

    toni.zul Member

    Joined:
    Jan 20, 2018
    Messages:
    47
    Likes:
    0
    what program i shud upload to arduino
     
  14. toni.zul

    toni.zul Member

    Joined:
    Jan 20, 2018
    Messages:
    47
    Likes:
    0
    what is 5k6 resistor
     
  15. Ian Rogers

    Ian Rogers User Extraordinaire Forum Supporter Most Helpful Member

    Joined:
    Mar 28, 2011
    Messages:
    9,805
    Likes:
    958
    Location:
    Rochdale UK
    toni.zul If you don't stop this indiscriminate posting about this topic, I'll be forced to take action!!

    One topic one thread... I have moved this to the Arduino section...
     
  16. toni.zul

    toni.zul Member

    Joined:
    Jan 20, 2018
    Messages:
    47
    Likes:
    0
    i m sorry i started my account today so please forgive me.
     
  17. toni.zul

    toni.zul Member

    Joined:
    Jan 20, 2018
    Messages:
    47
    Likes:
    0
    i just need help
     
  18. Les Jones

    Les Jones Well-Known Member

    Joined:
    May 15, 2015
    Messages:
    1,593
    Likes:
    202
    Location:
    Lancashire UK
    A 5K6 resistor resistor is 5.6 K ohms (5600 ohms) These components are to protect the HC-05 3.3 volt level inputs from the 5 volt siganls from the Arduino. I did not write a program to change the TX the pin to an input (So as not to load the signals between the ATMEG 16U and the HC-05) I unplugged the ATMEGA328. (I am useless at "C" progaming. I just made the suggestion as an alternative method.)

    Les.
     
  19. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    5,198
    Likes:
    159
    Location:
    morristown,tn
    You deleted where I showed how to hook one up
    Plus there is no helping without seeing what he has done.
    And not all app's one android work as one thinks I use bluetooth rs232 terminal and Bluetooth USB wifi terminal the last one is the best.
     
  20. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    5,198
    Likes:
    159
    Location:
    morristown,tn
    You can hook it up just like this
    [​IMG]
     
  21. toni.zul

    toni.zul Member

    Joined:
    Jan 20, 2018
    Messages:
    47
    Likes:
    0
    int state;

    void setup() {
    Serial.begin(9600); // im not sure for this
    }

    void loop() {

    if(Serial.available() > 0){
    state = Serial.read();
    Serial.println(state);
    }

    }
    can i use this program
    i connected gnd-gnd, 5v-5v, tx-tx and i puted 5k resistor from gnd andrx on module and 2k resistor from rx on module to rx on arduino
    my board works on 3.3 logic level
     
  22. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    5,198
    Likes:
    159
    Location:
    morristown,tn
    Or if you worried hook it up like this [​IMG]
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice