Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years, 1 month ago.
AnalogIn reference voltage problem
Hello guys,
i'm using the EA LPC4088 QuickStart Board for analog reading. I've connected the wiper of a 5k5 potentiometer to the A4-pin, the 3.3 V regulated supply is connected to one of the outer pins and the last pin is connected to GND.
Here is my problem: The ADC gives me the max value (1.0) already at 1.5 V and there is no difference whether the VSSA pin is connected to GND or not. It seems the 4088 somehow uses 1.5 V as reference voltage and not 3.3 V. Is there someone who encountered a simmilar problem and has a solution for this?
The Code i'm using is the following:
#include "mbed.h" #include "USBSerial.h" #define DEBUG DigitalOut heart(LED1,0); AnalogIn an1(A4); void heartbeat(void) { heart = !heart; } int main(void) { #ifdef DEBUG USBSerial usb; #endif Ticker tick; tick.attach(&heartbeat,1); while(true) { #ifdef DEBUG usb.printf("%.3f\n",an1.read()); #endif wait(1); } return 0; }
Okay, i figured out that there is a voltage higher than 3.3V possible at the wiper, when the USB cable is plugged in the device jack (USBDevice) and the PC. This is confusing since the potentiometer is only connected to 3.3V and GND (i did the measurements). BTW the board is powerd with 5V by an external power supply via the power pins.
posted by Peter M 23 Jan 2015Problem "solved", well not really. A4 is also USB-VBUS, so it`s pulled up. What a mess. *sigh*
posted by Peter M 23 Jan 2015