Control Sonoff Basic Switch with ESP Easy Firmware and Node- RED
432.Control Sonoff Basic Switch with ESP Easy Firmware and Node- RED You will gain the knowledge necessary to install the ESP Easy firmware on a Sonoff basic smart switch and utilize the…

Know the mission before touching a wire.
Understand what you are making, prepare the right tools, and make the workbench safe.
Project details
Control Sonoff Basic Switch with ESP Easy Firmware and Node- RED is a iot project. 432.Control Sonoff Basic Switch with ESP Easy Firmware and Node- RED You will gain the knowledge necessary to install the ESP Easy firmware on a Sonoff basic smart switch and utilize the…
- Source pages
- 1050-1055
- Named parts
- 7
- Build goal
- Working, tested prototype
Tools you need
- Digital multimeter
- Wire stripper and side cutters
- Soldering iron with a fine tip
- Current-limited bench supply
- Computer with a data-capable USB cable
Use eye protection, good lighting, and a clean insulated surface throughout the build.
Safety precautions
- Disconnect every power source before changing a connection.
- Check component polarity, pinout, and supply voltage twice.
- Use a current limit for the first power-up.
- This project may involve hazardous voltage. Work only with qualified supervision and proper isolation.
Gather, identify, and understand every part.
Use the standardized inventory, then open What's this? to learn each part's role, advantages, limitations, handling, and specifications.
What's this?Image, role, pros, cons, handling & specifications

Smart Switch by Sonoff with Wi-Fi
A named project component whose exact role is defined by the source circuit and build guide.
What it does hereIt performs a documented electrical, control, interface, or construction function in this project.
Buy / compare this part ↗Advantages
- Selected for this project
- Can be checked independently
- Supports modular troubleshooting
Limitations
- Substitutes may differ
- Generic names can hide variants
- Pinouts and ratings vary
Handling
- Compare the received part with the source
- Keep it labelled
- Do not force connectors or adjusters
Specifications to verify
- Use the exact model, value, package, and rating listed for Smart Switch by Sonoff with Wi-Fi; similar-looking parts are not always interchangeable.
- Confirm dimensions, ratings, connection method, polarity, and environmental limits.
What's this?Image, role, pros, cons, handling & specifications

FTDI Programmer
A named project component whose exact role is defined by the source circuit and build guide.
What it does hereIt performs a documented electrical, control, interface, or construction function in this project.
Buy / compare this part ↗Advantages
- Selected for this project
- Can be checked independently
- Supports modular troubleshooting
Limitations
- Substitutes may differ
- Generic names can hide variants
- Pinouts and ratings vary
Handling
- Compare the received part with the source
- Keep it labelled
- Do not force connectors or adjusters
Specifications to verify
- Use the exact model, value, package, and rating listed for FTDI Programmer; similar-looking parts are not always interchangeable.
- Confirm dimensions, ratings, connection method, polarity, and environmental limits.
What's this?Image, role, pros, cons, handling & specifications

Raspberry Pi Power Supply (Raspberry Pi) (5V 2.5A)
A power component supplies, converts, stores, or regulates energy for the project.
What it does hereIt must provide the documented voltage, polarity, isolation, and sufficient current safely.
Buy / compare this part ↗Advantages
- Stable power improves reliability
- Current limiting protects first tests
- Regulation reduces resets and noise
Limitations
- Wrong polarity can cause immediate damage
- Underrated parts overheat
- Mains circuits require qualified supervision
Handling
- Measure output before connection
- Use a fuse or current limit
- Insulate exposed conductors
Specifications to verify
- Use the exact model, value, package, and rating listed for Raspberry Pi Power Supply (Raspberry Pi) (5V 2.5A); similar-looking parts are not always interchangeable.
- Confirm input/output voltage, current, polarity, connector, isolation, and thermal rating.
What's this?Image, role, pros, cons, handling & specifications

About the Sonoff
A named project component whose exact role is defined by the source circuit and build guide.
What it does hereIt performs a documented electrical, control, interface, or construction function in this project.
Buy / compare this part ↗Advantages
- Selected for this project
- Can be checked independently
- Supports modular troubleshooting
Limitations
- Substitutes may differ
- Generic names can hide variants
- Pinouts and ratings vary
Handling
- Compare the received part with the source
- Keep it labelled
- Do not force connectors or adjusters
Specifications to verify
- Use the exact model, value, package, and rating listed for About the Sonoff; similar-looking parts are not always interchangeable.
- Confirm dimensions, ratings, connection method, polarity, and environmental limits.
What's this?Image, role, pros, cons, handling & specifications

several different brands of smart devices, including Sonoff products. It
A named project component whose exact role is defined by the source circuit and build guide.
What it does hereIt performs a documented electrical, control, interface, or construction function in this project.
Buy / compare this part ↗Advantages
- Selected for this project
- Can be checked independently
- Supports modular troubleshooting
Limitations
- Substitutes may differ
- Generic names can hide variants
- Pinouts and ratings vary
Handling
- Compare the received part with the source
- Keep it labelled
- Do not force connectors or adjusters
Specifications to verify
- Use the exact model, value, package, and rating listed for several different brands of smart devices, including Sonoff products. It; similar-looking parts are not always interchangeable.
- Confirm dimensions, ratings, connection method, polarity, and environmental limits.
What's this?Image, role, pros, cons, handling & specifications

ESP8266 - controller board / IC
A programmable controller that reads inputs, makes decisions, and drives the project's outputs.
What it does hereIt is the control centre and must use the documented board, pin map, supply, and logic level.
Buy / compare this part ↗Advantages
- Reprogrammable and reusable
- Large learning ecosystem
- Complex behaviour remains changeable
Limitations
- GPIO voltage and current are limited
- Some pins affect boot or communication
- Loads normally need a driver
Handling
- Disconnect power before rewiring
- Avoid static discharge
- Never power motors, relays, or pumps directly from GPIO
Specifications to verify
- Use the exact model, value, package, and rating listed for ESP8266 - controller board / IC; similar-looking parts are not always interchangeable.
- Confirm operating voltage, logic level, pinout, memory, USB interface, and maximum GPIO current.
What's this?Image, role, pros, cons, handling & specifications

ESP32 - controller board / IC
A programmable controller that reads inputs, makes decisions, and drives the project's outputs.
What it does hereIt is the control centre and must use the documented board, pin map, supply, and logic level.
Buy / compare this part ↗Advantages
- Reprogrammable and reusable
- Large learning ecosystem
- Complex behaviour remains changeable
Limitations
- GPIO voltage and current are limited
- Some pins affect boot or communication
- Loads normally need a driver
Handling
- Disconnect power before rewiring
- Avoid static discharge
- Never power motors, relays, or pumps directly from GPIO
Specifications to verify
- Use the exact model, value, package, and rating listed for ESP32 - controller board / IC; similar-looking parts are not always interchangeable.
- Confirm operating voltage, logic level, pinout, memory, USB interface, and maximum GPIO current.
Connect one verified path at a time.
Explore the named components and standardized signal flow, then use Source Check to verify exact physical pins, values, and topology before applying power.
Trace this circuit.
Control Sonoff Basic Switch with ESP Easy Firmware and Node- RED: interactive parts, standardized terminals, responsive anchored wires, student explanations, and the original circuit reference in one shared system.
Trace before wiring
Follow power, ground, inputs, processing, and outputs in that order. Never guess a pin from package shape alone.
Connect with power off
Make short, labelled connections and share a common ground only where the schematic requires it.
Inspect every joint
Check continuity, polarity, adjacent shorts, and loose connections before the first power-up.
Open all source diagrams and build views 5 visuals





Confirm the hardware-only control path.
This project does not include firmware in the source. The circuit itself provides the required behaviour.
How to connect
- Match every controller label to the circuit view and source pin map.
- Join grounds before signal wires when separate low-voltage supplies are used.
- Keep motors, relays, pumps, and other loads on a suitable driver and external supply.
Common mistakes
Reversed VCC/GND, board-label versus GPIO-number confusion, missing common ground, and charge-only USB cables.
Troubleshoot
Disconnect loads, continuity-test one path at a time, then test with a current limit.
Software preparation
No IDE, board package, library, or firmware upload is required for this project.
If you add a programmable controller as an extension, document its pin map separately.
How to upload code
The original design is implemented entirely in hardware, so proceed after verifying the circuit and supply.
Assemble, deploy, test, and troubleshoot.
Use the complete source notes in build order, then pass the final checks before calling the project finished.
Build in functional stages
- Power and regulation
- Controller or processing stage
- Inputs and sensors
- Outputs and loads
- Enclosure and strain relief
Power up safely
- Inspect unpowered continuity first
- Apply the lowest safe current limit
- Measure supply rails before signals
- Add one load at a time
- Record expected and actual results
Work from simple to complex
- Confirm power, ground, polarity, and orientation
- Compare each pin with the source
- Test inputs separately from outputs
- Replace only one variable at a time
- Power off before every correction
Follow the documented instructions.
These notes come from this project's source and remain in their original order.
Project overview
Project build note432.Control Sonoff Basic Switch with ESP Easy Firmware and Node- RED You will gain the knowledge necessary to install the ESP Easy firmware on a Sonoff basic smart switch and utilize the Node-RED dashboard to exercise control over the switch. On a Raspberry Pi, the Node-RED software is currently being executed. The ESP Easy firmware can also be coupled with various other home automation platforms, such as Home Assistant, Domoticz, openHAB, and so on.
Figure: Diagram provides a high-level summary of how the project is carried out.
Project build noteYou will finish this project with a Sonoff that is loaded with the ESP Easy firmware and that can be controlled with HTTP GET requests made from a web browser or another Wi-Fi capable device. You will be able to integrate it with the majority of home automation platforms once you have finished configuring it on the ESPEasy web interface. In this demonstration, I'll be utilizing Node-RED, which will be running on a Raspberry Pi. After connecting a few nodes, you will see a button appear on your Node-RED dashboard that you can use to control the Sonoff.
Parts Required
Project build noteSmart Switch by Sonoff with Wi-Fi FTDI Programmer
Read more about the Raspberry Pi Board in our article about the Best Raspberry Pi Starter Kits. MicroSD Card with at least 8 GB and Class 10 speed Raspberry Pi Power Supply (Raspberry Pi) (5V 2.5A) About the Sonoff The Sonoff is a device that is connected in series with your home's power lines and gives you the ability to control any electronic appliance from a distance. The app platform known as Sonoff eWeLink is compatible with several different brands of smart devices, including Sonoff products. It enables connections between various types of smart hardware and integrates popular smart speakers like Google Home and Amazon Alexa. To explain it more simply, a Sonoff device consists of an ESP8266 chip that is connected to a relay. Through this method, you will be able to connect to the Sonoff via Wi-Fi in order to operate the relay. The eWeLink app can be used to take control of the Sonoff thanks to the firmware that comes preinstalled on the device. On the other hand, the majority of people favor flashing the Sonoff device with their own personal firmware, just as we will do in this project.
Safety warning
Project build noteDuring the process of uploading a new firmware, you need to ensure that your Sonoff is unplugged from the voltage supplied by the mains. When a Sonoff component is linked to mains voltage, you should never touch it in any way. After everything has been removed and disconnected, the plastic box enclosure of the Sonoff should be opened. Sonoff Pinout The Sonoff is supposed to be hacked, and you can see plainly that some connections were left out, so that you can solder some pins and install a modified firmware. The figure below depicts the pinout. Preparing 3.3V FTDI Programmer You need an FTDI programmer to upload a new firmware to your Sonoff. Use the schematics provided as a reference.
Warning: downloading a custom firmware is irrevocable and you’ll no longer be able to utilize the app eWeLink. I’ve placed a toggle switch in the power line, so that I can easily turn the Sonoff on and off to flash a new firmware without having to remove the FTDI programmer. I used hot glue to connect the ends of the wires together. This stops you from establishing erroneous connections between the FTDI programmer and the Sonoff in the future. Boot your Sonoff in Flashing Mode To flash a new firmware to your Sonoff, you have to boot your Sonoff in flashing mode. To accomplish this, proceed with the following four steps: 1. Establish a connection between your computer and the 3.3V FTDI programmer. 2. Keep your finger on the button for the Sonoff. 3. Keep your finger on the button for the Sonoff. 4. After that, you are free to let off of the button on the Sonoff. Now that your Sonoff ought to be in flashing mode, you should be able to transfer a fresh firmware onto it. ESP Easy Firmware
Read more about it on their wiki page, but the ESP Easy is a firmware that can be installed in any ESP module, whether it be an ESP-01, an ESP8266- 12E, an ESP32, or something else entirely. You won't need to write any code if you use this firmware because it gives you an easy way to configure your ESP module. After the firmware has been loaded, all of the setups, such as designating GPIOs as inputs, outputs, etc., are done in your browser using a graphical interface that is friendly to users.
You built Control Sonoff Basic Switch with ESP Easy Firmware and Node- RED.
You followed the full workflow from understanding the mission to testing the finished project. That is a real engineering achievement - well done.
Browse all 500 projects