PDA

View Full Version : Need a really fast way to connect your Teensy 3 to the Internet via Wifi?



t3andy
06-10-2013, 03:19 AM
Need a really fast way to connect your Teensy 3 to the Internet via Wifi?

Obtain the IO-201 WiFi Web Gateway from Iobridge.com
https://store.iobridge.com/ProductDetails.asp?ProductCode=A0082

Obtain the 3/5 volt level converter from Adafruit.
http://adafruit.com/products/757

Connect up the level converter from the Teensy 3 (3 VDC) GPIO to the IO-201 (+5 VDC) GPIO.

Connect USB power to both the IO-210 and the Teensy 3. (+5 VDC)

The software setup takes only a few minutes.

You can even send email and mobile alerts from the Teensy 3 via WiFi. :cool:

adrianfreed
06-10-2013, 08:43 PM
I notice it is not shipping until "mid Summer."

This is a nice concept. I wish it didn't have yet another sensor plug-in convention.
We already have Arduino shields, Phidgets, Grove, Electronic Bricks, Frame, Tinkerit.

I had to pick one to equip a lab because I can't support them all. I picked Grove. I will build adapter cables for some
of the sensors for Esplora (Tinkerit). Maybe iobridge will build an adapter system. Maybe the tower of babel is inevitable.

t3andy
08-29-2013, 02:17 AM
I notice it is not shipping until "mid Summer."

I got mine the other day and it took about 2 mins. to go-online with no wifi programming whatsoever:cool:

The Wifi module is about the size of the Teensy 3 with 1 analog (1023 - 10 bit), one Din, one Dout and one serial using the Din and Dout.

I am checking the wifi re-connect times (powerup) throughout the house and it appears to be 10-17 seconds.

The IO-201 connects to their FREE cloud server and the user friendly application software resides there.

As with any wifi module, it takes a heafty 300 ma. minimum @ 5 VDC.

I am planning on using the Teensy 3 as a pre-processor to this wifi module even though its a 5VDC logic module.

More testing on-going ....

BTW ... I got the email alerts operational which triggers off the analog or digital input. Really cool.
Just add a "pet friendly" PIR motion dectector ($12 from smarthome.com) and your are good to go with
no monthly monitoring fees.

Xeon
08-29-2013, 08:51 AM
I got mine today.
very simple to use device.

Xeon
08-29-2013, 02:56 PM
Another way to do this n a more powerful scale..
Pick up a RB400 to RB800 from microtik.
Run wire from usb or serial protocol.
bam .. internet access with just a script running on the microtik.
You can also terminal in from the teensy and get crazy.

t3andy
08-29-2013, 08:22 PM
Another way to do this n a more powerful scale..
Extra cost but it doesn't do ssl email required by most ISP's in US but its another solution.

Xeon
08-29-2013, 08:46 PM
I picked up a few from the trash and one from my boss.
The older wireless ones are being phased out by ubnt wireless products.

A bullet m5 wireless module can transmit over wireless over 50KM with a good antenna and has a ethernet port.
If you screw it apart you will find 4 nice serial pins.
Runs linux with a 600MHz arm core.. you can ssh or use a webinterface into it.
and it's no bigger that 3 boxes of matches packed in a straight line 2 boxes high.

Some really wicked stuff can be done.
my RB532 has 4 wireless cards with a 400MHz mips core and 32MB ram running on a linux kernel with level 6 router OS and 32GB of flash storage.
I'm running my own set of little vm's and servers thru her giving me some severe control over the packets leaving and entering my network.

Meaning I get my speeds for gaming when i need it.
And the rest of the house gets to enjoy a "cache and buffering" yutube vids.
The problem is having to always log in and enable the queue rules.
But now a toggle using a teensy to burst the commands to the router with a single button push.

Makes me happy.

But this little board in OP's post.. much faster and smaller to work with.
thumbs up.

pictographer
08-31-2013, 11:08 PM
My favorite approach for connecting a Teensy to the net is to use a cheap OpenWrt-capable router such as the TP-Link 703N.

These routers are under $25, have a USB port, and a wired Ethernet port as well as wireless, and run Linux. You can connect the Teensy via USB. This approach handles both data and power for the Teensy. The TP-Link takes power over a separate USB cable, so it's easy to power it from a USB battery. The router can be configured over the net with a web browser or a terminal. This approach has no dependency on a third-party cloud software that might go away or be limited to dumbed down software.

http://wiki.openwrt.org/toh/tp-link/tl-wr703n

http://www.amazon.com/Mini-Tp-link-Wireless-Router-Change/dp/B009B2V1K6/ref=sr_1_2?s=electronics&ie=UTF8&qid=1377988735&sr=1-2&keywords=TP-LINK+TL-WR703N

http://www.ebay.com/itm/121138694906?hlp=false&var=

If you're crafty, you can fit your Teensy inside the case of the router. The TP-Link 703N is very small, easily fitting in the palm of your hand. There are many good tutorials for hacking the hardware and software of this and other OpenWrt routers. Moreover, there are plenty of other routers that support OpenWrt if you need more ports, more RAM, faster clock, etc.

Note: the TP-Link 702N doesn't have enough RAM for OpenWrt, so take care when you're ordering. :-)

I have no vested interest in TP-Link; I'm a happy customer of both the TP-Link and Teensy 3, nothing more.

stevech
08-31-2013, 11:35 PM
These have been around for years, from a robust vendor. Easy to use. Unlike WiFi to Serial modules, of which there are many, this one allows full control of WiFi via serial, plus serial port based ftp, telnet, and other apps.

http://www.connectone.com/
see products -> nano modules, eval modules, etc.
http://www.connectone.com/?page_id=215 example w/microprocessor

user manuals, programming guides
http://www.connectone.com/?page_id=1683

Sold by Mouser, et al

t3andy
09-01-2013, 05:45 PM
These have been around for years

You need an additional microprocessor to make these wifi modules work. :(
Try as much as you can, but it took only two minutes to go-online
with no programming whatsoever using IO-Bridge IO-201. :D

The IO-201 is so small that you could easily embedded it into a PIR motion sensor and
have it connect to the internet for home security. When was the last time you
seen a PIR motion sensor with Wifi built-in?

So far, all the other solutions, provided on this topic are non-starters due to programming
effort needed and the size of the wifi module. :cool:

stevech
09-01-2013, 06:03 PM
depends on goal!

This is a Teensy web site, ya know :p

t3andy
09-01-2013, 07:08 PM
This is a Teensy web site, ya know
The "teensy" IO-201 wifi almost matches the size of the Teensy 3! :cool:

The Teensy 3 could be (not required) be used as a pre-processor in more advanced user appplications.:cool:

Xeon
09-03-2013, 10:26 AM
You need an additional microprocessor to make these wifi modules work. :(
Try as much as you can, but it took only two minutes to go-online
with no programming whatsoever using IO-Bridge IO-201. :D

The IO-201 is so small that you could easily embedded it into a PIR motion sensor and
have it connect to the internet for home security. When was the last time you
seen a PIR motion sensor with Wifi built-in?

So far, all the other solutions, provided on this topic are non-starters due to programming
effort needed and the size of the wifi module. :cool:

We use e'm on our wireless towers...
But yeah i know the feel.

t3andy
09-04-2013, 12:08 PM
OK, to make my post unbias in favor of the IO-201, there is one other WiFi radio which is miniature and "easy to use".
Its the TI CC3000 from Texas Instruments.

This is what Adafruit had to say about the CC3000 ...


For years we've seen all sorts of microcontroller-friendly WiFi modules but none of them were really Adafruit-worthy.
Either they were too slow, or too difficult to use, or required signing an NDA, or had limited functionality,
or too expensive, or too large. So we shied away from carrying any general purpose microcontroller-friendly WiFi boards.

NO LONGER!

The CC3000 hits that sweet spot of usability, price and capability. It uses SPI for communication (not UART!)
so you can push data as fast as you want or as slow as you want. It has a proper interrupt system with IRQ pin
so you can have asynchronous connections. It supports 802.11b/g, open/WEP/WPA/WPA2 security, TKIP & AES. A built
in TCP/IP stack with a "BSD socket" interface. TCP and UDP in both client and server mode, up to 4 concurrent sockets.
It does not support "AP" mode, it can connect to an access point but it cannot be an access point.


Adafruit made two products from the CC3000 WiFi radio, an Arduino shield ($40 USD) and a breakout board ($35 USD).

http://www.adafruit.com/products/1491
http://www.adafruit.com/products/1469

Another vendor used their own STM32 ARM Stamp and embedded the CC3000 on it and called it Spark Core. ($39 USD)
Note: Spark Core production is delayed for another month. (Oct 14)


EASY WI-FI SET-UP PROCESS
Set-up steps:

1. Enter your network name and password into the Spark App and press OK.

That was it. Seriously. You’re connected.


http://www.kickstarter.com/projects/sparkdevices/spark-core-wi-fi-for-everything-arduino-compatible.
https://www.sparkdevices.com/


What happens when their "Spark Cloud" goes down or "IO Bridge cloud server" goes down? - your WiFi devices are useless and will not work! Another alternative is to have "bare metal" library code available which will run on the Teensy 3 without the cloud.

Here comes hacker Chris Magagna to the rescue. :D

http://hackaday.com/2013/06/24/tis-cc3000-wifi-chip-gets-a-library/
http://hackaday.com/2013/01/27/a-breakout-board-for-a-tiny-wifi-chip/

He even made the CC3000 library compatible with the Teensy 3 with exceptions. He could not make the "hardware SPI" work with the CC3000 but made a "software SPI" to finish his library work. He should of contacted Paul S of PJRC about any hardware SPI issues.

https://github.com/cmagagna/ArduinoCC3000


There you have it, another small and easy to use WiFi radio which could be easily attached to the Teensy 3. :cool:

potatotron
09-04-2013, 04:04 PM
Here comes hacker Chris Magagna to the rescue.

Hey, that's me! Neat!

I actually didn't make the breakout that's in the 2nd hackaday link, but I did make this one:

https://github.com/cmagagna/CC3000-Breakout-Board

I've made 2 of these boards so far and both work, but I wouldn't recommend anyone else using it just yet -- the RF trace is the wrong width so they aren't good coplanar wave guides...I'm sure I'll do another revision at some point...

Regarding the library, I actually did make a halfhearted try to get the Teensy 3.0 hardware SPI working with the CC3000 way back in June:

http://forum.pjrc.com/threads/18742-SPI-read-problem-on-Teensy-3-0?highlight=cc3000

But that got moved to the side while I worked on other parts of the library, then Adafruit started working on their own library, so it hasn't been a high priority to me. I hope to get back to it eventually because the CC3000 can handle SPI up to 16 Mhz, much faster than the 4 Mhz the standard Arduino SPI library can do, and when you're moving data every bit helps.

Right now I'm working on porting the Texas Instruments firmware upgrade to the Arduino. All the CC3000 modules I've seen have firmware version 1.10 which has lots of bugs; the current firmware is 1.19. TI released code to upgrade the CC3000 using their MSP430 Launchpad, but so far all my attempts at porting have resulted in bricked modules. Still, work continues....

Once I get the firmware upgrade ported I'll get back to library development. My ultimate goal is a Teensy 3 web server that supports DDNS, so I'll follow the path of least resistance...using Adafruits library, continuing work on my own, forking the two into a new blend, etc. that's what I'll do.

Chris / potatotron

[1] Adafruit's boards do ship with CC3000 firmware 1.19 but they've been cryptic as to whether they ported the upgrade and aren't making it public, have a special deal with TI to get their modules pre-upgraded, etc.

t3andy
09-04-2013, 09:32 PM
@Chris / potatotron

If you could get a Teensy 3 Web Server working with the CC3000 that would be a major accomplishment! :D

Since the overclocked Teensy 3 has plenty of RAM and flash resources at a very low price of only $19 USD and
getting the CC3000 breakout board down to about $11 would "short circuit" both Adafruit and Spark Core.

"Katie bar the door" ---> there would be a huge demand for this Teensy 3 / CC3000 combo !!!!

If you need any beta testers, I will provide my services if I could obtain a test CC3000 breakout module :cool:

PaulStoffregen
09-04-2013, 10:23 PM
I hope to get back to it eventually because the CC3000 can handle SPI up to 16 Mhz, much faster than the 4 Mhz the standard Arduino SPI library can do, and when you're moving data every bit helps.

Please try to make some good benchmarks or speed tests. Ideally, a benchmark should measure the actual performance when doing something that would actually be used in a real project (not just a synthetic test like how fast a loopback mode runs), and should use normal Arduino functions like millis() or micros() to measure time, so it could run on any Arduino compatible board.

If you make some good benchmarks, I'll probably take a look at adding native SPI code.

Xeon
09-05-2013, 10:54 AM
I'll look into getting you some detailed readings paul.