GoRobotics - Robotics news, robot projects

Gorobotics is the perfect blog for everyone looking to learn how to make a robot, gather knowledge about DIY robotics projects, and stay in touch with the latest robotics news.

Spyder LB1200 Robot Lawn Mower Unpacked

Posted on May 9th, 2012 in Household, Reviews
Spring is here and summer is just around the corner. Are you dreading mowing the lawn? Robot lawn mowers have been around for some time now, and almost all of them operate the same way. However, in the Spring of 2009 we all witnessed the latest revelation in lawn mowing technology with the Spyder LB1200. The Spyder LB1200 is a robot lawn mower designed for people looking to improve the quality of their life by eliminating the more menial task of mowing the grass, and also in setting up a robotic lawn mower.

What are the highlights?

The Spyder is a sleek looking machine; forest green, with two handles on the top to better grasp the mower and carry it around (not that it’s heavy though). This electric mower produces very little noise and covers a lot of ground in little time. It’s silent and green! In order to reduce the price as low as possible, the robot does not have a docking station, but rather a unique charging cord which has you press a lead onto each of the front two wheels to charge the robot.

What is so great about this lawn mower?

Unlike almost all other robotic lawn mowers, the Spyder LB1200 doesn’t require a perimeter wire. The mower relies on obstacles found on the property such as; rocks, trees, fences, concrete and asphalt, and others. The mower uses specially patented sensors to manage the mowing action; once the mower reaches a zone containing dry lawn or asphalt, it turns away and continues its course through uncut lawn. It will only cut your good grass – nothing else! The Spyder robot mower provides quality lawn mowing performance and merges simplicity with safety. This is the first robotic lawn mower of its kind to not require any setup whatsoever.

How to operate the Spyder LB1200?

The Spyder package includes the mower, a rechargeable lithium battery, a charging cable and the user’s manual. Once the robot is fully charged, all you need to do is grasp the two handles on the top of the robot lawn mower to settle it on your lawn, and press the “On” button on the top. As easy as 1-2-3.

What are the Spyder’s benefits and drawbacks?

The Spyder LB1200 is one of the simplest robots you’ll ever get. There is no time consuming installation; no wires to install around the perimeter of your property and no programming. It can manage slopes up to 27 degrees with its 4 wheel drive. The 18 pound (a little over 8 kilos) mower will perform on yards up to 5500 square feet. Bear in mind that this lawn mower does not have cliff sensors nor does it have a perimeter wire. If your property has a beautiful pond, creek, river or simply no obstacle to limit the mowers action, you might want to pass up on the Spyder LB1200 since it doesn’t come with swimming aids. You will find that other Lawnbott robot lawn mower models might better meet your needs. A final word The Spyder LB1200 is definitely a great and efficient product for busy home owner and for people simply wanting ot take full advantage of great summer weather. At around 1 000$, the Spyder is a smart choice when looking at some of the traditional lawn mowers out there starting at 600-700$ to a few thousand dollars. Oh, and labor is not included!

For more information on the Lawnbott Spyder LB1200 robot mower visit our product page

Should You Get a Robotic Vacuum Cleaner?

Posted on May 17th, 2012 in Household

Since the day robotic vacuums were introduced, household cleaning was changed forever. Due to their sleek design and advanced technology, people are hitting the market to purchase their own robot vacuum cleaner. But is the device worth it? Check out the most common reasons why you should consider getting your own robot vacuum cleaner.

Efficient

Let’s face it, cleaning is hard, nobody wants to do it and getting a maid doesn’t come cheap nowadays. With the robotic vacuum cleaner, you’ll get your living room, and any room for that matter, spic and span in no time. Its features are that of the regular upright vacuum, only better. The robotic vacuum has different accessories like brushes, filters, cleaning mechanisms, and more, all within a sturdy casing, ensuring the best operation possible.

Easy to Use

The robot vacuum is of course, automatic. It will work unattended; turn it on and let it do its thing. When you come back you’ll find the room sparkling clean. No special setup or configuration needed – just press the button, and the robotic vacuum will start cleaning without supervision. Some robotic vacuums go about the room randomly and may cover the same spot many times, while others are able to scan the room to detect obstacles and know to move around them, resulting in a more methodical approach. Most of these robots are able to recharge on their own if their battery power dips below a certain level; no need to worry about looking for it after it’s done cleaning. It would just be on its docking station waiting for you for its next scheduled assignment.

If there are areas you don’t want the robot to clean, each manufacturer has the equivalent of boundary markers; some use infrared light while others use special strips (magnetic or other). Some of the more intelligent robots are able to clean multiple rooms, stopping to recharge when needed and continuing where they left off. Don’t want the robot to move around when you’re at home? Not a problem. You can schedule the robot to clean at specific hours and (in certain cases) on specific days.

Compact

Most current robotic vacuums look like a flat, disk-shaped device. It’s flat so it can go under furniture and disk-shaped so it can turn easily, especially in corners. This design currently seems to be optimal, allowing it to reach all those places a normal vacuum can’t. There’s no need to move sofas, stools, and low-set tables. The vacuum’ disk-shape also allows it to go around furniture’s legs and wall corners effectively, cleaning as it goes. Most also feature a bumper to detect and absorb collision with a solid object.

Intelligent

The core technology used inside these robot vacuums is similar to what the army uses to clear land mines. Robotic vacuums contain a variety of different sensors to detect:
  • dirt (not only detect it but to clean that area until no more dirt is detected)
  • drops (like stairs for example)
  • path (it knows where it’s been)
  • charging base (it can sense where its base is and get there)
  • obstacles (either by lightly hitting them or detecting them at a distance)
  • battery usage
  • and more…

Affordable

Robots, just by their connotation, must be really expensive, right? Owning even one robot for personal use seems like a luxury. Well, not these ones. Believe it or not, iRobot’s Roomba ranges from CA $250 to CA $450. While the Infinuvo’s Cleanmate models start at CAD $170. The Neato, which scans a room even before it starts to clean, is less than $500. Mass production has made these intelligent vacuums as inexpensive as normal vacuums.

Upgradeable and Repairable

Worried that something so technologically advanced will break and cost a lot of money to fix? If you buy the vacuum from some retails, you would be right to be scared; however, if you buy from RobotShop, you get a lifetime warranty against failure! Although anyone can do the routine maintenance required to keep the robotic vacuum working (emptying the dust bin, replacing the brushes when they are too worn), some of the more complicated issues (“the robot is turning in a circle” or “it’s depressed”) are harder to resolve. Send the bot back to RobotShop and they’ll take care of it free of charge (assuming it was bought there).

We’ve all seen those garage sales where a lonely old vacuum lies off to one side being passed up by everyone. Unlike your standard upright vacuum, these can be upgraded with new software to make their cleaning patterns more efficient. Brushes and parts are modular and easily replaced. Want a brush that’s better suited for pet hair? Not a problem! Want a battery that lasts longer? They have those too! Want your robots to communicate with each other? That’s on the way…

Don’t be thrown off by “cheap knock offs”. As with all popular products, some manufacturers are entering the robotic vacuum market by trying to copy the leaders without any real understanding of the technology or software. These copies are often much lower quality than those that have been on the market for some time, and if they are ever broken, are almost always impossible to repair and not covered by a decent warranty. It’s better to pay a few dollars more for something you know can be fixed and is backed by an excellent warranty than trying to save a little only to end up with a disk-shaped paperweight.

If you buy a technological device from a non-technological company, servicing and repairs will be significantly harder than if you purchased from a specialized robotic company like RobotShop. You should also take a look at the warranty offered as this can differ significantly from company to company; a big incentive to buy from specialists is that even after a manufacturer’s warranty has run out, you may still be covered for many more years by the distributor you purchased from.

As with all technological devices, there may be a new type of robotic vacuum which comes out in a few years which includes a “must have” feature. However, since the release of the first mass market robotic vacuum, the shape and technology have not changed much. The most recent advancement has been a scanning laser which maps the room and is proprietary technology on the Neato. iRobot has released a physically smaller vacuum than previous models, but the basic technology is the same. It’s really up to you to choose the features you want most (self-charging base; room mapping; dirt detection; remote control etc.). These robots may be intelligent and advanced, but are robust enough to last a long time and perform reliably so long as you take care to empty the dust bins and periodically check the machine.

These are just some of the reasons that may urge you to get your own robotic vacuum cleaner. Just imagine the time you’ll save vacuuming your house’s entire floor area. You can do something else with all that time you should have spent cleaning. And in this fast changing world, time saved is definitely worth the price.

Arduino Microcontroller Feature Comparison

Posted on May 14th, 2012 in Latest News

Arduino Microcontroller Feature Comparison

Arduino is fast becoming one of the most popular microcontrollers used in robotics.There are many different types of Arduino microcontrollers which differ not only in design and features, but also in size and processing capabilities. In this article, you’ll understand the differences between the Arduino Microcontrollers (as of 2012). There are many features that are common to all Arduino boards, making them very versatile. All Arduino boards are based around the ATMEGA AVR series microcontrollers from ATMEL which feature both analog and digital pins. Arduino also created software which is compatible with all Arduino microcontrollers. The software, also called “Arduino”, can be used to program any of the Arduino microcontrollers by selecting them from a drop-down menu. Being open source, and based around C, Arduino users are not necessarily restricted to this software, and can use a variety of other software to program the microcontrollers. There are many additional manufacturers who use the open-source schematics provided by Arduino to make their own boards (either identical to the original, or with variations to add to the functionality). For example, the most popular board, the Diecimilla / Duemilanove (and now the Uno) has dozens of look-alike boards from other suppliers which differ slightly (different USB port, color etc) from the original.

Arduino Mini / Mini Lite

The smallest Arduino product is the Arduino Mini Light which is a 24-pin microcontroller without any connectors soldered. The unit features 8 analog pins and 14 digital pins. The module is based around the ATMEGA168 processor. The only different between the Arduino Mini and the Arduino Mini Light is that the Arduino Mini has pre-soldered pin headers. The Mini lineup will be changed and will likely include the new 32U4 processor.
  • Arduino Microcontroller Feature ComparisonMicrocontroller ATmega328
  • Operating Voltage 5V
  • Input Voltage 7-9 V
  • Digital I/O Pins 14 (of which 6 provide PWM output)
  • Analog Input Pins 8 (of which 4 are broken out onto pins)
  • DC Current per I/O Pin 40 mA
  • Flash Memory 32 KB (2 KB used by bootloader)
  • SRAM 2 KB
  • EEPROM 1KB
  • Clock Speed 16 MHz
The Mini and Mini lite are really intended to be used with breadboards. In order to program these, you need a separate USB to serial adapter.

Arduino Pro Mini 3.3V / Pro Mini 5V

The Arduino Pro Mini 8MHz and 16MHz are also breadboard mountable and are a bit longer than the Arduino Mini. The Pro Mini 8MHz operates on 3.3V while the 16Mhz operates at 5V. Both feature 6 analog I/O and 14 digital I/O. The manufacturer has marked the back of the PCB to indicate which is which.
  • Microcontroller ATmega328Arduino Microcontroller Feature Comparison
  • Operating Voltage 3.3V or 5V (depending on model)
  • Input Voltage 3.35 -12 V (3.3V model) or 5 – 12 V (5V model)
  • Digital I/O Pins 14 (of which 6 provide PWM output)
  • Analog Input Pins 6
  • DC Current per I/O Pin 40 mA
  • Flash Memory 16 KB (of which 2 KB used by bootloader)
  • SRAM 2 KB
  • EEPROM 1 KB
  • Clock Speed 8 MHz (3.3V model), 16 MHz (5V model)
The Pro is one of the fastest and smallest (and still one of the lightest) of the  boards.

Arduino Nano / Nano Lite

The last breadboard mountable Arduino is the Arduino Nano. This microcontroller distinguishes itself from the others by having the USB to serial chip and connector onboard. The Nano has 8 analog pins and 14 digital pins. There are the ISCP headers to re-flash the ATMega chip. There is also the Arduino Nano Lite which does not include the downward facing pin headers.
  • Microcontroller Atmel ATmega328Arduino Microcontroller Feature Comparison
  • Operating Voltage (logic level) 5 V
  • Input Voltage (recommended) 7-12 V
  • Input Voltage (limits) 6-20 V
  • Digital I/O Pins 14 (of which 6 provide PWM output)
  • Analog Input Pins 8
  • DC Current per I/O Pin 40 mA
  • Flash Memory 32 KB (2KB used by bootloader)
  • SRAM 2 KB
  • EEPROM 1 KB
The Nano was the first mini breadboard-compatible board to have onboard USB.

Arduino Fio

The Arduino Fio is a bit of a one-off board and is essentially an Arduino Mini with a built-in LiPo charger and XBee headers.
  • Microcontroller ATmega328P
  • Operating Voltage 3.3 V
  • Input Voltage 3.35-12 V
  • Digital I/O Pins 14 (of which 6 provide PWM output)
  • Analog Input Pins 8 (10 bit resolution)
  • DC Current per I/O Pin 40 mA
  • Flash Memory 32 KB (of which 2 KB used by bootloader)
  • SRAM 3.3 KB
  • EEPROM 1024 bytes
  • Clock Speed 8 MHz

Arduino LilyPad / Simple LilyPad

Next is the Arduino Lilypad. The Lilypad stands out from all other microcontrollers because of its round, purple PCB. The lilypad was originally intended to be sewn into clothing, though enthusiasts have found many other applications for it. If you’re cautious, the Lilypad can also be washed along with the clothing. The Lilypad requires as little as 2.7V to work.
  • Microcontroller ATmega168VArduino Microcontroller Feature Comparison or 328V
  • Operating Voltage 2.7-5.5 V
  • Input Voltage 2.7-5.5 V
  • Digital I/O Pins 14 (of which 6 provide PWM output)
  • Analog Input Pins 6
  • DC Current per I/O Pin 40 mA
  • Flash Memory 16 KB (of which 2 KB used by bootloader)
  • SRAM 1 KB
  • EEPROM 512 bytes
  • Clock Speed 8 MHz
The Lilypad is intended for use with clothing and fabric-related projects. There are many Lilypad accessories (LEDs, buzzers, sensors etc.) in the same format which can be connected via conductive fabric.

Arduino Leonardo

The next Arduino boards have the classic Arduino board shape and can’t be mounted on breadboards. The smallest in this line is the Arduino Leonardo. The Leonardo is available with or without shield stacking headers.
  • Microcontroller ATmega32U4 (onboard USB Transceiver)
  • Operating Voltage 5 V
  • Input Voltage 2.7-5.5 V
  • Digital I/O Pins 14 (of which 6 provide PWM output)
  • Analog Input Pins 12 (10 bit resolution)
  • DC Current per I/O Pin 40 mA
  • Flash Memory 32 KB (of which 2 KB used by bootloader)
  • SRAM 3.3 KB
  • EEPROM 1024 bytes
  • Clock Speed 16 MHz
The Leonardo is (currently) the newest Arduino to use the 32U4 chip and lowers the price of Arduino boards.

Arduino Pro 3.3V / Pro 5V

A very similar board to the Leonardo is the Arduino Pro. Some of the advantages to this board are its operating voltage range, which is 3.3 to 12V, its smaller footprint and lighter weight. The Pro doesn’t come with pin headers and although it’s smaller than other Arduino boards, it’s still compatible with Arduino shields.Arduino Microcontroller Feature Comparison
  • Microcontroller ATmega168
  • Operating Voltage 3.3V
  • Input Voltage 3.35 -12 V
  • Digital I/O Pins 14 (of which 6 provide PWM output)
  • Analog Input Pins 6
  • DC Current per I/O Pin 40 mA
  • Flash Memory 16 KB (of which 2 KB used by bootloader)
  • SRAM 1 KB
  • EEPROM 512 bytes
  • Clock Speed 8 MHz

Arduino Diecimilla / Duemilanove / Uno

Next is the most popular of the Arduino microcontrollers; the Uno. The Uno has almost the same appearance as its predecessor, the Duemilanove, but uses an ATMega8 for USB to serial conversion. The Duemilanove was previously the Diecimilla which had a less powerful ATMega168 chip. These boards come pre-assembled and ready to use. The Duemilanove is based around the ATMEGA328 chip while the Diecimilla used the ATMEGA128.
  • Microcontroller ATmega168Arduino Microcontroller Feature Comparison or 328
  • Operating Voltage 5V
  • Input Voltage (recommended) 7-12V
  • Input Voltage (limits) 6-20V
  • Digital I/O Pins 14 (of which 6 provide PWM output)
  • Analog Input Pins 6
  • DC Current per I/O Pin 40 mA
  • DC Current for 3.3V Pin 50 mA
  • Flash Memory 16 KB (ATmega168) or 32 KB (ATmega328)
  • of which 2 KB used by bootloader
On one side of the board there are 14 digital input/output pins as well as a ground pin and a reference pin which acts as voltage reference for the analog pins. Pin zero doubles as serial input, and pin 1 doubles for serial output. On the other side of the board, you’ll find 6 analog pins, as well as a voltage input pin, two ground pins and a reset pin. The board also has both a 3.3V and 5V output pins. You can power the board any of three ways: directly via the USB port, using the power connector, or the Vin and ground pins. The ATMEGA chip is removable from the board. This is especially useful if you have fried the processor and need to replace it, or you can use the board alone as a USB to serial interface. R3 of the Uno adds two new pins on the digital side: SDA and SCL

Arduino Ethernet / Ethernet PoE

The Arduino Ethernet is essentially a normal Arduino Uno where the ATMega8 chip and USB plug are changed for an Ethernet port. The PoE (power over ethernet) version means you don’t need a separate power supply (wall adapter for example), although your router must also be PoE compatible. A similar setup can be done using a standard shield-compatible Arduino and an Ethernet shield.
  • Microcontroller ATmega328
  • Operating Voltage 5 V
  • Input Voltage 7-12 V (36 to 57V PoE)
  • Digital I/O Pins 10* (of which 6 provide PWM output)
  • Analog Input Pins 6 (10 bit resolution)
  • DC Current per I/O Pin 40 mA
  • Flash Memory 32 KB (of which 2 KB used by bootloader)
  • SRAM 3.3 KB
  • EEPROM 1024 bytes
  • Clock Speed 16 MHz
*In order to use the Ethernet, pins 10 to 13 are reserved.

Arduino Bluetooth

Next on the list is the Arduino Bluetooth. The layout of the board is identical to that of the Duemilanove, but with one big difference: the Arduino Bluetooth board replaces the USB plug with a Bluetooth module, meaning you program it remotely. Take note that the board has different power requirements than the Duemilanove and doesn’t have a 3.3V output pin. The 9V output pin indicated on the board is not actually functional.
  • Microcontroller ATmega328Arduino Microcontroller Feature Comparison
  • Operating Voltage 5V
  • Input Voltage 1.2-5.5 V
  • Digital I/O Pins 14 (of which 6 provide PWM output)
  • Analog Input Pins 8 (4 are broken out onto pins)
  • DC Current per I/O Pin 40 mA
  • Flash Memory 16 KB (of which 2 KB used by bootloader)
  • SRAM 2 KB
  • EEPROM 51 KB
  • Clock Speed 16 MHz
 

Arduino Mega 1280 / 2560

The most recent addition to the Arduino lineup is the Arduino MEGA. This board is physically larger than all the other boards and offers significantly more digital and analog pins. The MEGA uses a different processor allowing greater program size and more.
  • Microcontroller ATmega1280Arduino Microcontroller Feature Comparison or 2560
  • Operating Voltage 5V
  • Input Voltage (recommended) 7-12V
  • Input Voltage (limits) 6-20V
  • Digital I/O Pins 54 (of which 14 provide PWM output)
  • Analog Input Pins 16
  • DC Current per I/O Pin 40 mA
  • DC Current for 3.3V Pin 50 mA
  • Flash Memory 128 KB or 256KB
  • SRAM 8 KB
  • EEPROM 4 KB
  • Clock Speed 16 MHz

Arduino Mega ADK

The Arduino ADK is intended to connect to Google Android based devices. Note that a cell phone will attempt to draw power from the board (often more than a USB connected to a computer can supply); an external battery or wall adapter is highly suggested.
  • Microcontroller ATmega1280 or 2560
  • Operating Voltage 5V
  • Input Voltage (recommended) 7-12V
  • Input Voltage (limits) 6-20V
  • Digital I/O Pins 54 (of which 14 provide PWM output)
  • Analog Input Pins 16
  • DC Current per I/O Pin 40 mA
  • DC Current for 3.3V Pin 50 mA
  • Flash Memory 128 KB or 256KB
  • SRAM 8 KB
  • EEPROM 4 KB
  • Clock Speed 16 MHz
  Arduino is open source; you are free to download the schematics and programming software and develop them as you wish. If you want to market your new design as an Arduino however, there is an approval process. For more information about the Arduino microcontrollers, different variants and accessories, click here.

RobotShop Rover for Arduino: Package Contents

Posted on May 9th, 2012 in Latest News, Robotics Projects

This article is a follow-up to the RobotShop Grand Tutorial Series and includes all the hardware chosen in the “Practical Example” at the bottom of each lesson. The RobotShop Rover for Arduino is a small tracked platform designed around the popular Arduino USB microcontroller.

RobotShop Rover for Arduino: Package Contents

The first product that one might look for after having received the package is the frame. The RobotShop Rover for Arduino aluminum frame (RB-Rbo-11) is powder coated a deep blue and comes with a variety of different mounting hardware used to complete the kit. Aside from standard washers, nuts, and rivets, the hardware also includes a 9V battery clip and leads. On its own, the RobotShop Rover for Arduino frame doesn’t do much, so in order to make a functional tracked mobile robot, you would additional parts.

There are two Solarbotics GM9 gear motors included with the kit capable of up to 66rpm and a maximum of 3kg-cm of torque. These are not the fastest of motors but do allow the robot to carry additional payload. The Standard GM Track Kit  includes all the links and pins you need to make two tracks, as well as two drive sprockets and two idler sprockets. To hold the idler sprockets in place, the kit comes with two Shoulder Bolts with matching washer and nut. Next a standard AA battery holder  holds four AA batteries which power the drive motors and servos.

All the parts listed so far are included with the RobotShop Rover for Arduino Tank Kit (RB-Rbo-13). The RobotShop Rover Tank Kit is ideal if you already have your own Arduino microcontroller or want to use your own parts to complete the robot. In order to make a fully functional robot however, you need additional electronics, starting with a microcontroller.

The Arduino USB Microcontroller is essentially the brain of the RobotShop Rover and includes an ATMega328 processor already installed. To connect the board to your computer, the RobotShop Rover Complete Kit comes with a 6 foot USB cable.

The Arduino board can’t produce a high current, which is why a 5 Amp Low Voltage Dual Serial Motor Controller (RB-Pol-16) is included to power both drive motors. You may notice the pin headers are not soldered onto the board – this allows you to mount it horizontally or vertically, or even solder wires directly to the controller.

At this point you have all the essential parts you need to make a mobile robot, but you may find connections are not easy. To help you easily connect electronics and wires, the kit includes three mini solderless breadboards, a pre-formed jumper wire kit and 25 feet of 22 gauge hook-up wire. The extra wire is used mainly to connect the motors. There are also two mini power switches included whose pins are spaced perfectly for breadboards.

One very attractive aspect to the RobotShop Rover for Arduino is that there is a slot at the front for a standard sized servo. The RobotShop Rover Complete Kit therefore includes a Lynxmotion pan and tilt system with two Hitec HS-422 servo motors. If you have only received the Tank Kit, you are free to add a Hitec HS-422 servo to create a pan system. To complete the kit, the popular Sharp GP2D120 infrared range sensor and associated Sharp IR cable are included to give the robot feedback about its environment.

Arduino 5 Minute Tutorials: Lesson 7 – Accelerometers, Gyros, IMUs

Posted on May 2nd, 2012 in Microcontrollers, Sensors

Lessons Menu:

Lesson 7 Hardware:

  1. Computer / Laptop or Netbook
  2. Arduino Microcontroller
  3. USB to Serial Adapter (if your microcontroller does not have a USB port)
  4. Appropriate USB cable (Arduino boards draw power from the USB port – no batteries yet)
  5. Analog accelerometer, gyroscope and/or IMU
  6. Connectors (between the IMU and the Arduino

Accelerometers, gyroscopes and IMUs are incredibly useful little sensors which are being integrated more and more into the electronics devices around us. These sensors are used in cell phones, gaming consoles such as the Wii wireless remote control, toys, self-balancing robots, motion capture suits and more. Accelerometers are used mainly to measure acceleration and tilt, gyroscopes are used to measure angular velocity and orientation and IMUs (which combine both accelerometers and gyroscopes) are used to give a complete understanding of a device’s acceleration, speed, position, orientation and more. Arduino 5 Minute Tutorials When choosing an accelerometer, gyroscope or IMU, it is also important to consider the type of output; depending on the type of sensor, readings can be output as:
  • Serial data (Tx pin)
  • I2C (SDA, SCL)
  • Analog
  • TTL
  • others…
In this tutorial we’re only going to cover analog output. The code shown below includes the output for a single axis sensor and factors in the rest value.

Arduino 5 Minute Tutorials

Accelerometer

Accelerometers measure acceleration in one to three linear axes (x, y, z). A single axis accelerometer can measure acceleration in whichever direction it is pointed. This may be good for a rocket, an impact, a train or other scenario where the device really moves in one basic direction. Knowing the acceleration and time, you can use mathematics to find the distance traveled by the object. There are fewer and fewer single and double axis accelerometers on the market because a triple axis accelerometer can do so much more. Thanks to low manufacturing costs the three axes accelerometers are not much more expensive than single or double.

Acceleration due to gravity is a constant and is in fact measurable using an accelerometer. When placed parallel to the ground, acceleration due to gravity would only be “felt” by one axis. However, when tilted, this acceleration would appear as components of two (or three) axes. You can get an idea of how to use an accelerometer to measure tilt here and here.

Connect the accelerometer to the Arduino; each output pin goes to one of the analog pins on the Arduino, the Vin pin goes to the 5V pin on the Arduino (read the user guide to ensure the Vin pin is 5V as opposed to 3.3V), and connect the GND pin to the GND pin on the Arduino. Note that there is no need for additional electronics! Next, open the sample sketch File -> Examples -> Sensors -> ADXL3xx. Upload to the Arduino and see the values change.

In order to choose the right accelerometer, consider the maximum linear acceleration the sensor will be subjected to. If you are planning to add an accelerometer to a small mobile robot, you will likely use a 2g accelerometer (even that is likely overkill), whereas if you are attaching it to a rocket, a 16g accelerometer is likely a better choice. When connected to a 10 bit ADC, the 2g accelerometer will have an accuracy of 2 / 1024 = 0.002g, and the 16g accelerometer will have and accuracy of 16 / 1024 = 0.0156. Therefore if you only need a range of 2g, but purchase a 16g accelerometer, you will only have about 128 possible readings, instead of the full 1024. Conversely, if you choose a 2g accelerometer when you really needed a 16g, you will get a lot of “maximum (1024) “readings since the acceleration is “off the scale”.

Gyroscope

Gyroscopes measure angular velocity in α, β, γ (see image below). Gyroscopes can be used to help with stabilization and well as changes in direction and orientation. Unlike accelerometers, gyroscopes do not have a fixed reference, and only measure changes. To choose the right gyroscope for your needs, consider the maximum angular rate of change (degrees per second) your product will be subjected to. A remote control will likely rotate at less than 1 rotation per minute (360 degrees per second), while a rocket tumbling out of the sky may be rotating at 1500 degrees per second. When connected to the same microcontroller (10 bit for example), the 360 degree/s gyro will have an accuracy of 360 / 1024 = 0.35 deg/s, whereas the 1500 deg/s gyro will have an accuracy of 1500 / 1024 = 1.46 deg/s. Therefore if you chose a 1500 deg/s gyro when you only needed a 360 deg/s gyro, you will only get about 245 readings as opposed to 1024.

Courtesy: Wikipedia

IMU

An IMU (Inertial Measurement Unit) usually consists of an accelerometer and gyroscope and is used to measures an object’s orientation, velocity etc. Often additional sensors (magnetic, temperature) are included to improve accuracy. The number of “degrees of freedom” indicates the number of different axes measured by the chip. For example, combining a three axis accelerometer with a two axis gyroscope would be consider a 3+2 = 5 DoF IMU.

Additional Considerations

When using accelerometers, gyroscopes or inertial measurement units (IMUs) to obtain positions in space, it is important to note that there are several additional factors that will affect the readings, the main obstacle being the sampling rate. Microcontrollers require a certain amount of time to read values being provided to them by the sensor, and because of this, the values between these readings are lost. There are several mathematical methods (a Kalman filter being a popular choice) that attempt to compensate for this. A second source of error is that readings are often affected by fluctuations in temperature. Most datasheets associated with micro-electro-mechanical systems (MEMS) attempt to describe how temperature affects the output.

Want to learn more? Start with the material put out for free by Analog Devices, makes or many MEMS acceleromters, gyroscopes and other sensors.

Subscribe to the RobotShop Blogs RSS feed!

Enter your email address: