How to build PID controller with Arduino UNO?

I want to control a DC motor with PID controller by using Arduino UNO board and simulink. i write the code as pic attached, and i found the when the ref. value was 0 the motor run and physically it's wrong. PIN 0 Reference value : from variable voltage source 0~5 VDC PIN 1 Feedback : from speed sensor 0~5 VDC PIN 5 output : to motor drive
please any help or example to how i use pid in smulink with arduino.

Respuestas (2)

Madhu Govindarajan
Madhu Govindarajan el 20 de Oct. de 2015

0 votos

Here is a link that shows how to do PID control on DC motors using Simulink - http://www.mathworks.com/help/supportpkg/arduino/examples/drive-with-pid-control.html
If you think the motor is running when the input is zero, can you confirm that the input is actually zero by connecting an oscilloscope to the pin?
Adrian Fleck
Adrian Fleck el 4 de Nov. de 2019

0 votos

But how is it possible to control an proces without simulink and an pid contoler (with code) ?

Categorías

Más información sobre Arduino Hardware en Centro de ayuda y File Exchange.

Preguntada:

el 19 de Oct. de 2015

Respondida:

el 4 de Nov. de 2019

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by