Author Topic: Sharp IR Sensor values  (Read 2856 times)

0 Members and 1 Guest are viewing this topic.

Offline lanamorTopic starter

  • Jr. Member
  • **
  • Posts: 45
  • Helpful? 0
Sharp IR Sensor values
« on: March 07, 2009, 10:34:31 PM »
I'm having a problem with the values fom my sharp IR sensor and I can't seem to find an answer. I've google'ed for about an hour and wasn't able to find the solution. So I thought maybe one of the pros here could help.

My setup: 2 DC motors controlled via H-bridge, sharp IR sensor, arduino. I've mocked up my design on proto board.

The problem I have is that my Sharp IR sensor become less responsive when my motors are turning than when the motors are not turning. The sensor value is normally around 60 when noting is detected by the sensor. If I wave my hand in front of the sensor the value quickly goes up; and when I remove my hand, the value quickly goes down. However, if the motors are turning the value will go up about as quickly but will not go down past 200-300.

What could cause this? At the suggestion of someone else I've already tried a 10uf cap across the VCC and GND pins of the sensor but it seemed to actually make it a little worse.

Offline superchiku

  • Supreme Robot
  • *****
  • Posts: 952
  • Helpful? 5
  • cooll
Re: Sharp IR Sensor values
« Reply #1 on: March 07, 2009, 10:37:59 PM »
eiher ur shortng ur motor circuit with ur sharp ir...or ur battery is down...or ome kinda noise is getting induced in the sharp ir readings...
JAYDEEP ...

IT AND ROBOTICS ENGINEER

"IN THE END IT DOESNT EVEN MATTER"

Offline Ro-Bot-X

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,431
  • Helpful? 25
  • Store: RoBotXDesigns.ca
    • Ro-Bot-X Designs
Re: Sharp IR Sensor values
« Reply #2 on: March 08, 2009, 09:18:04 AM »
Superchiku is right, the motors introduce noise in your circuit.

To supress motor noise, you need to install right on the motors, 3 capacitors of 0.1uF like this: one capacitor from one lead to the case of the motor, one capacitor from the second lead to the case of the motor and one capacitor between the leads. Sometimes only the capacitor between the leads is enough, but that depends on the motor quality. Also, make sure you twist the motor wires!
Check out the uBotino robot controller!

Offline lanamorTopic starter

  • Jr. Member
  • **
  • Posts: 45
  • Helpful? 0
Re: Sharp IR Sensor values
« Reply #3 on: March 08, 2009, 04:35:14 PM »
As suggested I added some .1uf caps to the motor terminals and casing. That didn't correct the problem.

I did solve the problem though (kinda). When I'm running the arduino on USB only power I have the problem I described above. When I use a wall wart to power my arduino with the USB still connected (for serial communication) the problem goes away. I can't really think why this would be.

Offline superchiku

  • Supreme Robot
  • *****
  • Posts: 952
  • Helpful? 5
  • cooll
Re: Sharp IR Sensor values
« Reply #4 on: March 09, 2009, 12:04:59 PM »
hahahha this is the sme problem i have u see when itry to program my  microcontroller from my laptop without external supply ..iam not able to program it...the device signture is alwayz invalid...but when i use direct ac power iam able to program it...this jst proves...that sum problems are really pretty dumb...
JAYDEEP ...

IT AND ROBOTICS ENGINEER

"IN THE END IT DOESNT EVEN MATTER"

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,704
  • Helpful? 173
    • Society of Robots
Re: Sharp IR Sensor values
« Reply #5 on: March 25, 2009, 12:38:09 AM »
As suggested I added some .1uf caps to the motor terminals and casing. That didn't correct the problem.

I did solve the problem though (kinda). When I'm running the arduino on USB only power I have the problem I described above. When I use a wall wart to power my arduino with the USB still connected (for serial communication) the problem goes away. I can't really think why this would be.

Its a power issue - your USB and your wall wart can't supply enough current to all your devices when the motors are used. Get a battery pack and the problem will go away ;D

 

SMF spam blocked by CleanTalk