Let's Make Robots!

LMR Start Here robot v2 (updated!)

IMG_6719.JPG215.59 KB
IMG_6720.JPG180.77 KB
basic-obstacle-avoidance.bas1.83 KB
IMG_6777.JPG2.72 MB

Update: I rebuilt version 1 with a body of wood this time, and added a bunch of new stuff:

  • A powerswitch which cuts the power between the motherboard and the batteries. This was convenient before I figured out how to make the kill-switch work.
  • A kill switch: a simple switch which works with an interrupt which stops all activity.
  • 2 LEDs. I had 2 leds from some cheap solar garden lights (the rest of the electronics had stopped working). Making them blink at different times was fun. When it turns it's head or makes a turn, the led on that side goes on. When it's moving forward, it blinks in rapid fashion. When it stops completely, both light light up for a second.
  • sometimes it got into a deadlock situation, where it just kept turning left and then right and back again. I added some extra code which checks if 3 turns have been made without forward movement and then does a longer turn to resolve the deadlock.
  • I also fixed the turn the previous one was making, there was a bad soldering connection on one of the motors and it wasn't getting enough juice.

See the video here: http://vimeo.com/26928481

Older text:

Ordered the LMR kit from Solarbotics, paid the amazing shipping costs to get it from Canada to Europe, and then had to pay additional VAT. Ouch. I guess I'll spend the time searching for parts in European webshops from now on.

Built it in 2 evenings. Got Frits' 'shbotvideoprogram.bas' to work, although I got it to balance, it then gets confused whenever it starts driving and tips forward, thinking there's an obstacle in the way.

The program in the tutorial itself (very nicely written by the way, thanks Frits!) doesn't seem to work, haven't figured out why yet.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Can someone with PICAXE 28 board experience please look at picture IMG_6777 (attached above) and tell me what pins are what in the code? I have 2 LEDs, which I can control with 'high 2' and 'high 3'. The yellow and the blue wire go to one LED where the yellow goes to the cathode and the blue to the anode. The other led has red as + and black as -. The pin labels in de code don't seem to correspond with the pins on the board? so why does it work at all? I would expect to have to turn the + and the - around on board to have the LEDs work.

Also if I move the - leads one pin to the right, the leds become superbright, but they aren't being controlled by pins 2 and 3 any more. 

I can only conclude that I'm controlling the anode pins now and somehow they are lighting up even though the polarity is wrong??

The red/black LED wires are connected in reverse. For control, maybe, you could could try B.2 and B.3? Reverse polarity to LEDs should get you squat, no matter if you pulled them high or low.

Somehow I had it in my head that the big piece in the LED was the + and the small bit the - but reading the pages on the web again it seems I got it wrong. I took my multimeter-meter to the pins and the leds and now I think I've finally got my head wrapped around it. Yea the red and black wires are soldered wrong to the LED; I guess I need to RTFW (web) more. ;-)


the flat side on the LED is the cathode and shoule go to ground(the side of the LED that has been ground down should go to ground).

Nice.   I added a rountine to make mine back up a foot or so and do a u-turn when it was deadlocked.

You mention mounting the sensor lower in the vid so the SHR will avoid the lego block.  You could also consider mounting a bump switch.

Yes, I thought of this last night too. Thanks, will be implementing that next.

Let's see if this works

I guess I can't embed video's in comments either.. :(

Here's a link: http://vimeo.com/26773015

OK, I see what is going on. One wheel running faster than the other is a fairly common issue.

Things to try (in order from easiest to hardest):

  • Carefully check the motor wires and leads. Be sure you have a good solder connection everywhere.
  • Reverse the leads on the slow motor (and reverse them in code too); DC motors often run faster in one direction than in the other.
  • Take apart the slow motor; look at the gears and file down any burrs; re-lubricate and re-assemble.

Thanks Ignoblegnome,

Well, I've done all 3 checks, and when I was reassembling my motor one of the leads came off the motor so that might be my problem. However, now I don't know what kind of lubrication I need for my gearing mechanism? Some googling for servo gear grease leads to 'silicone grease' or 'synthetic grease'. Does that sound right? I don't have any in the house of course, but I could go get some tommorow.

Thanks for the replies guys, I've found a shop closeby that sells the stuff and gonna get it next week. It seems the long turn was a crappy connection on the motor. I've resoldered it (along with a new body - will post pics soon) and it seems to be going straight now, although it's only doing very short burst of forward motion (dunno why yet).