Let's Make Robots!

Arduino Nano Undershield


Vendor's Description: 


The Arduino Nano Undershield is simply perfect for small, simple robots with everything you need, and nothing you don't. Start with an Arduino Nano, featuring an Atmega328, on-board volt regulator and on-board USB. Next, add the Undershield with connections for sensors, motors and servos. Mix in the ability to supply power in a lot of different configurations and you got yourself a gosh-darn-good board for almost any robot. Let's see what we got here:

  • L293D Motor Driver
  • Separate connections for data power in and motor power in
  • Connections for 2 servos (via 3-pin header)
  • Connections for 2 ADC's (via 3-pin header)
  • Connections for 1 Digital Sensor (via 3-pin header)
  • 3-Pin headers can be powered by on-board regulator or external power
  • All other pins accessible via female headers
  • Nano can be powered by its own on-board regulator as well as external regulated power, allowing the Nano to be run at voltage levels lower than 5v
  • Real-life mounting holes that are actually big enough for real screws! Fits 2-56, 4-40 and M3 "standard" PCB stand-offs
  • A footprint just slightly bigger than 1"x2"

  More information can be found here.

The Instruction Manual can be found here.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

CtC, is it possible to run a stepper motor with the Nano Undershield?

 

If so, than can you specify the pins to use when the Nano Undershield and its L293D must run a stepper motor?

Have found the pin assignments here but I can not translate it to run the stepper.

The library I use is the standard Stepper library from the Arduino IDE:

Stepper(int number_of_steps, int motor_pin_1, int motor_pin_2, int motor_pin_3, int motor_pin_4);

Any ideas?

 

According to CtC's Instruction Manual, the motors use the following pins:

 

D3 Direction Pin Motor A

D4 Direction Pin Motor A

D5 PWM Pin Motor A

D6 PWM Pin Motor B

D7 Direction Pin Motor B

D8 Direction Pin Motor B

 

 

The PWM pins are connected to the Enable pins on the L293D, write them both High to enable the stepper.

A bipolar stepper has 2 windings. Wire the first winding to the 2 Dir Pin Motor A (D3 and D4) and the second winding to the Dir Pin Motor B (D7 and D8). To find the windings, use an Ohm meter, there should be a resistance reading if the wires are connected to a winding. Now you have to figure out the relationship to the library notation of the motor pins. First, assume the pin 1 and pin 2 are from the first winding (D3, D4) and the pin 3 and 4 are from the second winding (D7, D8). Try to see if it works. You may need to swap a pair of pins (in case the winding is energized in reverse compared to the other winding). If it doesn't work, try to use even pins for one winding and odd pins for the second winding.

This setup will not work for unipolar stepper motors.

Thank you for connecting the dots for me, Gabriel.

Have put D5 and D6 to HIGH. Using the Ohm meter I have found the pairs OY (Orange,Yellow) and BB (Black/Brown) that have the resistance. Pair OY is plugged in with Motor A of the Undershield. Pair BB is plugged in to the Motor B of the Undershield. So now OY is on A and BB is on B (see the picture).

Unfortunately the stepper motor does not move with this setting.

So I have tried all possible combinations as you suggested but still: The stepper does not move.

In the software I use this pin settings now:

Stepper myStepper(stepsPerRevolution, 3,4,7,8);

 

What am I missing? Any ideas?

 

In Arduino v .022 there is a libary called Stepper. I think that is what you are using. There is a folder inside with examples. One of them is OneStepAtATime. Load that on your Nano, mount something on the stepper's axle to see which way it is turning and see how it works. Do not switch wires while the board is powered or you might burn your L293D. Make sure you give the stepper 12V as per data sheet. Also, is StepsPerRevolution defined as 48? The example allows you to see which way the stepper is turning, if it is not turning in the same dirrection, you must reverse the wires for one winding alone. If it doesn't move at all, or not making any sound, there is something wrong with the L293D chip try hooking up a DC motor and see if it still works. If it does, then well, I have no idea what's wrong. Oh, perhaps connect 2 DC motors and use the same example sketch for the stepper and see it it works. Good luck!

 good thinking CTC ,mounting holes in the right spots for a change with clearance :)