Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

motor controlling PIC16f877A LM293

Status
Not open for further replies.
lm324 pid

I've attached a .doc file that describes the code I use to read data from the LM628, maybe you will see something helpfull. The numbers you've recorded here may be correct. It's not supposed to read back the same numbers you write into it. The 07 07 is fractional value and the 08 may be the velocity it wants to start ramping at to reach your inputted velocity. It would probably be more helpfull to record the status byte and / or the "signals register" ( command "0C" - RDSIGS ) after writing the velocity move. Also, try reading the DAC output pins to see if they change from being "80" after velocity write. I'de like to take a look at the code you're using.
*Make sure you commanded a relative velocity
*Try "defining home" ( Command "02" - DFH ) , then read the position register (command 0A - RDRP ), this should come back as all zero's.
According to the datasheet, about the RDDV command ;
"This command reads the integer and fractional portions of
the instantaneous desired (current temporal ) velocity, as
used to generate the desired position profile. The bytes are
read in most-to-least significant order. The value read is
properly scaled for numerical comparison with the usersupplied
(commanded) velocity; however, because the two
least-significant bytes represent fractional velocity, only the
two most-significant bytes are appropriate for comparison
with the data obtained via command RDRV (see below).
Also note that, although the velocity input data is constrained
to positive numbers (see command LTRJ), the data returned
by command RDDV represents a signed quantity where
negative numbers represent operation in the reverse direction"
 
dspic30f pid asm example

Hi Pat it seems you have a great knowledge about LM628
So i am writing this in a hope that you will help me
M using atmega128 lm629-6 and optical encoder without index o/p
i have connected control signals of lm629 ie cs ps rd wr etc to portA of mega128
data port is connected to portC
m operating lm629 at freq of 1.7MHz
till now i could successfully reset lm629 i also could reset its interrupts by RSTI and got status byte as CO hex
problem is after this i tried to load filter parameters i got no command error intrrupt then i loaded trajectory neither the motor moved nor could i read back parameters i loaded.
in filter i loaded jst Kp=10;
in trajectory i loaded velocity n position as 0x346E and 0x1F40 i also took care of loading higher siginificant word as0x0000 in both cases but when i read desired position through RDDP i get all zeros
wat can b the error M i making mistake while writin or while reading?
please help m wasting my time over that since 3 days
 

lm628 + dc motor how to conect

I would need to see the code to check for errors. There are so many possible mistakes it would be difficult to guess. If you were able to RSTI then you must be switching the control signals (CS, PS, WR, RD) correctly. I assume you're checking the Busy Bit and using the LTRJ and STT commands correctly. It sounds like the wireing is good between the processor and LM629. Make sure pin 4 (brake) on the LMD18200 is low and toggle the PWM pin 5 to see if the outputs are switching. You may want to try a larger value for Kp until you get the bugs worked out. Good luck and please let me know how it's going. Pat
 

pid motor ic

Please dont laugh at me when I say this-
I had given just 7V to motor driver when i swithched it to 12V now its working.

Though its working (ie I am using it in velocity mode and i have fed values posted by you in this forum- Kp = 0x80, accln = 0x08 and velocity = 0x0A4A i have written higher bytes to 0 dnt worry about that) when i read velocity; what i read is desired velocity = 0x00000008 and real velocity = 0x0000
I am unable to understand this should not these values match with inputted values?

Thanx neways for your contribution.
Plz rply soon....
 

pid pwm ic

There is a good news and a bad news.
Good news is with the new hardware i was able to run motor both in vel as well as in positoin mode, motor ran accurately and precisely as per given values. So my day ended with a successful smile. today morning when i came back and just switched it on it is not working.
Not working means following:
1. I am able to reset LM629.
2. I am able to read from it as well as write into it.
3. I am entering some calculated values (which worked last day) for velocity accln and position etc and i am able to read them back from LM629 in spite of this my motor is running at top speed and is not even halting after specified count of position.
4. I am also able to read actual velocity and that seems right ie i think encoder o/p is fine and LM629 is also able to read it.
What can be the problem? I am unable to decipher it? Can you give me some clue?!

Well please check your mail i have messaged you.
Bye. please reply soon...

Added after 3 hours 48 minutes:

Yesss I got it.
I had connected my motor in reverse polarity so it was expecting different waveform at a and b and was getting opposite of that now i got it and it is working fine.
 

74138 keypad example

Pat,

Initially I started with crystal oscillator using schmitt trigger and not gate. Though i used crystal of 4MHz i could not get frequency more than 2MHz. My seniors told me that it is impossible to get anything better than that with that osc. So just to make my operation faster i decided to change my clocking source. I came across 89V51RD2; its ALE signal can be used for clocking. I checked it i am getting frequency of around 4MHz as expected but duty cycle is not 50% its 33.33%. I wanted to ask whether this will do for LM629 or not.

Can you please help or shed some light on clock specifications required by LM629. Will it work on clock with 30% duty cycle?

Please reply soon....
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top