Onwrikbaar wrote:The latter does not seem to be the case. With the (heavy Delrin) cane I use, the force of the impact is significantly greater after a 270° swing than it is after a swing of 180°. This suggests that my motor keeps accelerating all through the swing.
Certainly it keeps accelerating... no claim that the torque falls to zero after the motor is moving, just that it's peak is right at the start and it falls directly thereafter. There is no point at which torque drops to 0, until the magic smoke comes out. A PDMC motor's torque is at its maximum when first starting, and falls in a linear inverse proportion to speed.
The contrast I'm pointing out is that the torque curve of a stepper motor -- which starts with a hump such that it remains high from say 0-400 or 500 RPM, before falling steeply -- is an advantage in an application of slow speed acceleration like this one. A stepper will apply more of its rated torque over this stroke than a PMDC motor. I apologize if that wasn't clear.
With very light implements, possibly. With more mass attached, probably not. Going by my experience with NEMA23s, a caning machine based on one can undoubtedly be built, but I suspect it will be somewhat disappointing - dependent on one's wishes and expectations, of course.
In my scope, with the Spank-O-Matic implements topping out with the Oak Fraternity Paddle at something like 4 pounds, everything one would use with this type of machine is very light. I referenced a NEMA23 motor with torque rating 30% higher than a high quality 96 watt PMDC motor. It's plenty strong to swing the light implement you've shown. One can definitely find NEMA23 motors that cannot... a quick look found a 5718 series Nema23 stepper rated at 64 oz-in, so there is a huge range. No claim that _every_ NEMA23 is sufficiently capable.
As far as I recall the AccelStepper and FastAccelStepper libs don't do stall detection (but please correct me if I'm wrong, it's been a while). This means that you need some kind of sensor or limit switch to detect the (in practice slightly varying) target position to be able to stop/reverse the motor on impact. In that respect the setup with a brushed DC motor is simpler too.
You're right about AccelStepper, but that doesn't mean you "need" a sensor or limit switch. You could implement this as simply as manually moving the cane until it's against the target and retracting a known rotation, then accelerating for that rotation and holding. This obviously doesn't account for lost steps... one would need to remain within the motor's capability. Or you could intentionally overrun the target with extra steps that fail and are ignored. No harm to the stepper.
I'd definitely agree that it's superior to use either a limit switch to set contact with the target or a more capable closed loop stepper, but not necessary. I also agree that your drive approach is as simple to implement as possible, so everything I'm offering is a more complex alternative.
Anyway, I would be delighted to see different implementations of caning/spanking machines, so we can compare hardware & software complexity and performance in the real world, rather than theorize about it - and perhaps come up with a reliable "reference design" that most hobbyists can build. Judging by the reactions I get on Discord, there is plenty of interest
Sorry if it wasn't clear... I'm talking from experience, not theory. My actual dev target was a whipping machine, from shoelace (think the Pain4Fem machine) to short singletail... in this task, the detailed control over acceleration that the stepper provides was vital. You can swing a shoelace with a spring drive or a bare motor with voltage control, but when you ALSO want to attach something with a different combination of mass, length, and air resistance it requires a different acceleration profile. Life, work, and loss of interest shelved the project. I'll probably get back to it at some future point.
An aside... I also experimented briefly with an articulated arm on the SOM pneumatic system, which has quite detailed control over acceleration . The issue with a flexible implement on the SOM is the abrupt, short arc of acceleration, and with a mechanical arm/elbow I was able to get about 230 degrees. This worked pretty well... but the result with more complex than desirable and I ended up considering it an amusing side project.