Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Proteus rotary encoder question

Status
Not open for further replies.

Cantafford

Member
Hello,

I want to simulate a dc motor driver application in proteus. I need to know how to interface the rotary encoder. I did a lot of google but didn't find an exact answer. Please tell me if this is the proper way of connecting the pins of the rotary encoder in proteus:

vza7w3.png


Thank you!
 
If it is a quadrature encoder you need a min of 4 pins.
Otherwise it is a Tach and not an encoder.
M.
 
Hello, thanks for answering

In proteus that component is named: "motor encoder". I'm not sure how many pins a hardware encoder should have as I've never seen one :). Maybe there is an extra pin that need not be connected in proteus such as microcontroller's vss and vdd. Not sure.
I just need to know if I connected those 3 pins properly before I start to write my rotation ADC code for my project.
 
I do not use Proteus but one output is hardly an encoder.
Google quadrature encoder for the two 90° separated signals.
For one conductor it would have to be some kind of serial based absolute encoder.
Max.
 
There are many kinds;
1) incremental pulse and direction
2) Fwd & Rev out
3) quadrature dual out , where you decode it.
 
I just need an encoder that will read the RPM of my DC motor that will run in both directions(which means it will convert the analogous value of the rpm to a digital value that will eventually be displayed on an LCD).I don't need it to sense the direction just tell me the RPM value .That's literally all I need :D nothing else, no fancy tony-stark stuff . And I need someone who has used it in proteus before to tell me if that's how you interface it(in proteus) with a pic. By that I mean if I connected those 3 pins corectlly(in my case if they should be connected to: power, ground and to an analogous input of the PIC). I apologise if I'm not explaining this good enough. I just need an yes/no question and if the answer is "no" an advice on how to connect them(i.e. where to connect each pin of the encoder to).
 
Last edited:
All those three appear to describe the single quadrature encoder.?;)
Max.
No they appear to describe the answer to this dilemma.:):happy:

"how to interface the rotary encoder."

:meh: except we dont know what he is choosing.

Do you want just speed control with 1 pulse per rev?
Or position and speed control with many pulses per rev?
What resolution?
 
No they appear to describe the answer to this dilemma.:):happy:

"how to interface the rotary encoder."

:meh: except we dont know what he is choosing.

Do you want just speed control with 1 pulse per rev?
Or position and speed control with many pulses per rev?
What resolution?

I have a 12V DC motor that I run via a L93D full-bridge driver interfaced with a PIC microcontroller.
I can control the direction of rotation and I can control it's rotation speed via a potentiometer(so far that works fine).
I need an encoder to read the motor's speed at a time(regardless of the direction of rotation) then by using the PIC's ADC convert it to a digital value that will be displayed on the LCD. That's all I need. That's all I need. I'm sorry but I'm a beginner and I don't understand the 2 questions that you asked(I will do some google research tomorrow). But I'm guessing that what I want to do is quite simple.

Here is the schematic:
vnkt8p.png
 
There is an example in using that encoder in the sample section of Proteus as attached.

It looks like the output of the encoder is analog and should be connected to the ADC of the uC. In the example it is connected to a voltmeter to indicate the position of the rotor.

servo example.PNG


Allen
 
A single speed indicator whether dc or digital is a tachometer, if you need to detect speed & direction then you need a quadrature encoder +v -v A & B pulse.
If you don't need to sense direction then a simple pulse input (tach) is all that is needed.
Max.
 
If you can detect a falling edge (or rising), why is there a need for an index?

John
 
Most encoders have an index.... They use it for counting.... Each index pulse is one rotation or a reset for systems that lose power when off... I would also just use the quadrature signal...

BTW absf that is a servo... The differential transistor pair is providing the pulse width....
 
If you can detect a falling edge (or rising), why is there a need for an index?

John
Also only the A OR B pulse is needed for rpm, and also the index could be used only on a high rpm situation.
In industrial CNC the index pulse is used for accurate homing or zeroing the reference point on power up, after that it is not used.
Max.
 
Last edited:
Gotcha. So it is not really needed for incremental or decremental data entry.

Thanks both.

Thanks. John
 
So that's what Proteus looks like. The graph paper is a nice touch :)
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top