5 years, 6 months ago.

Measure real provided voltage of LPC1768

As you all know, LPC1768 provide the 5v with USB interface. But, as I tested with TMP36 sensor, I think the provided voltage is 3.3v.

I tested with 2 sensor which are connected to one USB pin with BreadBoard. As you know, USB pin's provided voltage is 5v.

As temperature can be calculated by analog voltage value (https://learn.adafruit.com/tmp36-temperature-sensor ), I can get real temperature like this.

AnalogIn temper(p15); voltage = temper * 3.3; (not 5 voltage!!!!) real_temperature = (voltage * 1000.0 - 500.0) / 10.0;

I'm wondering why the basis voltage value should be 3.3 for getting a real temperature. I think the reason is that the other sensor connected to USB pin cause the provided voltage value down. (5v > 3.3v)

Am I right ?

1 Answer

5 years, 6 months ago.

The LPC1768 is a device designed for a 3.3V powersupply. The analog input uses an external reference voltage for the A/D conversion process that is also connected to the 3.3V powersupply. That means the maximum input voltage should be 3.3V. The mbed lib returns a relative floating point value between 0.0 and 1.0, so you need to multiply that returnvalue by 3.3 to get the absolute input voltage. There are 2 pins on the LPC1768 mbed that provide a powersupply voltage: one for USB 5V (VU, pin 39) and one for 3.3V (VOUT, pin 40). Make sure you have the right one when measuring this value.

Accepted Answer