LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Controling a DC motor with encoder on back

The LabVIEW Interface for Arduino (LIFA) is for what this community group is named.  It is an API for interfacing between Arduino and LabVIEW.  You can view the overview of the group at ni.com/arduino to learn more about the basics of LIFA.

When working with an Arduino, you are not required to use LIFA but it's a good resource to use if you are going to make your own custom API.  Communication between LabVIEW is simply serial communication so you can make your own custom interface if you do not want to use LIFA.

0 Kudos
Message 41 of 46
(1,681 Views)

okay sir

thank u very much for these knowledge.

actually i am new in arduino. I dont have an

idea how to program the encoder. do you have

sample or tutorial u can send me please

0 Kudos
Message 42 of 46
(1,681 Views)

I posted a link to my quadrature encoder code in post 37 above.  There does not exist an actual tutorial.

0 Kudos
Message 43 of 46
(1,681 Views)

yeah sir, i saw it

thank u very much. I will go through it

0 Kudos
Message 44 of 46
(1,681 Views)

Hello,

Even my project is to control the speed of the dc motor with the encoder at the back using arudino uno and PID controller in Labview. Labview will onlly act as a GUI wherein PID will measure SP-Process Value to get Error and tries to minimize the error.

From the encoder output is coming but not reaching labview. Please help me.

IMG-20140410-WA0005.jpg

This is my encoder. Red and Black are for 5v and gnd. Brown will give the output i.e. number of pulses from dc motor and that is given to arduino digital pin 5. From Arduino digital pin 3, I am passing the PWM to the dc motor. I have used to protection circuit to connect Arduino with the dc motor.

adafruit arduino lesson 13 dc motor

0 Kudos
Message 45 of 46
(1,681 Views)

For speed control I suggest you use a frequency to voltage converter such as a LM2907 to covert the pulse train coming from your encoder to an analog voltage.  Then digitize the voltage with Arduino, compare the voltage with the setpoint,  pass the error signal to an Arduino PID controller and then drive your motor shield with the output signal from the Arduino PID controller.

LIFA is to slow for a Labview PID controller.   You will get much better results using an Arduino PID controller.  In this setup Labview is only use to send a setpoint signal to Arduino and to display the actual speed .

For LM2907 see: <http://www.ti.com/lit/ds/symlink/lm2907-n.pdf>

hrh1818

0 Kudos
Message 46 of 46
(1,681 Views)