Speed control of DC motor | LabJack
 

Speed control of DC motor

7 posts / 0 new
Last post
Victor
victorpbr's picture
Speed control of DC motor

Hi,

I'm planning to build a device capable of controlling the speed of two sets of DC motors using LabJack.

The motors are 12V and the rated current is 0.5-1.4 A. I do not have much experience when dealing to motor drivers, I've used the L293D with an arduino in a time before but apperantly the maximum output current from it is not enough to power this motor.

Can you suggest a solution for me? And how I'd use LabJack to control its speed? I thought about using pwm but I do not know if it is the best way.

PS: Ideally I'd have Two sets of motors,  in each set all the motors would operate at the same speed. So basically I'd need only two control signals. And a driver for each motor? So could I use only two labjack ports to control my set of motors?

LabJack Support
labjack support's picture
A motor controller usually

A motor controller usually has more intelligence and easier control inputs than a motor driver, but either are possible options.  Your first step is to find controllers or drivers of interest.  Then you can post links here to technical details and we can discuss how to interface with a U3.  Check our Sparkfun, Amazon, and anywhere that caters to robotics hobbyists.

LabJack Support
labjack support's picture
Also, if you are always going

Also, if you are always going the same direction, you can just use 1 power switch and don't even need an h-bridge.  So you could just get a solid-state relay that meets your needs and vary speed by varying the duty-cycle of a PWM output from the U3 (with an LJTick-RelayDriver between the U3 and SSR).  Make sure the SSR is designed for inductive loads.

Victor
victorpbr's picture
Hi, I ended up buying a L298

Hi, I ended up buying a L298 board. The only thing I need now is to know how to set a PWM output from labjack using matlab, I already have a conection and the object created, just need to know the command and the range of the PWM values. Thanks

LabJack Support
labjack support's picture
Based on the frequency you

Based on the frequency you want, choose 16-bit or 8-bit PWM output:

https://labjack.com/support/datasheets/u3/hardware-description/timers-co...

https://labjack.com/support/datasheets/u3/hardware-description/timers-co...

Based on the info from those pages, set TimerClockBase and TimerClockDivisor to get the frequency you want.  Set Timer#Value to get the desired duty cycle.  Try this first using the test panel in LJControlPanel.  Then once you have it working as desired you can set the same parameters in Matlab.  There should be a timer-counter example in our Matlab archive you can start from.

ssaindon
ssaindon's picture
Is there a way to output the

Is there a way to output the rpm's of the motor? 

LabJack Support
labjack support's picture
Are you saying you want to

Are you saying you want to measure the speed of a motor?  Yes, that is a common application.  First, what kind of signal does the motor provide, and if it does not provide a signal you need to attach some sort of sensor (e.g. encoder) to it so you get some sort of signal.