Robot Project #1, Take 1: Drunken Vampire Robot

This is the basic Start Here! robot, whose job is to move forward until it detects an obstacle and then stop and decide which direction it should turn.  So far I haven't varied anything from the instructions or added anything of my own to it; this is my first robot project ever and I just needed to get my feet wet.  (Thanks, LMR, for making it so easy to get started!)

I call it the drunken vampire robot because it can't move in a straight line (drunken) and it avoids bright sunlight (vampire).  The sunlight issue doesn't concern me right now, but I would like to have better control over the robot's motion.  One of the motors rotates faster than the other, which is apparently not an uncommon problem.  I do wonder if it's a problem with the motors themselves or if it could be caused by wire splicing (small contact area in connection between spliced wires = more resistance = smaller current = slower motor speed?).  In any case, solutions I've considered are:

  1. Increase the radius of the slower wheel until its speed matches the faster one.  Not a great option, since I'd have to increase the radius by about 5 mm to makes the speeds match, which would make the robot significantly lopsided and could cause other problems with the motion.
  2. Learn a general method for controlling motor speed.  This seems to involve pulse width modulation (PWM), which is unfamiliar to me but seems very useful, so this is the route I plan to take.

Next step: Learn what this PWM business is all about.  I get the general idea behind pulse width modulation: Approximate an analog voltage by turning a digital signal on/off, adjusting frequency and duty cycle appropriately.  Most of it seems to be programming, but it requires a timer.  So I need to investigate: Does my Picaxe 28X1 have a timer in it?  Or will I need to get more/different electronics hardware?

In any case, hopefully I will soon be posting another version of this robot that involves some modifications of my own.

Trundles around attempting to avoid obstacles (and sunlight).

  • Actuators / output devices: 143:1 Solarbotics gear motor (x2), Futaba S3003 Servo
  • CPU: Picaxe 28x1
  • Power source: 4 rechargeable AA cells
  • Programming language: Picaxe basic
  • Sensors / input devices: Sharp IR
  • Target environment: indoor

This is a companion discussion topic for the original entry at https://community.robotshop.com/robots/show/robot-project-1-take-1-drunken-vampire-robot

drunken vampire lol

The best description yet!

Yes, motors with different speeds can be a challenge. I’ve solved the problem (once) by taking the motors apart and reassembling with copious gear grease while making sure nothing binds when they’re reassembled.

Besides that, you’re correct. You can solve with hardware (increased diameter) or in the software with PWM. Regarding PWM, with the 28X1 it’s a challenge. It does have a timer for PWM but it’s shared with the servo so it’s kind of one or the other. A couple links with some more info…

https://www.robotshop.com/letsmakerobots/node/7453

https://www.robotshop.com/letsmakerobots/node/20374

On my one “drunken bot” I’ve considered putting a proper wattage resistor or a potentiometer on the output for the fast motor to slow it down. That project is so back-burner though… a long time since I dusted it off.

Also, rubber bands FTW! :slight_smile:

Thanks for the info! Based

Thanks for the info!  Based on your comments and what I saw in the discussions you linked, probably what I’ll do is forget about the servo for a while and just see if I can use the Picaxe 28X and PWM to control a motor.  Best to start simple, I think.  Then I can reassess and decide where to go from there.

nice try,i like it

like it.good luck!