ESP8266 and Arduino Uno

I am doing a project in which i want to read the value of IR sensor and send it to a webserver.
Will using of Arduino Uno and ESP8266 module work out perfectly.Also use of WAMP server for my project
a good choice.

I will read the value from IR sensor and send it to WAMP server with the help of ESP8266.Is this method correct

I want to create a IOT project with Arduino Uno and ESP8266 to send the values of sensor to a web server.
What are the steps I should follow

Which version of the ESP8266 do you have? Versions that have more of the pins broken out (-12, -07) have an ADC built in. It is 0 to 1V so keep that in mind. The ESP can be used by itself and programmed with the Arduino IDE after installing the ESP8266 core files.

what kind of ir sensor? there are different types for different purposes.
Nothing else is needed - buttons, leds, sensors, etc?

Just one sensor? What kind?

Just use the ESP. Save the UNO for another project.

I use these ESP based boards called Wemos. You can upload your UNO sketch to them using the Arduino IDE. The processor is much faster than Uno and there is much more memory for programs and data. But there are fewer pins. If you have only a few sensors, it is not a problem.
D1-mini-Mini-NodeMcu-4M-bytes-Lu.jpg

Here is a temperature & humidity sensor I made using the Wemos:
IMG_20160612_133540.jpg

IR sensor to count the number of objects.
I want to send this counter value to Server

What IR sensor? Can you post a link.

How will the server accept the value and what will it do with the value?

The IR sensor of the type normally used in Line Tracer Robots.The most basic one.
And the method by which the server will accept value is,I have not figured it out yet.I just need someone who can guide me appropriately on it.

IR Sensor:

ESP8266:

51BOh9GvOUL.SX425.jpg

Programming directly to an ESP-01 module is not easy for a beginner. You need a 3.3V USB-serial adaptor, a high-current 3.3V regulator, you need to wire up buttons for reset & program upload.

On the other hand, using the ESP-01 with the Uno is not very straight-forward for a beginer either. You need to use SoftWareSerial library, adapt the Uno's 5V pins for the 3.3V that the ESP can tolerate, and provide a high current 3.3V supply because the Uno's 3.3V output cannot provide enough.

That's why I recommended the Wemos, or something similar. The package makes it all pretty easy. Wemos are inexpensive ($4) but you might have to wait for delivery from China.

You did not answer one of my questions: what will the server do with the data it receives? Will it simply display the sensor count on a simple web page, or store each sensor reading in a MySQL database, or...

Sorry Sir.

The server will store the value in SQL database and then after few calculations it will display the processed data on website.

Cant i directly connect the Tx-Rx pins of arduino uno to Rx-Tx pins of ESP8266.

Because I can power it through 3.3V output of UNO.

Correct me If I am wrong anywhere

Cant i directly connect the Tx-Rx pins of arduino uno to Rx-Tx pins of ESP8266

You can but you lose the ability to use the hardware serial (USB) for troubleshooting and program monitoring. Better to use one of the software serial libraries.

Because I can power it through 3.3V output of UNO.

PaulRB wrote:

and provide a high current 3.3V supply because the Uno's 3.3V output cannot provide enough.

Do you read the posts that people take their time to write?

The ESP requires more than 250 mA when transmitting. The Uno 3.3V is capable of about 50 mA. See the problem?

NVT123:
Cant i directly connect the Tx-Rx pins of arduino uno to Rx-Tx pins of ESP8266.

Because I can power it through 3.3V output of UNO.

Correct me If I am wrong anywhere

You should not... The ESP8266 "could" take well over 500mA (I've recorded 750mA in the lab) and the 3.3V UNO regulator cannot handle that current. What usually happens in these situations is that strange/unexplained failures occur with the ESP8266 and the power issue never gets the bad-press that it deserves.

Pertinent articles:

http://www.esp8266.com/viewtopic.php?f=29&t=5842

Ray

So can you tell me then what is would be the correct procedure to power the ESP8266 and connecting Tx-Rx pins to Uno

NVT123:
So can you tell me then what is would be the correct procedure to power the ESP8266 and connecting Tx-Rx pins to Uno

Yes.
My personal choice for 5V Arduino module to ESP8266 is to use a 5V regulated 1A/2A power source for the Arduino (size the source to handle thevESP8266 too.)

Then pull a line from the 5V regulator to a DC-DC buck power module.... the eBay example is just to show the general item.... I pay about $0.50 USD directly from Mainland China.

So, highly stable 5V for Arduino, stepper motors, LEDs, Etc. Then the 5V drives the DC-DC buck to get a regulated 3.3V for the ESP8266.

For connecting send/receive:

The 5V Arduino "R" line is directly driven by thd ESP8266 3.3V "S" line.

The 5V Arduino "S" lind tk the ESP8266 "R" line must be buffered in one way:

I use the third approach; quick 'n cheap. Just copy the schematic.
Note, there are dual-directional solutions available if needed... just Google.

Ray

I found that 3rd approach is really good.
It will be very easy to buy a 3.3v-5v LLC and makes connection appropriately right?