msgbartop
Adam Palmer MBCS CITP, Linux, PHP Programmer, MySQL Developer, Embedded Hardware, Security Consultant
Did my blog help you? Please link to me!
  dns test
 
RSS Feed
msgbarbottom

21 Jun 09 The Linux Robot – Dancing Beat Recognition

I haven’t had a chance to post anything here in quite a while now, partly due to lack of time, and partly due to lack of interesting or original material.

SEE VIDEO BELOW! I found myself with some spare time over the past few days and decided to try and get the robot to dance autonomously. I initially started looking at software algorithms to detect BPM (beats per minute) in music, either by using phase shifting which is challenging to write and not hugely accurate, or by analyzing amplitude peaks at a given [usually bassy] frequency, which is easier to write, and even less accurate.

(more…)

Tags: , , , , , , , , , , , , ,

22 Nov 08 The Robot: Independant, moving, talking, and controlled via WiFi

Robot

Robot

I’ve made some excellent progress over the last week! The Robot is now independant, and it moves freely. I’ve written a simple shell script to take the following characters as control:
a – left
s – stop
d – right
w – forward
x – back
q – hard stop
k – turn anticlockwise
l – turn clockwise

This sends a single byte to the serial port. I am using 2xUSB to TTL converters which show up as

Robot

Robot

/dev/ttyUSB0 and /dev/ttyUSB. Each serial port controls two motors through the sabertooth controller. As we control two motors with only a byte, each motor has a 7 bit resolution from full reverse to full forward. For motor 1, 0 is stop, 1 is full forward, 64 is stop, 127 is full reverse. Motor 2 starts at 128 for full forward, 192 for stop, and 255 as full reverse. Although 7 bits of accuracy, speed changes only seem to occur at roughly 4 intervals, so we technically have about 32 different speeds, 14 forward, 2 stop, 14 reverse. We’re only using 3 speeds though as I can’t see the benefit in programming for any more right now.

The movement now seems to be working well. Smooth, controlled and straight which is something of a miracle ;-)

Robot

Robot

The battery is a 12V/7.2Ah sealed lead acid battery. With USB devices active, the board running and the processor 100% active, as well as peripheral fancy LEDs, digital outputs high, wifi active, etc, it uses 12v/800mA.

With all four motors moving at full speed, it uses 12v/6A. Seeing as the motors will be in action for short periods only, I would expect 6h+ battery life.

I have tested the sensors, and they are all working and reporting data except for the top back one which I’m going to have to investigate. Here are some more pictures:

(more…)

Tags: , , , , , , , , , , ,

10 Nov 08 The Robot: More good progress

Some more hardware has arrived! Very compact USB hub with external power input, Startech USB sound adapter (line out/mic), 4Gb USB mass storage, USB Trust Webcam.

All plug and play, all works out of the box. I’m using Alsa to drive the USB sound adapter, and v4l for the webcam. Works great and the majority of the hardware works.

Now I haven’t added any pictures to this entry, as I don’t think there’s much point in looking at more pictures of a messy table! I hope that my next post will include pictures of a (reasonably) cool acrylic body. I’m still waiting for the acrylic sheets to arrive though.

The two remaining parts of the hardware to get working are wheel movement and power/battery.

With all board hardware working excluding motors, we’re on 12V/600-700mA which I think is pretty fantastic.

I’m going to go for a NiMH battery pack (12V/10Ah) and not plan to generally discharge more than 12V/2A. The motors will realistically be in use rarely as it’ll be making short slow and unfrequent movements, rather than racing around at full speed!

The battery pack will connect directly to both motor controllers, as well as to a PICOPSU and then to the board.

So.. next stage is to get all the hardware off the table and into some acrylic casing with a 12V DC power source. Once that’s done I can look further into the motors and battery!

Tags: , , , , , , ,