I am a newbie with the Raspberry Pi.

I want to measure temperature from 16 sensors. Is it possible to have 16 analog inputs?

If not what controller should I use, I need something with web server.

1 Answer 1


You can use the Raspberry Pi for the webserver. You have a variety of programming lanugauges you could use, like Python, C/C++ even C# (in Linux using Mono) or Windows IoT.

It would be allot easier if you could use I2C - Which supports connecting allot of sensors (various types) typically using 4 wires (2 power + 2 RX/TX for bidirectional communication) (or 3 wires if using a leech circuit) to the Raspberry Pi's I2C

You can also get sensors using the 1 Wire Protocol, like the DS18B20. This only requires 3 wires (2 power - 1 RX) since all we are doing is reading data and used GPIO PIN 7. You then need to enable the device tree for 1-wire in /boot/config.txt by adding dtoverlay=w1-gpio and rebooting the Raspberry Pi. You can also mix various sensors using 1-wire

enter image description here

* A nice tutorial and source of image

But if you have no choice but to use Analogue you could get a 16 channel multiplexer and connect that using a few digital pins to the Raspberry Pi. You can find those at any popular electronics shops and are pretty cheap, you shouldn't need to pay more than 5USD/3GBP for one of these. You still need to convert the output from the multiplexer SNG to digital though.

enter image description here

The multiplexer works by setting the digital pin combination, to set the Analogue channel you would like to measure. So you cant have real-time measure of all 16 sensors at once, but you can switch between them pretty fast anyway and get possibly all 16 reading within 1 second, maybe faster.

  • As I said I am knewbie with Raspberry and sensors. I don't have to use analog sensors if I can digital measure temperature please let me know how. I want cheap solution. I thought that there are only analog sensors. Commented Dec 20, 2015 at 19:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.