ESP8266-01 not responding to AT commands - arduino

my esp8266-01 is not responding to AT commands when i upload a blink sketch. I have to re flash it with some other firmware which i got from the internet to make the AT commands work i am new in ESP modules ...so is it common or have i done anything wrong the connections are shown below while flashing..
i used an arduino uno for flashing
TX-TX
RX-RX
VCC- 3.3v external supply
CH_PD-VCC(The CH_PD pin in my module was named as "EN")
RST-VCC
GPIO0-GND
GND-GND
the blink sketch in the example is working fine but not responding to AT commands while blinking...
this is what the serial monitor outputs at 115200 NL&CR
//some garbage values//
ets Jan 8 2013,rst cause:1, boot mode:(3,0)
load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v614f7c32
~ld

You need to flash the ESP8266 with the AT firmware in-order to use the AT Commands.
Download The AT firmware and flash it using esptool.py or NodeMCU flasher.

Related

Standalone Atmega328p-pu not working without external crystal

Recently i bought some standalone Atmega328p-pu (just the MC not a arduino board). At the time i forgot to buy a 16mhz crystal but according to many sources on the internet i could run it without the crystal. but it never worked. I used a Arduino Nano as the programmer (with the Arduino as ISP sketch). made the following connections.
Nano ---> Atmega328p-pu
D13 Pin 19 (SCK)
D12 Pin 18 (MISO)
D11 Pin 17 (MOSI)
D10 Pin 1 (RESET) (tried it with and without a pullup resistor to 5V).
5V VCC
with those connections when i try to burn the bootloader or upload sketch using programmer, my upload fails. i get Device signature 0x000000. i have tested this on other MCs as well and none of them worked. few days later i bought a 16mhz crystal and connected it as given bellow. (keeping previous connections as they were).
Crystal Pin 1 ---> Pin 9 (XTAL 1)
Crystal Pin 2 ---> Pin 10 (XTAL 2)
22nF capacitor between the pins and ground
Only after this did the my MC work. i could burn the bootloader and upload code to the Atmega328p-pu using my Nano as the programmer
So. the question is why was the Atmega328p-pu not working without the crystal? i have seen videos on youtube where a crystal was not used and the MC worked fine.
Note: when i say MCs i mean other Atmega328p-pu's
Without external clock, you can just have 8MHz. With a crystal, you arrive to 16MHz.
If you use the one from an Arduino board, it is already programmed and it will not work without a crystal (you can put any crystal to upload your sketch, from 100kHz to 12MHz).
But it is important that you never upload a sketch with external crystal fuse flag set. Because at this point, you need to connect a crystal to pins 9 to 10 (also by hand) to be able to start/program it again.
Arduino IDE has the default Arduino boards. If you have your own AtMega328, you should install this board:
https://github.com/MCUdude/MiniCore
Then you can just set your 328 with the custom crystal settings:
If you set the interal crystal (limited to 8MHz), you can use pin 9 and 10 for other purposes.

Sending Data from Arduino to Android using Bluetooth

I am trying to do a project based on arduino and Android in which I want to use ultrasonic sensors and Bluetooth module hc-05 . I want to detect any obstacle using ultrasonic and send it's distance to Android app using Bluetooth. I am completely new to arduino and have never used it before . How could I connect both the Bluetooth and ultrasonic sensor to arduino uno board without using breadboard? Is it possible to connect both of them without using breadboard and just the jumper wires?
You can connect the Bluetooth Module and Ultrasonic Sensor with jumper wires directly to the Arduino.
Depending upon the Ultrasonic Sensor you are interfacing, there must be a library or a sample code. You can tweak the code to get the distance in your desired format or variable.
As far as the Bluetooth is concerned, you can operate it at 3.3v or 5v depending upon the module you use. Most of the Bluetooth module support both 3.3v and 5v - as they have voltage regulators on their break out. I have used these and they work on 3.3v as well as 5v
For instance, check the Bluetooth HC - 05 Module in the below link :
http://www.amazon.in/Verve-VTA009-Bluetooth-Module-HC-05/dp/B00S15XTG8?tag=googinhydr18418-21&tag=googinkenshoo-21&ascsubtag=7a58e842-4c10-40bf-a48f-339edef372a7
For implementing the Bluetooth communication, prefer using the Software Serial. If you connect the Bluetooth HC 05's Rx and Tx to the Arduino's Hardware UART Pins, there can be unpredictable results. I have experienced that using HC05 with Software Serial is reliable. Additionally, you can use the Serial Monitor to debug your code at the same time. I mean, you can send the same data on Software Serial and the Serial port and check if things are as desired.
You can implement, the HC-05 Software Serial at 9600 baudrate. 9600 is the default baudrate on most HC 05 Modules.
For developing the Arduino code and testing it, you can use a terminal client like PuTTY on you computer. You need to establish a bluetooth connection between your computer and HC 05.
HC-05 runs at 3.3V, make sure you do level conversion from 5V to 3.3V using a zener diode. Or buy a level converter if you are new to electronics. If you don't, there is a good chance you will blow up the HC-05. If you could add a photo we can see if its already done on the Bluetooth module, then you need not worry about level conversion
HC-05 is basically a wireless serial port over bluetooh. On arduino create a software serial post using the library SoftwareSerial and send the sensor data to that serial port
There are libraries available for popular HC-SR04 ultrasonic sensor, if that is the sensor you are using.
For testing on android many app are availables like Bluetooh Terminal, you can receive the data sent from arduino.
Yes the whole project can be done without breadboard using connecting wires.

Arduino Nano - Programmer not responding

I cannot seem to upload the simple blink program to my Arduino Nano. I keep getting the message:
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x03
What I have tried already with a lot of suggestions on Google. I have tried it on both a Windows 7 & 8 machine and with 2 different Nano's:
Set my Board to Arduino Nano
Set my Processor to ATmega168
Set my port to COM1
On windows 8 turned off driver signature
Installed the FTDI Driver
Checked my drivers in control panel
USB controllers says USB Serial Converter
USB Serial port says USB Serial Port (COM1)
Rebooted a Lot!
When I plugin the nano to the USB it starts blinking the L led 180 times a minute. When I start uploading, L blinks at about 80-100 times a minute, blinks the rx and then start blinking the L led fast again.
As of 2018, if you have a genuine Nano (from Arduino), you could be getting this error because of an update to the bootloader on all Nanos shipped by Arduino after January 2018 (Read the note (highlighted in bold) here: https://www.arduino.cc/en/Guide/ArduinoNano#toc4). You will have to update your Arduino AVR Core to 1.6.21 in Boards Manager Under Tools -> Board in the ArduinoIDE to use your shiny new Nano.
Conversely, if you have an older Nano (older than Jan 2018), but recently updated your ArduinoIDE, you should make sure the Processor you selected is ATmega328P (Old Bootloader) under Tools -> Processor.
If your Nano is not genuine (i.e. a 3rd Party Nano), then you may have to manually install the bootloader required to work with it. (The 3rd party should have documentation about this)

software serial not working with my esp8266

I am not able to use esp8266 wifi module on arduino uno using software serial, the problem is that i am not getting correct output. But i am able work with Arduino mega which has additional hardware serial tx-rx pairs. how to make it work on uno?
I used lm1117 voltage divider for esp8266, tried other voltage dividers(1k+2k), nothing seems to work on uno and nano.
Here is the output i am getting
AT+RST
OK
ets Jan 8 2013,rst c`use:2, boot mode:(3,7)
load 0x40100000, len 1386, room 16
t`il 4
chkstm 0x89
load 0x3ffe8000, len 776, rtail 4
e
t`ilcn1e IeKo
ŒÕ(j5�!
-€3%1…
j
äsl��oÿ
Ai-Thinker Technology Co. Ltd.
ready
Aj+CWMOBD=3
OK
AR+CWJAP="Max_Regul]®ÅªÖKb½�AAÅ¢ª²R‰j
WIFI CONNECTED
WIFI GOT IP
OK
AT+CIPMUX=1
OK
AT+¨R5UIVER=1,<0
OK
Server Ready

XBee and Arduino communication

I am in the middle of my project, and I am now trying to make a connection between two XBees, exactly like in this the YouTube video XBee Basics - Lesson 2 - Simple Chat Program Between Two XBees in AT Mode. I setup the network in the X-CTU first, and now I am trying to connect the XBees with Arduinos.
In the Arduino programming software, the side of the router works fine - I can see in the serial monitor that it's sending the "Hello World" messages, but on the side of the coordinator, it does not receive any massages.
Platform:
Arduino IDE version 1.03-1.05.
XBee Series 2
Arduino Uno
I suppose that the "Hello word" message on the router side is due to a Serial.print() instruction that you have included for debbuging purpose.
Arduino Uno like my Arduino nano have only one serial port (the usb) and if you use it for power purpose or debugging or transmitting data to the PC it is considered busy and anything connected to the pin 0 and 1 will be ignored.
Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data. These pins are connected to the corresponding pins of the ATmega8U2 USB-to-TTL Serial chip. it is from arduino site).
You need to create a software serial port with the library SoftwareSerial (is it included in Arduino IDE since version 1.0)
to call the library and define the software serial port you can use this piece of code
#include <SoftwareSerial.h>
uint8_t rxxbee = 2;
uint8_t txxbee = 3;
SoftwareSerial Serial_xbee(rxxbee,txxbee);
Rember to connect the RX of the arduino to TX of the XBee and viceversa.

Resources