LMR Start Here robot v2 (updated!)

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.


This is a companion discussion topic for the original entry at https://community.robotshop.com/robots/show/lmr-start-here-robot-v2-updated

Not sure if you already

Not sure if you already checked it out or not, but you might give this link a look over. Good luck on getting it all worked out. I can’t wait to see more.

Congratulations! You’ve

Congratulations! You’ve taken your first steps into a larger world…

If you are having trouble with the program, tell us specifically what isn’t working. Sometimes a video of your robot in operation can help us see what is going on most clearly.

Thanks

Thanks for your offer for help, ignoblegnome. I’ll post the code I have and well the robot really didn’t do anything when I started the tutorial code. Doesn’t seem to like the loop ‘main’ cause if I put some wheel commands or servo commands before it, it does do that.

Thanks for that, walkercreations. I hadn’t seen that yet.

 

Update: Fixed the tipping

By using a bent paperclip in the front and a spring from a clothespeg in the back, the robot now no longer tilts forwards and backwards and moves around a lot smoother. Now gonna play around with the code.

I’ve uploaded better pictures and some details of the back and underside.

Vimeo embedding is broken…?

Let’s see if this works

I guess I can’t embed video’s in comments either… :frowning:

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

OK, I see what is going on.

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.

Are you sure that isn’t a feature? :smiley:

Better obstacle avoidance by not moving in a straight line. :slight_smile:

One suggestion I would make is to lower the value that causes the turn to last so long.

Thanks, but nothing obvious thusfar

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.

Feature, meh! :slight_smile:

Hehe yea I guess but it gets kinda boring when it just goes in circles all the time. :slight_smile:

Yea I changed that. When I was debugging faulty code earlier I’d upped it to 1000 (from 300) (and then made the video to show the turn), but now I’ve set it back to 250 which is perfect, it turns exactly as far as the sensor on the servo does.

I believe you have

I believe you have identified the right stuff correct. To be honest I’ve never had to put that idea to the test!

Re: grease

When I put some of my first RC cars together, it was suggested that I use Vaseline as gear lube. I don’t know if Vaseline would be too thick for smaller motors or not.

Thanks guys

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).

LED output, I don’t get it

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??

Looking at IMG_6777

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.

I’m dumb

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. :wink:

Cheers

Most of the time

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).