Home Page    |  PIC18F4431 Programming: Position Tracking      | Flash Game: Find Matching Pair Programming      |

Device Generating Continuously ON-OFF Signal Using Hardware Timers & Relays

 

PIC18F4431 Programming: Using Faulhaber Motor + Encoder combo for Position Tracking

 

The project utilize Microchip IC 'PIC18F4431' and miniature Faulhaber DC motor.

PIC18F4431 IC from Microchip Inc.

Microchip IC 'PIC18F4431' IC has the hardware to recognize and decode the rotary encoder signal. Plus it run on DC5V supply which is suitable for house DIY.

IC's Motion Feedback Module (MFM) module features a Quadrature Encoder Interface (QEI) to accepts two phase inputs (QEA, QEB). QEI provide high and low precision position tracking, direction status and change of direction interrupt and velocity measurement.

PICkit2 Starter Kit from Microchip Inc. for downloading software

You will need a programmer to download firmware into the IC.

www.microchip.com/pickit2

 

Faulhaber motor + Gear head + Encoder combo

I bought it from eBay.

  1. DC motor
  2. Gearhead gear ratio: 141:1
  3. Nominal voltage: 6V
  4. Speed @ 6 VDC = 70 RPM< /li >
  5. Connector pin assignment
    Pin 1: Motor V+
    Pin 2: Encoder V+ (5V)
    Pin 3: Encoder Channel A
    Pin 4: Encoder Channel B
    Pin 5: Encoder Ground
    Pin 6: Motor Ground

    

 

Simulate Elevator Limit Switches Function

Common lift system has Door Zone shelter plates and limit switches at terminal floors. The follow example will simulte these functions.

 

Circuit Diagram

 

Programming code

PIC program source code