Close

Project start

A project log for Arduino AC motor PID

An arduino shield that lets you control an AC motor with closed loop feedback.

matt-vennmatt venn 08/02/2014 at 10:230 Comments

It took a while to commit to this project, because I knew about the super pid and I don't want to waste my time on stuff that others have already done unless I can learn something significant. In the end I went for it because I'd seen Mic and Klass's work and thought I could duplicate that fairly easily, then focus on the closed loop feedback, which is something that I've wanted to understand for a while.

I took the schematics from the 2 projects, remixed it a little and started working on a PCB. The things I paid special attention to was making sure I used the right pins for TRIAC trigger and the RPM counter. As this work will mostly be done with timers and interrupts, and they have special, related pins that can't be changed.

The arduino uses timer0 for various delay functions. So I used timer1 for the rpm counting, and timer2 for the phase control. When timer 2 overflows, I can toggle an external pin that will control the triac. This leaves the main loop for controlling a display and running the PID algorithm.

Discussions