All Projects → HarringayMakerSpace → Usb Esp

HarringayMakerSpace / Usb Esp

How to make a tiny USB powered ESP-12S

Projects that are alternatives of or similar to Usb Esp

Uhubctl
uhubctl - USB hub per-port power control
Stars: ✭ 1,036 (+2556.41%)
Mutual labels:  power, usb
X Cube Usb Pd
USB-C Power Delivery Firmware for STM32 microcontroller (ARM Cortex M0 & M4)
Stars: ✭ 41 (+5.13%)
Mutual labels:  power, usb
Esp32 esp8266 wifi speaker oled
A MP3 streaming WiFi speaker for ESP8266 & ESP32 chips
Stars: ✭ 20 (-48.72%)
Mutual labels:  esp8266
Esp3d
FW for ESP8266/ESP8285/ESP32 used with 3D printer
Stars: ✭ 979 (+2410.26%)
Mutual labels:  esp8266
Esp8266 Bitcoin Ssid Ticker
A Bitcoin SSID ticker for ESP8266's written in Arduino C/C++
Stars: ✭ 31 (-20.51%)
Mutual labels:  esp8266
Lsusb
Most popular USB devices and lsusb reports
Stars: ✭ 19 (-51.28%)
Mutual labels:  usb
Smarthome
💡 智能电器管理综合系统
Stars: ✭ 33 (-15.38%)
Mutual labels:  esp8266
Esp8266 pir
ESP8266 Motion Detector to IFTTT
Stars: ✭ 15 (-61.54%)
Mutual labels:  esp8266
Stream Deck Api
API to interact with the Elgato Stream Deck controller
Stars: ✭ 36 (-7.69%)
Mutual labels:  usb
Emodbus
Modbus library for both RTU and TCP protocols. Primarily developed on and for ESP32 MCUs.
Stars: ✭ 29 (-25.64%)
Mutual labels:  esp8266
Mclighting
The ESP8266 based multi-client lighting gadget
Stars: ✭ 977 (+2405.13%)
Mutual labels:  esp8266
Xow
Linux driver for the Xbox One wireless dongle
Stars: ✭ 947 (+2328.21%)
Mutual labels:  usb
Smarthome
SmartHome: firmware per ESP8266 - Casa domotica
Stars: ✭ 28 (-28.21%)
Mutual labels:  esp8266
Rogue router
Solar Access Point Fileserver for Sparkfun Thing
Stars: ✭ 34 (-12.82%)
Mutual labels:  esp8266
Easyntpclient
Library to read time from Network Time Protocol (NTP) servers.
Stars: ✭ 20 (-48.72%)
Mutual labels:  esp8266
Usbip Windows
USB/IP for Windows
Stars: ✭ 36 (-7.69%)
Mutual labels:  usb
Openwifidetectoresp8266
MASLOW: an Open WiFi Detector with ESP8266
Stars: ✭ 15 (-61.54%)
Mutual labels:  esp8266
Catchme
CatchME - WiFi Fun Box "Having Fun with ESP8266"
Stars: ✭ 28 (-28.21%)
Mutual labels:  esp8266
Esp8266 smartconfig flutter example
Esp8266 smartconfig(onetouch) config using flutter example
Stars: ✭ 33 (-15.38%)
Mutual labels:  esp8266
Wifi ducky
Upload, save and run keystroke injection payloads with an ESP8266 + ATMEGA32U4
Stars: ✭ 991 (+2441.03%)
Mutual labels:  esp8266

How to make a tiny USB powered WiFi Web Server or IoT Device from an ESP8266/Arduino ESP-12S

Alt text

This shows how to make a little USB powered ESP8266 that can run descretly plugged into USB socket, such as a USB phone charger or power bank, for a cost of just a few pounds.

Have it running as your own little web server, or add sensors to make a tiny IoT device.

What you need

Alt text

You need:

  1. A USB LED Light

    You can find these from Internet sellers, eg. Banggood currently have them for less than 50p when buying 3 or more.

  2. A 3.3V regulator, eg HT7833

    The SOT-89 package has the correct pinout for this

  3. An ESP-12S

    This must be the "S" version of the ESP-12. The "S" version has built-in pull-up/down resistors and bypass capacitors so you don't need to add these as external components. Eg. these for £1.89 on EBay

Note: I've made a few of these now and have had intermittent problems with one having occasional crashes on restart/wakeups. After trying a few different USB power supplies I've soldered an additional 100uF capacitor across the ESP power supply pins and its now been running fine for a couple of months doing restarts once every 15 minutes. So it appears that even with the "S" version of the ESP-12 module the additional bypass capacitor is needed to ensure stability.

Assembly

Alt text

First remove the resistor and three LED's from the USB stick. They come off quite easily heated up with a soldering iron and lifted with a small screw driver. The LED's are wired in parallel with all the bottom pads connected to the USB +5V and the left pad of the resistor connected to the USB GND.

Next solder on the XC6206 regulator. The SOT-89 package format just happens to fit perfectly where the resistor used to be and with the top tag of the regulator on the middle LED pad, with the correct GND and 5V input. A blob of BlueTack helps get it aligned and held in place while you solder it.

Next, turn the USB stick over and with a couple of drops of super glue stick on the ESP-12.

Finally add a short wires from each side of the XC6206 to the bottom pins on each side of the ESP-12 for the GND and +3V connections. Also, if its going to use deepSleep then add the connection between the ESP-12 pins 16 and Reset (thats the small white wire on the top right in the photo, connected to the top right pin and the 4th pin down).

Thats it! You can now plug it into a USB socket it will start running.

Add environment sensor

You can add small sensors on the back, for example, make an environment sensor by adding a BME280 which measures temperature, air pressure and humidity (about £3 from AliExpress).

Note, the ESP8266 uses about 70mA when running so gets noticably warm, which will effect the readings of any temperature sensor mounted on the back. To avoid that the ESP needs to use deep sleep most of the time and only wake up briefly to send the sensor readings. I've found it needs to deep sleep for at least about 3 minutes per sensor publish to avoid the heat problem.

Alt text

Or a simple temperature sensor with a DS18B20

Alt text

Or a tiny webserver with 32GB storage

Make a tiny webserver with SD Card storage by adding one of these Micro SD Card readers for just £1.

Alt text

Code

You need to program the ESP8266. Mounted on the USB stick like this it is most convenient to use the Over-The-Air (OTA) programming which enables you to "flash" or re-program it wirelessly. However that does still require one first upload over wires to flash it with the OTA sketch.

You need to install the Arduino IDE with ESP8266 support, as described here.

For the initial code you can just use the BasicOTA sketch that comes as an IDE example. Find that with the IDE menu bar "File -> Examples -> ArduinoOTA -> BasicOTA", and update the sketch with your Wifi netword SSID and password:

Alt text

To wire the bare ESP-12 up for flashing is a bit harder than one on a breakout board but its only six connections. Hold the bare ESP-12s in place with a blob of blutack and use male jumper wires which you've tinned with solder, and its not too hard with careful soldering to attach the jumper leads to the ESP-12 pads. You can use the UART chip from another dev module to program it - you need wires on the ESP-12 pins: VCC, GND, TX, RX, RST, and GPIO-0. This is the ESP-12 pinout:

Alt text

You connect those to a serial (FTDI) adapter, or if you don't have one of those you can use any ESP8266 development board like a NodeMCU which you've connected CH_EN to GND to disable the ESP8266 on the development board, and then connect the ESP-12 pins (VCC, GND, TX, RX, RST, and GPIO-0) to the same pins on the NodeMCU. Here's what that looks like:

Alt text

(if all that sounds too hard, buy one of these)

Example sketch

Once you have your ESP-12 flashed with the OTA sketch you can use it how you like, adding sensors etc, and reflashing it with a new updated sketch - but always keep incluing the OTA code part of the sketch so you can always do OTA updates to the code.

There is an example sketch here for a IoT type device sending sensor readings to ThingSpeak, uses deep sleep, WiFi Manager for network configuration, and ThingSpeak channel metadata for configuration and OTA firmware downloads from an HTTP url.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].