Low-cost solutions for motor control and automation