User Tools

Site Tools


workshops:arduino_to_the_next_level:motor_shield

Being able to turn things is pretty useful. Robots for example have lot of motors in them.

There are a few different types of motor. Each work in a slight different way and are suited to different tasks, the two types we'll be looking at today are:

  • DC motors - When current is supplied to the motor it will continue to turn until power is removed. Quite hard to make precise amounts of turn.
  • Stepper motors - They work by switching current to a number of separate coils in the right sequence allowing rotation in set “steps” motor can turn a set amount.

As motors need quite a bit of power they can't be powered directly from the Adruino pins. Some extra electronics are required to avoid damaging the Arduino. These are usually based around transistors, that act as electronic switches. To save time we'll be using pre-build shields but this could be wired up directly.

Motor Shield

motorshield.jpg

https://learn.adafruit.com/adafruit-motor-shield/use-it

There are several different types of motor and servo supported by this shield. With helpers assistance you should be able to experiment with a few of these.

Small Stepper Motor with Driver

stepper.jpg

There is some example code on http://www.4tronix.co.uk/arduino/Stepper-Motors.php

challenge_yourself.jpg Easier
(1) Turn the small stepper motor a full resolution in one direction and back again.

Intermediate
(2) Turn the stepper motor at a speed that takes about 60 seconds to make a full rotation.
workshops/arduino_to_the_next_level/motor_shield.txt · Last modified: 2017-04-11 11:32 by Simon

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki