-
1getting the HC-05 into AT mode
1st the mode of the Bluetooth module has to be set using AT commands
upload following code to Arduino Nano :
#include <SoftwareSerial.h> SoftwareSerial mySerial(11, 12); // TX, RX void setup() { Serial.begin(9600); Serial.println("Enter AT commands:"); mySerial.begin(38400); } void loop() { if (mySerial.available()) Serial.write(mySerial.read()); if (Serial.available()) mySerial.write(Serial.read()); }
then to put the Bluetooth module into AT command mode do connections as bellow.
press and hold this button at the time of powering up that puts the HC-05 to AT command mode.
-
2set the mode of HC-05
open serial monitor and type those following lines:
AT+ORGL AT+ROLE=0 AT+POLAR=1,0 AT+UART=115200,0,0 AT+INIT
115200 is for Arduino Nano with new bootloader for old bootloaders change it to 57600
if AT+INIT gives any error ignore it as it means the command has already been executed
the name of the Bluetooth can be changed also for better reference using,
AT+NAME=nano-hc05-port
after each AT command the hc-05 should return OK
-
3generating a single pulse
As the Arduino Nano requires a high-low-high pulse to go into programming mode, A circuit is needed to provide that pulse at the correct time.
the NOT gates and the R-C circuit is used to add a delay before the signal is passed to the next NOT gate.
When input is 5v the output of XNOR will be 5v. the moment the input changes to 0v one input of XNOR will receive 0v but because of the delay the other input pin will be at 5v momentarily which makes the output of the XNOR gate to 0v. After some moment both the input pins are 0v so the output becomes 5v again.
This creates the short pulse that is needed for the Arduino Nano to reset.
-
4Step 4
connect as shown bellow,
-
5uploading
add the Bluetooth and check the outgoing com port.
go to Arduino ide select the correct port and click upload
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
Greetings. I am longtime hackaday lurker. I ran into this here interesting article here...hope it is still monitored:) I recently solved a problem I had by using a Arduino Pro Mini (i.e. 8MHz/3.3V Nano) and now it is tucked away in a far corner powered by a 5V wall adapter.
My plan was to update a table stored in Flash Memory using Arduino IDE once a year by dragging it to my desk and connecting it to the USB port, and view the serial output on Terminal v1.93b to make sure it is still working OK before sticking it back into its lonely exile. With Terminal v1.93b, I can "Auto Disconnect/Connect" so can use the same port to program on one app and monitor on another. Neat.
OK, so after that long setup to an actual question, do you suppose I can use Bluetooth module to program through Arduino IDE and monitor the serial communication?
Extra happiness for me if I can still use both Arduino IDE and Terminal on same port (e.g. COM5). Thanks. P.S. I will probably just build it next week and see if it works that way for me.
Are you sure? yes | no
Hi, nice project! Just wanted to say that your XNOR circuit is also known as a "monostable multivibrator" and in this case you want a "trailing/negative edge detector" with a "negative output pulse". More circuits of this type maybe found in this article "Working with Monostable Multivibrators" by Ray Marston: http://www.n5dux.com/ham/files/pdf/Working%20With%20Monostable%20Multivibrators.pdf
Are you sure? yes | no