Sending signals to PC over wifi

arduinomicrocontrollerwifi

I need a microcontroller that would send statuses of it's input pins (around 5 of them, they can be 0 or 1) to a PC over wifi.

I thought of using arduino, but I don't know what would I need to make it able to send data over wifi? Some wifi module? And would that be a good combination?

This is a part of a device which is going to be on the hand, so it needs to be small and battery powered. (It should send statuses of it's pins at speed of around 15 times a second, and I'll need it to have one output pin set to 1, so I could send that signal to input pins) And since arduino is a bit bigger in size than I would like and it's made for much more advanced stuff I'm not sure if it would be the best choice.

So can anyone tell me what kind of microcontroller do I need and how to use wifi with it?

(I have some experience with arduino, but not with using wifi or other form of remote communication with electronics. If something about the question is unclear please ask in the comments. Thanks)

Best Answer

Arduino is a good starting point. There is a WiFi Shield available.

Your question, "What kind of microcontroller do I need?" is too broad. There are literally hundreds if not thousands of microcontrollers that you could potentially use. So how do you go about selecting one?

First, there are many manufacturers such as Microchip (PIC), Freescale, Atmel (AVR), etc. Selecting one is largely preference, but also highly dependent on support, price, reputation, available tools/software, feature offerings, etc. PIC and AVR are, for example, very popular platforms for 8- to 32-bit microcontrollers. The Arduino Uno is based on the Atmel ATmega328 8-bit microcontroller.

Let's say you pick AVR after becoming familiar with Arduino as a starter platform. (This is what I did.) Atmel has a microcontroller selector which gives you a parametric selection matrix to help you narrow down choices. The available microcontrollers are quite numerous, and some are purpose-made with specific applications in mind, such as portable music players, automotive applications, touch-based devices, and so on.

Using the selector, you can filter by such properties as memory size, pin count, CPU speed and type, temperature range, included timers and interrupts, external oscillator support, etc.

From what you've explained of your application, you are simply reading the state of five input pins and need to send that to a PC over a wireless (presumably ethernet) network at a rate of 15 Hz. The minimum requirement for that would be, obviously, at least 5 I/O pins, plus a way to connect to another component to send the data. SPI and I2C are common interface types, requiring two to four pins, depending on configuration. The WiFi Shield for Arduino that I mentioned earlier uses SPI to connect to the Arduino.

In the case of the WiFi Shield, all of the processing required for handling TCP/IP, encryption, and so on, is built into the board. If you decide to design and build your own microcontroller-based device, you could potentially find WiFi modules designed to "plug and play" with a microcontroller via SPI, or select individual components and create your own WiFi implementation. Personally, that would be a daunting task, especially if you're not familiar with microcontroller basics.

This site is not suited for product recommendations, but I can at least tell you to look for "WLAN Modules" or "WiFi Modules" at your favorite electronics component vendor. You can use their search tools to find modules that suit your needs, including the connection type you intend to use with your microcontroller.

If you're doing a one-off, or just getting started in learning, I would definitely recommend picking up an Arduino and the WiFi Shield. There is a lot of support for it, most of the difficult work has already been done, and there's even an Arduino StackExchange site.