So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By devildudeja
#70922 Hey,(Bear with me)
Long story short , I had been working on a prototype which basically includes a lot of WiFi communication(multiple devices)..I had been thinking and was pretty sure about using Arduino uno + esp8226 module to do so, but now I am totally confused , many people say that esp-01 doesn't directly work with Uno and I'll need a logic converter ,which are almost as much as arduinos themselves here , Moreover I need to submit this within 10 days for a science fair.The complications with esp-01 are too much and also there is no solid brand in India that manufactures these esp-01 of trustable quality.I dont want to make my project too complicated and thats why I am thinking of using node MCU , which is abundantly available here , I can also consider wemos d1 , but I'll prefer nodemcu if possible , but i have some doubts about it , they may seem foolish but I've gotten myself into so deep I've lost common sense(literally have 37 tabs open searching for these):

1.Will the arduino libraries and code work without any problem on NodeMcu?can they both run on the same language/code?
2.does nodemcu require a 3.3v source or is it compatible with 5v too?CAN I USE A NORMAL POWER BANK TO POWER IT?
3.will the nodemcu also work with certain sensors for arduino(HMC5883L magnetometer to be exact)

Please help
User avatar
By cblx5
#70943 Hi,

As you are on a timeline I will be share my experiences with the ESP-01

I am only able to answer some of your questions so you will need more replies, some of my answers are ONLY my experience.

a) To connect an ESP-01 to a 5 volt UNO you only need 2 resistors ( 1 K and 2.2K) and a AMS 1117 3.3V regulator. Use the two resistors to drop the UNO TXD voltage from 5 V to 3.3V to feed into ESP-01 RXD. The TXD (3.3V) of the ESP-01 can be directly connected to RXD of UNO.

You need to power the ESP-01 with 3.3V regulator as the UNO cannot reliably power the ESP-01. The ESP-01 draws just over 200 mA at times and you can suffer large voltage drops if powered only by the UNO.

Note the UNO Serial interface is also the programming USB port, so debugging a ESP-01 is going to be difficult. Most people us a 'SoftSerial' library and use other pins on UNO.

b) In my two years of using the ESP-01, all Arduino libraries I have come across use the AT command set to talk to the ESP-01 (or ESP8266). I understand that NODEMCU ( which is firmware not hardware) uses a language called LUA. (In fact a am suffering a similar problem with this at the moment). With LUA you programme the ESP-01 as a processor not the UNO. So if you need to run Arduino code you need an ESP-01 that responds to the AT command set ( i.e. the firmware is SDK not NODEMCU )

So to answer your questions (based on my experience).....


1.Will the arduino libraries and code work without any problem on NodeMcu? can they both run on the same language/code?

A- All libraries I have used assume AT command set not LUA (NODEMCU)
- so my answer in NO

2.does nodemcu require a 3.3v source or is it compatible with 5v too?
- Yes it needs a 3.3 V source to supply at least 250 mA.

CAN I USE A NORMAL POWER BANK TO POWER IT?
- Yes the power bank can be the Vin for the 3.3V regulator if the voltage is 5V to 9V



3.will the nodemcu also work with certain sensors for arduino(HMC5883L magnetometer to be exact).

I am ....GUESSING....... yes with - but you are using the ESP-01 as a processor and wifi and so no Arduino is needed. But the ESP-01 ( which is a ESP8266 with little eprom) may not have enough eprom space for your code.

Hope that helps....