Thanks in advance..

We are having esp8266-12E chip and Atmega328 connected as follows, ESP 12 pin as Tx,13 pin as Rx && Atmega328 13pin as Rx, 12pin as Tx. Everything works fine, but while communicating via serial some low pulse is being generated. We couldn't find the issue with multimeter anyway but got it by oscilloscope signal.

When this false low pulse during communication happens Atmega328 connected pins also getting low for the same duration.

We tried using separated logic execution for ESP and Atmega and both were worked perfectly, but only during communicating via Software serial its flickers getting started.

Please help us getting this resolved.

enter image description here

New contributor
Learner is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
  • esp8266 SoftwareSerial doesn't work reliably – Juraj Oct 10 at 18:33
  • @Juraj: Thanks. Can I use default Tx and Rx? are those reliable? – Learner Oct 10 at 18:38
  • yes of course. esp8266 has second hw Serial interface, but only TX of it can be used – Juraj Oct 10 at 18:42
  • That means I can transmit data to Atmega328 but could not get it back. – Learner Oct 10 at 18:46
  • low pulse is being generated where is it being generated? – jsotola Oct 10 at 20:01
up vote 1 down vote accepted

Don't use SoftwareSerial in esp8266. Connect the 328p's SoftwareSerial pins to Serial interface pins of the esp8266. ESP8266 has second Serial interface named Serial1. It has only TX (io 2), but it is enough for debug prints.

To change the firmware or sketch in esp8266 you can use ArduinoOTA library, but you should be ready to disconnect the esp8266 Serial pins from the 328p and use them for Serial upload if the OTA upload fails.

You should use logic level converter from 5 V to 3.3 V to protect the esp8266 RX pin.

  • Many thanks Juraj. It’s solved our problem. Many many thanks as we are struggling with this quite many days. – Learner Oct 11 at 15:21

Your Answer

Learner is a new contributor. Be nice, and check out our Code of Conduct.
 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.