News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

Encoder...

Started by nevraxSMD, March 13, 2014, 04:48:25 AM

Previous topic - Next topic

dedndave

if you are trying to maintain a constant speed...
you might be surprised how constant it will remain on it's own, unless the load changes

it would help if i knew more about the project - a basic description of what you're trying to control

nevraxSMD

i know the speed remains constant if there's no load.....
thats the hole point under different loads the motor has to stay at a specified speed.
the basic description is this:
use : http://medilab.com/index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=594&virtuemart_category_id=50&Itemid=130
to maintain a constant speed for a dc motor under load :D
srry for the lack of details i just got the project and i have a week to come with a detailed plan on how to implement it
and i'm trying to figure out how to make it work as i go...

dedndave

feedback control systems are used in many ways
voltage regulators, phase-locked loops, etc
even oscillators are an example of a feedback system

if the gain of the loop is greater than one at any frequency where the feedback is not 90 to 270 degrees, the loop will oscillate

by introducing delays into the loop (such as computer processing), you must add additional filtering to prevent oscillation
that means a slower response time

in the drawing below, the loop filter is typically placed in the "Feedback Element" block



http://www.pidtuning.net/pid-loop.php

dedndave

if you are not running under windows 2000, XP, Vista, 7, 8 things are a lot simpler
you can talk directly to the parallel port with IN and OUT instructions   :t

nevraxSMD

i have a basic understanding of how the loop works,
but i never had to physically implement one
this weekend i'll try to make the PID controller
specs: i'll be using dc motor that runs at 1000rpms -6V-120mA free run and 1.6 A stall.
please let me know what other info you need :D

TWell

Quote from: dedndave on March 14, 2014, 06:00:00 AM
if you are not running under windows 2000, XP, Vista, 7, 8 things are a lot simpler
you can talk directly to the parallel port with IN and OUT instructions   :t
Quote// Under Windows NT/2000/XP, after calling InitializeWinIo,
      // you can call _inp/_outp instead of using GetPortVal/SetPortVal
Is this still valid ?

dedndave

wellllll.....

if you have a DLL, you can do it
if you have a driver, it's a bit tricky

under win2000 and xp, you can install drivers freely
under vista or newer, drivers have to be signed (google WHQL)
there are ways to boot up with unsigned drivers, but it's a little inconvenient

even so, i don't think you can use IN and OUT instructions, directly
you call a function, and it accesses the kernel-mode driver that does the work

it appears he's developing on a non-windows platform, so he should be able to use IN/OUT