LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Arduino for controlling Galvano Mirror

I would like to use the digital output pins of arduino Uno R3 to fine control the turning angle of a galvano mirror with output voltage ranged from 0 to 5V.

The mirror can be connected to two pins(positive and ground) of the arduino through its own control board.

(1) Is there any useful sample VI as a reference for me to start with? Or what's the important function I need?

(2) What is the resolution of the output voltage, a few mV? And can I reduce the range to achieve a higher resolution?

Thank you very much.

0 Kudos
Message 1 of 4
(4,081 Views)

(1) Is there any useful sample VI as a reference for me to start with? Or what's the important function I need?

As far as I know there is no simple example that demonstrates pulse width modulated output.   The important Labview functions are Init, PWM Write Pin and Close.   Arduino does not have a true analog output.  Instead you need to use the PWM output capability of an Arduino Uno and averaging to simulate an analog output. 

(2) What is the resolution of the output voltage, a few mV? And can I reduce the range to achieve a higher resolution?

The resolution of the ouput is 1 part in 255.  As full sacale is 5 volts this is a resolution of 19.6 mV.  You can attenuate the oupput to obtain a finer resolution.  You might be able to use 2 PWM outouts and an op amp to obtain better resolition for short periods of time.  One PWM output could provide coarse resolution and the other fine resolution.

Note the maximum putput current of a digital pin is 20 mA.  Is this consistent with your galvanometer requirements?

hrh1818

0 Kudos
Message 2 of 4
(3,060 Views)

(1) What would be the different if I used Digital Write Pin to write a specified value on the digital output pin instead of using PWM Write Pin?

(I am sorry that I don't know the function of PWM.)

(2) The two PWMs you meant are hardware or the VI?

(3) Did you mean the max output current of arduino is only 20mA? Will that be to small to drive the galvannometer? I need to check.

Thanks a lot!

0 Kudos
Message 3 of 4
(3,060 Views)

(1) What would be the different if I used Digital Write Pin to write a specified value on the digital output pin instead of using PWM Write Pin?

(I am sorry that I don't know the function of PWM.)

With digital write the ouput is either 0 or 5 volts. Whereas with PWM you can control the persntage of time the output is 5 volts.  See the following article for a more detailed explanation.

<http://www.arduino.cc/en/Tutorial/PWM>

(2) The two PWMs you meant are hardware or the VI?

One Arduino Uno can produce multiple PWM output signals and can be controlled by one VI

(3) Did you mean the max output current of arduino is only 20mA? Will that be to small to drive the

galvannometer? I need to check.

The recommened output current limit for a digital pin is 20 mA.  The maximum allowable output current for a digital pin is 40 mA.   For additional information see:

<http://playground.arduino.cc/Main/ArduinoPinCurrentLimitations>

hrh1818

0 Kudos
Message 4 of 4
(3,060 Views)