Author Topic: WiFi for existing Arduino  (Read 2224 times)

0 Members and 1 Guest are viewing this topic.

Offline ziplock9000Topic starter

  • Regular Contributor
  • *
  • Posts: 173
  • Country: gb
WiFi for existing Arduino
« on: July 02, 2018, 09:19:33 pm »
I've been looking for a cheap and easy to use way to add WiFi capability to my Arduino UNO and then potentially a stand alone pro mini solution. After lots of Googling I keep finding the fabled ESP8266 solution in all of it's forms. The only "problem" is that every solution I find has a module that also includes its own MCU which is programmed separately from the host Arduino. Short of using the WiFi chip directly, are there no WiFi modules that plug into an existing Arduino and allow you to program that instead.. with all of the functionality you'd expect, ease of use etc?
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9889
  • Country: us
Re: WiFi for existing Arduino
« Reply #1 on: July 02, 2018, 10:03:07 pm »
https://www.adafruit.com/product/3653

This device apparently has some firmware but the majority of the code is in a provided library.  But the library is huge; it can not be used if the SD card library is in use.  Let's face it, the Arduino UNO is a tiny little CPU with an insignificant amount of memory.

Nevertheless, this gadget will work in some cases.  Or you can use a better board.

 
The following users thanked this post: ziplock9000

Offline malagas_on_fire

  • Frequent Contributor
  • **
  • Posts: 591
  • Country: pt
  • Kernel Panic
    • Malagas Lair
Re: WiFi for existing Arduino
« Reply #2 on: July 02, 2018, 10:07:17 pm »
There are always possibilities but they not present the cheapest :


Arduino SPI WiFi Module

https://www.emartee.com/product/41983/Arduino-WiFi-Wireless-Module

Keep in mind that the processing headup in this scenario adds up to the Arduino and the ESP solution has it's 32bit microcontroller which can manage better the TCP/ IP packets

http://www.mpja.com/TTL-WiFi-Serial-Module-with-Passthrough-for-Arduino/productinfo/32692+MP/
If one can make knowledge flow than it will go from negative to positve , for real
 
The following users thanked this post: ziplock9000

Offline ziplock9000Topic starter

  • Regular Contributor
  • *
  • Posts: 173
  • Country: gb
Re: WiFi for existing Arduino
« Reply #3 on: July 03, 2018, 09:15:14 am »
Thanks. So you recommend I should persevere with ESP8266 with onboard MCUs to handle the I/O and TCP/IP stack.. then have the host just perform the business logic? If this is the case, do you (or anyone else) know tutorials where a host arduino talks to the ESP8266 MCU in this way (again, I can't find any)

Thanks.
 

Offline cyclin_al

  • Frequent Contributor
  • **
  • Posts: 856
  • Country: ca
  • VE3TSD / VA2XAR
Re: WiFi for existing Arduino
« Reply #4 on: July 03, 2018, 01:39:57 pm »
If you are not fixed to the ESP8266, there are some other options.

For example, with a STM32F205 with WiFi and a Cloud service, there is the Particle Photon.
See particle.io.
It uses 3.3V logic, is mostly Arduino compatible (most Arduino libraries can be used directly without having to port them) and comes with a Cloud service to get up and running quickly.

I am not associated with Particle, just a happy user.
 
The following users thanked this post: ziplock9000

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9889
  • Country: us
Re: WiFi for existing Arduino
« Reply #5 on: July 03, 2018, 02:46:20 pm »
Thanks. So you recommend I should persevere with ESP8266 with onboard MCUs to handle the I/O and TCP/IP stack.. then have the host just perform the business logic? If this is the case, do you (or anyone else) know tutorials where a host arduino talks to the ESP8266 MCU in this way (again, I can't find any)

Thanks.

Sure, you leave the TCP/IP stack and protocol handling to the ESP8266

Google is your friend:  search for 'esp8266 arduino tutorial'  Projects are all over the place. 1,920,000 hits...

 

Offline malagas_on_fire

  • Frequent Contributor
  • **
  • Posts: 591
  • Country: pt
  • Kernel Panic
    • Malagas Lair
Re: WiFi for existing Arduino
« Reply #6 on: July 03, 2018, 11:28:09 pm »
Hi there
I didn't mean that you're not restricted to the ESP chipset, but in many applications it is seen in a 32 / 64 bit cpu implementation and the ESP has massive

Here is a cheap module from Microchip :

http://www.microchip.com/developmenttools/ProductDetails/atwilc1000-sd

It uses SDIO and SPI , so it is suitable for Linux Embedded CPU or 8 bit microcontroller. its works great
If one can make knowledge flow than it will go from negative to positve , for real
 
The following users thanked this post: ziplock9000

Offline tpowell1830

  • Frequent Contributor
  • **
  • Posts: 863
  • Country: us
  • Peacefully retired from industry, active in life
Re: WiFi for existing Arduino
« Reply #7 on: July 03, 2018, 11:49:17 pm »
Hmmm, raspberry PI?
PEACE===>T
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9889
  • Country: us
Re: WiFi for existing Arduino
« Reply #8 on: July 04, 2018, 12:02:06 am »
Hmmm, raspberry PI?

Always a better option for the networking aspects but not for any real-time considerations.  We don't have any information on the application.
 

Offline ziplock9000Topic starter

  • Regular Contributor
  • *
  • Posts: 173
  • Country: gb
Re: WiFi for existing Arduino
« Reply #9 on: July 04, 2018, 09:42:21 am »
Thanks. So you recommend I should persevere with ESP8266 with onboard MCUs to handle the I/O and TCP/IP stack.. then have the host just perform the business logic? If this is the case, do you (or anyone else) know tutorials where a host arduino talks to the ESP8266 MCU in this way (again, I can't find any)

Thanks.

Sure, you leave the TCP/IP stack and protocol handling to the ESP8266

Google is your friend:  search for 'esp8266 arduino tutorial'  Projects are all over the place. 1,920,000 hits...
I already mentioned in my OP that I tried Google and got no clear answers that addressed my specific query. No need for sarcasm.
 

Offline NivagSwerdna

  • Super Contributor
  • ***
  • Posts: 2495
  • Country: gb
Re: WiFi for existing Arduino
« Reply #10 on: July 04, 2018, 10:21:54 am »
I've been looking for a cheap and easy to use way to add WiFi capability to my Arduino UNO and then potentially a stand alone pro mini solution. After lots of Googling I keep finding the fabled ESP8266 solution in all of it's forms. The only "problem" is that every solution I find has a module that also includes its own MCU which is programmed separately from the host Arduino. Short of using the WiFi chip directly, are there no WiFi modules that plug into an existing Arduino and allow you to program that instead.. with all of the functionality you'd expect, ease of use etc?
I have a number of Arduino based clocks (of strange designs) around my house and wanted to keep them synchronised.  My partially complete solution is to use a ESP8266 with a minimal program that allows me to connect to the arduinos via their UARTS to configure them.  i,e, the ESP8266 is merely a serial bridge.  There already exists code out there to do the annoying bits like configuring the WiFi access point parameters etc. (It might have been https://github.com/tzapu/WiFiManager will have to check my notes)

I bought a few ESP-01 and a programmer adapter from EBAY on the slow boat from China.  I think they were <£1 each and seem to work.
« Last Edit: July 04, 2018, 10:23:42 am by NivagSwerdna »
 
The following users thanked this post: larsdenmark, ziplock9000

Offline ziplock9000Topic starter

  • Regular Contributor
  • *
  • Posts: 173
  • Country: gb
Re: WiFi for existing Arduino
« Reply #11 on: July 04, 2018, 11:28:28 am »
Brilliant thanks. This could be what I'm looking for.
 

Offline NivagSwerdna

  • Super Contributor
  • ***
  • Posts: 2495
  • Country: gb
Re: WiFi for existing Arduino
« Reply #12 on: July 04, 2018, 12:35:54 pm »
Brilliant thanks. This could be what I'm looking for.
np. Live long and prosper
 

Offline Sudo_apt-get_install_yum

  • Regular Contributor
  • *
  • Posts: 161
  • Country: se
Re: WiFi for existing Arduino
« Reply #13 on: July 05, 2018, 08:19:18 am »
The ESP8266, 85 and 32 are all µC that have a core for handling the wireless communication, you can program it just like a Arduino UNO since it’s a µC. what many people did in the beginning of the release of this chip (before the dev tools were released) they used it as a serial bridge and sending "AT" commands to it to connect to WIFI. If that’s what you want you could just buy an ESP and load the AT command firmware on it and then just send the commands from the UNO.
 
Or you can skip the UNO and program everything directly on the ESP. it’s even compatible with the Arduino IDE and has a ton of community support!
 
The following users thanked this post: larsdenmark, ziplock9000

Offline ziplock9000Topic starter

  • Regular Contributor
  • *
  • Posts: 173
  • Country: gb
Re: WiFi for existing Arduino
« Reply #14 on: July 05, 2018, 12:27:35 pm »
I may end up using different combinations of the above depending on the application. Thanks
 

Offline C

  • Super Contributor
  • ***
  • Posts: 1346
  • Country: us
Re: WiFi for existing Arduino
« Reply #15 on: July 05, 2018, 12:53:28 pm »

If a little more money or a little more power use in not a problem, start with the ESP32 over the ESP8266

You gain a lot here on hardware pins and included hardware.
Better sleep mode and ADC are some.
In addition to this the Software side as the WIFI does not use the same CPU making your software easer to create.
The ESP32 is just better all around making it easer for you.

C
 
The following users thanked this post: ziplock9000

Offline ziplock9000Topic starter

  • Regular Contributor
  • *
  • Posts: 173
  • Country: gb
Re: WiFi for existing Arduino
« Reply #16 on: July 05, 2018, 01:17:40 pm »

If a little more money or a little more power use in not a problem, start with the ESP32 over the ESP8266

You gain a lot here on hardware pins and included hardware.
Better sleep mode and ADC are some.
In addition to this the Software side as the WIFI does not use the same CPU making your software easer to create.
The ESP32 is just better all around making it easer for you.

C

That looks like a fantastic piece of kit. Very powerful in many ways. Many come with several sensors already installed. I'm just worried that if I keep going up modularity tree I'll end up just buying a complete weather station kit or whatever the project is.
 

Offline C

  • Super Contributor
  • ***
  • Posts: 1346
  • Country: us
Re: WiFi for existing Arduino
« Reply #17 on: July 05, 2018, 02:57:12 pm »

You can get a simple ESP32 mounted on a Dip PC board at not bad price. This is just ESP32, small power supply from 5V, some buttons and often a usb to serial connection.

Thing to think about is difference from,
 trying to stuff things in small space like a Arduino UNO
Or
Using something less limited and not using it all.
Makes it very easy for a future expansion.
Something like a graphic LCD is then do I what one here and not a case of can hardware talk and can I fit in the software & will it be fast.

You can buy a complete weather station kit or whatever
But this often leads to a bunch of separate things that will not work together.
But how great is it? Will it tell you temperature in the sun and shade?

Think of building a simple clock using an Arduino. You would need to add a real time clock with battery backup for when power failed. You end up with a bunch of pain in the ___ clocks that are not the same or have to be set often.
That WIFI will let you get time from the others and master time from the internet. Simple and automatic

If you keep it simple, powerful CPU like this can do a lot with out requiring a lot of hardware.

And once programed you can have access to over the air software updates.

Think of building little things that can work together.

When you want to link two or more micro-controllers with wire, Think you will find that CAN bus is often the best option. There is great reasons industry uses it and not UART, SPI or I2C.

So a better foundation now is better for future as you now have option to change or not

C

 
The following users thanked this post: ziplock9000

Offline Naguissa

  • Regular Contributor
  • *
  • Posts: 114
  • Country: es
    • Foro de electricidad, electrónica y DIY / HUM en español
Re: WiFi for existing Arduino
« Reply #18 on: July 06, 2018, 01:13:10 pm »
I created a ESP8266-oriented library for Arduino for this, using AT commands: https://github.com/Naguissa/WiFiLib

Also an SD card version with cooperative multitasking-like system (a state machine...) more focused on serving web pages and resources from SD (also AT commands): https://github.com/Naguissa/WiFiSDCoopLib

Both versions works with standard ESP8266 firmware. If you have trouble or you flashed with your own incompatible one you can use this one: https://github.com/Naguissa/WiFiSDCoopLib/tree/master/firmware%20-%20optional/ESP8266%20with%20512K%20Flash



But, for more reliable and complete solution it would be better to develop a program for the ESP8266 and use any kind of protocol to integrate it with your existing Arduino.


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf