Ruggedized Nano?

20V on the VIN pin would probably need a switchmode power supply (SMPS). I think it is a good practice to have some copper planes between the MCU and the SMPS. I'm not too sure it is a good idea to put an SMPS adjoining the MCU.

I have started to use an OKI-78SR-5 for 5V on my boards, it takes up to 36V and outputs up to 1.5A. I have it working with the Pi zero and on some AVR boards (m328p and m1284p). It has enough input range to work with 24V batteries and I can even charge the battery in the circuit (e.g. 24V LA charge at up to 30V).

The problem I would have with using the SMPS and a Nano is smoking the MCU with all that current. I need some sort of valve to limit the current to a safe level for the pins. I have tied those resettable fuses and they do not work fast enough. What works is a resistor. Another thing that works is to add current sources to the board so they can not damage the MCU pin. Unfortunately once the current source is in place I want to be able to run it from the VIN voltage (those wants are a PITA).

Years ago I noticed some circuits that level shifted I2C with a nearly useless BSS138 N-CH MOSFET. After playing with some SPICE simulations I started using the level shift for 12V to 5V and now 36V to 5V. It turns out that running a 20mA current source from 36V and then into a level shift before going into the MCU allows the MCU to control a ridiculous string of LED.

I end up smoking things like the Nano fairly quick. I do better if there are some power sources that are intrinsically safe to use with the MCU inputs, and it helps if the MCU inputs are as tolerant of my mistakes as possible without getting overly in the way of what I am trying to do.