Electronics project notes/ESP notes

From Helpful
Jump to: navigation, search
This is for beginners and very much by a beginner. It's meant to try to cover hobbyist needs, and as a starting point to find out which may be the relevant details for you, not for definitive information.

Some basics and reference: Volts, amps, energy, power · Ground · batteries · resistors · changing voltage · transistors · fuses · diodes · varistors · capacitors · inductors · transformers · baluns · amplifier notes · frequency generation · skin effect

And some more applied stuff:

IO: IO and wired communication · localish communication · wireless (ISM RF, GSM, RFID, more) · 802.11 (WiFi) · 802.15 (including zigbee)

Sensors: General sensor notes, voltage and current sensing · Knobs and dials · Pressure sensing · Temperature sensing · humidity sensing · Light sensing · Movement sensing · Capacitive sensing · Touch screen notes

Actuators: General actuator notes, circuit protection · Motors and servos · Solenoids

Some stuff I've messed with: Avrusb500v2 · GPS · Hilo GPRS · Bluetooth serial · JY-MCU · DMX · ESC/POS notes

Audio notes: basic audio hacks · microphones · amps and speakers · device voltage and impedance, audio and otherwise ·

Less sorted: Common terms, useful basics, soldering · Microcontroller and computer platforms · Arduino and AVR notes · ESP series notes · Electronics notes/Phase Locked Loop notes · mounts, chip carriers, packages, connectors · signal reflection · pulse modulation · electricity and humans · Unsorted stuff

See also Category:Electronics.

See Electronics_project_notes/Microcontroller_and_computer_platforms#ESP_series for some basic hardware introduction.

ESP chip and basic boards

Current draw, care with voltages

Current draw

The ESP8266 tends to draw ~80mA on average (light wifi use), transmission peaks in specific cases may take 170mA (more in very short spikes that shouldn't matter if there's capacitors there).

Startup seems to peak at 430mA or so[1] (RF calibration maybe?) which you may want to factor in power supply wise.

There are a few sleep modes

Voltage and damage

The ADC gets damaged by voltages about 1V max, so use a voltage divider.

Power should be 3.3V.

Powering from 5V power is likely to shorten lifespan, some people report sooner rather than later (and seemingly frequently the flash next to it fails first).

It seems that the question of whether IO pins are 5V tolerant varies with what you're connecting and how:

The datasheet says: "All digital IO pins are protected from over-voltage with a snap-back circuit connected between the pad and ground. The snap back voltage is typically about 6V, and the holding voltage is 5.8V. This provides protection from over-voltages and ESD. The output devices are also protected from reversed voltages with diodes."

The "5V not recommended" probably comes from the protection diodes being able to deal with relatively little current. The "IO is 5V tolerant" is e.g. true with a series resistor ensuring these diodes never see much current. And in some cases you don't even need that. (note: at this point you're just one more resistor away from doing it more properly with a voltage divider) (note: high-speed communication needs more care).

3.3V IO pins that output to things expectng 5V TTL levels will generally just work, because TTL's high is above 2V. Yet note that it's not enough for 5V CMOS (high above 3.7V). The thresholds can vary a little per device anyway, so check datasheets.

Larger boards

CH340G USB-to-serial

Used frequently as the USB-to-serial. (Apparently it's cheaper than the FTDIs or AVRs used e.g. on Arduino boards)

Driver may be installed automatically on all OSes, so if not detected you need to find the driver and possibly some instructions.

Datasheet: https://cdn.sparkfun.com/datasheets/Dev/Arduino/Other/CH340DS1.PDF



WeMos D1

and a revision "D1 R2", with minor difference in pins between the two.
Arduino-sized board, partially compatible

D1 Mini, specifically:

D1 Mini Lite
1MB Flash
PCB antenna
D1 Mini
4MB Flash
PCB antenna
D1 Mini Pro
16MB Flash
Lithium battery pin, charger chip
PCB antenna + Antenna connector

D32, based on ESP32

Lithium battery pin, charger chip
D32 Pro
Lithium battery pin, charger chip
MicroSD socket

(with some revisions)


NodeMCU devkit

NodeMCU itself refers to the firmware, which you can run on any ESP really.

...but there is also an easily-breadboardable piece of hardware called the 'NodeMCU Devkit'


flashing new firmware

Firmware alternatives

AT commands firmware

NodeMCU firmware


On WiFi