Author Topic: $50 Robot Sharp IR Problem  (Read 2956 times)

0 Members and 1 Guest are viewing this topic.

Offline Loco RoboTopic starter

  • Jr. Member
  • **
  • Posts: 17
  • Helpful? 0
$50 Robot Sharp IR Problem
« on: April 02, 2010, 12:17:28 PM »
Hello.
I am following Admin's tutorial on adding a Sharp IR Rangefinder to my $50 Robot. However, whenever I turn the robot on, it scans once then looks right, then the whole robot spins clockwise and responds to nothing else. Yes, I did use a calibration object when the robot first turns on. I am getting frustrated, and I am just about ready to give up. Please help.

Thanks,
Loco Robo.

P.S. Will post a video ASAP.
#@1L 73# 1337 L0(0 R0B0!

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,944
  • Helpful? 99
Re: $50 Robot Sharp IR Problem
« Reply #1 on: April 02, 2010, 01:37:55 PM »
Try adding a fairly large value cap (10-47uF) across the power pin directly on the Sharp sensor. These pull a huge amount of current when they switch on their LED and are notorious for causing problems with processors.

Offline Loco RoboTopic starter

  • Jr. Member
  • **
  • Posts: 17
  • Helpful? 0
Re: $50 Robot Sharp IR Problem
« Reply #2 on: April 03, 2010, 09:58:06 AM »
Alright, I'll try that!
#@1L 73# 1337 L0(0 R0B0!

Offline Loco RoboTopic starter

  • Jr. Member
  • **
  • Posts: 17
  • Helpful? 0
Re: $50 Robot Sharp IR Problem
« Reply #3 on: April 11, 2010, 05:46:50 PM »
OK, sorry for doubleposting, but i just realized I have no idea what I am doing.
Sorry, but I'm new, so if you could, could you please be more specific? I have no idea what it means to put a capacitor across the power pin. I know what each of these are, but do you mean putting the + end of the cap on the + line and - on -? Am I right or wrong? I'm so confused!

Thanks,
Loco Robo.

*UPDATE*
I just realized that there is a modify button. Whoops.
« Last Edit: April 11, 2010, 05:49:00 PM by Loco Robo »
#@1L 73# 1337 L0(0 R0B0!

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,944
  • Helpful? 99
Re: $50 Robot Sharp IR Problem
« Reply #4 on: April 11, 2010, 09:24:16 PM »
Yes the + lead of the cap goes to the +5V pin of the Sharp IR.
Here is a bad picture of the back of a Sharp IR sensor with a 10uF Tantalum cap soldered onto the connector pins. Hope this helps.
You don't need this exact cap. I used it because I have a bag of them I bought surplus years ago.

Offline Loco RoboTopic starter

  • Jr. Member
  • **
  • Posts: 17
  • Helpful? 0
Re: $50 Robot Sharp IR Problem
« Reply #5 on: June 26, 2010, 02:58:03 PM »
OK, I tried that, and when I turned it on, it reacted for a few seconds, then it would spin left or right and stop reacting. Is my battery not powerful enough? I am using a 4.8V 600mAh rechargeable battery. If it isn't, then I will try 4 AA's or 6V.

-L0C0 R0B0
#@1L 73# 1337 L0(0 R0B0!

Offline random robots

  • Full Member
  • ***
  • Posts: 108
  • Helpful? 3
  • he drives worse than my robot... thats sad
    • youtube channel
Re: $50 Robot Sharp IR Problem
« Reply #6 on: June 26, 2010, 03:38:36 PM »
the tutorial says you should use a 6v 1400mah nihm battery or 4 nihm cells and a 9v battery. 4.8v at 600mah is too low it seems.
this is a signature.

Offline Loco RoboTopic starter

  • Jr. Member
  • **
  • Posts: 17
  • Helpful? 0
Re: $50 Robot Sharp IR Problem
« Reply #7 on: June 26, 2010, 10:34:25 PM »
Thanks, I'll try that!

*UPDATE*
Ok, I tried it, but I got the same problem as before: it scans once and spins to the right and stops responding. I attached the capacitor as instructed and switched to a 6V battery. Could anything else be wrong?
« Last Edit: June 26, 2010, 10:54:06 PM by Loco Robo »
#@1L 73# 1337 L0(0 R0B0!

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,944
  • Helpful? 99
Re: $50 Robot Sharp IR Problem
« Reply #8 on: June 26, 2010, 11:31:20 PM »
Try letting it scan the servo without the Sharp sensor attached. If that works then you know its the Sharp causing problems. If it doesn't then you know its the servo or the code to control the servo that the problem.

Offline Loco RoboTopic starter

  • Jr. Member
  • **
  • Posts: 17
  • Helpful? 0
Re: $50 Robot Sharp IR Problem
« Reply #9 on: June 27, 2010, 01:51:08 PM »
OK, I did as you said, and it did the same thing. I plugged the IR into a different slot, and it started to work, but it didn't work entirely. It detected things and scanned as it should, but it only scanned a small area of the servo's radius. I think that this is because I am not using an HS-311 as instructed, but an HS-55. The 55 may be slower and so the code is not meant for it. To test this theory, I decided to swap to an HS-325HB, but then I got no response at all. I then swapped the batteries out for new ones, but still no response so I swapped the scanning servo back to the HS-55. Still no response. I switched back to the old batteries. I got a response once, then no more. Am I missing something? This project is driving me crazy! My questions are:
1) Would using a servo different from that used in the tutorial be the problem, if so would an HS-311 solve all my problems?
2) Why did the old batteries work and the new ones didn't when both are alkaline 1.5V AA's?
3) Could there be a problem with my microcontroller?


*UPDATE*
I found the solution! It's a bit embarrassing, but you were supposed to plug it in to the 3rd sensor slot, not the first. I must have mistaken weird jittering for response. Sorry I wasted your time, everyone, but it was a valuable learning experience for me. It works now, but instead of chasing objects and running into them, it tries to go around. I had it spin around my leg for a while. Not what I expected, but it's OK.
« Last Edit: June 27, 2010, 03:31:50 PM by Loco Robo »
#@1L 73# 1337 L0(0 R0B0!

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,944
  • Helpful? 99
Re: $50 Robot Sharp IR Problem
« Reply #10 on: June 27, 2010, 05:39:03 PM »
Ok, those are the real learning mistakes. We've all made them.
Thanks for posting.

Offline Loco RoboTopic starter

  • Jr. Member
  • **
  • Posts: 17
  • Helpful? 0
Re: $50 Robot Sharp IR Problem
« Reply #11 on: June 27, 2010, 06:58:41 PM »
Ok, those are the real learning mistakes. We've all made them.
Thanks for posting.

Ya, and thanks for responding! Helped a whole lot!
#@1L 73# 1337 L0(0 R0B0!

 


Get Your Ad Here