Shenzhen Xin Yuan Electronic Technology Co., Ltd.
 
手机官网
 
关注我们微信公众号
购物车图片 购物车 ( )
找服务 找新闻
全部商品分类
服务热线: (86)13928411439
排行 精选
  • describeESP32 Wi-Fi, the Bluetooth built-in ESP - WROOM - 32 microcomputer module, is used on the test circuit board. The central part of the test circuit board plug is compact, 300 mil wide, and the other parts are blocked. In addition, the reset and program write mode switching circuitry is also loaded, so there is no need to make it on another model.Use instance pictures
    2017 - 09 - 06
    describe1.New Original chip: LSM303C2.3 magnetic field channels and 3 acceleration channels3.LSM303C internal magnetic field = LIS3MDLUsing 4.Power Supply: 3-5v5.±16 gauss magnetic full scale6.±2/±4/±8 g selectable acceleration full scale7.16-bit data output8.SPI / I2C serial interfaces9.Analog supply voltage 1.9 V to 3.6 V10.Power-down mode / low-power mode11.Programmable interrupt generators for freefall, motion detection and magnetic field detection12.Embedded temperature sensor13.Embedded FIFO
    2017 - 09 - 06
    Microcontroller: ATmega32u4Clock Speed: 16 MHzOperating Voltage: 5V DCDigital I/O Pins: 10PWM Channels: 4Analog Input Channels: 5UART: 1I2C: 1Micro USB: 1Flash Memory: 32 KB of which 4KB used by bootloaderSRAM: 2.5 KBEEPROM: 1 KBPackage Included:1 x  BadUsb Beetle USB ATMEGA32U4 Development Board Module For Arduino Leonardo R3
    2017 - 09 - 06
  • Christmas 2015 yours truly was one of the lucky few in the world to receive the ESP32 for experimenting. The b...
    2017 - 08 - 02
    NOTE: The esp8266 Arduino core has a bug that causes wifi dhcp connect to fail if a delay() is used in the set...
    2017 - 08 - 02
    If you have wondered, if is it possible run your sketch on the ESP8266 program like you did on your ...
    2017 - 08 - 02
    ESP8266 as ArduinoSo this Lazy Old Geek (L.O.G.) heard about this ESP8266 IC. Basically, it’s a microcontroller that doe...
    2017 - 08 - 02
    Despite a wealth of tutorials for setting up and writing code for the ESP8266 WiFi module, there has not been much of an...
    2017 - 08 - 02
热门标签 / Products

ESP8266 As Arduino

作者:
发布时间: 2017-08-02
点击次数: 82

ESP8266 as Arduino

So this Lazy Old Geek (L.O.G.) heard about this ESP8266 IC. Basically, it’s a microcontroller that does WiFi. There are many Instructables with this chip and many with an Arduino. But most of these are using the ESP8266 as a sensor/WiFi connected to a standard Arduino.

Well, what I wanted to do was use the ESP8266 as an Arduino without having to use a standard Arduino.

The ESP8266 is a microcontroller similar to the AtMega328 used in the standard Arduino, e.g., Arduino UNO.

Now there is already a lot of information on doing this but I found it confusing, hard to figure out, sometimes misleading so I hope to simplify and clarify the process.

Special thanks to Lady Ada, Adafruit and the Adafruit HUZZAH ESP8266 breakout module. As usual she provides thorough, useful information.

Also, much of my information comes from this website:

https://github.com/esp8266/arduino

There are many versions of ESP8266s. Some of the cheaper ones are ESP-01, ESP-03. I think right now they go up to ESP-12. Plus there are other variations.

ESP-01 $2.88 ebay

ESP-03 $2.25 ebay

Cheaper on aliexpress.com


Step 1: Hardware Problems

Most communications with the ESP8266 is serial. Most computers use USB to serial converters, like FTDI chips.

PROBLEM: The ESP8266 IC requires 3.3Vdc instead of the more common 5Vdc. Also, it may need up to 250mA of current.

SOLUTION1: So some ESP8266 modules have built in 3.3Vdc regulators and are compatible with 5Vdc USB to serial devices.

Adafruit HUZZAH ESP8266 Breakout(https://www.adafruit.com/products/2471)(see picture)

SOLUTION2: So many FTDI converters have the option of converting logic to 3.3Vdc. And most have a 3.3Vdc supply. The problem is that most of the power supplies are in the FT232 IC and are only capable of supplying about 50mA of current. (see picture) This is also true of the PL2303 serial converters that I use a lot of.

So a separate 3.3Vdc power source is needed.

PROBLEM: The ESP-01 module has 2x4 header that is not compatible with breadboards.(see first picture)

SOLUTION: I took some long lead female headers and bent them with a little S-curve so that they will fit in a breadboard. (see pictures)

PROBLEM: The ESP-03 module has 2mm spacing on connectors which are not compatible with 0.1” breadboards.

SOLUTION: I have some 2mm headers so I soldered some male pins to the ESP-03. (see picture), then I took some 2mm female headers and wired them to some 0.1” headers. In this case I soldered them to a 2x4 headers so that I could plug them into the connector for the ESP-01.

Well, this works pretty good for breadboarding. (see picture) but I wanted something more permanent so I may make it into a PCB.



 

 

 

 

 

Step 2: ESP8266 As Arduino

ESP8266 As Arduino
ESP8266 As Arduino

Okay, there are many articles on how to do this. Most are very confusing. One of the better ones is:

https://learn.adafruit.com/adafruit-huzzah-esp8266-breakout/using-arduino-ide

The one I used the most is:

https://github.com/esp8266/arduino

ESP8266 Requirements

Hardware:

3.3Vdc supply 250mA or greater. I used an AMS1117 3.3 regulator. This is powered by USB 5V. (The USB requirement is that the 5Vdc has a minimum 500mA of current.)

USB to Serial 3.3Vdc. I use a PL2303 device.

******************************************************************************

WARNING: Some newer PL2303 modules have 5Vdc on TX. This could damage the ESP8266 modules.

******************************************************************************

Software:

Arduino Environment v 1.6.4 or greater

ESP8266 Setup

Software:

These are instructions from https://github.com/esp8266/arduino

Installing with Boards Manager

Starting with 1.6.4, Arduino allows installation of third-party platform packages using Boards Manager. We have packages available for Windows, Mac OS, and Linux (32 and 64 bit).

Install Arduino 1.6.4 (or greater) from the Arduino website. Start Arduino and open Preferences window. Enterhttp://arduino.esp8266.com/package_esp8266com_ind... into Additional Board Manager URLs field. You can add multiple URLs, separating them with commas. Open Boards Manager from Tools > Board menu and install esp8266 platform (and don't forget to select your ESP8266 board from Tools > Board menu after installation).

Connections:

ESP-01

UTXD RXD of USB-Serial

CH_PD 3.3V

Reset Pushbutton to Gnd

URXD TXD of USB-Serial

GPIO0 Pushbutton to Gnd

GPIO2

GND GND

TIPS: Make sure TX from serial goes to ESP-01 URXD and RX goes to UTXD

On my breadboard setup, instead of pushbuttons, I used two pin jumpers.

Procedure:

Connect USB-serial to PC and ESP-01, connect power if separate

Start Arduino 1.6.4

Select ‘Tools’ ‘Port’ whatever # your USB-serial is on

Select ‘Tools’ ‘Board’ ‘Generic ESP8266 Module’

Select ‘Tools’ ‘CPU Frequency’ ‘80MHz’ Not sure why

Select ‘Tools’ ‘Flash Size’ ‘512K (64K SPIFFS)

Select ‘Tools’ ‘Upload Speed’ ‘115200’ Some ESPs may be 9600

Put ESP8266 into Flash mode:

Ground GPIO0

Briefly ground Reset

Release GPIO0

(If you have an LED on GPIO0, it should be about ½ intensity)

Load a sketch. (You can use Blink if you change it from D13 to D2)

If it works, In the Arduino environment bottom window, you will see a string of red dots as it is programming.

TIPS: While the sketch is programming, the blue LED on the ESP-01 will flash. If you have an LED on GPIO0, it will turn off when programming is complete.

So if you’re lucky and followed my instructions you should have successfully programmed the ESP-01 with Arduino

For the ESP-03, you would expect the same procedure to work but not quite.

First you have to connect a 10K resistor from GPIO15 to ground.

Second it doesn’t have an easily accessed Reset pin.

Well, I did some research and apparently the CH_PD pin when pulled to GND will work as a Reset.

Connections:

ESP-03

UTXD RXD of USB-Serial

CH_PD 1K resistor to 3.3V

CH_PD Pushbutton to Gnd

URXD TXD of USB-Serial

GPIO0 Pushbutton to Gnd

GPIO2

GND GND

GPIO15 10K to ground

Put ESP8266 into Flash mode:

Ground GPIO0

Briefly ground CH_PD (Reset)

Release GPIO0

(If you have an LED on GPIO0, it should be about ½ intensity)

So this also works for the ESP-01.

Here is a schematic of my breadboard setup.


Step 3: Firmware

ESP8266 As Arduino

What I discovered was that loading sketches overwrites the original software which is used by many of the basic Instructables and probably with a lot used when the ESP8266 is connected to a standard Arduino.

So I needed a way to reflash it back to ‘original’ software.

The one I use is ESP8266_flasher.exe

https://drive.google.com/file/d/0B3dUKfqzZnlwVGc1YnFyUjgxelE/view?pli=1

This is on Google Drive. Up at the top there is a little icon down arrow that will say Download. Load it to your PC.

Now there is a version of firmware there but it’s not the latest.

Official version?

https://drive.google.com/folderview?id=0B_ctPy0pJuW6d1FqM1lvSkJmNU0&usp=drive_web&tid=0B3dUKfqzZnlwRjFaNTUzZFptbzg

Again, this is Google Drive.

What I did is click on 0.952 support Smar

Then click on v0.9.5.2 AT Firmw

Then click on Download and save it to your PC remembering where it is.

Procedure:

Run ESP8266_Flasher

Click on ‘Bin’ , select bin file

Select correct COM port

Now setup ESP8266 into flash mode as above.

Click on ‘Download’

Program should start Writing. This takes a while

Says Leaving… Failed to leave Flash mode

Ignore message, should be finished.

Test

Easy way to Test is to use Arduino, select port, open serial monitor

Set it to 115200 baud rate and Both NL & CR

On command line enter AT+RST

NOTE: I just noticed it says SPI Speed: 40MHz,( though crystal is 26MHz)

On command line enter AT+GMR

SDK version: 0.9.5

Step 4: Conclusions

So this seems to work pretty reliably.

You don’t have to load a bootloader onto the ESP8266.

It does seem to take a little longer to program/flash.

It’s a little harder to set it up for flashing. But I’m looking into automating some of that with an FT232 module. (My old USB-BUB doesn’t work anymore.)

I need to explore some of the WiFi capabilities of the ESP8266.



 

 

 

 

 

 

 

 

 

 

分享到:
相关推荐
2017 - 09 - 06
点击次数: 113
describeESP32 Wi-Fi, the Bluetooth built-in ESP - WROOM - 32 microcomputer module, is used on the test circuit board. The central part of the test circuit board plug is compact, 300 mil wide, and the ...
2017 - 09 - 06
点击次数: 71
describe1.New Original chip: LSM303C2.3 magnetic field channels and 3 acceleration channels3.LSM303C internal magnetic field = LIS3MDLUsing 4.Power Supply: 3-5v5.±16 gauss magnetic full scal...
2017 - 09 - 06
点击次数: 165
Microcontroller: ATmega32u4Clock Speed: 16 MHzOperating Voltage: 5V DCDigital I/O Pins: 10PWM Channels: 4Analog Input Channels: 5UART: 1I2C: 1Micro USB: 1Flash Memory: 32 KB of which 4KB used by bootl...
  • 资质认证

    服务商100%实名审核认证

  • 支付安全

    明码标价支付及信息安全

  • 专人服务

    服务全程进行信息化监控

  • 售后无忧

    服务出问题客服经理全程跟进

The unified hotline:
(86)13928411439
skype:seatechnolgy
@outlook.com


邮编:330520
  • Ali Express

  • ebay

  • "Sweeping" attention to us, more activities, surprise waiting for you
    E-mail: lily@lilygo.cc       Wechat: 13928411439       QQ :3004603945       Facebook: lily go
    Copyright ©2005 - 2013 Shenzhen Xin Yuan Electronic Technology Co., Ltd.
    犀牛云提供企业云服务