GoRobotics - Robotics news, robot projects

Posts Tagged ‘Arduino’

Arduino Robotics Projects

Posted on January 19th, 2012 in Robotics Projects

About Arduino

Arduino is an open-source electronics prototyping platform based on flexible, easy-to-use hardware and software. It’s intended for artists, designers, hobbyists, and anyone interested in creating interactive objects or environments. Arduino can sense the environment by receiving input from a variety of sensors and can affect its surroundings by controlling lights, motors, and other actuators. The microcontroller on the board is programmed using the Arduino programming language (based on Wiring) and the Arduino development environment (based on Processing). Arduino projects can be stand-alone or they can communicate with software on running on a computer (e.g. Flash, Processing, MaxMSP). Arduino Microcontrollers There are many different Arduino variations on the market, from small boards like the Arduino mini to large boards like the Arduino MEGA. All have certain features in common:
  • Digital input/output pins (some double as PWM pins)
  • Analog input/output pins
  • Serial communication pins
  • In-system programming pins (ISP)
  • Compatibility with Arduino software
  • more…

Shields

Several boards are also “shield” compatible. “Shields” are electronic boards which can be mounted directly on top of certain Arduino boards (and connect to the Arduino pins via pin headers) and are intended to extend the functionality of Arduino to control different devices, acquire data, etc. The location of the headers on Arduino boards is very specific, so only shields can be easily stacked. The Arduino Uno in the image below clearly shows the headers. The XBee shield shown only uses some of the pins, though the placement on the board corresponds to the placement of the pins on the Arduino.

arduino-shield-placement

There are many different shields available on the market, and new ones are released on a regular basis from third party manufacturers. These shields can be used for a wide range of applications and their main “raison d’etre” is to facilitate design, assembly and integration and reduce the time required to create a functional project and/or prototype. Below are just a few such shields:

Ethernet Shield

The Ethernet shield allows you to connect the Arduino to the internet and includes a microSD card slot, multiple status LEDsand stacking headers, so you can add even more shields. RoHS compliant and comes assembled.
arduino-ethernet-shield-T

Adafruit GPS Logger Shield

Connect a GPS module to your Arduino! Track and log GPS and other data to an SD card or help your robot navigate the world. Soldering and assembly is required, and the GPS module itself is sold separately.
adafruit-gps-logger-shield-kit-arduino

Adafruit Motor Shield

Drive two DC motors at up to 0.6A each as well as 2 servo motors with a dedicated timer, or drives up to two low power stepper motor. Soldering and assembly is required. Stacking headers are not included.
adafruit-motor-shield-kit-arduino-T

Color LCD Shield

Connect the Nokia 6100LCD to your Arduino using this shield display anything you want on its 128 x 128 pixel color LCD. Stacking headers are not needed since it should be the last shield in the stack. RoHS compliant and comes assembled.
sfe-color-lcd-arduino-shield-T

Arduino XBee Shield

Transmit data up to 100m (~300′) away at up to 115.2Kbps transfer rate (operating on 2.4Ghz frequency) using the Xbee Series 2 wireless module (included). Be aware that the Xbee module is not compatible with Series 1, and you will need a second XBee series 2 module to send/receive data. The shield comes assembled and ready to use.
Arduino Xbee Shield Wireless Module

DFRobot Joystick Input Shield

Use the onboard dual axis mini joystick and two colored push buttons to control your robot. At the rear of the board there is mounting for DFrobot Bluetooth or RF Modules. Comes assembled.
dfrobot-joystick-input-shield-arduino

Software

Arduino boards are made to be directly compatible with the software which bears the same name. Arduino (software) is also open-source, making it easy to write code and upload it to the i/o board. The software runs on Windows, Mac OS X, and Linux. The environment is written in Java and based on Processing, avr-gcc, and other open source software. You can download the latest version of the Arduino software for free at any time. Previous versions are also made available. The first screen you will see when you load the software is the following: Arduino software screen The software is text based (as opposed to graphical) and was designed to give easy access to all the features of Atmel chips, as well as including pre-written functions and routines. Just as with many other programming languages, reserved words are recognized and change color, and there is a “verify” button which allows you to compile the code (to see if there is anything wrong or missing) before uploading it to the microcontroller. There are many pre-written code examples which come included in the software and range from blinking an LED to working with IMUs, and the user community has created and shared even more.

Project Ideas

Robotshop Rover Arduino

RobotShop Rover Mobile Rover

There are many possible ways to build a mobile Rover using Arduino. The RobotShop Rover is a programmable mobile platform which features a normal Arduino USB board, a dual motor controller, tank tracks, a pan and tilt and much more.
arduino tutorials

Arduino Tutorials Tutorials

There are many tutorials presented on the Arduino website which start off simple (essential code) and become more and more complex and comprehensive (creating a server, displaying interactive images on an LCD and more).
Firefox Icon

Online Search

Many people have put their success stories online to share with others. They often include their setup, parts list and an idea of how to go about reproducing their project.

Curriculum

There are many books, articles and online tutorials explaining how best to learn / program / create using / hack / teach Arduino.

Getting Started with Arduino

  • Detailed introduction to the open-source electronics prototyping platform
  • Learn about interaction design and physical computing
  • Contains lots of ideas and helps you get going on them
  • Author: Massimo Banzi
Getting Started with Arduino, Second Edition

Arduino Learning Arduino – Learning

Contains a Style Guide to help you with writing examples and is intended for beginners.
arduino learning

Arduino 5 Minute Tutorials

RobotShop has created simple tutorials which take about 5 miutes each to help you get started using common parts, useful for most projects.
Arduino 5 Minute tutorials 	Arduino 5 Minute Tutorials

Robotics Magazines

Robotics magazines hold a ton of information and you do not necessarily need the most current issue to find useful and reletant content and project ideas. Popular magazines include SERVO, Nuts & Volts, ROBOT, MAKE and more
Robotics Magazines

Competitions

Although there are currently no major competitions specifically around Arduino (or specifically requiring the use of an Arduino), Arduino is often used as the main processing unit inside many robots. The website Instructables occasionally holds open contests where many of the contestants use Arduino.

What to Buy

There are several categories on the RobotShop website based on Arduino and related products:

Arduino and Compatible Microcontrollers

Arduino and Compatible Microcontrollers This category contains all Arduino-based microcontrollers and variations from individual ATmega chips to large boards like the Arduino MEGA. When choosing a board consider the specifications and features (some may need an external USB to serial converter for programming). Keep in mind that all controllers here are compatible with the Arduino software.

Arduino Shields

Arduino ShieldsThis category contains most production shields available on the market. Instead of creating external circuits, shields have all the necessary component needed for a specific function and stack on top of many Arduino microcontrollers. Shields can range from motor controllers to LCD displays, GPS units, relays and more.  

Arduino Kits

Arduino KitsThis category contains starter kits intended to get you playing with Arduino immediately, and saves you the time of checking for compatibility with third party products. Kits can include sensors, actuators, USB cable, prototyping boards and more. Other kits can be more specific, allowing you to build, for example, a mobile robot.    

Arduino Accessories

Arduino AccessoriesThis category contains all products which are useful accessories to Arduino products and include USB cables, power adapters, interfaces, a number of cables and more. Note that Arduino is compatible with almost all robotic products on the market, so this category only contains a short list of the most popular accessories which are not application specific.  

DFRobotShop Rover Kits

DFRobotShop Rover KitsThe DFRobotShop Rover incorporates a full Arduino USB microcontroller into the top PCB, which also serves as the top of the frame. Also incorporated into the PCB is a dual motor controller, voltage regulator, shield-compatible pin headers and more! The DFRobotShop Rover platform is one of the lowest priced programmable mobile platforms based on Arduino available on the market today.    

Carlitos’ Projects: Speech-Controlled Arduino Robot

Posted on March 1st, 2011 in Microcontrollers, Projects, Robotics Projects, Robots

We all dream of having appliances and machines that can obey our spoken commands. Well, let’s take the first step towards making this happen.  In this second iteration of Carlitos’ Projects, we are going to build a speech-controlled Arduino-based robot.

Speech Controlled Arduino Robot

You may be thinking that making such a robot must be a very complex task. After all, humans take many years before they can understand speech properly. Well, it is not as difficult as you may think and it is definitely lots of fun. The video below illustrates how to make your own speech-controlled Arduino rover.

After watching the video, read below the detailed list of parts and steps required to complete the project.

Materials

  • A DFRobotShop Rover kit. It constitutes the robot to be controlled.
  • A VRbot speech recognition module. It processes the speech and identifies the commands.
  • Two Xbee RF communication modules. They create a wireless link between the speech recognition engine and the robot.
  • An Arduino Uno. Controls the speech recognition module.
  • An IO expansion shield. Allows to connect the Xbee module to the DFRobotShop Rover
  • An Xbee shield. Allows to connect an Xbee module to the Arduino Uno.
  • Male headers. They are required by the Xbee shield.
  • A barrel jack to 9V battery adaptor. Allows to power the Arduino Uno trough a 9V battery.
  • An LED. It is not required since the IO expansion shield already has one but it can provide a more visible activity feedback.
  • An audio jack. It will be used to connect the microphone. This is optional
  • A headset or a microphone (a microphone is included with the speech recognition module).

Tools

  • Wire Cutter. It will be used to cut the leads off components.
  • Soldering Iron. In order to solder all the (many) connections, a soldering station might be preferable since it provides steady and reliable temperature control that allows for easier and safer soldering (you have less risk of burning the components if the temperature is set correctly).
  • Third Hand. This is not absolutely required, but it is always useful for holding components and parts when soldering.
  • A Hot-glue gun in order to stick the components together.
  • A computer . It programs the DFRobotShop Rover and the Arduino Uno using the Arduino IDE.

Putting it Together

  1. Assemble the DFRobotShop Rover and mount the IO expansion shield, an Xbee Module and the LED. Se the picture above or the video for further information.
  2. Solder the headers onto the Xbee shield. Also solder four headers on the prototyping area as shown below. Do not like soldering? Then keep reading since there is no-solder-required version of the project.
    Speech Engine - 2
  3. Connect the four headers to the corresponding pins as shown below.
    Speech Engine - 3
  4. As shown above, you can also mount the headphone jack and use the cable included with the microphone in order to connect it to the VRbot module microphone input.
  5. Put the shield onto the Arduino and connect the battery.
    Speech Engine - 4
  6. Connect the VRbot speech recognition module wires and the microphone.
    Speech Engine - Back
  7. Program the DFRobotShop Rover and the Arduino Uno with these programs respectively:
    dfrobotshop_serial.zip and VRbot.zip
  8. Start talking to your robot! Say “forward”, “backward”, “left”, or “right” in order to make the robot move in the desired direction. The word “move” shown in the video has been removed from the program in order to improve the performance.

Go Further

Now that you have the basic program you can create new commands in order to build upon this project. For instance, it would be nice to program a “dance” command that would make the rover execute a predefined choreography. It is also possible to use this knowledge to control other devices such as lamps, TV sets, and more.

You can find more information about using the VRbot speech recognition module here:

In our case, we used two of these robots in order to create a ball-fetching challenge at the CRC 2011 with high-school and CEGEP students. As shown below, the students and general public loved the game.


CRC - Robot Fun

CRC - More Robot Fun


Get your own

RobotShop put together a full kit that you can buy in order to get started with speech control. This kit is a bit different than the project shown and does not require any soldering and uses the microphone included with the VRbot module:

DFRobotShop Rover – Speech Control Kit

Arduino + Toy = Robot!

Posted on December 14th, 2010 in Microcontrollers, Projects, Robots, Sensors

This is a nice video from a while ago describing how to quickly and cheaply put together a robot by using an old RC toy, an Arduino (actually a Seeeduino), a Ping distance sensor and a couple of other components.

More in-depth videos of the construction below.

We are eager to see our readers go crazy and build their own robots from old toys.

Via DinoFab.

How to Make a Robot – Lesson 4: Understanding Microcontrollers

Posted on October 12th, 2010 in How To Make a Robot, Microcontrollers

How to Make a Robot Lesson 4: Understanding Microcontrollers

Lessons Menu:

Understanding Microcontrollers

Various Microcontrollers

What is a microcontroller?

You might be asking yourself what is a microcontroller and what does it do? A microcontroller is a computing device capable of executing a program (i.e. a sequence of instructions) and is often referred to as the “brain” or “control center” in a robot since it is usually responsible for all computations, decision making, and communications. In order to interact with the outside world, a microcontroller possesses a series of pins (electrical signal connections) that can be turned HIGH (1/ON), or LOW (0/OFF) through programming instructions. These pins can also be used to read electrical signals (coming form sensors or other devices) and tell whether they are HIGH or LOW.

Microcontroller and Development Board

Most modern microcontrollers can also measure analogue voltage signals (i.e. signals that can have a full range of values instead of just two well defined states) through the use of an Analogue to Digital Converter (ADC). By using the ADC, a microcontroller can assign a numerical value to an analogue voltage that is neither HIGH nor LOW.

What can a microcontroller do?

Although microcontrollers can seem rather limited at first glance, many complex actions can be achieved by setting the pins HIGH and LOW in a clever way. Nevertheless, creating very complex algorithms (such as advanced vision processing and intelligent behaviours) or very large programs may be simply impossible for a microcontroller due to its inherent resource and speed limitations. For instance, in order to blink a light, one could program a repeating sequence where the microcontrollers turns a pin HIGH, waits for a moment, turns it LOW, waits for another moment and starts again. A light connected to the pin in question would then blink indefinitely. In a similar way, microcontrollers can be used to control other electrical devices such as actuators (when connected to motor controllers), storage devices (such as SD cards), WiFi or Bluetooth interfaces, etc. As a consequence of this incredible versatility, microcontrollers can be found in everyday products. Practically every home appliance or electronic device uses at least one (often many) microcontroller. For instance TV sets, washing machines, remote controls, telephones, watches, microwave ovens, and now robots require these little devices to operate. Unlike microprocessors (e.g. the CPU in personal computers), a microcontroller does not require peripherals such as external RAM or external storage devices to operate. This means that although microcontrollers can be less powerful than their PC counterpart, developing circuits and products based on microcontrollers is much simpler and less expensive since very few additional hardware components are required. It is important to note that a microcontroller can output only a very small amount of electrical power through its pins; this means that a generic microcontroller will likely not be able to power electrical motors, solenoids, large lights, or any other large load directly. Trying to do so may even cause physical damage to the controller.

What are the more specialized features in a microcontroller?

Special hardware built into the microcontrollers means these devices can do more than the usual digital I/O, basic computations, basic mathematics, and decision taking. Many microcontrollers readily support the most popular communication protocols such as UART (a.k.a. serial or RS232), SPI and  I2C.This feature is incredibly useful when communicating with other devices such as computers, advanced sensors, or other microcontrollers. Although it is possible to manually implement these protocols, it is always nice to have dedicated hardware built-in that takes care of the details. It allows the microcontroller to focus on other tasks and allows for a cleaner program. Analogue-to-digital converters (ADC)  are used to translate analogue voltage signals to a digital number proportional to the magnitude of the voltage, this number can then be used in the microcontroller program. In order to output an intermediate amount of power different from HIGH and LOW, some microcontrollers are able to use pulse-width modulation (PWM). For example this method makes it possible to smoothly dim an LED. Finally, some microcontrollers integrate a voltage regulator in their development boards. This is rather convenient since it allows the microcontroller to be powered by a wide range of voltages that do not require you to provide the exact operating voltage required. This also allows it to readily power sensors and other accessories without requiring an external regulated power source.

Analogue or Digital?

Below you can find two examples that illustrate when to use a digital or analogue pin:
  1. Digital and Analog Arduino Example SchematicDigital: A digital signal is used in order to assess the binary state of a switch. As illustrated below (on the left side of the solderless breadboard), a momentary switch or push button closes a circuit when pressed, and allows current to flow (a pull-up resister is also shown). A digital pin connected (through a green wire in the picture) to this circuit would return either LOW or 0 (meaning that the voltage at the pin is in the LOW range, 0V in this case) or a HIGH (meaning the button is pressed and the voltage is at the HIGH range, 5V in this case).
  2. Analogue: A variable resistor or potentiometer (as shown towards the right side of the board below) is used to provide an analogue electrical signal proportional to a rotation (e.g. the volume knob on a stereo). As illustrated below, when a potentiometer is connected to a 5V supply and the shaft is turned, the output will vary between 0 and 5V, proportionally to the angle of rotation. The ADC on a microcontroller interprets the voltage and converts it to a numeric value. For example, a 10-bit ADC converts 0V to the value “0”, 2.5V to “512” and 5V to “1023”. Therefore if you suspect the device you plan to connect will provide a value that is proportional to something else (for example temperature, force, position), it will likely need an analogue pin.

Digital and Analog Arduino Example

 

What about programming?

ProgrammingBeing afraid of programming microcontrollers is getting old fashioned. Unlike the “old days” where making a light blink took advanced knowledge of the microcontroller and several dozen lines of code (not to mention parallel or serial cables connected to huge development board), programing a microcontroller is very simple thanks to modern Integrated Development Environments (IDE) that use up-to-date languages, fully featured libraries that readily cover all of the most common (and not so common) action, and several ready-made code examples to get beginners started. Now-a-days, microcontrollers can be programmed in various high-level languages including C, C++, C#, Processing (a variation of C++), Java, Python, .Net, and Basic. Of course, it is always possible to program them in Assembler but this privilege is reserved for more advanced users with very special requirements (and a hint of masochism). In this sense, anyone should be able to find a programming language that best suit their taste and previous programming experience. IDEs are becoming even simpler as manufacturers create graphical programming environments. Sequences which used to require several lines of code are reduced to an image which can be connected to other “images” to form code. For example, one image might represent controlling a motor and the user need only place it where he/she wants it and specify the direction and rpm. On the hardware side, microcontroller developments boards add convenience and are easier to use over time. These boards usually break out all the useful pins of the microcontroller and make them easy to access for quick circuit prototyping. They also provide convenient USB power and programming interfaces that plug right into any modern computer. For those unfamiliar with the term, a Development Board is a circuit board that provides a microcontroller chip with all the required supporting electronics (such as voltage regulator , oscillators, current limiting resistors, and USB plugs) required to operate. If you are not planning to design your own support circuit, buying a development board is preferable to simply getting a single microcontroller chip. Note: Robot programming is covered in greater depth in Lesson 10.

Why not use a standard computer?

It is apparent that a microcontroller is very similar to a PC CPU or microprocessor, and that a development board is akin to a Computer motherboard. If this is the case, why not simply use a full computer to control a robot?

Desktop Computer v.s. Microcontroller

As a matter of fact, in more advanced robots, especially those that involve complex computing and vision algorithms, the microcontroller is often replaced (or supplemented) with a standard computer. A desktop computer includes a motherboard, a processor, a main storage device (such as a hard drive), video processing (on-board or external), RAM, and of course peripherals such as monitor, keyboard, mouse etc. This type of system is usually more expensive, physically larger, more power hungry. The main differences are highlighted in the table below.

Microcontroller Personal Computer
Example Atmega328 Intel Pentium Core 2 Duo
RAM 1KB 4000000KB (4GB)
Storage 15KB 15000000KB (1000GB)
Power 0.1W 600W
Voltage 12 12
Input/Output Pins USB, RS232
Wireless Bluetooth*, RF* Bluetooth
Video None 1000000KB (1GB)
Price $4 to $300 $400 to $2000
Internet WiFi* or Ethernet* WiFi or Ethernet
*Available as optional additions on many microcontrollers.

Choosing the right Microcontroller

Unless you are into BEAM robotics, or plan to control your custom robot using a tether or an R/C system (which, based on our definition from Lesson 1 would not be considered a robot), you will need a microcontroller for any robotic project. For a beginner, choosing the right microcontroller may seem like a daunting task, especially considering the range of products, specifications and potential applications. There are many different microcontrollers available on the market: Arduino, BasicATOM, BasicX, POB Technology,  Pololu, Parallax and more. When considering the right microcontroller, ask yourself the following questions:
  1. Which microcontroller is the most popular for my application? Of course making robots or electronic projects in general is not a popularity contest, but the fact that a microcontroller has a large supporting community or has been successfully used in a similar (or even the same) situation could simplify your design phase considerably. This way, you could benefit from other user’s experience and among hobbyists. It is common for robot builders to share results, code, pictures, videos, and detail successes and even failures. All this available material and the possibility of receiving advice from more experienced users can prove very valuable.
  2. Does it have any special features the robot requires? As popular as a microcontroller might be, it must be able to perform all the special actions required for your robot to functions properly. Some features are common to all microcontrollers (e.g. having digital inputs and outputs, being able to perform simple mathematical operations, comparing values and taking decisions), while others need specific hardware (e.g ADC, PWM, and communication protocol support). Also memory and speed requirements, as well as pin count should be taken into consideration.
  3. Are the accessories I need available for a particular microcontroller? If your robot has special requirements or there is a particular accessory or component that is crucial for your design, choosing a compatible microcontroller is obviously very important. Although most sensors and accessories can be interfaced directly with many microcontrollers, some accessories are meant to interface with a specific microcontroller and even provide out-of-the-box functionally or sample code.

What does the future hold?

As the price of computers has gone down, and advances in technology make them smaller and more energy efficient, single-board computer have emerged as an attractive option for robots. These single-board computers are essentially computers you may have used about 5 years ago, and incorporate many devices into one board (so you cannot swap anything out). They can run a complete operating system (Windows and Linux are most common) and can connect to external devices such as USB peripherals, LCDs etc. Unlike their ancestors, these single-board computers tend to be much more power efficient.

Practical Example

In order to choose a microcontroller, we compiled a list of features / criteria we wanted:
  1. The microcontroller’s cost must be low while including a development board (below 50$)
  2. It must be easy to use and well supported. It is also important to have lots of documentation readily available.
  3. It should be programmed in C or a C-based language.
  4. It must be popular and have an active user community.
  5. Since the robot will be used as a general purpose platform, the microcontroller should be very feature rich in order to allow for broad experimentation. In this sense, it should have several analogue and digital pins, as well as an integrated voltage regulator.
Since our robot will use two motors, the microcontroller will need two digital pins for direction control, and two PWM pins for speed control (this will be explained in more detail in Lesson 5). The robot will also transmit and receive data so it will need to support the UART (a.k.a. serial or RS232) communication protocol in our case.  We would also like the option of adding other sensors and devices in the future so analogue pins and many extra digital pins would be appropriate. The upcoming RobotShop Microcontroller comparison table allows us to compare the main features of one microcontroller with another. The Pololu and Arduino microcontrollers seemed to conform best to the above criteria. In order to select a specific microcontroller from these two manufacturers, each was researched in order to determine the amount of available material, code, user community, Google hits and more. Arduino Uno The Arduino Duemilanove (recently replaced by the Arduino Uno) was ultimately chosen based on price vs. features and because of the concept of “shields” (separate accessory boards you plug and stack onto the microcontroller which add specific functionality). Also, Arduino is rather popular, there are many sample projects, and its community is very active. RobotShop - Robotics at your serviceFor further information on learning how to make a robot, please visit the RobotShop Learning Center. Visit the RobotShop Community Forum in order to seek assistance in building robots, showcase your projects or simply hang-out with other fellow roboticists.

DFRobotshop Rover Or Arduino On Tracks

Posted on July 29th, 2010 in Hobbyist, News, Projects, Robots

RobotShop is proud to announce the immediate availability of the DFRobotShop Rover, an Arduino-compatible robotic tracked platform. At an 89.99 USD price-tag, this is by far the most affordable, programmable mobile robot in the market.

The DFRobotShop Rover is a versatile mobile robot tank based on the popular Arduino Duemilanove.  It incorporates all the Duemilanove features (since it uses a surface mount ATMega328),  including shield compatibility, and is supplemented with (1) an on-board DC step-up that allows it to be easily powered from small power sources such as AA batteries,  (2) a dual H-bridge DC-motor controller (L293B), and (3) an APC220 and Bluetooth serial interface connector for telemetry and radio control. As an addition it also features a temperature and light sensors that can be readily connected to analog inputs on the ATMega328 for immediate use. This Arduino-compatible platform rides on the popular Tamiya twin motor gearbox and the Tamiya track and wheel set.  This created a low-cost traction system that has been tested to carry over 2 kg without issues.

- Robotshop Blog

Let us know what would you like to do with this very cool Arduino tank.

Via RobotShop Blog.

Subscribe to the RobotShop Blogs RSS feed!

Enter your email address: