esp8266 esp-12 needs programming?

Hello. I bought esp8266 esp-12 and I would like to know if it needs programming(so I have to buy a usb to serial converter) or I can connect it with a regulator to the arduino and play from there. Thanks!

It depends on what you want to do with it. There are lots of tutorials on the web!

You do need a level shifter of some sort, since the Arduino serial is 5v, and the ESP8266 is 3.3 - see tutorials for suggestions on how to do this - there are multiple ways, with varying levels of cost/complexity/robust-ness. No matter what, you need to pay attention to this.

You can use the serial adapter on the board if your Arduino board has one on-board (as opposed to something like a pro mini, which relies on an external adapter, or the Micro/Leo/Due/etc which have native USB), you can tie RST on the Arduino board to ground, and use the serial pins to communicate directly with the ESP8266. There is absolutely more info about this out there.

However, it's stupid to jump through hoops like that, except between the time you ordered a USB serial adapter, and when it arrives: The damned things are a buck a pop shipped, $2-3 with the nice FTDI pinout (for a CH340G-based adapter)

freebil: Hello. I bought esp8266 esp-12 and I would like to know if it needs programming(so I have to buy a usb to serial converter) or I can connect it with a regulator to the arduino and play from there. Thanks!

I have the cheaper ESP-01.

I found it much easier to buy a USB-serial adapter to talk to the unit via the Serial Monitor than to use an Arduino Uno as the USB-serial converter.

A particular advantage of the USB-serial adapter is that it already uses the appropriate 3.3 V levels.


But when asking things like this, you really need to cite the Web page of the version you actually have.

Paul__B: A particular advantage of the USB-serial adapter is that it already uses the appropriate 3.3 V levels.

My FTDI adapter that I bought on eBay based on recommendation of Crossroads has trace hardwired for 5V. I measured the VCC and it is 5V. I measure the voltages on RX and TX and both are 5V.

I never recommended an e-bay purchase of anything. If anything, I would have recommended a module from www.tinyosshop.com, they have a jumper to select between 3.3V and 5V. http://www.tinyosshop.com/index.php?route=product/product&product_id=600&filter_name=ftdi%20 http://www.tinyosshop.com/index.php?route=product/product&product_id=186&filter_name=ftdi

freebil: Hello. I bought esp8266 esp-12 and I would like to know if it needs programming(so I have to buy a usb to serial converter) or I can connect it with a regulator to the arduino and play from there.

they have built in at commands so, yes, can be controlled with an arduino with no need for converter. another way is update with alternate firmware like lua interpreter and use stand alone. or they can be programmed directly from the arduino ide. those last two do not need any other controller but require a usb/serial adapter.

Paul__B: A particular advantage of the USB-serial adapter is that it already uses the appropriate 3.3 V levels.

turns out levels on those are not that important. as noted virtually all modern usb/serial are 3.3v signals and if there ever did exist a 5v one nowhere near enough current to actually damage an esp8266. ive never seen one that didnt work with signals direct connect.

an issue that actually is of concern is the dc supply. converters all have 5v which, coming directly from pc chipset, under some conditions may have enough power to kill an esp. most also have 3.3v dc but none with enough ma to drive an esp reliably. i estimate 90% of the problems people have with these are marginal supply which may seem to work but flaky. false security.

having worked with many esp setups, my own and for others, best arrangement so far is a cheap cp2102 converter with regulator (ie lm1117-3) wired in parallel onboard. pc drivers for ch340 not quite as good and ftdi to be avoided at all costs for hardware and software reasons as a quick search in the internet will show.

if you have money to burn and time is short then as bob recommends they are available domestic with the expected 500-1000% markup. personally i prefer economy and have the ability to think ahead so grab a few at a time off ebay or alibaba. great deal for a buck or so ea free shipping. they have many other uses besides esp and very important to get the ones with dtr.

another solution is use an external psu but i like the convenience of everything in one module.

ieee488: My FTDI adapter that I bought on eBay based on recommendation of Crossroads has trace hardwired for 5V.

Yes, indeed on the FTDI, "VccIO" is selectable. On - I think - all the others, it is 3.3 V which works quite well for 5 V systems and is naturally perfect for 3.3 V.

ieee488: I measured the VCC and it is 5V. I measure the voltages on RX and TX and both are 5V.

Well, that is rather a worry, since Rx is an input and should not show 5 V! :astonished:

john1993: Turns out levels on those are not that important.

I wouldn't say that. :roll_eyes:

john1993: As noted virtually all modern usb/serial are 3.3v signals

Except it seems, the FTDI which can be configured either way which is rather convenient.

john1993: and if there ever did exist a 5v one nowhere near enough current to actually damage an esp8266. I've never seen one that didn't work with signals direct connect.

Are we talking about the Vcc, or the Rx line?

john1993: most also have 3.3v DC but none with enough ma to drive an esp reliably.

I haven't fully characterised this yet, but since it is pulsatile, expect that a decent capacitor across the supply will sort it out.

john1993: FTDI to be avoided at all costs for hardware and software reasons as a quick search in the internet will show.

Well, I feel that way also, but you get howled down by the "True Believers" here. Of course if you run Linux (Mint), it is not a problem either way.

Well, as a "True Believer" I can say that I have been using FT232 chips & modules in my Projects & the Custom Products I have designed & sold since 2010 without issue. No extra code to download into a board to have the board work. With real parts (and not the fake/counterfeit crap all the e-bay buyers use) the drivers for Windows have not been a problem for me.

So does that make me a True Believer, or just an advocate of buying parts from legitimate suppliers?

CrossRoads: I never recommended an e-bay purchase of anything. If anything, I would have recommended a module from www.tinyosshop.com, they have a jumper to select between 3.3V and 5V. http://www.tinyosshop.com/index.php?route=product/product&product_id=600&filter_name=ftdi%20 http://www.tinyosshop.com/index.php?route=product/product&product_id=186&filter_name=ftdi

You are correct. It wasn't you; it was aarg. I bought the one he recommened. http://forum.arduino.cc/index.php?topic=383469.msg2643608#msg2643608

So, the caution is that not all USB-to-TTL / USB-to-serial converters have 3.3V.

CrossRoads: So does that make me a True Believer, or just an advocate of buying parts from legitimate suppliers?

If you are selling these products, then you would want to buy parts from legitimate suppliers.

If you are a hobbyist, then maybe, it isn't so important.

Paul__B: Well, that is rather a worry, since Rx is an input and should not show 5 V! :astonished:

There's voltage there when the cable is plugged it -- 4.63V -- not the 5.03V as on VCC and TX.

(deleted)

CrossRoads: does that make me a True Believer, or just an advocate of buying parts from legitimate suppliers?

both i think, which is fine because this is after all a free country (yeah, right!). but youve been very lucky. probably because you restrict yourself to one or two suppliers and willing to tolerate extreme markups.

as i said a quick search shows heretics, aka "the 99%", not so lucky judging from dozens of threads here on arduino.cc (no exaggeration) and other popular tech sites too:

http://www.eevblog.com/forum/microcontrollers/ftdi-gate-2-0/ https://www.eevblog.com/2014/10/27/eevblog-676-rant-ftdi-bricking-counterfeit-chips/ http://www.eevblog.com/forum/reviews/alternatives-to-ftdi-usb-to-uart-converter/ http://www.eevblog.com/forum/reviews/ftdi-how-to-remedy-the-dangerous-driver/ http://www.eevblog.com/forum/microcontrollers/i-don't-want-ftdi-what-are-my-options/

literally hundreds more too. notice that last one purchased from farnell (eu equivalent of digikey).

i think it was teensy paul who stormed out of this site when similar issues arose in maple thread so you are not alone in your belief system. religious freedom not just in carolina so having not been so lucky and bitten to the tune of couple thousand $ by ftdi backorder problems i personally choose reason over faith and will stick with silabs (or ch340 if forced to by economy and availability issues).

buying "legitimate" is fine and sometimes have to myself but fortunately most of the time open to other options.

ieee488: So, the caution is that not all USB-to-TTL / USB-to-serial converters have 3.3V.

this is true. and even if they do, as i mentioned, that 3.3v is not suitable for esp8266.

you must add higher power 3.3v regulator anyway so far more important to have the dtr feature so you dont have to push a button every time you download. i may do this hundreds if not housands of times per project so that little inconvenience can mean hours wasted wacking away at reset buttons.

it is unfortunate that, like with programming dongles, the ones recommended by many experts are often the worst type. the ones bob links are a little pricey but have the benefit of correct signals and fast shipping.

Paul__B: Are we talking about the Vcc, or the Rx line?

no damage to rx by direct connect to 5v outputs. do the math or real world measure. or if it makes you feel better 1k series resistor. anything but those silly cd4050 or sparkfun fet boards.

Paul__B: I haven't fully characterised this yet, but since it is pulsatile, expect that a decent capacitor across the supply will sort it out.

100uf or 1000uf cap is a popular recommendation and ive verified does improve an order of magnitude but still may show flakiness on long packet tx runs like udp.

Paul__B: Well, I feel that way also, but you get howled down by the "True Believers" here. Of course if you run Linux (Mint), it is not a problem either way.

one of the many advantages to that os. OH NO! im turning into a BRONIXIE!!!

http://forum.arduino.cc/index.php?topic=389299.msg2682490#msg2682490

john1993: this is true. and even if they do, as i mentioned, that 3.3v is not suitable for esp8266.

I am confused. Why not suitable? Not enough to power a ESP8266? I have a separate 3.3V AC adapter to power the ESP8266.

john1993: so far more important to have the dtr feature so you dont have to push a button every time you download. i may do this hundreds if not housands of times per project so that little inconvenience can mean hours wasted wacking away at reset buttons.

it is unfortunate that, like with programming dongles, the ones recommended by many experts are often the worst type. the ones bob links are a little pricey but have the benefit of correct signals and fast shipping.

The FTDI USB-to-serial converter I bought does have the DTR pin.

john1993: no damage to rx by direct connect to 5v outputs. do the math or real world measure.

Connecting 5V TX from Arduino to ESP8266 RX did not "hurt" the ESP8266 module that I have.

But can you explain with the math, why this is so?

ieee488: I am confused. Why not suitable? Not enough to power a ESP8266?

exactly. esp can draw 300-400ma (pulse as paul mentioned) whereas most serial converters put out 50ma or less. another reason to avoid ftdi which have even less. silabs capable of couple hundred which is probably more than any other.

cap is a band aid and iffy fix. external supply or regulator tacked onto usb converter are proper.

ieee488: Connecting 5V TX from Arduino to ESP8266 RX did not "hurt" the ESP8266 module that I have. But can you explain with the math, why this is so?

well for a couple of reasons. first since according to esp8266 spec pins are 5v tolerant there is zero risk. secondly even on devices that are not when you calculate or measure current on 1v or so overdrive and considering impedance of the output device there is still no danger.

hysterial claims of "bricking" and "frying" chips on the internet imo are nothing short of ridiculous. i recall someone getting banned on the rpi forum for bringing up similar subject even though she was right and most of the attackers had head-up-but syndrome. appropriate though with such a turd forum. specially any criticism of rpf policy or if a mod just has bad mood. knowing me you can imagine i must be very careful over there. all sweetness and light. lol