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 !!!
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
and as they usually have at least 4 ports, you can just connect both Tx and Rx to get a clean signal over.
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.
yes, that works too
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?
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
Ok I understand. I then plan to use the 5V and direct it to the USB input of the ESP.
yeah split your 5V to both boards
have you considered moving to an ESP32 instead if having the complexity to deal with 2 processors?
what do you mean ?
I mean this
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
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...
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
![]()
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
