Difference between revisions of "VelTek shield motor step"

From Training Technology Lab Wiki
Jump to navigation Jump to search
Line 44: Line 44:
  
 
= Software description =
 
= Software description =
 +
Todo

Revision as of 12:08, 10 May 2019

Required hardware components

To complete this exercise you need for following:

Arduino Uno (or similar)
VelTek shield (r2, blue)
DC motor w. encoder
12V AC/DC adaptor
USB A to B cable
Motor cable
Small flat-head screw driver
Recommended: cheap USB hub

Required software

  • Serial terminal program with logging capabilities. We recommend Putty which is available on Windows/Linux/Mac.
  • Math program capable of importing numbers from a text file. Matlab or Octave (free) is recommended, but Microsoft Excel can also be used.
  • Arduino sketch (C/C++ program for the Arduino) File:Veltek-shield-motor-ab-encoder-1.0-beta1.zip that starts the DC motor and count pulses from the encoder on the motor.
  • Arduino IDE to compile and upload the sketch to your Arduino. This is available on Windows/Linux/Mac

Setup

motor encoder cable mounted correctly
File:IMG arduino motor shield connected.JPG
motor connected to VelTek shield
  1. Mount VelTek shield on top of Arduino. Take care that all pins mate correctly to their sockets before pressing together.
  2. Connect motor cable to DC motor. The little white plug can only go in one way. When inserted correctly, the orange wire is towards the edge of the circuitboard. (See picture)
  3. Use screwdriver to connect the red wire to "OUTB" and black wire to "OUTA" on the green terminal on VelTek shield. The red and black wire is for motor voltage that drives the DC motor.
  4. Connect blue wire to Arduino GND, and yellow wire to Arduino 5V. These wires power the encoder circuit on the back of the motor.
  5. Connect violet wire to Arduino pin 3 and orange wire to pin 2. These wires carry the output signals from the encoder on the motor.
  6. Plug the AC/DC adaptor into a 230V wall socket and then insert 12V plug from adaptor into the Arduino.
  7. Optional but strongly reccomended: Connect Arduino board to USB hub.
  8. Connect Arduino or USB hub with Arduino to your computer.

Hardware description

Todo

Software description

Todo