Sunday, February 26, 2012

Bluetooth

Wow I had no idea what I was getting into when I decided that I wanted to use a PS3 Controller to drive this thing around.  I still have no idea what I'm doing, but a few articles that have definitely shed some light on the subject are:

  • Arduino Serial Interface
    • The bluetooth bee is connected to the Rx/Tx pins of the Arduino Fio, so the serial interface is what's used to communicate with it.
  • Bluetooth HID Spec
    • Human Interface Device Profile (HID) is what the PS3 controller uses as a protocol.
  • Bluetooth Bee Wiki
    • Contains a list of valid commands that can be sent to the bluetooth bee in order to set it up.  note: the default pin is 0000
  • Overall Explanation
    • Found this to be a bit useful, although I am still utterly confused.  
I will report back when I have even the slightest understanding of WTF I am talking about.

Edit:

Been reading for a while now, and frankly it's looking like it is no small task to use the PS3 controller.  That said there seems to be a fair bit of community support for wii remotes.  I may have to change my spec to use one of those instead.

Arduino Wiimote Library

Edit 2:

Best complete PS3 BT code found yet. 

Friday, February 24, 2012

/Cheer

Ok, so I got a Servo running!  yay.

For the record, it does work on any of the pins, not just the PWM lines.

Tested using the sweep script and the servo library from the Arduino site.

(quick note about this pic... the power and the signal wires coming from the servo are reversed... oops.)

Let the cardboard prototyping begin:


Thursday, February 23, 2012

Servos

So I popped by the local hobby shop and told them a bit about what I was doing.  They unfortunately didn't have a lead on any small cheap servos.  I figure I can go pretty cheap (sub $10) on these servos because the actual weight load and accuracy requirements are pretty minimal.  They did however think it was a pretty cool project and gave me a Server to test with for free.  Thanks!


Next step is to get an actual program running on the Arduino that can cause the servo to move.  As well as finding out if I need to be using a PWM pin out from the board, or if I can just use one of the regular digital I/O pins.

I'm thinking about sourcing the HXT900 ($5.85 > $81.90) from SolarRobotics.  It has fairly good reviews for being so cheap.  Other options are the Dagu Micro ($4.57 > $63.98) or the DFRobot Micro ($3.60 > $50.40) from Robot Shop.

I may just order one of each to test.  We shall see.

Components Arrived

Components arrived from Robot Shop today.


Overall, extremely happy.  They even showed up a day earlier than quoted.  YAY!

Now to source those silly servos.

Tuesday, February 21, 2012

Components

A few things came up yesterday as I was trying to source components.

The first thing I realized was that in order to get the legs to move much more realistically I will need 3 servos per leg.  Which comes out to 18 servos for the legs and 2 for the body.  Well the Arduino boards I like all only have 14 digital I/O pins.  So this poses a bit of a problem.  My first thought is to use a demux to give me more outputs.  Indeed this seems to be a viable option, the Arduino site has an article on using a 4051 Analog Multiplexer/Demultiplexer.  But to keep this project as simple as possible I'm just going to use 2 Servos per leg, with the addition of 2 for the body, that puts me at 14, which should work out perfectly.  Note that I'm still not sure if I need to be using the PWM lines only for driving the servos.  If this is the case, I will need to get 2 x 4051s and use PWM lines as the signal input.

The other major thing that came up yesterday was trying to buy the components.  I'm located in Canada so sourcing was getting to be a bit of a pain.  I first tried to order directly from sparkfun, but when the checkout screen got to the shipping options, I saw that shipping was going to cost me 50% of the cost of my order.  That in addition to the duties on the import was not looking very cost effective.  To resolve this I started looking for Canadian companies that sell Arduinos.  I managed to find a company located in Calgary called Solarbotics.  Their prices seem reasonable to me, as does their shipping.  The biggest problem here is actually that they don't sell the Arduino Fio that I wanted to buy.  So now I'll have to come up with a new parts list and try to find another way to skin the cat.

The design I'm now considering will use an Arduino Pro Mini as the primary micro controller.  In conjunction with the SparkFun Bluetooth Mate, I should be able to get similar functionality.  The one thing I can see still having to add is a charging circuit, of which I know nothing about yet.

Edit:

Ok so I found a site with reasonable shipping, no duties and everything I needed.  Ordered from robotshop, I picked up an Arduino FioFTDI Basic Breakout - 3.3VDFRobot Bluetooth Bee, and a Polymer Lithium Ion Batteries - 3.7V 860mAh.  Grand total after tax and shipping: $105.

Monday, February 20, 2012

Defiler

So prior to deciding to start this project I had recently bought a defiler.  This will be pretty handy for measuring components.  I just took a couple of photos of it partially assembled with a ruler next to it to get an idea of it's size.

Torso   
Width : 2.5cm - 3.5cm
Length : 6.2cm
Height : Odd shape, wide portion is 0.5cm
Space in a 2x2cm box on the top


I will likely make up a couple of paper / cardboard templates to work with.  I think it will probably help with picking the right servos.


Trochanter : 1cm ball
Femur : 3.5cm
Tibia : 4.5cm
Tarsus : 2.5cm
Width : ~1cm

Sunday, February 19, 2012

First Project

So I'm thinking that for my first project, what I'd like to do is create a Hexapod.  They have the wonderful property of being extremely stable, this alleviates a lot of potential problems for my first go.  The largest downside I can foresee is their complexity.  With 2 servos per leg, and 6 legs, it will be a challenging first.

My thought is to create a bot that I can skin to look like a Warhammer 40k Chaos Space Marine Defiler.



I think I can do this by sticking to some fairly small Servos and using an actual Defiler model as the structure.  I'd like to be able to walk it around a Warhammer game table and aim it's turrets.  To control it, I'd like to use a Sony Dualshock 3 Wireless Controller.  Having the ability easily control the bot is pretty essential.  Failing this I'd like to be able to control the bot via my android phone.  Either way the method of wireless communication is going to be Bluetooth.

I spent some time doing some research today and I believe that I'd like to use an Arduino as the micro-controller.  More specifically the Arduino Fio seems to be a good choice as it has USB charging capabilities, as well as pin outs for XBee wireless modules.  The board has 14 digital outs, 6 of which provide PWM.  To program the board I'll need to pick up an FTDI Basic Breakout board, the 3.3v version, not the 5v.  The final piece for the control circuit is the XBee board, however from what I've seen, none of them are actually Bluetooth capable.  In its place I plan to pick up a Bluetooth Bee HC-05 this should be plug and play with the Arduino Fio, but I can't be sure.

The next step is going to be to checkout some Servos.  Unfortunately I know nothing about these yet either.  I'm going to go to a couple of local hobbie shops and ask around.


Introduction

First blog post of my first blog.  Step 1

So today I watched this TEDx talk


It really got me thinking about what I'd like to do in life.  I've always had a real passion for building electro mechanical things.  The only real issue has been the excuses I've laid out for myself.  Well, enough of that, time to build.

The primary purpose of this blog is going to be to keep an account of everything I learn as I struggle through creating, what I consider to be, fun robotic projects.  I simply figure that if I keep a blog about it I will be able to reference back to why I chose to do things a certain way, and who knows, maybe someone else will learn something from my mistakes.