HC-06 Bluetooth module datasheet and configuration with Arduino

In a previous post I shared my notes on  how to connect an Arduino to an Android phone using the the popular and cheap HC-06 Bluetooth module. In that example I used the Bluetooth module with its default settings. That works fine, but some applications may require changing the communication speed (Baud rate), the pairing code, the module name etc. For example, I am trying to set-up a way to program my Arduino Uno and Arduino Pro Mini wirelessly, over Bluetooth. This requires changing the baud rate of the module from the default 9600 to 115200,…continue reading →

Arduino program / sketch upload speeds

I am working on circuit that will allow me to program my Arduino boards (I have an Arduino Uno and a couple of Arduino Pro Minis) over a wireless Bluetooth connection. I am planning to use my cheap and easy to find HC-06 Bluetooth module  for this. One of the first thing to figure out is the baud rate that the Arduino IDE uses, when uploading the sketches to the various Arduino boards. I need to make sure that my HC-06 Bluetooth module is configured to communicate at the same rate, so the avrdude stays happy. I…continue reading →

Free Arduino reference guide

Erik Verberne teaches Information and Communication Technology (ICT) in Netherlands and looked into the Arduino platform in an attempt to enhance his department's curriculum. He diligently documented his research and is now sharing it with the community. The result is an e-book of over 200 pages full of examples and tutorials, from Arduino and ATTiny programming tips, to working with LCD and LED displays, playing sounds, detecting obstacles, wireless communication via IR and Bluetooth and much more. See the official thread in the Arduino forum for the latest update and a copy of…continue reading →

Play simple melodies with an Arduino and a piezo buzzer

https://www.youtube.com/watch?v=RVyLqXz-xvU Piezo buzzer background Piezo buzzers are simple devices that are commonly used to produce beeps and sounds in many electronic gadgets, like alarm clocks, toys, pc boards, etc. They consume very little current and have high impedance, which means that you can safely connect them directly to a micro-controller pin. Buzzers have a piezoelectric ceramic plate that generates electricity when a mechanical force is applied to it and vibrates (extend and shrink) when exposed to an electric field. The first property is often used to detect knocks and musical tones, while the…continue reading →

Shift registers: add more digital I/O to your Arduino

Shift registers are useful chips that can add more outputs or inputs to your micro-controller. The 74HC595, for example, provides 8 additional digital outputs that can be controlled with only 3 Arduino pins. Additionally, you can “daisy-chain” multiple shift registers to multiply the number of outputs even further.Below is a great video by Kevin Darrah explaining how shift registers actually work. He took an interesting approach demonstrating the functionality of the shift register using manual input via push buttons, rather than a micro-controller. (more…)

An Arduino self-balancing robot: working prototype

I spent some time reading on accelerometers, gyros, sensor fusion, PID, optimized PWM motor control. I tinkered with the components I have for a while and then procrastinated for even longer. Finally, I can say that I have a prototype of a self balancing bot that shows promise.http://www.youtube.com/watch?v=oK_kQzm8P8MMore fine-tuning is needed, and I plan to add a Bluetooth module to get PID controller data wirelessly, possibly to adjust the PID coefficients in real time and, hopefully to steer the bot remotely someday. (more…)

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. (more…)

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.https://www.youtube.com/watch?v=831qjVX6YLA(more…)