Using a single power source for Arduino and stepper

I have a project that has an arduino nano powered via USB and a 24V stepper motor powered from an AC adapter. I would like to have the single power source powering both, but have heard cases of people blowing up their boards when the stepper comes on powered by a common source.

What is the best approach? Thanks!

If you use some kind of voltage regulator to turn the 24V source into something more paletable for the Nano (either 9-12V to VIN or 5V to +5V) along with a smoothing cap (I usually use 100uF but only because I have a bucket of them, not because that's the best value) you'll be fine(*).

I have a Nano connected to 3 stepper drivers this same way and it's been running fine for months now.

(*) "Fine" being defined as being sure you follow reasonable precautions to keep the raw 24V source away from anything 5V etc.

Good luck!

Just be sure to check the spec for any regulator chip - not all of them go to 27V (although
7805's etc do, I believe). A cheap LM2596 switch-mode DC-DC converter from eBay perhaps?