# Arduino micro with esp8266

**URL:** <https://forum.arduino.cc/t/arduino-micro-with-esp8266/1190238>\
**Category:** General Discussion\
**Created:** [November 17, 2023, 11:05am UTC](https://forum.arduino.cc/t/arduino-micro-with-esp8266/1190238 "2023-11-17T11:05:21Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![nano54120](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/nano54120/32/1013044_2.png) [@nano54120](https://forum.arduino.cc/u/nano54120)\
**Post date:** [November 17, 2023, 11:05am UTC](https://forum.arduino.cc/t/arduino-micro-with-esp8266/1190238/1 "2023-11-17T11:05:21Z")

</div>

Hello. I have a esp8266 and a want send string like a usb keyboard to a PC. I know it's not possible with this device but i have a arduino micro and i want to use it with the esp8266 to interface with pc usb. I dont want use BT. I need a usb keyboard device i cant use in every situation. And with esp8266 a can made a web form to program sequences to send to keyboard. I'm not sure how to connect the two devices with serial. Must the voltage of 3.3v be respected between the outputs ? I don't find a wiring diagram. Thank you for your answers and sorry for my english !!!

---

<div class="post-metadata">

**Author:** ![J-M-L](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/j-m-l/32/766245_2.png) [@J-M-L](https://forum.arduino.cc/u/J-M-L)\
**Post date:** [November 17, 2023, 11:20am UTC](https://forum.arduino.cc/t/arduino-micro-with-esp8266/1190238/2 "2023-11-17T11:20:41Z")

</div>

> [@nano54120](#):
>
> I'm not sure how to connect the two devices with serial. Must the voltage of 3.3v be respected between the outputs ?

Yes the arduino micro is a 5V device and your ESP is a 3.3V device

if you use Serial communication and only use Txesp8266 ➜ Rxmicro (on top of joining GND) then you'll be fine as 3.3V will be received fine on a 5V device. The opposite is the issue Tx micro ➜ Rx esp8266 that would send 5V possibly to the ESP8266 pin which can only accept 3.3V

in that case you need a voltage adapter (look for "_I2C Logic Level Converter bidirectional module_") . You can find ready made I2C voltage adapters

 ![image](https://europe1.discourse-cdn.com/arduino/original/4X/6/1/e/61e462ab9d7c61b16f3eb8e4af2f046aad4d1309.jpeg)  
and as they usually have at least 4 ports, you can just connect both Tx and Rx to get a clean signal over.

---

<div class="post-metadata">

**Author:** ![Deva\_Rishi](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/deva_rishi/32/227254_2.png) [@Deva\_Rishi](https://forum.arduino.cc/u/Deva_Rishi)\
**Post date:** [November 17, 2023, 12:12pm UTC](https://forum.arduino.cc/t/arduino-micro-with-esp8266/1190238/3 "2023-11-17T12:12:51Z")

</div>

> [@J-M-L](#):
>
> in that case you need a voltage adapter

Or just use a simple voltage divider on the ESP's RX line  
Micro TX -\> 1K -\> ESP RX -\> 1K -\> 1K -\> GND  
which will effective reduce the 5v logic to 3.3(333)v  
Use 1K not 10K resistors as the added capacitance of higher values will reduce the attainable speed.

---

<div class="post-metadata">

**Author:** ![J-M-L](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/j-m-l/32/766245_2.png) [@J-M-L](https://forum.arduino.cc/u/J-M-L)\
**Post date:** [November 17, 2023, 12:41pm UTC](https://forum.arduino.cc/t/arduino-micro-with-esp8266/1190238/4 "2023-11-17T12:41:26Z")

</div>

yes, that works too

---

<div class="post-metadata">

**Author:** ![nano54120](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/nano54120/32/1013044_2.png) [@nano54120](https://forum.arduino.cc/u/nano54120)\
**Post date:** [November 17, 2023, 4:26pm UTC](https://forum.arduino.cc/t/arduino-micro-with-esp8266/1190238/5 "2023-11-17T16:26:52Z")

</div>

Super ! Thanks to you. This is indeed a safe way.

And to power the ESP8266 with 3.3V can I use the 3.3V output of the Arduino micro?

---

<div class="post-metadata">

**Author:** ![J-M-L](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/j-m-l/32/766245_2.png) [@J-M-L](https://forum.arduino.cc/u/J-M-L)\
**Post date:** [November 17, 2023, 4:30pm UTC](https://forum.arduino.cc/t/arduino-micro-with-esp8266/1190238/6 "2023-11-17T16:30:37Z")

</div>

> [@nano54120](#):
>
> And to power the ESP8266 with 3.3V can I use the 3.3V output of the Arduino micro

I would not.

The 3.3V of you Arduino Micro is generated by an internal regulator and your ESP might draw too much current for this regulator - esp. if you need WiFi

---

<div class="post-metadata">

**Author:** ![nano54120](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/nano54120/32/1013044_2.png) [@nano54120](https://forum.arduino.cc/u/nano54120)\
**Post date:** [November 17, 2023, 4:51pm UTC](https://forum.arduino.cc/t/arduino-micro-with-esp8266/1190238/7 "2023-11-17T16:51:13Z")

</div>

Ok I understand. I then plan to use the 5V and direct it to the USB input of the ESP.

---

<div class="post-metadata">

**Author:** ![J-M-L](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/j-m-l/32/766245_2.png) [@J-M-L](https://forum.arduino.cc/u/J-M-L)\
**Post date:** [November 17, 2023, 5:01pm UTC](https://forum.arduino.cc/t/arduino-micro-with-esp8266/1190238/8 "2023-11-17T17:01:33Z")

</div>

yeah split your 5V to both boards

have you considered moving to an ESP32 instead if having the complexity to deal with 2 processors?

---

<div class="post-metadata">

**Author:** ![nano54120](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/nano54120/32/1013044_2.png) [@nano54120](https://forum.arduino.cc/u/nano54120)\
**Post date:** [November 17, 2023, 5:40pm UTC](https://forum.arduino.cc/t/arduino-micro-with-esp8266/1190238/9 "2023-11-17T17:40:18Z")

</div>

what do you mean ?

---

<div class="post-metadata">

**Author:** ![J-M-L](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/j-m-l/32/766245_2.png) [@J-M-L](https://forum.arduino.cc/u/J-M-L)\
**Post date:** [November 17, 2023, 5:42pm UTC](https://forum.arduino.cc/t/arduino-micro-with-esp8266/1190238/10 "2023-11-17T17:42:15Z")

</div>

I mean this

> [@Can ESP32 be recognized as HID mouse or HID keyboard in Windows like Arduino Leonardo?](https://forum.arduino.cc/t/can-esp32-be-recognized-as-hid-mouse-or-hid-keyboard-in-windows-like-arduino-leonardo/1089166/5):
>
> There is support for USB HID with the newer ESP32-S2 and ESP32-S3 microcontrollers. The ESP32 Arduino boards platform comes with a library named "USB" that includes examples for emulating a mouse and keyboard similar to what you can do with the Leonardo board: But note that library is only for those specific microcontrollers. You can't use it with the original ESP32 microcontroller or the newer ESP32-C3.

---

<div class="post-metadata">

**Author:** ![nano54120](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/nano54120/32/1013044_2.png) [@nano54120](https://forum.arduino.cc/u/nano54120)\
**Post date:** [November 17, 2023, 6:02pm UTC](https://forum.arduino.cc/t/arduino-micro-with-esp8266/1190238/11 "2023-11-17T18:02:32Z")

</div>

I chose the esp8266 for its SVRAM capacity, WIFI and with an integrated OLED screen with this model: [https://www.amazon.fr/ESP8266-Node-MCU-D%C3%A9veloppement-XTVTX-Programmation/dp/B0CJFJ8RL7/ref=sr\_1\_5?keywords=esp8266+oled&qid=1700244120&sr=8-5](https://www.amazon.fr/ESP8266-Node-MCU-D%C3%A9veloppement-XTVTX-Programmation/dp/B0CJFJ8RL7/ref=sr_1_5?keywords=esp8266+oled&qid=1700244120&sr=8-5)

---

<div class="post-metadata">

**Author:** ![J-M-L](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/j-m-l/32/766245_2.png) [@J-M-L](https://forum.arduino.cc/u/J-M-L)\
**Post date:** [November 17, 2023, 6:13pm UTC](https://forum.arduino.cc/t/arduino-micro-with-esp8266/1190238/12 "2023-11-17T18:13:55Z")

</div>

The ESP32 is more capable and you have many offerings with an embeded OLED screen

it was just an idea to keep the design simple. Coding for distributed computing (using your 2 MCUs) is not straightforward if you want robustness, failure detection etc...

---

<div class="post-metadata">

**Author:** ![nano54120](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/nano54120/32/1013044_2.png) [@nano54120](https://forum.arduino.cc/u/nano54120)\
**Post date:** [November 17, 2023, 6:32pm UTC](https://forum.arduino.cc/t/arduino-micro-with-esp8266/1190238/13 "2023-11-17T18:32:51Z")

</div>

You are right. I hadn't thought of this version. I built my project with what I had. I'll follow your advice, it's certain that it'll be better designed this way and it meets all the details of my project ! Thank you so much 😌 👍

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [May 15, 2024, 6:33pm UTC](https://forum.arduino.cc/t/arduino-micro-with-esp8266/1190238/14 "2024-05-15T18:33:37Z")

</div>

Closed on May 15, 2024, 6:33pm UTC

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
