Notifications
Clear all

Using encoders for speed detection

19 Posts
4 Users
5 Likes
769 Views
(@davee)
Member
Joined: 3 years ago
Posts: 1665
 

Hi Ron @zander,

  As I said, I use it as an illustration ... those devices are not meant for continuous rotation ... they are  used more like 'digital potentiometers and rotary switches', albeit obviously different in their electrical requirements from either.

But if you had a slow, but steady constant speed motor, it might be interesting to see how they respond to being coupled to it. I just hope you don't find one with 'perfect' mechanics that behaves impeccably!

---------

And I don't think I will ever be entitled 'Prof'

--------

Hope your hospital stay goes well.

Best wishes, Dave


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6907
 

@davee When I bought them, I assumed they were more like a digital pot, but when you used them in your post, I assumed I was wrong. I will look for a device more suited to the task or maybe even a wheel assembly with one built-in. I think I read a post where that idea was mentioned. Come to think of it, would they be built into the wheel hub or the motor? Seems to me more likely in the motor or attached to the shaft of the motor. All new to me. I wasn't expecting to need something like that, I just assumed if I applied the same voltage to two motors, they would turn at the same speed. Hmm, now I recall some vehicles only have one motor for a pair of wheels while others have two. I also heard the term quadrature, more stuff to look up. Wow, I just did that Google search and saw there is a LOT more to this than I thought. At least my submarine doesn't need this stuff. Maybe I will just forget about wheeled and concentrate on the swamp buggy above the water.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6907
 

@davee Just thinking out loud here, Dave, I wonder if something like an airplane's trim controller could be used. If I can use a pot to divide the voltage between the two motors in a way that allows more to one than the other, then maybe that would work. Is there an obvious problem I am overlooking?

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
(@davee)
Member
Joined: 3 years ago
Posts: 1665
 

Hi Ron @zander,

 The encoder I showed is a quadrature encoder .. electrically it behaves like two single pole switches, operated by multi-lobe cams attached to the spindle. If the spindle is steadily rotated in one direction, the two switches will periodically change state, so that if they are supplied with power, they can each produce a square wave. However, the cams are arranged so that the square waves will be offset by 90 degrees. Hence, by observing both outputs simultaneously, it is possible to determine not only the extent and speed of the rotation, but also the direction.

There are lots of explanations on the web, and if you draw them out, probably as a kind of modified truth table, you will figure out how they can be interpreted with a few lines of code.

I think the encoder I showed a picture of is literally a mechanical cams and switches device, often with a detent so it 'clicks' as it is rotated. They also have an additional switch, which is activated when the knob is pressed in.

The 'higher spec' encoders usually replace the mechanics with a semi-electronic approach, such as a pair of light sources and detectors, the light being interrupted by a 'fan-like' wheel, or by magnetic poles and Hall effect sensors. These will obviously be more specific about their electrical power requirements, but the resulting waveforms should be similar to the switches.

--------

The chances of two brushed motors going at the same speed, when fed with the same voltage is a bookies' dream ... it will practically never happen .. any difference in friction, etc, will mean they rotate at different speeds .. albeit sometimes the difference may be small enough not to matter. e.g. small differences in two independent motors and props on a boat or sub, can be counteracted by a small rudder movement. However, two wheeled robots, which Inq has specialised in, are very sensitive to small variations.

-----------

Sorry, I am not sure exactly what you mean by aircraft trim controller. However, potentiometers are generally not good at directly controlling voltage/power levels associated with motors .. at the very least, I would expect you to need thick wirewound devices ... I remember having something like it with my model train set and slot car racing toys as a young child, and they seemed very crude to me then. Electronic power controllers seem far more appropriate.

----------

However, if you need to closely match two (or more) motors' rotations, then it might be better to consider either stepper motors or brushless DC (BLDC) motors ... here the waveforms fed to the motors are deliberately tailored to the exact rotations required .. assuming the motor always has enough torque to follow the incoming electrical drive. e.g. stepper motors used for 3-D printers and the BLDC motors for the 4 rotor drones. Of course, it is possible to add encoders to these motors, as a check that they are not being overloaded, and to compensate if a difference is found. Obviously this adds cost and complexity, so it all depends on the requirements and budgets of the situation.

---------

Plenty to read and think about!!!

Best wishes, Dave


   
ReplyQuote
Page 2 / 2