About: I ain't no physicist, but I knows what matters. :p By the way, I'm an Electronic Engineer . Interested in Electronic Hobby's and DIY Projects . I'm Focusing mostly on Simulations of Projects and Further mor...

I Made this in Proteus


Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: This Tutorial Is:

> Using Labview to interface Arduino to PC via USB port.

> Using Labview to send data that describes Motor Speed to Arduino without any toolkits.

> Solving the problem of Arduino serial port hanging.

> Using Arduino to generate Stepping pulses.

> Using Arduino Mega’s Serial port 1 to show stepper motors speed on a serial LCD.

The best way to interface Arduino to PC is via its USB port. Arduino uses virtual Serial COM port to interface its USB connector to PC. At the same time Arduino uses its USB to interface its own serial (USART) port…. Bravo Arduino!!!

To send data to Arduino from your computer just connect it to USB port and use a program that can deal with computers serial port. This program can be Aeduino Serial port monitor, MIKRO C Serial terminal tool, PIC MP-LAB, or a program you establish. The one you build on yourself can be made by using a programming language like C, C#, C++, Python, Basic, NI-LABVIEW… etc.

Your own program not only has the advantage of interfacing the port, but performing a specific mission you need in your project as well. And so I do down here.

Step 2: In Labview (any Version) Establish the Following Front Panel

Step 3: Establish the Following Block Diagram. (click to Enlarge)

Step 4: And Here Is the Another Case of (if) Statement.

Step 5: This Virtual Instrument:

>> Starts communication with Arduino.

>> Detects if there is a change in control knob value.

>> If there is a change it sends the new value to Arduino.

>> Else, it clears serial port Input/output register to avoid data overflow and serial port overloading.

>> When pressing STOP, it sends “0” (brake or hold order) to Arduino.

Step 6: Arduino Code

Step 7: This Arduino Sketch:

Checks if labview sent a new value.If there is a new value, it converts it into integer byte with the same value.This integer byte represents the delay interval used in stepping sequence. That, the greater the delay the lower the speed and vice versa.Else, Arduino continue running the motor at current speed. This prevents the processor from overloading the serial port and pushes it to avoid Arduino Serial port hanging… Bravo ;)

Calculates motor speed from its resolution and delay intervals between steps as following:

Rpm = (60 x 1000 x step angle) / (360 x (delay m.sec))

Rpm = (1000 x step angle) / (6 x (delay in msec))

I used a 1.8 deg/step motor in this project and so:

Rpm = 300 / (delay in msec)

Sends the calculated motor speed to another Serial port of Arduino Mega to show if our code works

Step 8:

I simulated this tutorial with PROTEUS and worked perfectly.

In real application, it controlled my stepper motor perfectly on the long run.

Step 9: Proteus File

Enjoy.. :)

Be the First to Share


    • Made with Math Contest

      Made with Math Contest
    • Multi-Discipline Contest

      Multi-Discipline Contest
    • Robotics Contest

      Robotics Contest

    12 Discussions


    2 years ago

    In the figures under Steps 3 and 4 I see a LabVIEW icon that looks like a blue backward pointing arrow with a smaller arrow joined under it and pointing down. (It's just above the "Equal To?" icon. just inside the while loop.)

    What is that? I've looked everywhere.

    Also, I am new to Arduino and LabVIEW (bought the Sparkfun Kit).

    If I get this, I load the INO file into the Arduino using the standard Arduino software kit, and then run the LabVIEW code, yes?

    Great instructable by the way. Your showing me that I should use a "modularized code approach" (some LaVIEW code, some Arduino INO) saved me a lot of grief.

    I was trying to do it all in LabVIEW alone, and it was painful


    1 reply

    Reply 2 years ago

    Thanks for such appreciation , fell free to contact me . I'm hear for u Guys..!!
    as for this icon did u know close loop? serch about that u will find your answe.!! more u dig more u find .


    Reply 2 years ago

    contact me at


    2 years ago

    Why i canot open .pdsprj extension file fro my proteus 7.0?

    3 replies

    Reply 2 years ago

    use this link


    Reply 2 years ago

    use proteus 8.3 or higher. lower version doesn't support thnks.


    Reply 2 years ago

    Thanks Joony very much, Now i used proteus 8,6 and fixed it,

    If you share vi labview design, I will feel more happy wkwkwk


    2 years ago

    hardware connections!! please


    3 years ago

    how to configure proteus to comunicate with labview? if you may help


    3 years ago

    i would ask if i want to send data from 2 motors or more using lapview to arduino how can i do this ??