0

I designed a PWS (personal weather station) which will be placed in a difficult to access location. In case of the master crashing and not requesting from the slave for a certain amount of time (stay alive protocol), is it possible to reset the master from the slave by powering a digital pin?

enter image description here

Note, I improvised a pull down circuit so that the Arduino Nano's D7 (or any other digital pin) 5V output could be pulled down to 3.3V.

  • 1
    for me it didn't work for Wemos D1 mini. with level shifter it worked. I don't know why. but you should have a level shifter for esp8266 RX too – Juraj Jul 26 at 15:18
  • care to elaborate into an answer? tks @Juraj – tony gil Jul 26 at 15:57
  • 1
    I plan esp-01S wiring experiments this weekend and the reset of the esp8266 from Arduino is one of the goals – Juraj Jul 27 at 6:17
  • 1
    The "RST" (reset pin) should work, try it w/o the other device, to see if it actually resets. – Paul Jul 27 at 7:12
  • @Juraj da man! tell me how that goes, please! Do you want me to post this fritzing diagram as an fzz somewhere? – tony gil Jul 27 at 8:55
2

There is no need for a voltage divider or a level conversion on the reset pin of the esp8266. The esp8266 has internal pull-up on reset pin. To reset the esp8266 the reset pin must be connected to ground for a very short moment.

To pull the reset pin LOW with pin of the other MCU we do:

void resetEsp() {
  pinMode(ESP_RESET_PIN, OUTPUT);
  delay(1);
  pinMode(ESP_RESET_PIN, INPUT);
}

ESP_RESET_PIN is the pin wired to reset pin of the esp8266. It is not configured in setup() and it is never set HIGH (we don't want to send 5 V to esp8266). Setting the ESP_RESET_PIN to OUTPUT connects it to ground, setting it back to INPUT hands the control of the line back to esp8266 reset pin's internal pull-up.

  • not sure i understand the wiring. Does that mean that my Arduino (MCU) digital out is connected directly to NodeMCU RST pin? If not, do you mind posting a Fritzing diagram? UPVOTED pending clarification for eventual ACCEPT AS CORRECT ANSWER. – tony gil Jul 29 at 17:36
  • i am posting a Fritzing as an answer, please comment if correct or incorrect. Vote (up or down) if you will. – tony gil Jul 29 at 17:43
  • yes direct connection, because there is never 5 V from Nano side. it only pulls the reset LOW – Juraj Jul 29 at 18:13
  • ACCEPTED, tks!! – tony gil Jul 30 at 15:49
0

As per verification from Juraj, this would be correct wiring for his answer:

enter image description here

  • the point of reset from other MCU is not in wiring, but in code. – Juraj Jul 29 at 18:11
  • so is my original diagram correct, with the voltage divider? – tony gil Jul 29 at 18:25
  • I removed my comments about level conversion on I2C following Majenko's explanation here: arduino.stackexchange.com/questions/67461/… – Juraj Jul 30 at 9:11
  • as I write in the answer you don't need voltage divider on reset because it has nothing to divide. there is never 5 V – Juraj Jul 30 at 9:12
  • 1
    yes. of course there is a risk that some other unintentionally to Nano uploaded sketch sets the pin as output high. – Juraj Jul 30 at 9:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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