EmbDev.net

Forum: FPGA, VHDL & Verilog Control motor velocity using PID


Author: nmiguel sa (Company: student) (n_sa)
Posted on:

Rate this post
0 useful
not useful
Hello,

I´m new in VHDl Programming , i´m using a altera FPGA ... i need to read
the velocity from a dc motor to use a PID control.

Could some one help me how to do it?

Thanks

Author: Lothar Miller (lkmiller) (Moderator)
Posted on:

Rate this post
0 useful
not useful
Need more input:
What kind of motor is it (manufacturer, type, ...)?
Does the motor have any kind of velocity output (analog, encoder, 
resolver, ...)?
Do you have a datsheet of the motor?

Author: nmiguel sa (Company: student) (n_sa)
Posted on:

Rate this post
0 useful
not useful
Thank you for your answer.

The moto is a Micromotors type HVE155 with hall efect, output is an 
encoder

.voltage : 12 Vdc
.Ratio to 1: 43,3;
• MAx. Torque: 18 Ncm;
. RPM: 155 rpm;
• Corrent no load: <140 mA;
• Max. Corrent with load: 580 mA;

I need some VHDL code or some function in the altera fpga to know " read 
" the input data from the encoder to aply with PID.

Could you help me in this?

Author: Lothar Miller (lkmiller) (Moderator)
Posted on:

Rate this post
0 useful
not useful
nmiguel sa wrote:
> Could you help me in this?
For shure, but one question in advance: You ask only for the code to 
read the velocity. Do you have the PID already? How does it look like?

> output is an encoder
Try this with babelfish or something similar (its German):
http://www.lothar-miller.de/s9y/categories/46-Encoder
With this you get the position. And from there you can calculate the 
speed: eg. "how many increments per second"

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [vhdl]VHDL code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.