PLEASE VOTE for this instructable. Look for the vote up at the top right. Would be great to win a t-shirt! That's all I'm looking for out of this.
The purpose of this instructable is to show how to use a PIR (motion detecting) Sensor to drive a 3v Relay Module.
NOTE: The relay was improperly designed/engineered so it does not work properly as it should. This instructable is to show you how to get it to work. So, on the cheap you can have a PIR/Relay circuit for less than $4. If the relay operated properly it should work as you see wired in the image. It does NOT! Read on to see how to get this to work.
By the way... my goal was to do this without any microcontrollers.
I will start by stating I am a complete novice to electronics with only about a year of tinkering with some easy wiring. With the discovery of this website I am constantly thinking of cool things to try to make. The idea of making things work by different sensors seemed like a fun idea.
In my research I discovered a low cost PIR Sensor on Amazon. This PIR Sensor output voltage is rated at 3.3 volts. Although, I have measured 3.7 volts. With only 3.3 - 3.7 volts to work with, you are very limited on what you can drive with such low voltage. A couple LEDs is about it! Therefore, I learned that if I connect the PIR to a relay module I could drive higher voltage devices. This sent me on the hunt for a 3v relay module. Understand that 5v and 12v relay modules are very common online. You can find many of these at a variety of sources.
But, a 3.3v signal from this PIR will not drive those relays. Although, if I was more savvy with electronics I could purchase an independent relay and create my own relay module. Or I could integrate a level shifting circuit or some other signal boosting circuit. But as I mentioned earlier, I am a complete novice. So, my efforts were to find the easiest solution. Remember.... I like to just connect wires and make it work. :-) At least I did before this project.
Purchase and connect 3v PIR Module to 3v Relay Module to switch and power devices with higher voltage than 3.3 volts. Sounds easier than it is. Of course you need to power the PIR and Relay. The image you see for this introduction should let the relay operate correctly. But it does not. FYI... the PIR and Relay are connectrf to 3v power each from a bench top power supply. You could use batteries, but I discovered working with batteries becomes very irritating and expensive.
Relay Rarity! The 3v relay module I finally found can be found on Ebay and many Asian websites. I was not able to find any others. It appears that there may be only one manufacturer of this 3v relay module. If you know another source to find a proper working 3v relay module, please share in your comments.
Upon receiving my PIRs and Relays I had my first try at making the connection. My attempts failed. After testing and confirming that the PIR operated correctly, I connected to the Relay. Once the signal was sent to the relay there was no triggering of the relay. The only evidence that the signal was making it to the relay would be the indicator light with very dim illumination.
This is when I started to spend endless hours trying to figure out how to make this circuit work. Through lots of research on YouTube, Instructables, and AllAboutCircuits I discovered these relays just DO NOT OPERATE AS THEY WERE DESIGNED. Perhaps that is why they are so rare and cheap when you find them?
The Flawed Relays...
Special thanks to the community at AllAboutCircuits for coming up with this conclusion on the relay modules. Special thanks to AAC member ericgibbs who really helped me out to get this to work and taught me a bunch along the way
The relay PCB is advertised as a 3v relay. While the relay on the board may trigger independently with only 3 volts, the circuitry of the board demands a higher voltage to trigger the relay. The relay PCB has a EL817 opto-isolator for the input signal, it requires a 5V drive voltage on the Input in order to drive the onboard transistor which controls the relay coil current. With only a 3v drive, there is insufficient current to drive the opto and transistor. The module that the relay is mounted to is falsely advertised as 3.0V because the components on the board need more than 3 volts.
Problem and Solution
My problem now was that I have a handful of PIRs and Relays that do not work together. The solutions that I discovered were...
- Increase voltage with a level shifting circuit between PIR and Relay ( a bit involved for a newbie who does not have an inventory of transistors and resistors and other electronics toys.) or...
- Send the 3v signal to a different part of the relay to trigger it.
Again, after lots of research and communication with the Instructables and AllAboutCircuits communities I started to learn quite a bit about level shifting. But then I thought... can we modify this relay module to make it work. After all, if it was poorly designed/engineered, there must be a fix!
This instructable will show you a work around to the design flaw of the relay. We will go with option #2.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: What You Will Need
Remember that this is a cheap way to create a PIR circuit with a 3v relay that was incorrectly engineered. I am a complete newbie... If you have a better solution, please share. I will not be held responsible for any mishap of this circuit. Just showing how to get this circuit to run with the cheap devices.
- PIR Relay for a good price HC- SR501 Adjustable Pyroelectric Infrared PIR Motion Sensor
- 3v Relay Module (remember these do not operate as designed or advertised. I am going to show you how to get them to work with 3 volts as they should)
- Connecting Wire
- Breadboard- Helpful in your testing. You can hardwire your final project and eliminate the breadboard.
- Mini screw driver for relay connecting block terminals
- Bench top power supply or batteries to power circuit and load
- Connecting wires to connect power to devices.
- Soldering Iron
- Magnifying Glass to see your solder point on the relay module
Step 2: Connections As Designed
In theory, this image shows how this circuit is supposed to work. But, since the relay was poorly engineered, the PIR can't drive the relay.
You can see that the signal is making it to the relay from the PIR. But, not enough juice to drive it.
Step 3: Modify the Relay to Make It Work!
With a steady hand, good eyes or magnifying class, and some basic soldering skills you can modify the relay.
Here I have made a quick and easy modification. Instead of connecting the output signal to the input of the relay module. I have soldered a lead wire to the Emitter of the opto-isolator.
Step 4: PIR Wired and Relay Working
The only change that has been made now is where the PIR connects to the Relay. The PIR now connects to the lead wire soldered to the Emitter of the Opto-isolator on the PCB. The input on the connecting block is no longer used.
Note that I have powered each module separately. You can power both of these together off a single 5v source if you wish. I have tested and it works fine. Probably would not go higher than 5v as it may damage the relay. At least that is what I have been told.
Step 5: My Summary
Let me know what you think. If you have a better solution please share.. others can benefit. If you know where to purchase a 3v Relay Module that works properly would love to know where to purchase.
With this circuit I plan on making some projects with motion activated lights and sounds. Should be simple enough with a couple battery packs and output devices or light circuits. Hope you find valuable. Thanks again to everybody that gave their input to help me solve this flawed relay problem and get me started on motion activated projects using a 3v PIR motion detector.
Participated in the
Sensors Contest 2016