5V ESP-01 module plus relay modules

Place your projects here
Post Reply
lyizb
Posts: 93
Joined: Fri Feb 12, 2021 8:23 pm
Has thanked: 37 times
Been thanked: 23 times

5V ESP-01 module plus relay modules

Post by lyizb »

Only part of a project, but I keep finding uses for this 5V ESP-01 carrier module.

With a twisted pin on a long-pin socket soldered to a 3-pin right angle socket, it makes a tidy connection to an inexpensive relay module. I soldered a 2-pin header to 0V and 5V on the carrier module to bring power from a usb breakout module.

I connected TX on the ESP module to IN on the relay module. TX is Pin 1, so after PIN.MODE 1,output, PIN(1)=0 turns the relay on, and PIN(1)=1 turns it off.
ESP-01 module relay 1.jpg
ESP-01 module relay 2.jpg


30A 2-relay combination toggling Tx and Rx alternately on and off:
ESP-01 module relay2x.jpg
2-relay program:

Code: [Local Link Removed for Guests]

' GPIO 1 (TX), GPIO 3 (RX)
 pin.mode 1,output
 pin.mode 3,output
' pin(1)=0 ' turns relay on
do
  pin(1)=0
  pin(3)=1
  pause 500
  pin(1)=1
  pin(3)=0
  pause 500
loop
You do not have the required permissions to view the files attached to this post.
Post Reply