Repurposing an LED RF Remote to control "anything"!

**Controlling LED Lights with an RF Remote: A Step-by-Step Guide**

The following is the content of a file:

WEBVTTKind: captionsLanguage: enA few weeks ago, I showed you how I built a cuboid cloud LED lamp, which created mixed feedback from viewers. However, that's not the point right now because the lamp is not completely finished yet.

As you can see when I flip on the lamp's power switch, it activates both the GU10 LED spots and the RGBW LED strips on top. The reason for this is that both components are wired up in parallel, which isn't ideal as it prevents us from experiencing mood lighting without having the whole room flooded with lights.

The easiest solution would be to use two switches, each individually turning on and off one component group. However, that's not possible because we only have two wires available at the power switch. A simple two-switch system is not feasible in this case.

Fortunately, since we got an RF remote for the RGBW LED strips, I will show you in this video how it communicates with its receiver and how we can use it to talk to my controller and thus control all sorts of things. But first, let's start by understanding how this system works.

**Understanding the RF Remote System**

The RF remote transmitter uses an IC that has a specific data encryption method, which might be different from what your particular IC uses. The data sheet should provide more information on this. My secret codes for turning off/on the GU10 LED spots will be pressing yellow and pink one after the other.

To get the decimal codes of those buttons, I used the simple receive demo sketch and created a simple piece of code around them that reverses the current state of digital pin 5 whenever this button combination is pushed. After uploading the new code, I hooked up an LED to pin 5 for testing and checked whether everything works as intended.

**Implementing a Solid-State Relay (SSR)**

In order to control mains voltage, we would need something like a relay about which you can learn the basics in one of my previous videos. After building up a small demonstration circuit with this generic relay board, it worked just as I thought it would. However, I don't put a lot of trust in those relays because they often experienced sparking, leading to the changeover contacts getting locked in one position.

A better solution is to use a solid-state relay (SSR), like the G3MBA-202P SSR, which probably consists of a Triac with a sprinkle of complementary components for safety reasons. This type of relay does not use mechanical components for switching but instead does it electrically. If you want more information about solid-state relays, I would recommend checking out one of my previous videos.

**Finalizing the Circuit**

After hooking up the Arduino as well as the GU10 LED spot replacements to the SSR, it was time for testing, which turned out successful. At this point, I expected to build a small additional circuit for the solid-state relay since I wanted to turn on when the Arduino outputs a low voltage signal.

However, apparently the board the relay came with already featured such a circuit and thus when the Arduino fails, the lights will still be turned on. Next, I soldered out all of the required components onto an additional piece of perf. board and connected them to one another using solder bridges and bridge wire according to my small finalized schematic.

**Testing and Finalizing**

As soon as the circuit was complete, I grabbed myself a 5-volt power supply with more than enough output current capabilities and wired it up to power the circuit. After turning on the power, everything seemed to work fine, and I could turn off/on the lights with the RF remotes.

Later, I realized that the receive range of the circuit was quite horrible, so as an afterthought, I was forced to remove its data signal to the Arduino and replace it with the data outputs of the previous receiver circuit. This way, the range of the transmitter and receiver system was drastically improved.

**Final Assembly**

It was finally time to run unscrew and lift up the lamp's top MDF piece, hook up the circuit's power supply to mains voltage along with the LED power supply, and insert the solid-state relay in series to the GU10 LED spots. After closing everything up, we cut a rectangle hole into the MDF boards for easier possible troubleshooting later on.

And got the lamp back in position. And as you can see, it still works perfectly fine, but now I can turn off the GU10 LED spots whenever I want.

WEBVTTKind: captionsLanguage: enA few weeks ago. I showed you how I built a cuboid cloud LED lampWhich created, let's just say, mixed feedback from viewersBut that is not the point right nowBecause the lamp is not completely finished yetAs you can see when I flip on the lamps power switchIt activates the lamps gu10 LED spots as well as the RGB. W led-- strips on topThe reason for that is that both components are wired up in parallelThat kind of sucks though because you can never experience, for example, the mood lightingwithout having the whole room flooded with lights due to the bottom LEDsThe easiest solution would be to use two switches which each individually turn onand off one component groupBut that is not possible because even though the ceiling offered three wires to work with at the power switchWe only got two of themSo a simple to switch system is not possiblebut since we got an RF remote for the RGB W LED stripsI will be showing you in this video how itCommunicates with its receiver and how we can use it to talk to my controller and thus control all kinds of thingsincluding a solid state relayWhich could turn on /off d gu10 LED spots and thus solve our initial problemLet's get startedThis video is sponsored by JLCPCB where you can get custom PCB's the easy and economical waySo upload your Gerber files and submit your order which includes getting a proper file review before the reproduction processTo start off we should have a look insidethe RF remotes, but since I didn't want to destroy itI rather ordered myself another RF LED strip remote with receiver, which also does that job without a problemSo I took apart the remotes in order to pull out the main PCBWhich is apparently a build around an RM03C ICOnly problem was that I found absolutely no information about this IC on the InternetThankfully though while inspecting the three IC's of the RF receiver. I noticed this480R IC which according to its datasheet is an ask/ook RF receiverASK stands for amplitude shift keying andOOK for on-off keying which are two methods used to send 1 and 0 bits Through an RF signalbut right now we do not care that much about this technical principle asWell as the more or less complicated functional diagram of the ICWhich in a nutshell picks up the modulated RF signal and turns it into a proper data signal that we can work withfor nowWe only care about the cleaned-up data signal on pin 5 of the IC at which I immediately had aLook at with my oscilloscope as you can see by pushing a button on the RF transmitterWhich I obviously had to reassemble beforehand. We get a decent looking data signal at the receivers data outputs andof course by pushing another button we get a slightly different data signal, which is very hard to see on the oscilloscope, butObvious because the receiver needs a differentIdentification signal for each button in order to know what it should doBy using the continuity function of my multimeterI found out that this data outputs directly connects to microcontroller ICWhich will probably read in a data signal and then control the MOSFETs which sit right next to itto adjust the brightness of the LED'sandThat is basically how this RF receiver worksAnd yes, it can also receive and demodulate the data signals from the RGBWLED strip RF remotesBut I really do not need the microcontroller and MOSFET part of the PCBThankfully though since I knew that the receiver and transmitterwork with a carrier frequency of433 megahertzI simply searched for another433 megahertz receiver on eBay and quickly found oneAfter receiving it. I hooked its VCC and ground pin up to 5 volts and its data pin to the oscilloscope andSure enough after pushing a button on the LED remote. I was greeted with a lovely-looking data signal that we can work withSo I connected the data pin to the pin two of anArduino Nano and started writing codes so that the microcontroller uses its external interrupts to start a timerwhen the state of the data signal changes while saving the onoff times of the received signalbut while trying to write this codeI realized that a way easier to use Arduino library already exists the RC switch librarySo after downloading it's opening up the Receive Demo Advanced sketchUploading it opening the serial monitor and finally pushing a button on the remotes. I was greetedNot only with the mandatory binary data codesbut also with the facts that the signal used the protocol 1 afterDoing a bit of digging in the library's wiki I found out that the protocol is actually an encryption for the sent datawith a synchronization part and with the bit 0Representing one high and three low times and a bit one representing three high and one low timethe synchronization parts was easy to spot on the oscilloscope andAfter decrypting the data signal it was exactly the same 24 bit value as the serial monitor spit outPerfectBut of course depending on what kind of IC your RF transmitter and receiver uses this data encryption can be a bit differentBut the data sheet should always give you more information on thatNow my secret codes for turning off/on the gu10 LED spotswill be pressing yellow and pink one after the other soI got the decimal codes of those buttons from the serial monitorby using the simple receive demo sketch andCreated a simple piece of code around them which reverses the current state of the digital pin 5 of the ArduinoWhenever this button combination was pushedafter uploading the new codesI hooked up an LED to pin 5 for testing and checked whether everything works how I wanted it toWhich it didbut of course in order to control mains voltageWe would need something like a relay about which you can learn the basics in one of my previous videosAnyway, after building up a small demonstration circuit with this generic relay board, it worked just like I thought it wouldBut honestly speaking I do not put a lot of trust in those relays because I oftenexperienced that after a few weeks of usageTheir changeover contacts got locked in one position due to sparkingSo a relay could easily fail which is why I tore down my demonstration circuit and instead got myself a solid-staterelay boardthis G3MBA-202P SSRProbably consists of a Triac with a sprinkle of complementary components for safety reasonsWhich means it does not use mechanical components for switching but instead does it electrically?But of course if you want more information about solid state relaysThen I would once again recommend checking out one of my previous videosAnyway after hooking up the Arduino as well as the gu10 LED spotReplacements to the SSR it was time for testing which as you can see turned out successfulAt this point I expected to build a small additional circuit for the solid state relaysince I wanted to turn on when the Arduino outputs a low voltage signalbut apparently the board the relay came with already featured such a circuit and thus when the Arduino failsThe lights will still be turned onSo next I soldered out all of the requiredComponents onto an additional piece of perf. board and to one another with solder bridges and bridge wireaccording to my small finalized schematic asSoon as the circuit was completeI grabbed myself a 5 volt power supply with more than enough output current capabilities andWired it up to power the circuitAfter then turning on the power, it seems like everything works and I can turn offon the lights with the RF remotesBut later, I realized that the receive range of the circuit was quite horribleSo as an afterthoughtI was pretty much forced to remove its data signal to the Arduino andReplace it with the data outputs of the previous receiver circuit, which I had to hook up to 5 volt power as wellThis way the range of the transmitter and receiver system was drastically improvedSo it was finally time to run unscrew and lift up the lamps' top MDF piecehook up the circuit's power supply to mains voltage along with the LED power supply andat the solid state relay in series to the gu10 LED spotsAfter closing everything up we cut a rectangle hole into the MDF boards for easier possible troubleshooting later onAnd got the lamp back in positionAnd as you can see, it still works perfectly finebut now I can turn off the gu10 LED spots whenever I want IHope you enjoyed this small project and maybe got inspired by it to control something on your ownwith an existing RF remoteAs always don't forget to Like, share, subscribeStay creative and I will see you next time!