Wireless remote switch, button press: 1 second=ON, 3 seconds=OFF

From OpenCircuits
Revision as of 08:54, 8 October 2016 by Definitionofis (Talk | contribs)

Jump to: navigation, search

I bought a 315Mhz transmitter/receiver pair of postage stamp size inexpensive boards from robotshop.com. Ebay has them too.

Here is the schematic of how I used the data output of the receiver. My objective is to process the data without using a digital serial-interface decoder processor IC and to latch the ON and OFF so they do not spuriously switch back and forth from neighborhood transmissions on the same frequency, from electrical lightning noise, nor from button-bounce:

315Mhz schematic.png

Here is the board layout, which should be redone in surface mount parts some day. I used drawer junk parts and old VCR parts: 315Mhz wireless remote-switch 120vac-off-on.png

Here is the LTspice simulation of the signal filter of data incoming ON and OFF button presses. This 2Hz to 12000Hz response curve shows 60Hz is near the peak response: LTspice of data input filter 2Hz-12000Hz.png

After the diode and 47uf capacitor, the signal is 0.7vdc with some ripple. High frequency data would not get through, and neither will lightning pulses. I have a commercial remote switch that was triggered ON by lightning and that is not acceptable, thus my filter idea using 60Hz pulses. LTspice 60Hz for 1second goes through to Q2 as 0.7vdc.png

Here is LTspice of the 1s and 6s hold-for-OFF using pulses from V1 which is imitating the 60Hz converted to 0.7vdc from the previous LTspice. See 6 second delayed OFF and instant-ON effect in green. Blue is the button held down for 8 seconds each time: LTspice V1 bluePress8seconds blue givesON-OFF 7v outputs.png

Other notes: I tried to omit the 3H inductor (top schematic) and I ran into a small problem with the data being vdc. The inductor converts it to AC. I think a large serial capacitor would work instead of an inductor, but then maybe it cannot be a polarised type of capacitor; ie. too expensive. On the other hand, a smaller serial ceramic capacitor would work with a mosfet gate, instead of a transistor base (smaller current). I stopped thinking about it since I have an old small power adapter transformer to use as 3H inductor and it works.

Circuit function: That circuit idea is very complex. I got a version from somewhere and it did not work, although they claimed it worked. I added 5 parts to make it work. Without LTspice I never would have deciphered the error.

Q1 could be just an ON-button-switch. C2 is the trigger for pumping Q2 base ON. Q3 pulls Q2 base high (OFF) during the delay hold of 6 seconds. That seems simple enough. But the D3 and D5 diodes are essential to omit the reverse signals which we want to discard. Then D3 causes a problem because it has a forward voltage and is not really ground. A schottky diode has a lower forward voltage and might be low enough to pull Q3 base near enough to ground. I added D7 to raise the emitter instead. Then the diodes are all the same. Also C2 discharges into the Q2 base at the same time as Q3 discharges it. That is a conflict. So I added R8 to slow the discharge and benefit Q2 base. R8 cannot be too large or it slows another part of the cycle where we want Q2 base pulled high! Again, a conflict of objectives occurs, thus 7.8k worked and maybe 50k would not work. Also R8 raises the emitter a little more, which is also essential at micro-amp currents when diodes do not obey what you think are the forward voltage specifications (haha); ie. forward is lower than you think.

Next, the Q2 was originally a p-mosfet and the circuit failed completely without R10 while using a mosfet because the mosfet does not move current into the base, like does a pnp transistor and D5 also blocks current. However, base-emitter is only 700 ohms whereas a mosfet is near infinity ohms. So R10 is probably not necessary if Q2 is a pnp. I left R10 in anyway in case I change it to a high current p-mosfet some day so the mosfet gate gets charged through R10 during part of the cycle.

Do you think I could sort all these issues without LTspice? Sadly, I say no. I wish I was faster and smarter. This took EIGHT DAYS, TEN HOURS PER DAY for me to unscramble the puzzle pieces. Also some ideas work in LTspice and do NOT work in real life: The D7 was like that. I slept on it to come up with that idea. Apparently LTspice had different forward voltages for the base-emitter and diodes, compared to mine, and it was very close to failing in LTspice and should have failed to help me find the need for D7.

Conclusion LTspice is great and you should learn it or maybe Linux ngspice or iespice. I rarely get caught where LTspice is not helping me. This time I did. Do not trust somebody elses circuit even if their website looks professional.ha.

    This would be very small in surface mounted parts, if I eliminated the inductor.
Personal tools