@RWB it was a simple servo 'test' connection – servo + to VIN, servo GND to GND, servo signal to D0. no-load test, i.e. servo was not connected to any mechanical load.
Yes, good point on transient readings @DevRandom. I was tracking max amperage on a fluke 87V (250us), but I'll check this on the scope again.
The most pertinent detail as I mentioned in my original post is this: 'garden-variety' analog servos do not exhibit this behaviour (frying the Photon's VR). Furthermore, the Photon datasheet says VIN can provide up to 1A. Some analog 'standard-size' servos pull more power than this TGY-S712G wing servo and the transient current never posed an issue for the Photon's VR.
Poking deeper into this particular servo reveals that it uses a rotary pot with some sort of 'clutch' mechanism, i.e. there's no physical endstops on each end of the travel on the output shaft. I know this might sound unrelated to my question at first, but this somehow led me towards thinking about PWM timings and the myriad standards (or lack thereof) that servo manufacturers set to control their servo arms.
This short note on the Particle Docs - Servo provided a partial answer:
Note however that attempting to drive a servo past its endpoints (often indicated by a growling sound) is a high-current state, and should be avoided.
In the case of this servo, because there are no physical endstops, the growling never happened, and perhaps some sort of feedback loop occurred (I'm not an engineer, so pardon the wording) on the servo IC which kept demanding more power to the servo motor to reach an impossible position. That said though, the servo wasn't moving when the VR fried, the arm just travelled to the end and stopped, and... pop.
This makes sense to me because the VR on the Photons did not fry instantaneously, but only when the arm was sent to the extreme ends of its travel (0º, 180º). I'm not sure if any servo IC have the ability to clamp and limit invalid PWM timings. Perhaps I sent PWM timings that put the servo into a 'high-current state' >1A from VIN – it would be great if someone can explain this 'high-current state'.
I subsequently found that this servo works within a narrower angle, via a different mcu and then carefully using another Photon with a potentiometer to find mid/min/max positions.
All this indicates that we have to be extremely cautious with the Servo.write()
and Servo.writeMicroSeconds()
when testing a new servo out: powering it via the Photon's VIN might just kill your Photon, so use a separate power source while confirming the maximum/minimum range of your servo's PWM timing.
I thought this could be a useful lesson to share with the community.
(now I'm just waiting on new VRs to get those 2 Photons running again...)