Arduino Uno and the InvenSense MPU6050 6DOF IMU

A while back I bought the InvenSense MPU-6050 sensor in a “GY-521” breakout board from eBay. For a long time it sat quietly in my box of “possibly cool things to check in the future”. Recently, I decided to finally get to building a self-balancing robot and dug it out. As with almost anything from eBay, it came with no documentation. The MPU-6050 breakout boards are quite popular in the Arduino community and information was easy to find. Even too easy: it took me a while to sift through many partial, or “almost” working implementations before I found a relatively easy to use, clean and reliable set of instructions and Arduino sample code. So here it is documented for future reference! MPU-6050 Overview According to the InvenSense MPU-6050 datasheet, this chip contains a 3-axis gyroscope and a 3-axis accelerometer. This makes it a “6 degrees of freedom inertial measurement unit” or 6DOF IMU, for short. Other features include a built in 16-bit analog to digital conversion on each channel and a proprietary Digital Motion Processor™ (DMP) unit. ...

March 28, 2014 · 27 min · 5748 words · Stan

28BYJ-48 Stepper Motor with ULN2003 driver and Arduino Uno

First, lets see the little steppers in action! Our main character, StepperBot, is “instructed” to move in a square path on my coffee table, making 90 degree turns at the corners. Turning exactly at the right time and by the right angle is critical avoid falling off and crashing on the floor in an embarrassing pile of messy wires. ...

March 2, 2014 · 26 min · 5330 words · Stan

Using Bluetooth and an Android phone for debugging Arduino sketches

I bought a Bluetooth module a few months ago and never really tried to use it because in my mind it would be another module that would require hours digging the internet to find libraries, and some code sample to get me started. Only after reading Stan’s post about Bluetooth modules I realized how easy is to get them working and how useful they can be to troubleshoot projects that require movement (like robots). Bluetooth basically makes your serial port wireless and open a whole new set of possibilities with two way communication between your Arduino and a Bluetooth enabled device. See more on the video below… Arduino – Robot troubleshooting with Bluetooth module

February 9, 2014 · 1 min · 114 words · Wagner

Arduino robot controlled from an Android phone via Bluetooth

Project overview This is a differential steering robot that can be controlled from an Android phone via Bluetooth. The robot’s “brain” is Arduino Uno compatible board (an “Arduino on a breadboard”). The robot uses a JY-MCU Bluetooth module for communication with the Android phone. A custom Android app, created with the MIT App Inventor 2 essentially acts as a remote control, sending commands to the Arduino that tell the robot to move forward, reverse, stop or rotate. ...

January 26, 2014 · 9 min · 1706 words · Stan

Simple Android apps with App Inventor

App Inventor provides a fast and easy way to build simple apps for Android phones and tablets. It is targeted primarily at those of us with limited, or no experience in Android development. App Inventor has a fairly intuitive graphical interface, where you first visually design the application screen and then add the logic by dragging and dropping a series of colour-coded code “blocks” that snap together with a satisfying click, when connected correctly. ...

January 23, 2014 · 4 min · 708 words · Stan

“Betamax” Quadcopter test flight video

Today I tested my first ever quadcopter, built as part of a recent workshop at the Vancouver Hackspace (VHS) . My initial test flight lasted a whopping 10 seconds and ended with a spectacular crash on the concrete parking lot in front of VHS, ...

January 20, 2014 · 2 min · 345 words · Stan

Differential drive with continuous rotation servos and Arduino

Purpose: Create a simple and easy to control drive system for a small robot with minimal number of parts and connections. ...

January 14, 2014 · 7 min · 1347 words · Stan

Programming ATtiny84 / ATTiny44 with Arduino Uno

My order of ATTiny84 chips from Mouser arrived yesterday, so it is time to load the Arduino Blink example sketch onto it. I made a small line follower using the ATTiny85 a while back, and quite liked the idea of having a smaller, cheaper IC that can run simpler Arduino sketches. The ATTiny84 comes with extra 6 I/O pins (see datasheet), so it should be an even better replacement of an Arduino for smaller projects. Here is a beautifully rendered mapping of the ATTiny84 / ATTiny44 pins courtesy of Alberto (PighiXXX): ...

January 4, 2014 · 8 min · 1586 words · Stan

Connecting Arduino Uno and the JY-MCU Bluetooth module using SoftwareSerial

My previous post covers the basics of setting up a Bluetooth connection between an Arduino Uno and an Android phone using the JY-MCU Bluetooth module. We connected the JY-MCU Bluetooth module to the Arduino via a serial connection on (digital) pins 0 (rx) and 1 (tx). This uses Arduino’s built in hardware support for serial communication (via something called UART) and requires no additional libraries. The Arduino has a 64 byte serial buffer and can receive and store data in it, while executing other tasks in your program. For some great examples of using serial communication, as well as wealth of other Arduino related info see Nick Gammon’s web-site. There are a couple of downsides of this set-up for Bluetooth connectivity: ...

December 31, 2013 · 6 min · 1219 words · Stan

How to connect an Arduino Uno to an Android phone via Bluetooth

The purpose of this tutorial is to cover the basics of setting up a connection between Arduino Uno and an Android phone via Bluetooth. Smart phones pack a ton of cool features (camera, accelerators, speakers, microphone, a nice screen to show data from your sensors, wi-fi adaptor…) that will make an excellent addition to a robot, or any other Arduino project. I will use Blueterm a basic free Android terminal emulator app to send a single digit (zero or one) from a phone to a BlueTooth module connected to the Arduino Uno via a serial connection. The Arduino Uno will read the data and will turn an LED on, or off accordingly. After that it will send a status message back, which will be displayed on the phone’s screen. This will essentially confirm we have a two way communication between the Arduino and the Android phone over Bluetooth. The same approach can be used to interact with anything connected to your Arduino (like motors, servos and sensors) or the cool goodies in your smartphone (camera, accelerometer etc.). So let’s get stared! ...

December 27, 2013 · 21 min · 4294 words · Stan