@Christopher_Hemmings - honestly, it could be any number of things that are causing your restarts. I have seen some issues with controlling servos using the NodeMCU (e.g. with the crappy servos I had connected, they would oscillate at any point the wifi radio goes active), so I see how the servos could affect the NodeMCU vice versa. I hadn’t tried this yet, but maybe a low ESR capacitor between the 5V/GND lines on the servo would help filter out any noise?
Just listing things off the top of my head, I’d look at these:
- Make sure your 5V input is remaining steady (if you have a Fluke or a meter with a “MIN” function, you could put that across the VIN/GND pins and see if you’re dropping too low - below ~3.9 v is bad…
- Use the serial monitor to see what messages the NodeMCU is sending during resets - it’ll include the reason for rebooting (wdt, power loss, or any other runtime crash).
- Check your code for any obvious problems like dividing by 0 or other common problems.
The RST/D0 diode I put in is for programming only (after I found out there’s issues with getting some boards to go into boot mode with a straight connection).
BTW, we definitely should have a hardware section on this forum - there’s plenty of people who would be interested in having hardware discussions as they relate to their openHAB system (sensors, controllers, etc…) and that information is hard to come by at arduinoi- or other hardware specific forums.