Wednesday, May 17, 2006

 

Magnetic Shaft Encoders

My attempts to make a reliable optical shaft encoder blogged back in January 2006 didn't work well (see the wiki page).

Vik has been rabbiting on about the magnetic rotary encoder chips from Austria Microsystems for ages, and so I finally got round to trying them out.

Guess what? They are beaut!

I rapid prototyped a holder for a small piece of stripboard to go on the back of one of the geared motors that I used for the Mark II Extruder, soldered one to the board, and put the lot together:

completed encoder

A small magnet is mounted on the motor's shaft, and Hall-effect probes in the chip encode the rotating magnetic field. Here's the scope trace:

scope trace

There are two outputs which give quadrature (i.e. the phase tells you if the thing is going clockwise or anticlockwise).

I used the chip that gives 256 steps per revolution (the AS5035), but they go up to 4096. The signal is clean reliable and easy to feed into a PIC. And the circuit is simplicity itself (though it needs to be soldered by ants, as the chip is SMT).

For more details, see the Wiki here.

Finally a big thanks to 2001 Electronic Components Ltd, who gave me four of the chips and their associated magnets free. Buy stuff from them.

Comments:
LOL! I just had a feeling that that was going to happen. Oh well, I guess we can use the Hamamatsu chips for limits detection, hey? :-p
 
Oh yeah, so you really get a 256 bit resolution plus the direction?
 
Yup. Or 4096 if you feel you need a little extra precision...
 
For a threaded rod positioning stage I doubt that much resolution will be anything except a bother. :-)
 
It wakes up the possibility of a turntable again though.

Vik :v)
 
Oh, and Austria Micro deserve being publicly congratulated on the quality of their development kits. When issuing a sample, they also issued a made-up PCB with a battery connector and the free magnet. If any company wants to see how it should be done, Austria Micro are the ones to take a cue from.

Vik :v)
 
I agree Vik - good for them. I can also say that my experience of just grabbing one of their chips, taking a cursory glance at the data sheet, then hitting it with a flaming soldering iron worked first time.

I don't think I'm lucky. I think they designed it right.
 
I think their sales agents up the road in San Jose are in suspended animation. I made an inquiry over a week ago and again today. I might as well not have bothered. "-s
 
Are we going to move to SMT chips pretty soon, because they're cheaper and smaller, or should we stay with the more hobbyist-friendly larger components? Or release 2 sets of circuits?
 
I think we should stick with DIL wherever possible. RepRap is designed to copy its own parts and for people to assemble them. SMT chips are a real pain to work with by hand. But some useful chips don't have DIL versions.
 
While we're on the subject, can I please ask just how on earth you managed to get a surface mount device to work on regular 1/10" stripboard??? I've only used surface mount twice, but that was more than enough to persuade me to try never to use those little buggers ever again!
 
I think that if you look at Adrian's pics of the circuit he turned the chip upside down and did the soldering that way. That struck me as quite tricky! :-)
 
It's a technique that works well. You can also use conductive paint and a brush on polyamide film if that's your bag.

Vik :v)
 
" I think that if you look at Adrian's pics of the circuit he turned the chip upside down and did the soldering that way."

Yup - that's how I did it. Useful tips: you need a big magnifying glass, or some half-round bottle-end old-person's reading glasses from the chemist (mine cost £12, and you can stick them on the end of your nose like a librarian...); Hold the soldering iron together with a light rigid stick about 300 mm long that you can rest on the bench to steady your hand - just like those sticks with a pad on the end that you see art restorers using; and finally drink no beer the night before...
 
Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?

Subscribe to
Posts [Atom]