Overview
- Object ID : 2354 (2015-03-29)
 - Author : Henk Kiela | added by Archiver
 - Content : Code
 - Microcontroller : Propeller 1
 - Language : C/C++
 - Categories : Motor Control, Sensor
 - Licence : Other
 - Tag : PWM
 
Content
The MAE3 is a small magnetic absolute encoder of US digital. We have been using it in various robot projects. So far is was only available in Spin. We made a C-version available derived from the standard Pulsein code in the C simple libraries.
The MAE creates a 4 kHz PWM signal with a duty cycle of 0% to 100% and 12 bit resolution. As we wamt to use this device to commutate brushless motors of control steering robot wheels, the sensor passes through the 100%->0% transition at some point. None of the standard PWM in routines in the OBEX seem to be able to detect such transitions without errors or a very long measuring time. The introduction of the state engine in the modigied routine helps to detect 0% and 100% within a reasonable time.
If you have comments or suggestions, let us know.
Henk Kiela Opteq Mechatronics BV hkiela@opteq.nl