Author Topic: Noisy servo interfering with IR sensor  (Read 896 times)

0 Members and 1 Guest are viewing this topic.

Offline ArtBotTopic starter

  • Jr. Member
  • **
  • Posts: 14
  • Helpful? 0
Noisy servo interfering with IR sensor
« on: December 23, 2011, 10:56:12 AM »
This is my first attempt at an Arduino-controlled robot and I'm still on the lower foothills of the learning curve when it comes to electronics, so please be gentle ;)

My robot currently has a servo (Modelcraft RS-2) used to turn a 'head' holding a couple of sensors (those sensors aren't important - they're working fine).

I also have an IR sensor switch from DFRobot (http://www.dfrobot.com/index.php?route=product/product&path=36&product_id=114) which works fine by itself (using it via an interrupt on the Arduino). The problem is that whenever the servo operates, it triggers the IR sensor. I suspect the servo is causing enough of a power drain to cause the sensor connection to go low.

The problem arises when I use a 9V battery or USB to power the Arduino (motors are powered separately) but disappears when I use a more powerful LiPo cell, which is why I'm thinking it's a power drain problem.

I'm using a pull-up resistor (10K) on the sensor and a decoupling capacitor (2.2uF) across the servo. Doesn't seem to help. I'm thinking 'diode' but am too rapidly running out of talent.

Any pointers? I'm happy to experiment but benefit from being nudged in the right direction.
Speculatrix - thinking machines and artificial smarts

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,132
  • Helpful? 108
Re: Noisy servo interfering with IR sensor
« Reply #1 on: December 23, 2011, 12:27:43 PM »
Where are you powering the servo from - they can take quite a bit of current. ie your 9V battery (which if its the old rectangular ones cant produce much power) to power the Arduino and then use another power source (whose voltage is ok for the servo) to power the servo - just make sure you connect the two grounds together.
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline ArtBotTopic starter

  • Jr. Member
  • **
  • Posts: 14
  • Helpful? 0
Re: Noisy servo interfering with IR sensor
« Reply #2 on: December 23, 2011, 02:07:04 PM »
The servo is currently being powered from the +5V supply from the Arduino, so I guess that's the problem.
Speculatrix - thinking machines and artificial smarts

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,132
  • Helpful? 108
Re: Noisy servo interfering with IR sensor
« Reply #3 on: December 23, 2011, 02:35:06 PM »
Yep - the regulator on the Arduino is probably rated at around 1A. So if you put any stress on the servo (ie it cant rotate coz there is a table leg in the way) then the servo current requirements will go up (one servo can easily take 1 amp) and this may fry the Arduino voltage regulator. So always keep motors/servos on their own power bus.

Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline ArtBotTopic starter

  • Jr. Member
  • **
  • Posts: 14
  • Helpful? 0
Re: Noisy servo interfering with IR sensor
« Reply #4 on: December 23, 2011, 03:37:35 PM »
Thanks for the tip - I'll try that...
Speculatrix - thinking machines and artificial smarts

 


Get Your Ad Here