Oh, yeah, I barely scratched the surface of PWM applications... and of course you don't really need a microcontroller; discrete components can be easily assembled into a working PWM application. Microcontrollers just make the control task relatively easy.
I had done stuff using PDM, which is "sort of like PWM, but slightly different".
I am not sure if they are entirely interchangeable, as I suspect there may be cases where the receiving end expects a particular modulation, as opposed to a specific duty cycle.
I have also noted that there are some types of sensors which output something PWM-like, but the frequency varies rather than the duty cycle, which I have interpreted as being some sort of digital FM (say, it maintains an approx 50% duty cycle, but varies the output between around 700Hz and 1400Hz or so).
the biggest difference I have noted between PWM (mostly DPWM) and PDM (in software), is that PWM variants tend to use accumulators or arithmetic to determine the output state, whereas PDM tends to be driven by comparing the current output with the target value.
I have noted between comparing several algorithms, that PWM seems to work better at holding a particular duty cycle, but responds slower, whereas PDM variants seem to have better high-frequency response at the cost of not holding the target value as closely.
PWM tends also to more result in a variable square-wave output, whereas PDM will more often generate dithering in the output. also noted that PWM seems to under-compensate for changes in duty-cycle, whereas PDM seems to overcompensate.
one of the better compromises seemed to be a first-order delta-sigma modulator, which has a more uniform frequency response, and tends to generate output which looks more like PWM output.
One area I have been investigating is electrosex stimulators, after my experience in physical therapy recovering from an arm broken in a motorcycle accident. The pulsed electrical muscle stimulation of my arm, along with the hot towels applied to it, felt quite wonderful. It might even have helped the healing process, although I read that the Russians did that by applying currents across the kniting bones. My orthopedic surgeon didn't want to try that.
back when I was much younger (sometime in the late 90s IIRC), I remember hearing about some various "toys". one which I half remember (seeing talked about, probably on TV) was something for using a speaker-like voice-coil to essentially jerk-off the user (hands-free, using some sort of sock-looking thing). IIRC, it was designed use the audio output from a computer or game console (in-context, for pornographic FMV games, on the CD-i or something). also remember some stuff about "teledildonics" and similar.
I forget now where I saw it, and have not found any later evidence of any of this stuff having existed.
( well, among other things lingering in dark corners of my memory... )
So I surfed the web to see what was available for home use. You would not believe the kinky stuff I found! Here is a major cottage industry right under my nose just waiting for high-tech exploitation. I already had a little experience in this area (electrical muscle stimulation), having used in the 1970s a
Grass stimulator on frog legs (from freshly sacrificed frogs) as an electronics technician assisting medical researchers and scientists. It didn't occur to me at the time that there might be other uses... or less expensive products.
Anyway, I hope this helps too. Imagine, an ARM processor used to build arm strength!
dunno about medical applications...
I have before imagined going the other way, mostly in the context of if people had powered armor or for controlling large robots. something similar is being done already for people controlling prosthetic limbs, which I guess is another noble goal.
possibly a person could also run A/V into their head, but for this, headphones and AR goggles could be a better solution.
dunno about a "good" solution for AR displays. past ideas had involved some use of conventional optics mixed with a combination of LCD and OLED displays (LCD for alpha blending, OLED for RGB).
an idea being to have an outer lens flatten the light, which passes through the display layers, and an inner lens reverses the effect of the first lens (and also has the display fill the users' field of vision).
on one extreme, they would be transparent like glasses, and on the other, would function more like VR goggles. in their normal mode of operation, they could allow overlays over ones' normal field of vision, and probably also have stereo cameras. also cool if they could function as welding and night-vision goggles.
they could also function sort of like the kinect, and allow the user to interact with the overlays using their hands or type with a virtual keyboard.
more conventionally, a person could have a VR headset with stereo cameras, but the drawback is that the user would have some amount of latency and reduction of dynamic range and resolution when it comes to their external vision.
well, and it could be annoying for those of us who have slightly abnormal color vision, and where cameras/monitors see the world a bit differently than ones' eyes (colors generally "look different", and the world cameras see looks dull and desaturated, and some colors I can see IRL seem to not exist on computers, *).
*: particularly near the blue end of colors. what many people collectively call "blue" I see as several different looking colors, and where pure blue on a computer is more of a violet-looking color. if a computer sees cyan, it just sort of mixes blue and green, but this doesn't really look much like what I see IRL (no good way to describe it exactly, but it looks "different").
basically, there is "blue" in the sense of cyan or sky-blue, which I see as "different looking" colors IRL. then there is another "blue" which looks more indigo or violet, which is what computers see. and, of course, there is green. green+blue (indigo) doesn't match the other color.
red/yellow/green look about the same though in both cases (this part of the rainbow matches).