Electronic – arduino – Sewing machine speed and needle position control over arduino

arduinomotor controllerresistorssensor

I need control sewing machine speed and needle position over arduino project.

  • Current sewing machine is: Brother X5, with 70 Watt motor with foot pedal control.

Speed of motor will controlling by triac dimmer (image attached) but want to change dimmer resistance (rheostat) throw arduino, progragrammatically. Not with servo motor.
enter image description here

Q1: How can I change resistor resistance to form arduino programmatically?

Q2: Can I control motor speed sending 220V AC as pulses? (without triac dimmer)

For needle position plan to use magnet sensor. "Reed Switch Magnetic Sensor" Or "Hall Sensor"
Problem is vibration of machine and spinning speed is factors,

Q3: Which sensor best suit in this case?

Best Answer

If the machine has a brushed or universal motor, you can use a triac dimmer to control its speed.

However, triac dimmers are annoying to control. They fire on each mains cycle, ie every 10ms on 50Hz mains which inserts a large phase lag in the control loop. Also the input-output curve is very nonlinear.

If you want to control needle position you will need fast and accurate control, so you don't want to insert a large phase lag in your control loop. You'd need a smart control algorithm to compensate for this lag.

A much better scheme is to rectify mains and smooth it with a capacitor, then use high-ish frequency PWM like 10-20 kHz through a MOSFET. This has much lower phase lag, and would be easier to control. You can also control current through the motor, if you want to control torque.

For example, I have several electric drills. Most drills use triac dimmers. When using such a drill to drive a screw it is impossible to control torque and speed accurately, and the screw always ends up either deep into the workpiece, or sticking out. Triac dimmers just aren't accurate. I have another mains powered drill which uses a rectifier and PWM dimmer, and this one is very easy to control, the screw ends up perfectly flush with the workpiece every time.

Note your project uses high voltage thus it will be dangerous. Be careful.