Some model trains operate on a system called DCC, or Digital Command Control. As an alternative to DC, or Direct Current-driven models, it’s a commonly-held misconception that DCC runs on an AC, or Alternating Current circuit. In reality, it’s still using direct current, but combining it with PWM, or Pulse Width Modulation, to embed digital signals at slightly higher voltages than the regular operating voltage. These signals can be used to address individual models and send commands that allow for a model to have more functions than a DC model would be capable of, such as more sophisticated lighting, finer motor controls, sound features, consists, speed matching, automation, and a lot more.
Wow... I love electronics but I've never dabbled with model trains, had no idea they've gotten that sophisticated. I thought it was all about the miniature making etc. lol, PWM in the tracks is amazing.
Oh DCC has been around since the 80s, I think, but nowadays we can use Arduino boards as base stations in place of the more turnkey units that cost a lot more.