Showing posts with label Wifi. Show all posts
Showing posts with label Wifi. Show all posts

Thursday, April 9, 2015

Prototyping with EMW3162 "IoT" devices.

I've picked up a bunch of EMW3162 devices recently. I don't yet have any up on Anibit, I'm trying to figure out how many I want to keep and and many I could part with.

EMW3162 Overview


They are really neat little devices:

The Good


  • Price: Runs in the neighborhood of $10 USD
  • Wifi b/g/n, reportedly up to 54MBps
    • On-board chip antenna, and UFL connector for an optional external antenna
  • Included STM32F205 ARM Cortex-M3 120MHz CPU with 128kb SRAM and 1Mb of Flash
  • About 20 available IO pins (+2 on board LEDs, and JTAG/SWD breakout)
  • Uses Broadcom Wifi chipset, compatible (after some finagling) with their WICED sdk
    • Broadcom has a lot of support for "IoT" in their SDK, with appliance samples, Access Point setup, and embedded web server support.
  • Mostly (but not all!) 5V tolerant I/O pins. (I love that, level shifters are such a pain)

The Bad

  • Documentation for the device itself, is almost non-existent. 
    • You must rely on the documentation for the constituent parts, and the work of some industrious hackers, see this
    • If you can read Chinese, you may have better luck.
  • It's not straightforward on how to use it as simply a Wifi adapter for an external Microcontroller. I believe there are firmwares for this, but it will require a lot of research.

The Ugly

  • 2.00 mm pitch headers on the breakout. Who does this, seriously! I think MxChip must have hired the person who came up with the XBee socket.
  • The various SDK and libraries are a slight licensing minefield. If you want to use this for a closed source or proprietary application, read through all the licenses of all the sub-parts carefully. There are some "free for closed source commercial" library license options, but not all of them are. 

Prototyping

I have thrown together a quick and dirty adapter PCB to let you mount the EMW3162 on a breadboard. I'm considering possibly doing a run of kits for the adapters to get the cost down, we'll see. 

You can get your own adapter from OSH Park here. [Updated link to new version here] Use at your own risk, I have not received my boards yet to verify that it works, but a paper printout looked like it matched up, and the actual circuit is so simple. You will also need:
  • 2 15-pin 2.54mm (0.1") pitch male headers for the breadboard part.
  • 2 15-pin 2.00mm pitch male headers for the EMW3162 module, unless you already have them mounted.
  • 2 15-pin 2.00 pitch female headers to receive the EMW3162 on the adapter.

Comparison to ESP8266


The main advantages of this over the popular with makers ESP8266 is that it has many more pins broken out, and they are 5V tolerant, making this device a better candidate for standing on it's own as an appliance vs acting as a peripheral for another Microcontroller. The CPU of the EMW is also faster (120 Mhz, vs 80Mhz), and has a lot more on board RAM and Flash space. Also, the WICED SDK from Broadcom is very sophisticated, with support for features such as OTA updates to the device. You can develop code to run directly on the ESP8266, but the support for that is more community built than officially supported. To be fair, WICED does not officially support the EMW3162, ether, but the board is close enough in design to other officially supported devices that it's not very hard to port.

Though the EMW3162 is about twice the price of the ESP8266, for some applications, it is worth it, especially if the extra capabilities allow you to remove external components form your design.

Resources to get you started

  • Several folks have started an analysis as a Hackaday project, and they're adapting their own flavor of the WICED sdk for use with the board.
  • The WICED SDK, which includes an Eclipse/CDT tailored to embedded devices using Broadcom chipsets.
  • The Github Repo for the WICED fork specific to this board.
  • Seeed studio sells a couple Development boards you can plug your 3162 into. This one has a JTAG port for an external JTAG, and this one has an on board JTAG built in.
  • My breadboard adapter you can order in multiples of 3 for $8 per set (you'll need to find the headers separately)

--P




Tuesday, September 23, 2014

Working remotely on a Raspberry Pi

I've been trying to do some real work on a Raspberry Pi and it's cramped my style a little bit to cannibalize a monitor and slap an extra keyboard an mouse on my desk.

Working in Raspian Wheezy, you have a lot of Debian Linux at your disposal, so I thought, "I'll just ssh in" That works great, from either a Linux VM, or using Putty on Windows. I needed to run graphical applications and spawn terminals at will, so I really wanted full desktop experience.

X11, the base graphic interface run by virtually all Unix-like operating systems, supports a feature known as display redirection. I used this back in the 90's when I tried to make use of a boat anchor DECstation from my Slackware Linux box. It still pretty much works the same way it did 20 years ago. Before I get too far into how it works, I'm just going to stop and and mention that if all you want is to remotely run graphical programs on your Rasberry Pi, stop right there!  There is a much easier way! X11's server-client model is very powerful and flexible, and is unique in a class of technologies that has stood the test of time, but it's not very "get'er done" user friendly.

Linux machines support Microsoft's "Remote Desktop" protocol with two programs: xrdp and rdesktop.

xrdp is the "Remote Server". This runs on the machine that your want to remotely log into. Note that is this backward from X11, where the "server" is the machine with the physical display, and the client is the (remote) application that generates contents to display.

To install xrdp on your Pi (if using Raspian or other Debian Linux derivative), type:

sudo apt-get update

then

sudo apt-get install xrdp

You're pal apt will download, setup, and launch the xrdp deamon to start listing for connection requests. If you're parnoid, reboot your Pi to make sure.

Thursday, April 5, 2012

Wifi Links.

I haven't made any progress on the Wifi project lately. I've been on a pseudo-vacation for the past week.

In case you've landed here from Google with an interest in the MRF24WB0MA Wifi board from Microchip, I've got  few interesting projects I've run across you may find interesting.

"Jeff", trying(unsuccessfully?) to get the board working with an Arduino:
http://jmsarduino.blogspot.com/2012/01/mrf24wb0ma-not-working-yet.html

"Manis B", got a webserver running on an Arduino with the board:
http://theiopage.blogspot.com/2011/10/connecting-mrf24wb0ma-to-arduino.html
(Also, really nice, pragmatic setup with connecting the pads, made me realize my mount was overkill - but fun)

"Blondihacks", did extensive experimentation with the board with an Atmega 168:
http://quinndunki.com/blondihacks/?p=840
(Also, a fantastically done write-up, even though she deems it "a failed experiment")

And last but not least, one for my favorite blogs, Dangerous Prototypes, recently posted about a MCW1001A chip that is a companion to the MRF24WB0 boards that implements the TCP stack for you and communicates via UART:
http://dangerousprototypes.com/2012/04/04/mcw1001a-tcpip-socket-communications-interface-with-gpio/

--P

Sunday, March 11, 2012

MRF24WB0MA Wifi board update.

Success!
(For various values of  'success' at least)

I finally have the board physically put together:

Not pretty, but I think it will work.

After drilling the pcb holes for the .1" headers, I am now certain that surface mounting was the way to go for the daughterboard. I never would have been able to get the accuracy needed with my uber cheapo drill press, it actually moves about 0.5mm when you apply too much vertical force to the press, so about half way through the job I realized that slow drilling was the key to better accuracy. Still, I don't think I could pull off drilling holes for 0.05" headers.

To do a surface mount solder, I "pre-soldered" the pads where the board would be sitting:

Thursday, March 8, 2012

Perfectly etched Wifi host board

I did a second take at doing a toner transfer. This time it came out flawlessly. I did a few things differently. I dont know if any or all of these thing contributed, but I really could not have hoped for a better result.

Here's what I changed:

  • Used a part of a glossy magazine that was mostly white space. The first printing was on top of a color image in the magazine.
  • Once the magazine was lying on the copper, I covered it with a small piece of laser printer paper, instead of ironing directly
  • Maxed the iron setting, and waited a good 10 minutes before starting to iron.
  • Used constant motion of the iron, and made sure that all parts of the iron visited all parts of the copper, so that whatever "sweet spot" that was yeilding good transfer was hitting all parts of the copper.
  • Ironed until I did 300% of what I thought was necessary, basically ironed the crap out of it.
  • Let it soak in water for 2 hours before even attempting to remove the magazine paper from the copper.

 I dremeled and etched the board this evening, and even let my kids watch from a distance.


Fresh etched board. It's not soldered yet.

Tuesday, March 6, 2012

Microchip Wifi update.

My wifi board project has moved kind of slow lately. When I last left off, before the holidays last year, I had ordered 1.27 mm headers needed to make my planned adapter board to a more reasonable 2.54 mm pitch. I've been working with the awesome KiCid to design the adapter. While KiCad is amazing in what it lets you do for free, the user interface is not the most intuitive (I common phenomenon it seems in software designed be hardware people). It turns out that I think I may forgo the 1.27 header and try to mount the Wifi daughter board surface mount. I have a low-end pcb drill press for drilling through-holes, but I have serious doubts that I would be able to drill with the precision needed.

Anyways, I took the plunge this evening and decided to attempt a toner-transfer to a copper-clad. The result is this:
Try again!
I find myself trying to remember some Edison quotes about failure and perseverance. When I was ironing the thing I was convinced it was going to come out perfectly. I thoroughly washed clad ahead of time, I found the glossiest magazine paper I could find, and I ironed it for so long that I thought I was going to scorch the paper. Yet you can clearly see in the top traces where the steam-holes in my iron where. 

I was doing this late night, my whole family was asleep, so I tip towed through the house, fruitlessly searching for my wife's nail-polish remover, to remove the toner. 

As far as my final plans for what I'm going to actually do with the board, I'm leaning toward trying to make my own device inspired by openPicus. It is a general purpose standalone Wifi/tcp/http enabled I/O board. My only problem is that the pic chips I have are not nearly powerful enough to run the openPicus firmware, and I'm having a hard time finding dip PIC24's with 256k of flash, so I may peruse the code and see if I can use a subset of it.

--P






Monday, November 28, 2011

Tiny Gecko ^h^h^h^h^h^h^h^h^h^h + Microchip Wifi Project update.

I finally got my 1.27mm headers in today. They were coming in from China after all.... I didn't pay a lot of attention when I ordered.

Anyways, to recap: the guys at Farnel hooked me up with this wifi board. I planned to use it with my Tiny Gecko demo board. The Microchip board is heavily geared toward using it with PIC processors, but they release the source code to a tcp/ip stack. My plan was to port the Microchip stack to run on the Gecko, shimming in Gecko-native SPI and interrupt code in place of the PIC code.

While I was waiting for my headers, I figured I'd start working on the port, so that when the headers arrived, I'd be almost ready to connect it to my Gecko. I got about 1/3 of the way into it, and realized I was doing more work than it was worth. I decided to scrap the idea of porting the code. I'm just going to use a PIC chip, and treat it like a high level tcp/ip "black box". I'll use a UART, or maybe SPI port to send and receive socket data, and let the PIC do all the heavy lifting. Hopefully, this means I can mostly use the Microchip code "out of the box", and make a simple serial messaging protocol. This also means I can also make it portable so that it's not just for the Gecko.

I just ordered a few PIC chips and a PICKIT 3. I had always planned to get around to exploring the PIC line of chips, but now I have a good excuse.

--P


Monday, November 21, 2011

Tiny Gecko + Microchip Wifi Project.

The good folks over at Farnel (Newark in North America) got me hooked up with a 802.11b "Wifi" board that uses a 3 wire, "SPI" interface to do Wifi.



You can find it here:

I've decided to combine it with my Tiny Gecko board, I'm not sure what I'll do with it yet, it may not even be a permanent marriage of devices. (Both of these devices fall into the category of "I acquired these cool shiny toys without an actual purpose in mind, but just that they looked cool"). My purpose is to just see how easy it is to get up and running with an embedded wifi setup, and get inspired for some other uses along the way.

In this first of several posts about this effort I will focus on my first impressions with the MRF24WB0MA wifi board.