SciJoy
Published © CC BY

Exploring Encoders - Step Trackers for Motors

Build Absolute, Incremental, and Quadrature Encoders

BeginnerFull instructions provided4 hours7,098
Exploring Encoders - Step Trackers for Motors

Things used in this project

Hardware components

Adafruit Break Beam
You can also use LDRs and LEDs.
×3
DC motor
The shaft diameter in the CAD file is 3mm. You might need to adjust this according to the motor you pick. A smaller and cheaper motor is: https://www.amazon.com/RS-550s-18v-Electronic-Controlled-Replacement/dp/B00TE42PME/ref=sr_1_1?ie=UTF8&qid=1477015531&sr=8-1&keywords=rs550
×1
Arduino UNO
Arduino UNO
Any Arduino should work.
×1
Breadboard (generic)
Breadboard (generic)
You can use this instead of soldering.
×1
Jumper wires (generic)
Jumper wires (generic)
If you are using a breadboard, you can use jumper wires.
×1
Motor Controller
You can just use a battery and a potentiometer.
×1
OpenBeam Starter Kit
You don't have to use this. You can use other materials to construct the stand.
×1
2 Pin Board Side
You don't need this if you are just going to breadboard the project.
×3
2 Pin Sensor Side
You don't need this if you are just going to breadboard the project.
×3
3 Pin Board Side
You don't need this if you are just going to breadboard the project.
×3
Contact - 22-28 AWG
You don't need this if you are just going to breadboard the project.
×15
3 Pin Sensor Side
You don't need this if you are just going to breadboard the project.
×3
Hook-up wire (solid 22-28AWG)
You don't need this if you are just going to breadboard the project - use jumpers.
×1
Header pins
You don't need this if you are just going to breadboard the project.
×1
Solder (Generic)
You can just use bread boards. This is a good tutorial for learning how to solder:https://learn.sparkfun.com/tutorials/how-to-solder---through-hole-soldering?_ga=1.113903495.1265549123.1409440336
×1
Prototyping Board
You don't need this if you are just going to breadboard the project.
×1
Screw Terminal
You don't need this if you are just going to breadboard the project.
×1
9V battery (generic)
9V battery (generic)
You can use power or PWM on Arduino instead.
×1
9V Battery Clip
9V Battery Clip
You can use power or PWM on Arduino instead.
×1
AA Batteries
AA Batteries
You can use power on Arduino.
×1
AA Battery Holder
You can use power on Arduino.
×1

Software apps and online services

Fusion 360
Autodesk Fusion 360
This is how we created our drawings.
Arduino IDE
Arduino IDE
You'll need this to upload the code.

Hand tools and fabrication machines

3D Printer (generic)
3D Printer (generic)
You could also cut the templates out of cardboard.
Crimper
You don't need this if you are going to breadboard the project.
Soldering iron (generic)
Soldering iron (generic)
We like Hakko. You don't need this if you are breadboarding the project.

Story

Read more

Custom parts and enclosures

3D Printing Files

Absolute Encoder - 3 Bit

Incremental Encoder

Motor Mount Lower

Used on OpenBeam

Motor Mount Upper

Used on OpenBeam

Quadrature Encoder

Sensor Mounts

This is for OpenBeam. You'll need two of these.

Schematics

Wiring Diagram

Red wires to power, Black to ground. White to signal. Pin 5 of Arduino to inner sensor. Pin 6 of Arduino to middle sensor. Pin 7 of Arduino to outer sensor.

Motor Controller Hookup

The first two terminals go to the motor and the second two go to a battery. We used a 9V battery. The switch allows you to power off and turn the motor both clockwise and counterclockwise. The knob adjusts the speed.

Top of Transmitter Board

We wired a AA battery pack to the green terminal. We soldered a connector to the board and crimped the other side to the sensor.

Transmitter Board Wiring

We used hookup wire and soldered the black wire side of the connector to the ground rail and ground pin of the terminal The power side was soldered to the red side.

Wiring to Arduino

We soldered a connector to the board and crimped the other side to the sensor. The black wire is ground, red is power, and white is signal. We went to Arduino ground, Arduino 3.3V power, and pins 5, 6, and 7 for the signal pins.

Receiver Wiring

We soldered hookup wire to a power rail for the red sensor wires. We soldered hookup wire to a ground rail for the black sensor wires.

Code

Code for Absolute, Incremental, and Quadrature Encoders

Credits

SciJoy

SciJoy

7 projects • 15 followers
We run a YouTube channel where we share what we are learning and building with others.

Comments