I have a basic electronics question, I am controlling a 230v AC motor from my photon using a relay. I would like to control the torque of the motor by adjusting the motor voltage i.e. if the voltage applied to the motor is 230v it is 100% torque if it is 115v it would be 50% torque, that’s the idea anyway.
I can’t seem to find a way of doing this by the photon. Is there a variable resistor that can be controlled by the photon or do I need to just use a normal variable resistor like a light dimmer switch? Or is there another way?
AC isn’t (normally) dimmed by variable resistors but usually via Triacs.
If you search for zero-cross detectors you’ll find some threads - but judging by your original approach I’d recommend you stay away from 240VAC. If you are not educated in that field you’ll easily end up putting your own or other peoples lifes in danger.
And torque control is far more complicated than mere speed control too.
What kind of motor are you dealing with (sync vs async/induction)?
I’m not educated in the field of motors/ knowledge is a bit old, but I do hold a current 17th edition electrical cert and an HND in Electrical Eng, so don’t worry about the mains safety issues. Electronics on the other hand is a new field for me as is software programming.
You probably want to use an AC drive controller between your photon and the motor. The typical controller has low voltage digital and sometimes serial interfaces to control motor speed and isolation to keep your photon safe. Examples are on this page: AC motor Controls. They work by changing the frequency and sometimes phase angle of voltage to current, to control power factor.