Close
0%
0%

WiFi to 433 MHz bridge

Toggle RC sockets using WiFi connected smartphone

Public Chat
Similar projects worth following
Before Christmas, I decided to buy remote controlled electric socket. It works well for Christmas tree, because when leaving home, we don't need to unplug Christmas tree lights manually.

I was lazy and sometimes forgot to take remote control, when going to bed.

Then I thought to build my WiFi to 433MHz bridge. This, in theory should allow me to control these sockets (and lights) via network-connected smartphone.

So... I did it!

Sniffing packets

For ability to replicate switch on-off packets, I've built 433 MHz sniffer on breadboard. This subproject involved ESP32 and XY-MK receiver module. Then, I've used ShowReceivedCode.ino example to retrieve unit address and ID. It took me a while to understand protocol that was used by my remote controlled sockets, but eventually I've ended up with working prototype.

Printed Circuit Board

FS100A moudle was easy to use, but there was a problem to achieve small PCB size using this module. I've started to find an alternative. I have read a lot of various RF module's datasheets and hopefully ended with RFM110W-433S1. Theoretically I didn't know if it will work or not, but had a lot of hope.

Simultaneously, just after ordering these modules on Aliexpres, I've started KiCad schematic and PCB project. I knew that I wanted to use ESP8266 and RFM110W. I've also placed two leds, first to indicate if we are in config mode, second to indicate RF transmission, like it's done on ethernet ports in your PC.

Worst part. Waiting.

It took about three weeks from design finish to receive parcels containing RF modules from Aliexpress and fabricated PCBs from JLC-PCB. Eventually all of them arrived in excellent quality, well packed in anti-static bags.

Soldering

I'm not a soldering professional, so I had to go with "trial and error" method. Hardest part was to solder USB port, because I haven't done this before. However, thin soldering iron did the job. Everything has been soldered using solderpaste (with flux included). Every other small element has been soldered with hot air gun.

The software novel

I've started with Blynk library. It was a lot of mental pain for me. It is great example how to NOT create libs. Want to use Blynk in more than one C++ class? Forget about it! Without workarounds it is not possible. Anyway, I've spent two weeks due to frequent disconnections/reconnections to Blynk cloud server.

I was about to scream "I surrender", but I realized, how good MQTT is and quickly decided to drop Blynk.

MQTT was very good, but still it was reconnecting every few hours. After trial and error with manual etharp_requests and other crazy things and hacks, I tried to compile my code with LwIP 1.4 instead of 2.0. Simultaneously I've changed MQTT broker to cloudMQTT. 

These changes ended up with great reliability improvement.

  • 1 × ESP-12F / ESP8266 wifi capable system-on-chip
  • 1 × RFM110W radio transmitter module
  • 1 × Tact switch
  • 4 × 10 k Ohm 1206 SMD resistor
  • 2 × 220 Ohm 1206 SMD resistor

View all 11 components

  • PC Control app

    h4rdc0der04/25/2019 at 16:08 0 comments

    I wrote (using C#) small PC MQTT client app to easily turn on/off lights in my house using in-app buttons or Windows tray context menu. I have used M2Mqtt to handle MQTT protocol and Newtonsoft.Json to store user data (button definitions).

View project log

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates