Making absolute encoder

Lobobo

Member
Hi. Advice needed. Currently I making wind turbine project. My wind power generator is almost ready to go and to avoid cable wraping around the pole I want to make construction be able to control wind turbine direction. At the moment I am working on absolute encoder and I'm thinking of using two of them. One is for knowing direction of wind (weather vane) and the other for knowing the direction of the wind turbine. I decided to make an absolute 4 bit gray code encoder, but I wouldn't like mechanical one, as I want friction free. 4 bits must be switched on/off or blocked/unblocked opticaly depending on encoders shaft possition. The problem is, I am not sure how shall I make 4 optical sensors, what connection diagram shoud it be or shall it be infrared emiters, collectors, or LED lights or any other way it's possible to make the task with picaxe. Any suggestions guys?
Thanks for your help.
 

1968neil

Senior Member
The problem is said:
Personally i'd use hall sensors and 4 magnets, optical is ok but from my experience when used in such a project they can get clogged up with grease and dirt due to environment, Hall sensors are much simpler to use and give very good results.

have a look here this will explain all you need to know,
http://www.bristolwatch.com/hall_effect/

Regards
Neil
 

Lobobo

Member
Hi

That sounds good, but how to know exact possition? I suppose that is perfect solution for incremental encoder, but with hall sensor I will be able to see only 4 possitions where the magnets attached. Or shall I attach lots of magnets on the rotational shaft? In this case I am afraid they may interfere with each other and magnetic field would be too big and interfere to few hall sensors at ones. To be honest I am not sure how to do it with hall sensors efficiently...
 

1968neil

Senior Member
You only need one magnet and as many hall sensors as you can get into your project, You could use a whole port on a picaxe (8 inputs) and read them as a binary word ? that should be more than accurate for position i would think ?

Regards
Neil
 

BESQUEUT

Senior Member
You only need one magnet and as many hall sensors as you can get into your project, You could use a whole port on a picaxe (8 inputs) and read them as a binary word ? that should be more than accurate for position i would think ?
a 4 bits grey code encoder offer 16 positions...
But grey code encoding with Hall sensor suppose lots of magnet or multipoles magnets...
Grey code wheel is easy to print if optical sensor is used.
 

rossko57

Senior Member
Optical is just a construction problem. Disc with 4 concentric circles of holes is easier to visualise. Could be 4 discs mounted on one shaft for alternative shape. Or flatten it out to use reflective sensors looking at "bar code" style cylindrical code wrapped around the shaft.

There are a few "weather station" threads on this forum covering similar needs, including cleverness with hall effect and magnets
EDIT - this the thread I was thinking of
http://www.picaxeforum.co.uk/showthread.php?24458-Another-idea-for-wind-speed-and-direction-sensing-evaluation-please!/page5&highlight=wind+direction+hall
 
Last edited:

Lobobo

Member
a 4 bits grey code encoder offer 16 positions...
Grey code wheel is easy to print if optical sensor is used.
Thats why I was thinking of using optical sensors as I thought to glue printed gray code on transparent disc and to leave only black stripes on it. So I'd have 16 positions and it must be more than enough but who can suggest the optical input sensor connection diagram for it?
"1968neil" idea of 8 hall sensors will give 8 possitions with 8 inputs. Optical thing would give 16 possitions with 4 inputs. Otherwise it's possible I will use "1968neil" idea with biger chip like picaxe 28x2 or maybe 18M2 for 12 inputs with 12 hall sensors if I don't find optical way sensor diagram.
 

Ravenous

Member
Not a frictionless solution, but what about two correctly-shaped cams on the shaft and two rollers+linear potentiometer on a fixed part?

(I suggest two cams at 90 degrees because just one would give a reading for any two directions, in most cases.)

Or for a frictionless one, two cams again but sense them using those Sharp optical proximity sensors (GP2....whatever it was)
 

BESQUEUT

Senior Member
Thats why I was thinking of using optical sensors as I thought to glue printed gray code on transparent disc and to leave only black stripes on it. So I'd have 16 positions and it must be more than enough but who can suggest the optical input sensor connection diagram for it?
"1968neil" idea of 8 hall sensors will give 8 possitions with 8 inputs. Optical thing would give 16 possitions with 4 inputs. Otherwise it's possible I will use "1968neil" idea with biger chip like picaxe 28x2 or maybe 18M2 for 12 inputs with 12 hall sensors if I don't find optical way sensor diagram.
http://www.gotronic.fr/art-reflecteur-optique-itr8307-2328.htm
http://www.gotronic.fr/pj-364.pdf

Pin 4 to 0V
Pin 3 to Picaxe input and to 10k ==> 5V
 

premelec

Senior Member
There was a program written by a forum member years ago which gives you an image of an optical encoder disc made to your requirements - perhaps eclectic knows where it resides... it's a cool program!
 

premelec

Senior Member
@eclectic - Thanks so much for reminding me of this site which should be referenced for anyone interested in encoders!

@Technoman - Not just sure what your suggestion is but before computers I went through University with a circular slide rule - basically a linear rule with the end bent around to meet and an index pointer with two legs which could have the angle between them changed... compact and worked well.
 
Top