NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.
Sensors, Actuators, and Robotics » Analog to Digitial Conversion anamolies
March 07, 2012 by dvdsnyd |
Hi all, I have recently been looking at interfacing an accelerometer and a barometric pressure sensor to the NK. I bought an ADXL193 breakout board from Sparkfun. it is a +-250 G accelerometer. I soldered on some headers and away I went. I was able to get it to work pretty well. It is a bit noisy, but not any more than I would have expected being on a breadboard... Well, yesterday I decided I wanted to solder the headers on a different way to the board, so I attacked it with my iron and desoldering tools. I don't believe I damaged the board whatsoever..however I think it could have gone a bit smoother. Anyways, I put it back in and now the Analog to Digital Conversion seems WAY off! The accelerometer takes 5 volts, roughly half of that is 0 G. It is a 1 axis accelerometer by the way. Laying flat it should read 0 G. I measured the input voltage as 4.93 volts, and the output signal from the sensor was 2.43 volts, with an ADC reading of about 505-506...After I was able to get the conversion correct, I could set it down and read 0 G and tilt it vertical and read +- 1 G very accurately. Well After I went and resoldederd the headers on, it no longer reads correctly. I was able to jumble the wires around, twisting and turning them to get it to read correctly (briefly) It is reading very high almost 200 G However, the voltage coming from the sensor is exactly the same....I don't have milivolt resolution out of my meter, but if it were to be reading 200 G the voltage from the sensor, according to the datasheet would be close to .5 volts. To do a check, I set up the tempsensor project. Doing this, I am now getting a reading of 91 degrees in my room, where before it was around 75-77. My multimeter has a temp probe on it as well, so I plugged that in for comparison. When I first did the tempsensor project the meter and NK were within about 3 degrees F. The meter reads about 77 degrees F. Does anyone know what could have happened? Could I have accidentally fried the ADC? It doesn't seem like a coincidence now that the temperature is off and the accelerometer. Is there something I am overlooking? Any help is much appreciated! Sorry for the long drawn out explanation...Just trying to be as clear as possible. Here are some measurements with the temp sensor, if anyone finds them useful in helping... Voltage to Temperature Sensor 4.89 Volts Voltage from Temperature Sensor to ADC .812 Volts 92 degrees Thanks again! David |
---|---|
March 07, 2012 by Rick_S |
If you are running on battery power, try changing your battery. A weak battery can make the ADC read funky. Rick |
March 07, 2012 by dvdsnyd |
Hi Rick, Thanks for the response. I forgot to mention that I looked at the battery voltage too, and it was above 8 volts. Just to be safe I threw on 2 other batteries, one right of of the box, and another that I had found on my desk. Both batteries read exactly the same. When I turn everything on, the ADC reads above 300 for a second and then lowers to around 180. This is with the tempsensor in now. I am at a loss. Nothing else is connected to the MCU except the temp sensor that came with the kit, that a month ago read what I thought was pretty accurately, compared to my multimeter. I appreciate any and all help! The 5 volt rail is reading 4.88 volts...seems kinda low. Could it be the regulator? It is steady. Can I answer any questions to better help? Thanks, David |
March 07, 2012 by dvdsnyd |
Sorry, I lied the voltage on the 5 volt rail is 4.94 volts. David |
March 07, 2012 by pcbolt |
David - I had a similar problem just last week. I was getting room temps at 45-deg F. I checked the voltages on all pins and found out the AVcc pin (#20) was reading about a half a volt too low. Odd because it was connected directly to the 5v rail via a jumper. A quick re-seat of the jumper solved it. |
March 08, 2012 by dvdsnyd |
Hey pcbolt, I noticed that I was able to do that too seating and maneuvering the wires around. I noticed it more with the accelerometer. A new symptom I have run into now however, is that when I go to turn on the kit, nothing happens. I started playing around with various connections and found that a few spots on my breadboard, when things are connected to them, like the accelerometer it simply pulls them to ground. I guess the best way to explain it is like a short. It seems to be centered around the pins by the ADC. Maybe I jammed a jumper in crooked or something? Later today I am going to throw the NK on a different breadboard quick and see if that does anything. I ordered a few more MCUs for various projects so that will definitely throw out something with the MCU. Until then, I up to try anything. Sorry the explanation is kind of vague. Seems like some gremlins have made there way over here... Thanks for the help so far David |
March 09, 2012 by dvdsnyd |
If anyone cares to know, I was able to get it to work again. It was as I suspected in the last post. I think I may have damaged my NK breadboard somehow. I moved everything over to a new home and after getting the infamous "Not a Butterfly" error I was able to get the accelerometer reading more stable than before. Thanks for the suggestions. I appreciate the help David |
March 09, 2012 by Ralphxyz |
dvdsnyd, do you want to add you add your accelerometer and barometric pressure sensor project to the Nerdkit Community Library. There are other accelerometer projects here in the forum but they were I2C output, yours is a analog output accelerometer so that gives a different twist and would make your code interesting. Ralph |
March 09, 2012 by dvdsnyd |
Ralph, I will go ahead and do that. The pressure sensor is actually an I2C output. My next step is attempting to interface that with the microcontroller. I have scoured the forums, like you said there is a lot of stuff already on it. I want to get them working together as well. I am in the beginning stages of an altimeter/flight computer for a high powered rocket. I would also like to be able to store some data either to an EEPROM IC or to a SD card. These are all just dreams at the moment :-P Thanks for the interest David |
March 10, 2012 by Ralphxyz |
Well there is a new release of SD card storage by pcbolt and there is great instruction on implementing I2C EEPROM by Noter. Ralph |
Please log in to post a reply.
Did you know that an electroluminescent backlight for an LCD panel requires hundreds of volts AC to run? Learn more...
|