Fan & Light Controller

Share your projects using MegunoLink Pro here!
Post Reply
Posts: 3
Joined: Tue Dec 08, 2015 12:12 pm

Sat Dec 12, 2015 8:39 am

I have 3 rooms with combination fan/lights that are ceiling mounted. They have 433MHz RF remote controls that have dip switches inside so each control is paired with the fan with dip switches set similarly.

I wanted a way to control these from an Android phone instead of the remote controls so I got an Arduino and 433MHz transmitter for a couple of dollars from AliExpress, along with a bluetooth LE module.

I have been having trouble with the HM-10 BLE module and was getting frustrated with a project not working so I looked at another way to interface with the Arduino and found megaunolink so decided to use that as an interim solution until I figure out the BLE side of things.

The remote sends 24 bit message with the first 8 bits containing the arrangement of the 4 dip switches, then the last 16 bits containing the actual button pressed.
Remote control
Remote control
20151212_160218.jpg (109.38 KiB) Viewed 34756 times
I couldn't figure out how to get megaunolink to send 24 bit strings so I ended up just using the Blink2 example and sending integers across with the first digit representing the remote ID and the 2nd digit representing the key pressed (as there are less than 10 keys on the remote) and then the arduino created the 24 bit string from the code in 2 halves - 8 bits for 1st digit then 16 bits for 2nd digit.

I just quickly made up the interface shown and it works fine and allows me to test that the RF and Arduino parts of the project work while I await a couple more BLE modules to see if I got a bad one or whether I need to investigate more why I couldn't get it working initially.
EnvironmentalInterface.png (28.28 KiB) Viewed 34756 times
That's about all I needed the megaunolink for as it is still my eventual aim to control the fans from an Android app and also from my home automation website. But it was worth the price to get the testing done more quickly.

Would be interested if a megaunolink version was made that had a web interface instead of an application GUI. Also an Android version that communicated over BLE or WiFi would be another possible product.

Next steps:
Get Bluetooth Low Energy interface working
Write Android interface
Replace the Arduino Uno with an Atmel MEGA328P to make it smaller & cheaper.
Add in timer button control.
I already have small battery operated sensors in each room that tell me temperature, humidity, barometric pressure & battery voltage so add a light sensor to those modules so I know whether the light toggle is turning on or off.
Posts: 446
Joined: Mon May 26, 2014 10:58 am

Wed Feb 03, 2016 10:32 pm

Nice work Dave! Sounds like a fun project.
Post Reply