A goal challenged robot

I was thinking about cockroaches after seeing some sort of program on the subject. It brought me on to thinking about insect locomotion and the way complex moves are carried out by creatures without a central nervous system. It then started to occur to me that the reason that these creatures (or any other for that matter) function is that there are a great deal of stimuli. An insect’s leg, for instance, has thousands of sensory organs to determine touch, temperature an various other external events that aren’t processed anywhere centrally. The thought the occurred to me about the notion of how a nervous system might work. Hence my latest, yet ugly, creation. The Roboto v2.

Roboto V2. from the front
This is the robot from the front. Currently it has 6 ultrasonic range sensors. This was the best thing to test my idea.

I had a frame for a robot I had already assembled and really didn’t get anywhere with it until I had this idea. Basically the idea is to have a matrix of variables, in this case a 10×10 struct array. Sensors are ‘bound’ to certain segments of the matrix. The matrix elements also communicate with the adjacent nodes to relay positive or negative stimuli. These stimuli make their way to the motor controls which are bound to other matrix nodes, in my case, elements several nodes away on opposite sides of the grid. The values expressed in the node are translated into motor movement.

Roboto V2.0 from the top, A tremendous jumble of wires.

What I have right now is functioning better than I hoped. I made close proximity ‘painful’ and moving forward ‘pleasurable’. A close proximity on the side will cause pain on the same side. Currently the robot seems to find open areas but doesn’t stay in them. I did fudge some things which are.

  • Output to the motors is kind of jury-rigged to disallow stopping by ensuring that at least one wheel is at maximum motion based on a weighted average.
  • the sensory input is weighted at the nodes. This was needed simply to make it function correctly.
  • I have a constant ‘pleasure’ value plugged in to make the robot strive to move forward. otherwise it would probably just stay in one place.
Here’s a video of it in action, doesn’t do a lot but I think it’s neat because I can’t predict it’s reaction despite the fact that it’s perfectly logical.

Well, I’m going to try some other things and add more stimuli like IR sensors, compass, accelerometer and a gyro. We’ll see if I can get something interesting out of it. An in case anyone is wondering about the build here’s a point by point list of what I used.

  • Arduino Mega2560
  • A robot chassis that I bought off EBay. It’s not bad.
  • Built the motor driver board myself with an SN75441one and a 5A linear LDO reg.
  • 7.4v LiPo battery, 850mah for direct drive to the motors
  • A little cheap bread board
  • and LED-KEY module, based off the TM1638, very handy modules
  • lots of male to female wires!
Anyways, Let’s see how it goes.

Ugluino, the ugly Arduino powered robot

So, even though I’ve built a wide variety of crap over the last few years, all of them with varying utility, I’ve decided to build a quick robot. With oodles of free time and the feeling of having to go back to work on the horizon after what feels like an eternity of holiday (1 week) I quickly grabbed a bunch of stuff I had sitting around and put this guy together with all the grace of a kindergarten macaroni art sculpture.

Ugluino Being Built

Based off of an Arduino Nano, this guy works just fine. I don’t like using Arduinos for the following reasons.

  • Perceived lack of control of what’s going on inside
  • Feels like cheating since it’s so easy
  • Arduino UI is kind of shitty, especially for larger source files.
  • When dealing with AI routines, making it difficult to use multiple files is a minus

Anyways, i plugged ahead and quickly pounded this out with the following IO

  • Input – The only one, the Echo pin on the ultrasonic sensor
  • Output – Trigger on ultrasonic sensor
  • 4 Digital output – for controlling direction on SN754410 Quad half h-bridge driver. These go to two gear motors which are attached directly to wheels
  • 1 PWM out for duty on motors
  • 1 attached servo out of the servo to turn the sensor
The back end of the Ugluino

Most everything worked out swimmingly until I fucked around with some wiring and produced a short. I hooked the robot on to the USB supply on my computer, I noticed after a few second that the power to the unit wasn’t running… hmmm POOF! Well, as it turned out, there was a problem with the wiring to the ultrasonic dealy and it blew what I beleive was a zener diode

I wasn’t able to figure out exactly what it was, I suspect that it is a zener diode that selects between main power and USB since it is on the output of the VReg. I could be wrong. Since I didn’t have any more Arduino Nano’s I simply tried to fix it and soldered a wire across the offending gap. The device seems to work fine…? Anyways, if anyone know what that part was on the Arduino Nano v3.0, I’d like to know ’cause I couldn’t find the 3.0 Schematics and the design has moved those parts around.

Anyways, The robot moves around based on a very simple algorithm.

  1. Stop Moving
  2. Scan from 40Deg Right to 40 Deg Left in 10 deg increments
  3. return appropriate movement from a function that analyses it
  4. execute proper movement (Forward, Backward, Right, Left, Hard Right and Hard Left)
  5. rinse
  6. repeat

It seemed to work reasonably well. I’d like to build a more sturdy version for shits and giggles so that I can play with the algorithms. I’m probably gonna build one with a PIC18F2685 instead of an Arduino. Also, instead of a single sensor, I will use IR proximity sensors to detect low lying objects. Moving the sensor with the Servo make the robot seem more intelligent than it actually is like it’s ‘looking around’. I quite like that. 🙂

Anyways, it’s my first post of the year, considering it’s January 1st and 3:52 am as I write this. maybe I should go to bed. Here’s a video of it getting around.

 

Been almost 2 years at Endura

Now that It’s coming up on two years at the place I work, I was looking through some of the drawings. I figured it’d be fun to post some of them. I’ll simply place a gallery here, click the images to see a more detailed description

Note that these aren’t all of my drawings, but a decent selection of them.