03-14-2014 08:27 AM
Hi all,
I want to generate PWM from Labview and to drive a DC motor. I have searched online and found a way where I can generate the PWM, but I do not know what circuit to build on the breadboard connected to Mydaq. Please, any help would be much appreciated!
-C
03-14-2014 09:51 AM
Hey CharDiss,
You're going to have to give us a lot more information on what it is you're trying to do. If you just want to output PWM there is no circuit necessary, you could generate a square wave using analog or digital IO and connect directly to a pin. This, however will be logic level output and not powerful enough to drive a motor. If you want to drive a motor you'll need a motor driver. Do you have one? If so which one?
The more information you provide the faster we can help you.
Thanks,
-Sam K
Join / Follow the LabVIEW Hacker Group on google+
03-15-2014 07:14 AM
Hi,
Thanks a lot for your reply. Well basically what I want to accomplish at the end is to have the motor rotating in both clockwise and anticlockwise directions. To cause the motor to rotate, the only way I know how is via PWM. I'm still first year engineering and I'm really new to this. What is a motor driver? Can I buy it? This is the video that I found on youtube to generate a PWM signal:
http://www.youtube.com/watch?v=Er8ZGfTCQLI&hd=1
03-17-2014 09:56 AM
Hey CharDiss,
The ELVIS (and most other controllers) are designed as logic devices and not able to generate high current on their outputs. So for example the analog output on the ELVIS can probably output a couple mA max. This is not enough to spin most motors.
A motor drive takes the logic signals from a controller (such as ELVIS) and generates the high current outputs to drive the motor. There are different types of drives for different types of motors.
Here are some examples:
(Servos can be driven with PWM for control and a direct external power connection for power, no drive required typically).
Let us know if that helps or if you have more questions.
-Sam K
Join / Follow the LabVIEW Hacker Group on google+
06-20-2014 12:52 AM
Hi Sammy,
I also has the same problem.
I am using NI myDAQ to generate digital pulses to control the full controlled 3 phase converter drive to drive my DC motor. But i am unable to generate digital signals by comparing two signals(sine and triangle) using myDAQ. please give me a valuable solution. i am attaching the error what we are getting. Please give me the solution to rectify the problem.
06-24-2014 12:17 PM
Hi sivakumard,
Even though comparing a sine and triangle waves is a correct way to generate digital pulses in many applications, it is mainly used on low level hardware approaches such as when using an inverting aplifier to drive a motor and etc.
Do you have a particular need to do so? If not, the suggested way is to simply use the pulse generation functionality of DAQ Assistant as mentioned by Sammy_K. Alternatively you can develop the same approach in lower level DAQ VIs as explained and shown on the following community example:
https://decibel.ni.com/content/docs/DOC-17537
Please also give this white-paper a read as it explains PWM generation using DAQmx in greater detail:
http://www.ni.com/white-paper/2991/en/
Hope that helps. If you need more information, a simple google search on "PWM generation using DAQmx/myDAQ" or equivalent should bring-up a good number of results as it is a quite common usage of our DAQ hardware.
Best of luck with your application!
12-22-2014 03:11 PM
Hi There,
I'm currently learning Labview by example, for now just controlling by PWM an LED with a potentiometer. I have connected a potentiometer to one of the analogue channels, so I can control the duty cycle with it. This part works well and it is responsive.
I have seen the tutorials that you mention, they use the audio channels or counters. But I cant find any good example using digital output. I have tried to drive the DO at different frequencies and sample rates. I found is that the LED flickers a lot, I have tried to raise both values but it does not behave as I expected. What is the maximum frequency that I can drive the DO, as far as I know at around 170 Hz the flicker should not be noticeable.
Last question: What are the differences between the signal generators in Labview???
Greets,
Jose Vidal
12-22-2014 09:22 PM
You're using software timing so you may be running into issues with your OS slowing your loop enough that you're having that issue.
12-23-2014 03:20 PM
Do you have some suggestions to verify what is the issue or you are going to tell me that Hi tech piece of equipment like mydaq can not drive a led, I could do the same job with a 555.
12-23-2014 03:24 PM
If you want to "drive" the LED, why not just turn it on? You're seeing to work specifically with the frequency. That's not purely driving the LED. If you post disingenuous questions, do you expect serious answers?