IntermediateSensors & Measurement
Pico Analog Temperature Thermometer
Read the MCP9700A with the Pico ADC and convert its 500 mV offset and 10 mV/°C slope into Celsius.
Parts from the database
- MCP9700A-E/TO × 1Analog temperature sensor
- Raspberry-Pi-Pico × 1ADC and USB serial output
Other supplies
- breadboardCommon build supply
- 100 nF bypass capacitorCommon build supply
- jumper wiresCommon build supply
- MicroPython installed on PicoCommon build supply
Amazon links may be affiliate links. As an Amazon Associate, Electronics Hobby Hub earns from qualifying purchases.
Connections
- Use the MCP9700A package datasheet to identify VDD, VOUT, GND; do not assume TO-92 lead order.
- Power VDD from Pico 3V3(OUT), ground to ground, VOUT to ADC0 GP26; place 100 nF across sensor supply.
- Do not power the sensor from 5 V when its output is connected directly to the 3.3 V ADC.
Build steps
- Run the code below.
- Compare the serial reading with a trusted thermometer after settling.
- Warm the sensor gently and confirm the reported temperature rises.
- For better accuracy, account for sensor and ADC-reference tolerance.
Software and firmware setup
from machine import ADC
from time import sleep
sensor = ADC(26)
while True:
volts = sensor.read_u16() * 3.3 / 65535
celsius = (volts - 0.500) / 0.010
print('Temperature: {:.1f} C'.format(celsius))
sleep(1)Test your build
The console prints a reading each second. MCP9700A nominal output is 500 mV at 0 °C with 10 mV/°C slope.
Troubleshooting
- Full-scale/near zero: verify sensor lead order and GP26.
- Implausible value: check 500 mV offset and 3.3 V supply.
- Noisy readings: bypass close to sensor and average samples.
Safety and limitations
Educational thermometer only, not medical or safety equipment; do not immerse the bare sensor.
Manufacturer and platform documentation
Community Notes for This Project
These are unverified visitor contributions, separate from the build guide and manufacturer specifications. Verify technical advice against the linked datasheets before relying on it.
Set up the comments service to load community notes.