Moderate speed rotary encoders for shaft positioning. Your advice please
John Bond
Posts: 369
I’m looking for a rotary shaft encoder IC, one that will give me 8 or 10 bit resolution. I’d like it to be contactless because I want to fit it to an automotive alternator to see if I can make a BIG cheap 3 phase brushless motor (1hp or 3/4kw @ 13.5V).
The idea is to mount the stimulator on the alternator rear shaft. This shaft·protrudes about 2mm (1/8”[noparse];)[/noparse] once you remove the protective rubber cap. The sensor IC·is then mounted behind this. I want to handle the signal from the sensor using an SX28 and ADC, I2C or SHIFTIN. I will need a lookup table for triggering the coils so the signal doesn’t have to be linear, just so long as the repetitive accuracy of the measurements are 7 bit or better. The sensor and stimulator·will be fitted in a home workshop (using epoxy) so slack tolerance would help.
Does anyone have experience with either Hall Effect, ·AMR, ·magnetic ·or other contactless rotary sensors. What was your experience. What do I need to watch out for.
Kind regards from glorious Kwa Zulu Natal this fine Autumn afternoon
John Bond
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The idea is to mount the stimulator on the alternator rear shaft. This shaft·protrudes about 2mm (1/8”[noparse];)[/noparse] once you remove the protective rubber cap. The sensor IC·is then mounted behind this. I want to handle the signal from the sensor using an SX28 and ADC, I2C or SHIFTIN. I will need a lookup table for triggering the coils so the signal doesn’t have to be linear, just so long as the repetitive accuracy of the measurements are 7 bit or better. The sensor and stimulator·will be fitted in a home workshop (using epoxy) so slack tolerance would help.
Does anyone have experience with either Hall Effect, ·AMR, ·magnetic ·or other contactless rotary sensors. What was your experience. What do I need to watch out for.
Kind regards from glorious Kwa Zulu Natal this fine Autumn afternoon
John Bond
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Comments
Initially I used an optical encoder (1000 line/rev) and an opto interrupter that provides a single pulse per revolution for reference to the shaft. By putting current through the field coil and one of the stationary coils you can align the the opto interrupter to give you a "zero" position and then count the pulses from the optical encoder to determine position from that point.
I am sure the optical encoder I used was overkill, but it was what I had at the moment, and it worked well enough to verify that the idea is workable. It will take a bit of experimenting to get the timing, voltage, and currents optimized, and I am too busy at the moment to do it. If you want more details I will provide what I have so far.
Good luck.
The motor(alternator) needs to know where the rotor is at any time, particularly at start-up.
·
Wouldn’t it be nice if you could just glue a magnet onto the rotating shaft and put an IC opposite it? Even better if the magnet and IC don’t even have to be accurately placed to get a good reading .
·
There seem to be many ICs that do just this. I saw one on the accelerator pedal ·for the 2011 Toyota Corolla, the first Corolla that will be drive by wire. I though “this looks like a fun gadget to play with…”. They are not too expensive, from about US$ 4.00 to US$ 10.00, much less than an optical encoder.
·
But - the question is, which one is most suitable for us hobbyists?
·
Do you go for lots of intelligence?
·
Description – product 1
http://www.ichaus.de/upload/pdf/MH_flyer_rev3a.pdf
Datasheet
http://www.ichaus.de/upload/pdf/Mh_b1es.pdf
·
Description – product 2
http://www.austriamicrosystems.com/eng/Products/Magnetic-Encoders/Linear-Encoders/AS5304
·
Or is ease of assembly but tons more code a better option?
http://www.position-sensors.com/
·
or old technology like the typical Hall Effect rotary sensor…
·
When I am this confused, I usually find that members of the forum bring me down to earth. There are usually half a dozen people with good experience.
·
Kind regards from Kwa Dukuza (wherever the heck that is – somewhere in Darkest Africa)
John Bond
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
As for tons more code, I feel the application is relatively simple even though 3 phases are involved. Basically it is just a matter of turning on/off each transistor or driver at the proper time. Pretty much any microcontroller with enough I/O pins should be able to handle that, although I intend to use the prop even though it will be overkill.
The encoder and opto interrupter were added to see how well I could control the speed. I did not have any problem starting the alternator turning before the opto interrupter saw the flag attached to the alternator shaft. I applied current to the field coil and then energized each of the stator windings in turn for about 250mS to start and once the opto interrupter signal was seen I could use the encoder signal to determine the position and timing.
I fully agree with you, the Ic-MH chip has all the features (and 4096 unique steps). An additional advantage is that if you use PWM, signal frequency gives you speed and duty cycle gives you position (time from rising edge to rising edge for speed, time from rising edge to falling edge/speed gives you duty cycle). It seems a pity to use PWM and chuck away all those added features but hey, that makes one’s life much simpler…
I haven’t found who stocks the Ic-MH chip.
You’re right about Honeywell – Digikey prices for Honeywell HMC1512 :-
Unit··· Unit Price·· Total
1······ 17.00000··· 17.00 OUCH!!!
25······ 6.00000···150.00
100····· 3.25000·· 325.00
500····· 1.70000·· 850.00
10 X the price for a one off!!! Maybe Honeywell will give samples.
The way I read it, the Honeywell chip will give accurate positioning in each half turn, 0-180 or 180-360 Deg but one does not know which half of the revolution you are in. You seem to need an additional hall effect IC or some clever code to keep track of where the rotor is.
Do you have any idea how you will determine the physical angle of the rotor at which you switch each phase? Obviously you only have to do this once and create a lookup table.
Thanks for your valuable input
John Bond
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Post Edited (John Bond) : 6/8/2009 8:09:32 AM GMT
What do you think? Does that sound like a reasonable approach?
I would assume you would then back the mark off 90 Degrees (because that's the centre point of the field). Once I've got that right, I'm going to rig up an ampmeter and a quite heavy and consistant load (torque load on the shaft). I'll then shift the trigger for the 3 fields forward and backwards a few degrees and see what the ammeter does.
I can't think of any other way.
EDIT - My alternator seems to have 3 or 4 positions per rev for each coil. This doesn't make any difference though, a·45 Deg trigger instead of every 180 Deg.
Thanks for you're help and insight.
Kind regards from a cold Kwa Dukuza (Its only 52 Deg F but for us this is freezing!!! we seldom get below 60. we just don't have the cloths or heating for cold weather).
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Post Edited (John Bond) : 6/9/2009 6:31:39 AM GMT
You may want to check out the OSMC groups on Yahoo Groups:
http://tech.groups.yahoo.com/group/osmc/
Although the main focus of the groups is Open Source Motor Control there has been some discussion on the group about converting alternators to motors. You may find some useful info by review some of the old posts and I believe there may be references to an open source motor group that was working on conversions.
Robert
These were a crowd working on making a motor from an alternator (I think they were in the Mid-West). They got the mechanical aspect sorted but couldn't get the electronics to work reliably. They helped me with modifying the windings (which is real simple once you know how!!!)
Ive bought about half the parts for the OSMC but it's a long way down my project list. I keep robbing parts [noparse]:)[/noparse]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Be careful with the current you put through the field coil. I think it has a very low current compared to the stator coils so it could burn out easier.
I don't think having the ammeter measuring current will tell you anything when you change the angle of the shaft. The current will be limited only by the resistance of the circuit.
Post Edited (kwinn) : 6/9/2009 3:06:25 PM GMT
You're right about the initial positioning of the trigger points. Your way will get the approximate (but quite accurate) position for each trigger point.
How to make these points a bit more accurate? After setting the trigger points the kwinn way, run the motor and measure the amps for a given load. Then slightly shift the trigger points and do it again. My limited understanding of brushless motors is that a change in the trigger point has a marked effect on motor efficiency and hence the Amps used. It is not just efficiency, the Amps not used in RPM and torque produce heat which I also want to avoid.
That is probably why the designers suggest a ramp-up and ramp-down of the voltage as you switch on and off each phase. They also talk of energising the coils for different durations depending on torque and speed. That’s all getting a bit too complex for me though…
The cabling for the field coil is designed for well over 5 amp and the coil itself will handle 15 Volt. You’re (VERY) safe if you supply 13.8V and let the field coil's natural impedance handle the current. There may be an opportunity in changing the voltage of the field coil to limit (or increase) the KW the motor produces. Remember that the stronger the magnatism of the field, the more efficient the motor.
WOW! I’m slowly starting to understand brushless motors. They’re a lot more interesting than I thought.
Have a great day
JMB
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Lets assume I am correct in thinking my alternator has 3 stator windings 120 degrees apart.
First, I would energize the field coil and each stator winding in turn and mark the shaft position. I would expect to get 3 marks 120 degrees apart. These would be the positions where I would get the lowest (0%) efficiency. I would expect the highest efficiency would be 60 degrees from there.
Next we place an optical encoder on the shaft with 360 lines and a "zero" position indicator, where the zero position would be the minimum efficiency point. Now we can count pulses from the optical encoder and energize the stator windings at the high efficiency points.
I am assuming that power to the windings will be pulse width modulated using a mosfet or half an H bridge, so we can now control when and for how long we power the winding.
If we wanted low power we could turn the first winding on from 55-65 degrees, the second from 175-185, the third from 195-205. To increase power we would increase the on time symmetrically around the maximum efficiency points.
As I said in the beginning this is how I think it would work, and is the approach I will take when I start with the alternator I have. Unfortunately I am now into my busy season and it looks like I will not have much time to work on it until September/October.
When you take it up again, contact me and I'll send you the chapters covering brushless motors out of "The Power Electronics Handbook" by Timothy Skvarenina. There's interesting stuff in this book.
Modern automotive alternators don't have ONLY 3 poles, they seems to have 6, 9 (my one), 12 or in rare cases more. Each of the three phases are connected to multiple windings (2 for 6, 3 for 9 or 4 for 12 etc). This doesn't make much difference though because, on a 9 pole alternator you just trigger each phase 3 times in each revolution instead of only once - every 40 Deg rather that 120 Deg.
Keep well.
John Bond
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔