Jan 15, 2012

Arduino Bluetooth Link


In a previous Arduino project, I used the BlueSmirf Bluetooth Breakout Board to communicate with my Android phone. There was absolutely no special code on the Arduino to handle Bluetooth since, by default, the BlueSmirf is set as Slave and will accept any connection call. The phone app was doing all the work.

The next logical step was to use the BlueSmirf interface by programming the Arduino. Using a second Bluetooth board, I decided to create a link between two autonomous Arduinos. To make things interesting, I've set a couple of rules for the project. I wanted to heave the same code on both Arduinos and have the whole connection process be automatic. I also wanted the Master device to scan for other devices, retrieve the MAC address, connect and send data.  Here's the video of the final result:



My biggest issue started with the Sparkfun proto shield for Arduino. It has a built-in socket for their Bluesmirf device. Nice marketing move! This socket is hardwired to use the Arduino pins 0 and 1 for communications. It all looks good until you need to use it in the real world. Here are the pros and cons:

Pros:

  • No wiring needed to connect the Bluesmirf board.
  • No extra library needed to do serial communications.

Cons:

  • You must remove the Bluesmirf breakout board every time you need to plug the Arduino board in the computer. Why? Because of the hardwired Bluesmirf socket the Arduino board communications are mixed with the Bluesmirf interface.
  • Another consequence of the previous problem: You can't used the USB serial output to the computer to send debug info. That is really annoying when debugging your project.
  • The power is always ON for the Bluesmirf.

I'll fix this by using different pins for the Bluetooth communication using the NewSoftSerial library. I will also modify the Sparkfun Bluesmirf socket to use any communication pins and to have control on the power usage.

For more details continue reading after the break. (Warning! Geeky stuff about code and electronics)


Nov 22, 2011

Infrared on the cheap

When you make mobile robots, infrared detectors are a must. Here's a nice specimen taken in the Internet wilderness:


The problem is the cost. Starting at $13.95 US plus tax, plus shipping from Mars and the retarded Canadian border fees... in the end, it's to much. Not only that! It takes two weeks to come here. Two week! Are they using camels? I'm living in Quebec city, it's not that small, we even have asphalt and electricity.

Deep breath

Anyway for about $2.50 you can make the 'same' thing at home with these components:
  • Detector $1.95
  • Light $0.32
  • Resistor (220 ohms) ~$0.15
  • Bit of PCB board ~$0.01



Long live DIY

AMD's backyard

Blackberry is not the only company having a bad year, AMD is also having hiccups.


A tile just fell on AMD. It just canceled the production of the 28nm Bobcat processor. This news by itself is extremely bad for the company but this is not the only tile. In fact maybe the entire roof is caving in.

Around October AMD released is new Bulldozer chip. It was supposed to be their flag ship unlike the Bobcat which targets the mobile platform. A basic design decision in the Bulldozer chip makes it less effective.

During that time, on the server front, AMD is trying to push the use of its Fusion-Cloud (sadly based on the Bulldozer core). That effort is taking off like a concrete rocket while ARM based servers are in orbit. Yes, ARM, not in portable devices but in servers. They teamed up with Calxeda and mighty HP to start a new server technology.


While ARM is on the subject. AMD is not going anywhere on the mobile front either. Guess what's in your iPhone, Nexus, Galaxy or Blackberry? ARM of course.

C'mon AMD, get up and fight.

Trans-App / a bleep on the radar


A Facebook phone build on a mix of Android software & hardware optimize for Facebook-type features. Could this be the first real Trans-Application device? Like I mention in this original Trans-App post, the idea that devices would have to adapt to applications needs could become a reality.

To clarify the concept of Trans-Application I should say that Trans-App devices must be designed around constraints dictated by two or more applications. If this new Android-Facebook phone supports more than Facebook, it's well on its way to be a Trans-App device.

Why is this important? Because nobody will want to carry a Facebook phone and a LinkedIn phone and a Google Wallet phone. We want things to be integrated into one device. And while we're at it we want that device to fit in our pocket and have an 8 inch screen and.. um.. you know what I mean 'cause you want it too.

Purchase may soon be driven by the preference of devices optimizing the user experience of the favorite applications. Not by the OS. Not by the Browser. Not by the hardware brand.

Nov 13, 2011

Sunday night with Bluetooth

What do you do after installing your Christmas lights? Build a robot of course!


This projects started with a modified version of the Boe-Bot on which I added big dirt wheels scavenged from a dead RC car. The simple structure on top is made with my usual LEGO spider-legs system supporting the Arduino and its proto shield. I'm using the Sparfun proto shield since it has a build-in connector for the BlueSmirf Bluetooth breakout board and.. it's red. I also use two power supplies to separate the servos from the rest of the electronics.

Software wise, I used the Sena BTerm app to do some direct communication with the Bluetooth device. This app was very practical since it enabled me to only code on the Arduino side. This made prototyping very fast. The only real work began when I had to make the real Android app using Bluetooth. For that I hacked Google's BluetoothChat demo and after a short time I was using buttons and sliders to communicate with my Arduino. Why was that work? Eclipse...


A great advantage of using an Android device as the communication platform is the real-time outputs. This is very nice when debugging since you don't have to be tether with the laptop.

Edit 1: I later created an Arduino to Arduino link with bluetooth.

Edit 2: Here is similar code a later used for the minirccar