The question is simple, and I am not doing any SE in here. I googled first, I didn't find an answer. So, people of electronics, I am not from electronics so don't know where to look exactly.

Just an example scenario below (no SE in any way):

I have a sensor dht11, how do I connect exactly that to a server via wifi.Now I am able to connect to raspberry pi and then to a server from raspberry pi.

How do I go about? I am not asking in here for any secret blueprint of some secret stuff. I know it is available online, I don't just find it because I am not from this domain.

Any helpful links are highly appreciated. Will return back to the "electronics" stack exchange in specific, once I gain expertise in this domain.

(If this is not a right place to ask this, kindly comment on where should I post this)



closed as too broad by brhans, Bence Kaulics, Nick Alexeev Oct 24 '16 at 17:10

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    \$\begingroup\$ "Now I am able to connect to raspberry pi and then to a server from raspberry pi." -- You are on right track... Rather you already did that! You cannot connect a raw sensor directly to WiFi... You will need a microcontroller in between which will host the stack. \$\endgroup\$ – Swanand Oct 24 '16 at 14:38
  • \$\begingroup\$ Yeah, this is what IoT is all about: connectivity. However you need to decide which connectivity stack you want to build on: TCP/IP+WIFI, or NFC, Bluetooth, or sub-1G. If your sensor is so small that you don't want to use a RPI just as a wifi transmitter, you can use RPI as a hub to Internet, for a cluster of sensors and use some other lower-cost short range protocol from sensors to the hub. \$\endgroup\$ – user3528438 Oct 24 '16 at 14:46
  • \$\begingroup\$ @Swanand Yes, I'll need a microcontroller. I am currently in a course on coursera, the course is taking a lot of time to complete, where I build my own IoT device. Can you link me, on how I embed my sensor in the microcontroller, I am just stuck on this, rest all is fine. \$\endgroup\$ – johnrao07 Oct 25 '16 at 10:50
  • \$\begingroup\$ @user3528438 I can use Rpi as a hub, and it's a lot easier to do so, but I don't know how reliable Rpi is. So I understand that I need to build my very own microcontroller as a hub. Programming stuff isn't an issue for me, but the electronics stuff is out of my head.Thanks for your answers this time, I think we should have a section to discuss some broader things unlike usual specific problems. Thanks! \$\endgroup\$ – johnrao07 Oct 25 '16 at 10:56

What you seem to think you want is:

<Sensor> -> <WiFi>

Whereas in reality what you actually need is:

<Sensor> -> <X> -> <WiFi>

Where <X> is some device that can do two things:

  1. Read the data from the sensor, and
  2. Connect to the WiFi and send the data through it to the internet.

You have already achieved that with the Raspberry Pi, although for a single small sensor the Pi is considerably more powerful than you would ever need.

Instead you want something smaller. As has been mentioned in the comments using the Pi as a "hub" to connect multiple sensors to the internet is one possibility - for that you may choose something like the nRF24L01+ wireless modules along with small microcontrollers, such as Arduino-style boards, or maybe X-Bee modules with the same boards, etc.

Another option is to use a small WiFi-enable microcontroller, such as the ESP8266, which you can program to read the data from your sensor and to communicate to the outside world through WiFi.

{{analogy alert}}

Basically, at the moment you have a can of petrol and a road and you want to magically travel on the road with just that. What you lack is the vehicle to consume the petrol and travel on the road. Get a car (Arduino + WiFi), bus (Rasperry Pi) or Motorbike (ESP8266) and fill it with your petrol.

  • \$\begingroup\$ thanks for clearing me on this, I don't need to stick to this idea anymore. \$\endgroup\$ – johnrao07 Oct 25 '16 at 10:51

There are probably some things that are called 'sensors' with Wifi connectivity, just as there are things called sensors that have digital interface or signal conditioning built-in.

Nobody controls the use of language and, at a system level, you can consider a HART transmitter and sensor or a Wifi connectivity module plus an ADC plus a signal conditioner plus a raw sensor as a single component in the system.

In the particular case of the dht11, it contains some circuitry and is not quite a raw sensor (it has a digital interface) but it does not have Wifi connectivity. You can add a module such as a PC, a Raspberry Pi, an ESP8266 or an Intel Edison and get it to work with Wifi. You can probably also buy a module that does everything (but it won't be a few dollars, most likely, unless it's designed for that and ordered in huge quantities).

This is, as stated in the comments, what the IoT (Internet of Things) is all about. Now there is some overhead (cost, power, etc.) with a Wifi connection so it's also common to have a star configuration with a Wifi node connected to many sensors using something like BTLE, Lin, Zigbee etc.


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