Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Accelerometer sampling

Status
Not open for further replies.

Monkeyman87

New Member
Ok I have an analog devices adxl203 dual axis accelerometer. this device outputs a voltage proportianal to the acceleration along the axis. The datasheet says that the output must be bandlimited. Bandlimiting does what exactly? Does it lower the frequency of the output or does it act as a filter for certain frequencies. The output is modulated so I am wondering if when I sample the output for an a/d conversion how do I know the signal will be at its peak. Correct me if I'm wrong but the output is a changing right? And lastly how does the capacitor bandlimit?

Thanks
 
The "xFilter", "yFilter" pins of the ADXL is connect to the filter of the signal inside the ADC, before it is converted to digital through the PWM. Adding capacitance here will lower the freq response of the output, thus bandlimiting it. The analog voltage on these pins are also useful for reading the acceleration through the PIC's ADC directly, but the internal resistance (which is deliberately placed there as the "R" of an RC filter) is too high for the PIC's ADC stage so it would need to be buffered.
 
Ok so the adxl has too much internal resistance. So if I put a capacitor in series with the signal and another cap between the signal cap and gnd that would give me enough to read with a pic?
 
Monkeyman87 said:
Ok so the adxl has too much internal resistance. So if I put a capacitor in series with the signal and another cap between the signal cap and gnd that would give me enough to read with a pic?

That would give you nothing!.

You need a unity gain buffer, a simple opamp with a gain of one is all that's required.

A PIC has a sample and hold circuit internally, which charges a capacitor, and then reads the voltage off that. If the source impedance is too high this takes too long to charge, so you can read it before it's fully charged - giving a false low reading. So if you are requiring very fast sampling, you need to provide a low impedance source.
 
You should pick the bandlimit such that you include just enough bandwidth for your frequencies of interest. Accelerometers are horribly noisy so trying to integrate them to get displacement (which I see lots of people try) is difficult. By picking a good band limit you will eliminate noise in the frequencies outside your passband.
 
Once again I agree with Nigel. The cap does nothing, the leakage on the PIC input pin never "switches off". It causes an IR voltage drop on the source impedance all the time, so a cap changes nothing at all.

I know. I had the exact same problem, thought of the cap, and quickly evaluated that it has no useful effect in any configuration I can think of.

I do hate op-amp stages for this, the offset error can be large depending on the amp you use, in addition to limiting factors that the input probably can't go rail-to-rail anymore. So consider this. The 2.5K is the max input impedance to guarantee the PIC's ADC is accurate. If you exceed it, you can expect one +/- 1, or more, in additional error, but otherwise it does still work just fine. Check the spec sheet for the exact error versus input resistance. The thing is, if you only plan to use an amp with a 15mV offset, that's already +/- 3 codes of error. Depending on how much resistance above 2.5k you're trying to eliminate, it could actually be WORSE than without the buffering.
 
I checked the x out pin of the adxl with a DMM and I get 2.5v at 0g. I'm wondering how the DMM can read a voltage at such a high impedance. Also I built a unity gain buffer using a ti tl061acp op amp. I have +12v on Vcc+, -12v on Vcc-, the output connected to the inverting input and my multimeter, the adxl connected to the non-inverting input. I am still getting a 0 uA reading on the DMM. Any Idea what is going wrong? Thanks
 
Hmm! I did a little testing. When I measure the current output of my buffer with my DMM it shows notthing. BUT when I measured it with an analog meter It puts out plenty of current to drive the A/D in the pic. Is there a reason that the DMM shows no current flowing?
 
Monkeyman87 said:
Hmm! I did a little testing. When I measure the current output of my buffer with my DMM it shows notthing. BUT when I measured it with an analog meter It puts out plenty of current to drive the A/D in the pic. Is there a reason that the DMM shows no current flowing?

How do you have the meters connected, and what ranges are they on?.

Are you also sure your digital meter works on current?, it's usual for them to have a fuse on the current ranges, you may have blown that.
 
positive test lead is connected to the buffer output, and ground is connected the the buffer power supply ground. I have tried all the ranges: 200 uA, 200 mA, 2000 mA. The fuse is not blown. I can measure milliamps from my power supply.
 
Monkeyman87 said:
positive test lead is connected to the buffer output, and ground is connected the the buffer power supply ground. I have tried all the ranges: 200 uA, 200 mA, 2000 mA. The fuse is not blown. I can measure milliamps from my power supply.

The output of an opamp buffer is a voltage, not a current, connecting a milliammeter in this way isn't going to work properly anyway, but it's more likely to damage the meter than not give a reading.

Perhaps you had better post the circuit you're using, so we can see what you're doing.
 
It may be a voltage but there should also be some current even if its very small at the output. Here is a diagram of my circuit. Hope it helps to clarify this a little.

**broken link removed**
 
that .47uF cap is supposed to be connected to ground. and i believe the op amp input can be connected between the adxl x output and the capacitor.
 
this will work , sorry for the look of it.
 

Attachments

  • untitled_156.gif
    untitled_156.gif
    19.1 KB · Views: 366
I haven't read the entire thread but, have you tried the adxl calculator on analogs website? This pretty much designs the required circuit for you.I've used this in the past and found it quite helpful with the Analogs' accelerometers.

**broken link removed**
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top