Does anyone's Analog to Digital Conv. work properly?

Discussion in 'General Discussion' started by oregon187, Mar 7, 2014.

  1. oregon187

    oregon187 New Member

    Joined:
    Feb 26, 2014
    Messages:
    11
    Likes Received:
    0
    I posted in the troubleshooting section and even submitted a trouble ticket but all I hear is "crickets". So I am going to ask here, since this seems to be the most popular section of the forum.

    The three UDOO's that I have all have the same problem. The Analog to Digital Converter (ADC) on the Arduino side does not begin working properly until the input voltage is 1.5V. I have tested an Arduino Due board (which has the same Atmel chip) and it works fine with a linear response from 0V up to the limit of 3.3V. But the UDOO measurements don't stabilize and become linear until the input is 1.5V. I believe there is a flaw in the design of the board and the fact that the Atmel Chip gets warm when running very light code, adds weight to that assumption.

    Is anyone else seeing the same problem? Or has anyone else actually tried to use the ADC on the board?
     
  2. mkopack

    mkopack Member

    Joined:
    Jun 14, 2013
    Messages:
    451
    Likes Received:
    21
    Hmmm... I haven't had a chance to try any of the arduino side stuff on the Udoo yet. And thanks to grad school commitments I won't be able to for at least another 2 weeks, can't wait to finish and graduate in 2 weeks! Once that's done though I can try on mine.

    How were you wiring up the circuit? Just a simple "3.3V off the udoo, into a variable pot-->A/D pin"? And based on what you're written I assume you've checked the voltages with a voltmeter... Are you seeing this on a specific Analog pin or all of them? Are you programming the Arduino side of the udoo from the Udoo itself, or from another computer? (just trying to be sure we can 100% replicate the setup you have to confirm your findings).

    I unfortunately don't have a Due to compare against.

    DracoLlasa, delba - You guys mess with this at all or have a little time to experiment and double check oregon's findings??? My Udoo is currently not hooked up or set up at all, and it'd take me a bit of time to get set up to try this for him.
     
  3. oregon187

    oregon187 New Member

    Joined:
    Feb 26, 2014
    Messages:
    11
    Likes Received:
    0
    I have tested three different UDOO boards now and the results have been the same. The analog to digital converter does not turn on until an input of 700mV and it is very unstable until the input reaches 1.5V (I tested several different analog input pins also, with the same results). I tested an Arduino Uno and an Arduino Due as well. The Uno and the Due both returned accurate linear results. For the test procedure I used a potentiometer connected to the 3.3V output of the UDOO (which actually tops out at 3.441V) and a common ground between all boards tested. The ADC resolution was left at the default of 10 bits, so the digital output should have been between 0 and 1023. Here is the code I used on all boards:

    Code:
    int sensorPin = A0;    // select the input pin for the potentiometer
    int ledPin = 13;      // select the pin for the LED
    int sensorValue = 0;  // variable to store the value coming from the sensor
    
    void setup() {
      // declare the ledPin as an OUTPUT:
      pinMode(ledPin, OUTPUT);
      Serial.begin(115200);  
    }
    
    void loop() {
      // read the value from the sensor:
      sensorValue = analogRead(sensorPin);
      // turn the ledPin on
      digitalWrite(ledPin, HIGH);
      // stop the program for <sensorValue> milliseconds:
      delay(1000);
      Serial.println(sensorValue);
      // turn the ledPin off:
      digitalWrite(ledPin, LOW);
      // stop the program for for <sensorValue> milliseconds:
      delay(1000);
    }
    The only difference in the setup with all the boards is the IDE. I used the Arduino 1.5.4 IDE on the UDOO to program the onboard Sam3X chip and I used the Arduino 1.5.6 IDE to program the Uno and Due from a Linux PC.
     

    Attached Files:

  4. mkopack

    mkopack Member

    Joined:
    Jun 14, 2013
    Messages:
    451
    Likes Received:
    21
    Ok, if you don't mind (since you'll get to it LONG before I have time to try) give it a try programming the Udoo's Arduino side from your linux machine (not the Udoo itself). See if that works any different...

    We've seen reports of there being other issues with the compiler, so it's entirely possible that this might be a similar issue.
     
  5. oregon187

    oregon187 New Member

    Joined:
    Feb 26, 2014
    Messages:
    11
    Likes Received:
    0
    I have followed the tutorials but I cannot program the 3 UDOO's that I have with a separate computer. I have tried through Linux and Windows 7 using several different versions of the Arduino IDE. I am able to open a Serial Monitor to the device and read the serial data output but when I try to upload it says "Device not found".

    What are the differences between the Arduino Compiler on the UDOO and Arduino 1.5.6 computer version?
     
  6. mkopack

    mkopack Member

    Joined:
    Jun 14, 2013
    Messages:
    451
    Likes Received:
    21
    You need to install the Bossac patch (see the downloads -> Drivers and Utilities section of this site) to make the Arduino IDE on 3rd party computers to get them to compile and upload for the Udoo.

    Not saying it'll work any differently, just taking a stab in the dark to see if maybe there is something different taking place.
     
  7. gionji

    gionji Member

    Joined:
    Jun 28, 2013
    Messages:
    38
    Likes Received:
    0
    Hi,

    we made some test with regulated power supply and voltimeter. We had differents results, something like this:

    Code:
    mV UDOO IDEAL
    --------------------------------
    50 6 15
    101 22 31
    205 51 63
    400 111 124
    597 170 185
    697 199 216
    797 228 247
    899 262 278
    1011 294 313
    1200 351 372
    1497 442 464
    1699 500 527
    2010 598 623
    2505 742 777
    3300 1018 1023
    --------------------------------------
    We'll try as soon as possible to test other different board sets.
     
  8. mkopack

    mkopack Member

    Joined:
    Jun 14, 2013
    Messages:
    451
    Likes Received:
    21
    Hmmm, that's interesting... oregon187, what are you using for a PSU? What's the specs on it?
     
  9. oregon187

    oregon187 New Member

    Joined:
    Feb 26, 2014
    Messages:
    11
    Likes Received:
    0
    :D Okay, today I received the fourth UDOO that my university had me order. I tested it using the onboard Arduino compiler and I got the same non-stable results as the other three.

    However, I was able to program this one using my Linux PC and the results were much different. The readings were linear just like they should be and just like the Uno and Due boards. I then tested one of the other boards that I received a few months ago and this time, programming it from my PC worked (not sure why I could never get it to work before :? ). Anyway, the older board showed the good linear results as well.

    My conclusion is that there is something wrong with the Arduino IDE compiler for the UDOO board and not with the UDOO hardware.

    This is definitely a relief, software is much easier to fix/work-around than hardware.

    Thanks for all the help on this.

    Is there a good way to find out the differences between the UDOO Arduino IDE v. 1.5.4 and the PC Arduino IDE v. 1.5.6? There is a lot of source code to compare with no direction.
     
  10. mkopack

    mkopack Member

    Joined:
    Jun 14, 2013
    Messages:
    451
    Likes Received:
    21
    Awesome! Good to hear!

    Alas, you'll need Delba's help on the compiler issue as it was the Udoo guys that put that together. they are aware of several compiler issues that they're working to fix, so please let them know about this one so it can be addressed.
     
  11. andcmp

    andcmp New Member

    Joined:
    May 8, 2013
    Messages:
    161
    Likes Received:
    0
    Thanks for your work and feedback oregon187, what you pointed out is something that the team needs to study in deep (the whole IDE needs improvements and fixes).

    As a side note, which is your ticket number?
     
  12. oregon187

    oregon187 New Member

    Joined:
    Feb 26, 2014
    Messages:
    11
    Likes Received:
    0
    @andcmp My ticket number is 988713

    The UDOO board is really sweet and we are hoping to incorporate it into our course work here at my University. So I was very relieved to find out that there isn't a problem with the hardware design.
     

Share This Page