Software Overview  |  Sitemap  |  Downloads  |  Developers  |  Forums
Small_clear_logo_llc

Wicked Device Devices on Arduinos

Here we describe the Wicked Device devices we support. To learn more about Wicked Device and their devices, see http://www.wickeddevice.com. A good description of this shield is at http://www.makershed.com/products/motor-shield. If you are interested in using a Wicked Device device which is not in this list, you may be able to support it using standard pin configurations. The Wicked Device Scripts are in the Arduino/Devices Scripts directory in the WickedDevice subdirectory.

The Wicked Device devices we support are:

Motor Shield V1 - the motor shield is useful for robotics projects. It was featured in Make Magazine in an omniwheel robot project. The Motor Shield can control a robot's drive unit.

The Motor Shield V1

Wicked Device Motor Shield V1
motor shield

The Wicked Device Motor Shield is a small board which plugs into an Arduino (an Arduino shield). The shield has outputs for controlling up to 6 motors independently. Each motor has its own speed and direction control. Motor speeds are controlled by 6 PWM outputs from the Arduino. Motor direction is controlled by direction bits in a 16 bit shift register on the shield (for more details, see the Maker Shed website).

Note: Maker Shed advertises this as a 4 DC motor / 2 stepper motor shield. We haven't experimented, but you probably shouldn't use the motor 5 & 6 outputs for driving motors directly.

The direction bits in the 16 bit shift register are as follows (assuming bits are numbered from 0-15):

bits 1,3,5,7,13,15 are the direction bits for motors 3,2,1,4,5,6.

Setting a direction bit causes a motor to spin in the opposite direction. The shift register also has brake bits. Setting a brake bit causes a motor to stop, irregardless of its speed or direction.

Bits 0,2,4,6,12,14 are the brake bits for motors 3,2,1,4,5,6.

Configuring the Shield

To configure the Wicked Device Motor Shield, run the MotorShield Script in the WickedDevice subdirectory. The Script adds 7 input terminals to your Arduino Device. 6 of the terminals are for controlling the speed of the 6 motors; they use pulse width modulation (PWM) values ranging from 0-100 or the values "on" or "off" ("on" is the same as a duty cycle value of 100, and "off" is the same as a duty cycle value of 0). The 7th terminal is the shift register value terminal. This terminal takes 16 bit values and shifts them into the shield's 16 bit shift register.

The MotorShieldV2 Script takes the following parameters:

  • arduino_id : the ID of the Arduino which is connected to the Motor Shield. This is the same as the ID supplied by the "id" parameter when adding an Arduino to the system.
  • m1_pwm_name : the name for motor 1's pwm input terminal
  • m2_pwm_name : the name for motor 2's pwm input terminal
  • m3_pwm_name : the name for motor 3's pwm input terminal
  • m4_pwm_name : the name for motor 4's pwm input terminal
  • m5_pwm_name : the name for motor 5's pwm input terminal
  • m6_pwm_name : the name for motor 6's pwm input terminal
  • shift_reg_name : the name for the shield's shift register terminal

If you want to leave a terminal off of your Arduino, define its name as the empty string ("").

In addition to these terminal name parameters, there are parameters for redefining some of the Arduino pins the shield uses. The default values generally work fine, but according to the Wicked Device documentation, these pins are user configurable using a jumper. These parameters define the configurable Arduino pins:

  • m1_pwm_pin : the Arduino pin used for motor 1's PWM (default is pin 11).
  • m6_pwm_pin : the Arduino pin used for motor 6's PWM (default is pin 3).
  • shift_reg_data_pin : the Arduino pin used as the data pin for the shield's shift register (default is pin 12).

Lastly, there are 6 terminals available for measuring motor current. They report the voltage reported by the shield's current sensors. By default, these terminals are not named, so they will not show up on your Arduino device. Their parameters are:

  • m1_isense_name : motor 1's current sensing terminal name.
  • m2_isense_name : motor 2's current sensing terminal name.
  • m3_isense_name : motor 3's current sensing terminal name.
  • m4_isense_name : motor 4's current sensing terminal name.
  • m5_isense_name : motor 5's current sensing terminal name.
  • m6_isense_name : motor 6's current sensing terminal name.

Here's an example using the MotorShield Script. It adds a Motor Shield with motors connected to the shield's 1 and 2 motor outputs. It's plugged into an Arduino with ID "arduino". Motor 1's terminal is named "m1_pwm"; motor 2's terminal is named "m2_pwm"; the shift register is named 'shift_reg".

arduino_id: "arduino"
m1_pwm_name: "m1_pwm"
m2_pwm_name: "m2_pwm"
m3_pwm_name: ""
m4_pwm_name: ""
m5_pwm_name: ""
m6_pwm_name: ""
shift_reg_name: "shift_reg"

Catalina Computing, LLC.

Copyright © Catalina Computing, LLC. (2013-2018)




Page last updated: Thu Oct 9 19:36:02 2014 (UTC)