Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: Loco Robo on April 02, 2010, 12:17:28 PM

Title: $50 Robot Sharp IR Problem
Post by: Loco Robo 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.
Title: Re: $50 Robot Sharp IR Problem
Post by: waltr 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.
Title: Re: $50 Robot Sharp IR Problem
Post by: Loco Robo on April 03, 2010, 09:58:06 AM
Alright, I'll try that!
Title: Re: $50 Robot Sharp IR Problem
Post by: Loco Robo 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.
Title: Re: $50 Robot Sharp IR Problem
Post by: waltr 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.
Title: Re: $50 Robot Sharp IR Problem
Post by: Loco Robo 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
Title: Re: $50 Robot Sharp IR Problem
Post by: random robots 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.
Title: Re: $50 Robot Sharp IR Problem
Post by: Loco Robo 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?
Title: Re: $50 Robot Sharp IR Problem
Post by: waltr 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.
Title: Re: $50 Robot Sharp IR Problem
Post by: Loco Robo 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.
Title: Re: $50 Robot Sharp IR Problem
Post by: waltr on June 27, 2010, 05:39:03 PM
Ok, those are the real learning mistakes. We've all made them.
Thanks for posting.
Title: Re: $50 Robot Sharp IR Problem
Post by: Loco Robo 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!