Adafruit rf m4 as a ground switcher

ledswitcheswireless

I have a store-bought battery powered LED light assembly that is controlled by a microswitch. The light is installed in a hard to reach place so I wanted to hook it up to a cheap ASK wireless receiver with a remote. I bought the RF M4 (http://www.adafruit.com/products/1096) from adafruit. It's built around a PT2272.

I didn't do enough checking on the light's circuit ahead of time and it turns out the microswitch in my light assembly is on the ground side. What is the cheapest way to make the RF M4 switch the ground for me? I was planning on powering the receiver circuit with a standard 9V battery which is within the specs for the chip. I was thinking a transistor circuit, but I'm not great at designing those.

Just as a quick overview, the M4 receiver here puts out Vcc on the D2 pin when it receives the signal from the transmitter. I couldn't tell from the PT2272 data sheet (http://www.adafruit.com/datasheets/PT2272.pdf) if there was a way to get D2 to go to ground instead.

Also, in my light assembly the only current going through the switch is the pulse for the switching circuit to turn the lights on. The LED current does not appear to go through the switch since the light stays on after releasing the momentary switch.

I'm still a beginner so I really just don't know which way to go from here.

Best Answer

From the description of the microswitch function as provided, it seems the "microswitch" is a momentary pushbutton (as opposed to a toggle / DIP switch) connected between a pull-up resistor and the lighting controller's ground. If so, the solution for replacing the push-button functionality using the remote is simple.

From the AdaFruit product description:

The M4 momentary type acts like a push button - when the A button is held down, the matching pin goes high. When the A button is released, the matching pin goes low. The pins only go high when a button is pressed

In order to use this momentary positive pulse to achieve the equivalent of the pushbutton momentarily shorting a pulled-up line to ground, a N-channel MOSFET can be used, thus:

schematic

simulate this circuit – Schematic created using CircuitLab

Explanation:

  • When D2 goes high due to a button push on the remote, this causes the gate of the MOSFET to be driven high.
  • The MOSFET thus conducts, acting as nearly a short circuit (a fraction of an ohm), similar to what the "microswitch" push-button does.
  • When the button on the remote is released, D2 goes low, and the MOSFET stops conducting
  • This schematic will allow either the pushbutton or the remote to switch the lights, as they are hooked up in parallel.
Related Topic