Posts Tagged ‘robots’

Filtering a Sensor with Noise and Spikes

January 5th, 2011 3 comments

Recently I have been working on a robot that required accurate measurement of distance (more on that robot on a later post). I noticed some unpredictable behavior of the robot and so I investigated further to find out what was wrong with it. It turns out that the Sharp GP2D120 sensors I used are pretty noisy! I didn’t do much research about it before adding it on my project. When I needed to know the distance value, I took 10 consecutive readings and averaged them. But that was not such a clever choice for filtering and you will understand why, in a while.

Let me first explain you my testing platform. First of all we have the robot that has the GP2D120 sensor on. The PIC micro (used a PIC18F4520) on the robot is able to transmit wirelessly using an XBEE module. Data is received on my PC using another XBEE module through USB. Finally, data is analysed in MATLAB. So I position my robot to be stable, so that the distance sensor should read the same value constantly. Each value read, is transmitted and captured on my PC.

Experiment 1 – No filtering

No filtering

Notice that the y axis is the ADC value and not the voltage value directly. As you can see there are some pretty nasty spikes over there! They occur quite ofter as well. Converting those values to distance, spikes reach up to 3cm ! So you have a wrong measurement by 3cm. For a project that requires accuracy that is a nightmare! Read more…

Incoming search terms:

  • median filter (22)
  • spike filter (22)
  • sensor noise filter (20)
  • how to filter spikes sensor (16)
  • median filter adc (13)
  • c code simple spike filter (10)
Categories: electronics Tags: , , ,

Need motors for your robot? – Servo Motor Hack

April 13th, 2009 No comments

Another quick post. If you are just starting on small scale robots you may wondering what motors to use for movement. A quick google search may scare you actually 🙂

I am telling you this because I had a similar experience when I was starting out. You see, if you look for ‘robot motors’ you are most probably be taken to a DC motors website. First of all a decent DC motor would probably cost more than a newcomer wants to spend just to test it out. And most important it is quite complicated as you need to mess around with DC motor controllers and other stuff like gearing. Read more…

Incoming search terms:

  • servo motor hack (12)
Categories: electronics Tags: , ,