Welcome! Log In Create A New Profile

Advanced

Using the cheap 101-5433-EV Mountain Switch encoder

Posted by Joshua Merchant 
Using the cheap 101-5433-EV Mountain Switch encoder
July 30, 2008 03:06AM
I'm trying to finalize my shopping list for my Seedling, and I'm going to be replacing the steppers with encoded DC motors.

I'm planning on starting with the 101-5433-EV Mountain Switch encoders [www.mouser.com] (or perhaps one of the slight variations), but I don't know exactly how I'm going to interface them with the rest of the system, and thus I don't know what parts I need to order to make them work.
The only technical specs I found were these:
Contact Rating: 1mA/10VDC
Contact Resistance: <= 10Ohm
Dielectric Strength: 50VAC 1 minute
Insulation Resistance: >= 50MOhm 50VDC

They seem to have 2 or 3 pins (it looks like 3, but I don't see the third pin in figure C at the bottom).

This may sound silly, but how can I read the pulses? Do I need to build a separate circuitboard for each encoder to manipulate the output into something the arduino can understand (something like [www.reprap.org])?
Or should I take a break from specifics and go read a book on electronics so I can figure this out myself grinning smiley? If the latter is true, any suggestions?

Edit: On second thought, is it as simple as just connecting a couple resistors to the encoder's pins and connecting these to the proper pins on the Arduino?

Edited 3 time(s). Last edit at 07/30/2008 09:32AM by Joshua Merchant.
Re: Using the cheap 101-5433-EV Mountain Switch encoder... eye popping smiley
July 30, 2008 03:57AM
Good luck.
Re: Using the cheap 101-5433-EV Mountain Switch encoder... eye popping smiley
July 30, 2008 09:31AM
Forrest Higgs Wrote:
-------------------------------------------------------
> Good luck.


ROFL drinking smiley
Re: Using the cheap 101-5433-EV Mountain Switch encoder
July 30, 2008 10:02PM
I think the Mountain Switch encoders are based on mechanical switches and designed for very slow operations such as a mouse scroll wheel. I expect you will need to provide debounce logic on the switches and, therefore, not be able to turn them more than a few revolutions per second without missing pulses.

Good luck.
Re: Using the cheap 101-5433-EV Mountain Switch encoder
August 06, 2008 01:16AM
I received my Mouser shipment today, which included 101-5433-EV and 101-5437-EV. While I can't test them or anything yet (I still don't have all the components for my Arduino), I can say a few things about them.

They both have 3 pins.

In the middle of the shaft (for both) there is a hexagonal hole, into which I imagine can be placed a hexagonal rod. The diameter of the hole is about 2mm.

I tried rotating the shafts with my hands and with a knife (the wedge shape of the knife [I don't mean the sharp part] allowed me to wedge it into the hexagon and turn it), and I could feel the detent thing.

After examination, I found that the part with the hexagon hole is a disk that rotates within the housing. It appears to be a sort of crown gear. When it is turned, every 15 degrees (there are 24 detents/teeth), a tooth presses against a piece of metal, which looks to be a strip which has been pressed in the middle to form a U which the tooth presses against. The teeth and the metal piece force the disc to stay at one of 24 positions.

A while back, I think Forrest Higgs said something to the effect that using a magnetic encoder and DC motor combination, the motor's internal inertia allowed the motor to keep spinning for a short time after cutting power. I think that this detenting mechanism may do away with this problem, making the encoded DC motor perhaps more like a stepper (better, actually).

It does look like there may be a low rpm limit, but I have to test this with a full setup before I know for sure.

In any case, once I get the rest of my parts and put it together, I'll have more useful information, and I'll post my results.
Ru
Re: Using the cheap 101-5433-EV Mountain Switch encoder
August 06, 2008 11:17AM
Quote

making the encoded DC motor perhaps more like a stepper (better, actually)

What makes you say that it is better? Given that it is lower, lower res, etc etc.
Re: Using the cheap 101-5433-EV Mountain Switch encoder
August 06, 2008 06:27PM
Ru Wrote:
-------------------------------------------------------
> What makes you say that it is better? Given that
> it is lower, lower res, etc etc.


Well the original idea was to attach it to a high mechanical advantage gear train which is in turn attached to the motor, such that the encoder turns much faster than the motor, giving it more pulses per rotation of the motor shaft.

The expected problem with this is the max rpm of the encoder shaft. Other than that, which may well be enough to prevent the use of a low resolution mechanical encoder like this, it allows for a much cheaper and lighter DC-motor-based setup.

Edited 2 time(s). Last edit at 08/06/2008 06:29PM by Joshua Merchant.
Ru
Re: Using the cheap 101-5433-EV Mountain Switch encoder
August 07, 2008 07:22AM
I was thinking of the homebrew-servo vs stepper comparison. Except in this particular circumstance perhaps, I'd be inclined to take the stepper most times.
Re: Using the cheap 101-5433-EV Mountain Switch encoder
August 07, 2008 11:34AM
Ru Wrote:
-------------------------------------------------------
> I was thinking of the homebrew-servo vs stepper
> comparison. Except in this particular circumstance
> perhaps, I'd be inclined to take the stepper most
> times.

Sure, but a stepper/stepper driver combo is usually more expensive than a cheap DC gearmotor/DC driver/encoder.

Forrest, in his relentless quest to make things cheaper for the rest of us (yay) is experimenting with super-cheap stepper motors, but AFAIK there still isn't a less expensive solution to run them than the RRRF board which is $28.
Ru
Re: Using the cheap 101-5433-EV Mountain Switch encoder
August 07, 2008 01:52PM
Quote

Sure, but a stepper/stepper driver combo is usually more expensive than a cheap DC gearmotor/DC driver/encoder.

But then the cheap homebrew servos simply aren't anywhere near as good in a huge range of roles, though they do happen to work very well as the power behind an extruder. Hence my caveat, "Except in this particular circumstance perhaps" winking smiley

Your choice of encoder might limit your motor speed, and the requirement to use a geartrain to get the same resolution out of a cheap encoder as a more expensive one such as the magnetic one RRRF sells is tricky to fulfill well: each part of the geartrain is going to add backlash and positioning error so you end up with resolution without precision. Again, okay for the extruder, perhaps. Less so for a positioning stage, I'm thinking.

Quote

AFAIK there still isn't a less expensive solution to run them than the RRRF board which is $28.

The current stepper drivers have two expensive bits; a stepper controller and an H-bridge.

The RRRF board uses the L298 H-bridge, which can handle 2A motors. That's a bit bigger than the 750ma the reprap's DC motor driver can deal with. You can swap it for the L293, the same chip the DC motor driver uses, (or whatever cheaper replacement you might have discovered!) so we're comparing like for like. The smaller chip looks to be 25% cheaper than the larger one.

Rolling your own H-bridge is possible, but not necessarily easy. The linistepper [www.piclist.com] open source stepper driver uses discrete components which may well work out cheaper, but that can only drive unipolar motors. Still 1A per phase though, so its a bit beefier than the L293. I haven't priced the discrete components, though I don't doubt they are cheaper than the IC.

The stepper controller is the really expensive bit on the RRRF boards; the L297 is the single most expensive component I've had to buy. The STMD project [avrstmd.com] uses an atmega48 to twiddle the motor phases, and thats about a quarter of the price of an L297. The linistepper uses a Pic, though I haven't priced any of those either, but it will be much cheaper than the specialist IC.

I don't know if you could get away with using a slightly beefier uC to drive several H-bridges at once, though specialised chips like Parallax Propeller [www.parallax.com] would be quite capable. Of course, you'd need to rustle up some firmware then, unlike the linistepper and STMD which are open source.

So really, the price difference boils down to the cost of the stepper driver, vs the cost of an encoder. And if you look at the STMD, its not that huge a difference.

So all thats needed is for someone to rustle up a super cheap motor driver PCB winking smiley Easier said than done, of course...
VDX
Re: Using the cheap 101-5433-EV Mountain Switch encoder
August 07, 2008 03:05PM
... if the stepper hasn't to run very fast (e.g. <1kHz) and pulls only 0,7Amp per coil, then the single-chip-driver MC3479P is the simplest route - here some images of my first prototype (built around 1985):




Viktor
Re: Using the cheap 101-5433-EV Mountain Switch encoder
August 07, 2008 11:30PM
Ru Wrote:
-------------------------------------------------------
> Sure, but a stepper/stepper driver combo is
> usually more expensive than a cheap DC
> gearmotor/DC driver/encoder.

> But then the cheap homebrew servos simply aren't
> anywhere near as good in a huge range of roles,
> though they do happen to work very well as the
> power behind an extruder. Hence my caveat, "Except
> in this particular circumstance perhaps" winking smiley
This isn't necessarily true. Since they cost less, you can use more powerful motors (think about it, a $25 DC motor...) for the same price as the more expensive steppers.
Cheaper is better in more than just one way.
> Your choice of encoder might limit your motor
> speed, and the requirement to use a geartrain to
> get the same resolution out of a cheap encoder as
> a more expensive one such as the magnetic one RRRF
> sells is tricky to fulfill well: each part of the
> geartrain is going to add backlash and positioning
> error so you end up with resolution without
> precision. Again, okay for the extruder, perhaps.
> Less so for a positioning stage, I'm thinking.
With more precise positioning, we can create more precise geartrains, which can have less backlash. With more precise geartrains that have less backlash, we get more precise positioning, and so on. There is a falloff, but I'm hoping that the end result will be fairly accurate.
If all else fails, I could take a ball mouse's encoder, yank out the disks with the holes in them, and replace them with really fricken big RP'ed disks with a bunch of holes per revolution (the optoelectronics that I would be yanking could also be bought cheaply at places like Mouser, etc).
Or I could similarly reduce backlash in the geartrain by using gears with high size ratios to their pinions, and thus allowing the use of fewer gears.
Or combine the two. Or do something else entirely. There are so many methods for cheap encoding, that it's almost not funny (but it still is). I might even find a cheap way to have a high precision magnetic encoder (which would be more rugged), but this may not be necessary.

>...
> You can swap it for the L293, the same chip the DC
> motor driver uses, (or whatever cheaper
> replacement you might have discovered!)
> ...
TI's old SN754410 (Mouser's part # 595-SN754410NE) seems to be a suitable replacement with the same pin layout, but I haven't tested it yet (soon...). It's cheaper and available.
>...
> So really, the price difference boils down to the
> cost of the stepper driver, vs the cost of an
> encoder. And if you look at the STMD, its not that
> huge a difference.
> ...
I'm guessing you forgot about the $25-each stepper motors [store.rrrf.org]? I haven't tested it yet, but Solarbotic's GM3 should provide enough power when fitted with a RM2. The cost is $7.65 each when you buy two or more of this combo.
That's a significant difference in cost, considering you need 3. ($75-$22.95=$52.05)
Re: Using the cheap 101-5433-EV Mountain Switch encoder
August 08, 2008 12:30AM
I use the SN754410 chip pretty much exclusively. It will handle up to 1.1 amps/coil, though unless you have a heat sink on it, I wouldn't push it much beyond 0.8-0.9, though, without a heat sink.
Ru
Re: Using the cheap 101-5433-EV Mountain Switch encoder
August 08, 2008 05:12AM
Quote

With more precise positioning, we can create more precise geartrains, which can have less backlash

I'm going to be terribly pessimistic about this. I suspect if you want high quality gears, you're going to have to use milling/lathing to make them. I'm opento dissent on this one, but I think it would be very difficult to print very high quality gears.

Quote

This isn't necessarily true. Since they cost less, you can use more powerful motors (think about it, a $25 DC motor...)

And then we come full circle, back to the original anti-homemade-servo argument. A big DC motor has lots of power, but it also has a big heavy core and lots of inertia that make it extremely poor for moving short distances at speed. You're then basically having to rely on gearboxes to drop the speed down far enough, and I've already bitched about that winking smiley

Sure, you can get a low inertia motor and yes, it may well be significantly better than a stepper, but low inertia motors would appear to be pretty expensive toys.

Quote

I'm guessing you forgot about the $25-each stepper motors [store.rrrf.org]?

You're not comparing like with like, though. Those are quite large motors, compared with the GM3, no?
Ru
Re: Using the cheap 101-5433-EV Mountain Switch encoder
August 08, 2008 06:07AM
Just to continue in my previous grumpy vein... you can handle lower quality gearboxes with some backlash by putting the encoder on the output shaft. But you couldn't then have another gearbox to increase the resolution of your encoder, because you'd be using the same standard of gears which would add the backlash on again.

You could use a high resolution encoder like the RRRF one, but suddenly thats aonther $20 (and thats just in the US! In Europe, we could conceivably pay twice that) and your price difference vanishes again.

Don't get me wrong; I'm highly in favour of cheap and effective servomotors; I just don't think 'cheap' and 'suitable for driving a leadscrew on a CNC machine platform' are compatible right now. For this task, at this level of power and speed requirement, little steppers just seem to be simpler, more effective and not that much more expensive in the end.

Of course, if someone works out how to print and wind a low inertia DC motor, things might change again winking smiley
Re: Using the cheap 101-5433-EV Mountain Switch encoder
August 08, 2008 04:16PM
Ru Wrote:
-------------------------------------------------------
> I'm going to be terribly pessimistic about this. I
> suspect if you want high quality gears, you're
> going to have to use milling/lathing to make them.
> I'm opento dissent on this one, but I think it
> would be very difficult to print very high quality
> gears.
Nop has made progress with quality, so I don't think this is a valid statement anymore. Take a look at the door handles [blog.reprap.org].
Also, there are alternatives to gears, if this doesn't work out. They would be more difficult to implement, and that's why I'm going with gears.
Aside from that, there's always the option of combining additive and subtractive RPing for better build quality (like building it up, and then smoothing out the rough edges).

And, failing all that, I'll RP a giant optical encoder disk and use some infrared LED's/sensors (or whatnot) and make a precise optical encoder, which can get smaller and more precise with increased build quality (because more holes per arc length allows me to get smaller with the same precision and/or be more precise with the same size).

I love devil's advocates! They let me point out all the cool parts of my plans.

> And then we come full circle, back to the original
> anti-homemade-servo argument. A big DC motor has
> lots of power, but it also has a big heavy core
> and lots of inertia that make it extremely poor
> for moving short distances at speed. You're then
> basically having to rely on gearboxes to drop the
> speed down far enough, and I've already bitched
> about that winking smiley
Inertia means it takes more effort to stop a heavier object moving at higher speeds than to stop a lighter object moving at lower speeds. There are quite a few ways to handle a servo's momentum. You can make it slower (not preferred). You can use detents (like in my encoder; this requires testing; I'm guessing you might be able to add detents directly to a motor shaft too). You can apply brakes. You can make it lighter. There are probably more options.

> Sure, you can get a low inertia motor and yes, it
> may well be significantly better than a stepper,
> but low inertia motors would appear to be pretty
> expensive toys.
The expensive toys are always the best, aren't they? grinning smiley

> You're not comparing like with like, though. Those
> are quite large motors, compared with the GM3, no?
As far as I know, they are quite large because they are steppers, and steppers are inefficient for their mass, size, and price. The whole point about cheap DC motors is that they are less expensive and smaller.
Although, you're probably right. The specs were hard to compare, so originally I thought they were about the same. Now, though, it appears the GM3 is about 2.7 times slower and provides about 1.4 times less torque (so about 3.8 times weaker). Again, though, the specs were hard for me to compare, so I could be wrong.

Ru Wrote:
-------------------------------------------------------
> Just to continue in my previous grumpy vein... you
> can handle lower quality gearboxes with some
> backlash by putting the encoder on the output
> shaft. But you couldn't then have another gearbox
> to increase the resolution of your encoder,
> because you'd be using the same standard of gears
> which would add the backlash on again.
>
> You could use a high resolution encoder like the
> RRRF one, but suddenly thats aonther $20 (and
> thats just in the US! In Europe, we could
> conceivably pay twice that) and your price
> difference vanishes again.
RRRF sells a precision magnetic encoder chip. I don't think such a contraption is necessary.
> Don't get me wrong; I'm highly in favour of cheap
> and effective servomotors; I just don't think
> 'cheap' and 'suitable for driving a leadscrew on a
> CNC machine platform' are compatible right now.
> For this task, at this level of power and speed
> requirement, little steppers just seem to be
> simpler, more effective and not that much more
> expensive in the end.
"Seem to be" and "are" are two phrases with very different meanings.

> Of course, if someone works out how to print and
> wind a low inertia DC motor, things might change
> again winking smiley
Heh.



Anyway, after such a long silly post by myself, I think I'll get to work now.
Re: Using the cheap 101-5433-EV Mountain Switch encoder
August 08, 2008 04:33PM
Joshua Merchant Wrote:
-------------------------------------------------------
> Inertia means it takes more effort to stop a
> heavier object moving at higher speeds than to
> stop a lighter object moving at lower speeds.

Sure, but that's just half of it. Inertia REALLY means that it will resist any change in velocity. So a motor with higher inertia will also be harder to get back up to speed.

> There are quite a few ways to handle a servo's
> momentum. You can make it slower (not preferred).
> You can use detents (like in my encoder; this
> requires testing; I'm guessing you might be able
> to add detents directly to a motor shaft too). You
> can apply brakes. You can make it lighter. There
> are probably more options.

Detents and brakes are both solutions that only solve the slowing-down part of the problem, but make it worse when you want to get up to speed again. Servos can certainly be used for this (large, industrial machines use them pretty much exclusively), but I wouldn't be so eager to hand-wave away the inertia problem. It's tricky. In fact, it is a big part of why PID [en.wikipedia.org] was invented, and that can be a bit of a bugger to implement.
Ru
Re: Using the cheap 101-5433-EV Mountain Switch encoder
August 08, 2008 04:47PM
Quote

Nop has made progress with quality, so I don't think this is a valid statement anymore

Gears are tricky sorts of things; people jump through a lot of hoops to make high precision ones. I don't think you can guarantee a perfect even finish all the way around a fine gear using our production methods. And for every little imperfection, you're adding to the final positioning error and backlash. I have a nasty suspicion that imperfect gears are likely to wear out faster too, so their performance will change over time.

This *could* be compensated for by having a high quality encoder on the output shaft, but it does rather preclude attaching a low resolution encoder to a bunch of the same gears in order to beef up its resolution, because your level of precision is going to be twice as bad (actual maths not involved there winking smiley)

I'm not disputing that good gears can't be made; I'm more concerned that they might not be good enough for this task.

Quote

You can apply brakes. You can make it lighter. There are probably more options.

If it were all this simple, how come a nice industrial servomotor sets me back a good
Re: Using the cheap 101-5433-EV Mountain Switch encoder
August 08, 2008 05:02PM
I just happen to be doing stepper v GM3 calculations for the extruder at the moment:

12V GM3's run at 50RPM 4.1Kgcm torque.

The Keling stepper motors are 11Kgcm and can run at about 2000 pps before the torque falls to half (with the right electronics). So that is 600 RPM @ 5Kgcm, i.e. 15 times more power for only about 4 times the cost of a GM3, without an encoder. They also have much better bearings and no brushes to wear out, so last virtually forever. The same cannot be said for GM3's which are just toy motors. They also emit lots of RF interference and they are noisy.

I know which I prefer!


[www.hydraraptor.blogspot.com]
Re: Using the cheap 101-5433-EV Mountain Switch encoder
August 08, 2008 06:15PM
nophead Wrote:
-------------------------------------------------------
> I just happen to be doing stepper v GM3
> calculations for the extruder at the moment:
>
> 12V GM3's run at 50RPM 4.1Kgcm torque.
>
> The Keling stepper motors are 11Kgcm and can run
> at about 2000 pps before the torque falls to half
> (with the right electronics). So that is 600 RPM @
> 5Kgcm, i.e. 15 times more power for only about 4
> times the cost of a GM3, without an encoder. They
> also have much better bearings and no brushes to
> wear out, so last virtually forever. The same
> cannot be said for GM3's which are just toy
> motors. They also emit lots of RF interference and
> they are noisy.
>
> I know which I prefer!


You also have to factor in what the intended use is: if you're planning on driving something that doesn't need 15x more torque, the kelling steppers are just 4x more expensive winking smiley

-------------------------------
I decided to check CNCzone.com to see what the experts have to say. After reading several threads, it seems that conventional wisdom is that servos tend to run a bit more expensive to get a usable solution, and are best when you need your machine to go really fast, be really big or push the limits in other ways. For light machines (and everything there is almost by definition more heavy-duty than an FDM-only RepRap) steppers are recommended almost exclusively. That meshes with my gut feeling/experience.
Ru
Re: Using the cheap 101-5433-EV Mountain Switch encoder
August 08, 2008 06:15PM
Hurrah. I'm glad someone managed to produce some hard facts. I'm pretty lousy at those partcular little details of my arguments winking smiley
Re: Using the cheap 101-5433-EV Mountain Switch encoder
August 08, 2008 06:35PM
Kyle,

15 times more power, only 2.5 times more torque. And true, the Keling ones are a lot more powerful than needed for FFF.

The GM3 will drive the belt drives at about 33mm/s, about the same as HydraRaptor, so they would do the job, but by the time you have added a 400 step shaft encoder and factored in that they won't last anything like 1/4 of the lifetime of the stepper, then you only have a short term gain at best. You have to implement PID, tune it, and then I can't imagine it having the same acceleration as a stepper. Poor acceleration will degrade the build quality because you can't control the filament speed to match.

Also, I intend to make use of the fact that my Darwin can move at 150mm/s or more.


[www.hydraraptor.blogspot.com]
Re: Using the cheap 101-5433-EV Mountain Switch encoder
August 10, 2008 07:14PM
I don't have much time to respond to each comment and post about all my new ideas, but here are a few points:

I noticed that no one posted any comments whatsoever about the proposed optical encoder. Any reason? At the current point, these look like they will be the best balance between cost, durability, and performance (at least at the beginning and for me).

If the current steppers are so overpowered for our uses, why are we using them? Why not use a more fitting (slightly cheaper/weaker) stepper? Is it just to have the option to evolve the setup (as nophead hinted to)?


It should also be noted that I'm working on a cheapo RepStrap.


In the end, of course, I'm still open to using the current steppers. I am simply trying to discover the most optimal solution (not only for myself).
Re: Using the cheap 101-5433-EV Mountain Switch encoder
August 10, 2008 11:21PM
the optical encoder would work fine, really. It would depend on build quality and how good you are at aligning optical elements as the size shrinks.

Lower end steppers do not necessarily mean significantly lowered cost. As you approach your torque threshold, you start worrying about missing steps. Alternatively, you can go faster like nophead. Or drive a bigger head or larger feedstock without getting a new mototr and drive board.

"Hackability" tends to have the issue of not going for minimum cost but somewhat more expanded flexibility. It's the price of getting the whole concept off the ground. Perhaps 2.0 will optimize the design, but "optimize" also means that the parts become more integrated into the design, so specialized. This shouldn't be a problem when those milestones are reached as by then those parts should be made by the RepRap, but until then I need to be able to use Kelig steppers while you or someone else in Europe or Asia should be able to use something else locally sold without requiring a complete redesign.

Note industry sources turn steppers into brushless DC motors with some fancy control software and an encoder. This is where I think we'll end up in Mendel or a project offshoot since it's still an incremental upgrade from open loop steppers. This also benefits more from lower step counts such as tin can steppers as you get closed loop microstepping effectively, which is again more in tune with converting a high speed screw drive system into higher accuracies, although you then start running into mechanical limits to accuracy and speed.
Sorry, only registered users may post in this forum.

Click here to login