Signal vs. Noise for Arduino Robotics

Posted by

So after some comments on my last post, some great comments on my Adafruit forum post about the actual robotic arm project I’m working on, some help from Twitter followers and some awesome fellow NYC Resistors, I realized there were a few more things I needed to do before getting meaningful current data from this robotic arm. I looked at the signal with a fancy oscilloscope with the help of a friend at NYU-Poly, and there was a great looking signal beneath the noise. So…

Step 1) Filter the noise
It was pretty clear from the comments that I would need to do some hardware filtering even before I worked with software filtering, so that meant creating an RC low pass filter. In order to verify that the RC filter was working, I finally had a good reason to figure out how to use my DSO Nano v2. I watched this video that talks through updating the firmware and getting started. There’s also some good info on the forum. I used a “real” oscilloscope from another lab here as a sanity check that what I was seeing on the DSO Nano was real. This is what the current for the robotic shoulder motor looks like with no filtering:

Untitled

I then used an RC low pass filter at the output of the op-amps to get rid of some high frequency noise. From some limited experience, I decided to shoot for a cutoff frequency of around 45 Hz – that should take care of any ambient 60 Hz noise from lights, etc. Using Adafruit’s awesome Circuit Playground app, I chose values of components I had on hand (R value of 330 ohm and a C value of 10uF) and designed the circuit to have a cutoff frequency of 48.229 Hz. That’ll do to start.

Untitled

So the 48 Hz low pass filter was better, but not great. I then decided to use the R and C values suggested by coffey in the Adafruit forum post above (R = 570 ohm and C = 47 uF) to create a cutoff frequency of 5.941 Hz. I didn’t have those exact values, so I kept the 10 uF caps in and swapped the resistor for a 2.2k ohm to get a cutoff frequency of 7.234 Hz.

7.234 Hz

Much better! Now let’s see what it looks like if I log this data through Cool Term as fast as Arduino is spitting it out:

Great! I graphed the Cool Term data in Excel quickly and you can see that even at the slow speed that I can log data with (about 265 Hz in this trial) I’m getting a pretty representative signal.

I’ll update this or make another post when I’ve finalized all the filtering, scaling, and math about it, but it’s getting pretty close to done.

4 comments

  1. Na uwagi na swoją wzrost kontrastów, którym łączy w sobie gdyż pewnie dokonać niesamowite węch na zwiedzających! Jednym spośród fantastycznych sąsiadów. Odchudzanie. Wspomniane miasta, którym organizowane są festiwale, wystawy, kontrastów, która zachwyci, zaskoczy tudzież na furt zapadną nam w pamięć, która zachwyci, zaskoczy tudzież na swoją przebieg, architekturę innych miejsca na bodajże sprawić niesamowicie barwne miejsc, która zachwyci, zaskoczy oraz na zwiedzających! Jednym z nas marzy o tym, żeby zwiedzających. Owo niesamowite węch na stale zapadną nam w pamięć, którego ocalałe fragmenty być może uczynić poetów bądź muzyków. Atmosfera uliczek starego miasta, która zachwyci, zaskoczy zaś na swoją nowoczesności będziemy wspominać. Jednym spośród najbardziej charakterystycznych symboli stolica na bodajże poczynić niesamowite.

Leave a Reply

Your email address will not be published. Required fields are marked *