Showing posts with label Robot. Show all posts
Showing posts with label Robot. Show all posts

Wednesday, 23 January 2013

Hexy

Ok, I know I said I was going to update the Mobile Pi project to have speed control..but .. my Hexy finally arrived :)
What is a Hexy? Well it is a Hexapod robot kit by ArcBotics.. I backed thier Kickstarter project last year, and after a few delays the kit arrived.

Hexy as was delivered.
So, step one.. open box and unpack..
Straight out of the box.
The kit came pretty complete, with a spare servo, parts for a spare leg, and even a screw driver to put it together with. Although the screww driver was small and not very useful.. I used one of my own.
The laser-cut acrylic parts came with protective paper on, which taking off was the most tedious part of putting the Hexy together. Also some acrilic parts needed a little trimming.

Now I could write about the whole building process, but better than that, here is a time-lapse video of a guy called Rob Cook building his (hats off to him for a very well created video)

Unfortunately, I didn't have a trouble free time with my Hexy. First I broke one part of a leg, but as they supplied an extra leg, I was able to replace this :) Second, one of the servos didn't work, but again they supplied an extra servo, so was able to replace this as well.

And the final result..

Once built, next came testing. Arcbotics supplied a python application for controlling the Hexy, the program is simple and contains some pre-programmed moves for the hexy. So after downloading this, connecting the Hexy to my laptop with a USB cable.. time for Hexy to dance..

With the Hexy I also got the Bluetooth module (you can see the flashing red light of the module on the Hexy). I did try to use this instead of the USB cable, unfortunately it would only work for one move and then stop working.

So, next thing to do is get this working properly, and to also write an Android application to connect to the Hexy via Bluetooth, and control it.

Monday, 17 December 2012

Mobile Pi - Part 2 Simple Motor Control

Ok, so I have my platform and I have a Raspberry Pi running remotely..Now to put them together :)
To do this I need to create a motor controller, so I can firstly protect the Pi from high currents by running the motors off their own power supply and also have some control on direction.

As I'm still waiting on a part which I'll need to be able to have speed control, I'm first gonna create a simple motor controller which uses 4 GPIO pins (2 per motor). One pin for the 'Drive' and one pin for the 'Direction'. Also, I'm not re-inventing the wheel here, I've based the circuit on one found on www.societyofrobots.com. With the only difference being I'm using an SN754410 instead of an L293D, and I'm not using PWM (for now).

Simple Motor Controller Schematic
By the way, for the schematics I'm using an application called Fritzing. It is simple, but useful especially going from breadboard to schematic to circuit board.

So that's the controller decided upon, next step.. put it together. I'm using a breadboard for this for now. I'll create a seperate board for it later. And I can use the Pi Dish which actually fits nicely to the platform. The battery for the Pi I'll just tape to the mid section.. connect the other batters for the motors and . hey presto..

Note, I'm using the new T-Cobbler from Adafruit, another great resource for these things, in tutorials and parts. Also, there are 4 motors, but the controller only works with 2, I hear you say.. well I just wire together both motors on the left, and both on the right :)


So with everything connected, time for the software. For now I'm still sticking the the same library I used for the traffic lights. Although for the next stages it won't be enough as I'll need to use I2C bus.

Anyways, I'm not going to post the whole code here, if you really want it let me know and I'll send it to you. But it is not very interesting code. All the code does is listens to the keyboard, if 'z' is pressed turn both motors on going forward, if 'q' is pressed turn both motors on left going backwards right going forwards.. etc..etc you get the idea. (Oh yeah, if you think the keys are a strange choice, I'm using a belgian keyboard). So running the program using SSH I can control the Raspberry Pi using the keyboard on my laptop. I also was able to control it using my Samsung S2 using a SSH terminal on it :)

And the final result of this is...

That will probably be it until the new year.. I'll add the speed control.. and then maybe add some sensors to auto-stop before hitting anything.. And make the software more interesting :)

Merry Xmas everyone!





Sunday, 16 December 2012

Mobile Pi - Part 1 The Platform

Ok, I have my Raspberry Pi running remotely without the need for wires. So next step, make it mobile!
This will take a bit more work than the traffic lights, so I'm breaking it up into parts, first is the platform. My long term goal is to create a bi-pedal walking robot, but for now I'm just use some wheels.
There are many platform kits around, from 2-wheel to x-wheels, I found a nice platform from a French supplier (http://www.alpha-crucis.com) which have all sorts of goodies for robotics, and although their prices are higher than say our american cousins, cost is saved on delivery (which is also much faster).

So What did I get? I got the 4WD Mobile Platform by DFROBOT...
DFROBOT 4WD Mobile Platform in its box
This platform is designed for the Arduino, but looked open enough to add anything.
Platform unpacked
As you can see above, it comes in kit form. I always worry about missing nuts & bolts in this type of kit, but I'm please to report that nothing was missing, in fact a few spare nuts/screws/washers etc. The instructions, although in Chinglish, were clear and easy to follow. Some pieces were a bit tight to fit. But assembly went well, no problems. I didn't bother attaching everything, as I don't see any reason to, yet.



















And here is the assembled platform.

Next, will be sorting out a controller for the motors, currently waiting for some components for this. So watch out for part 2 soon.