1
\$\begingroup\$

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.

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

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.
\$\endgroup\$
4
  • \$\begingroup\$ Thanks! I already have some NPN BJT's. Is there a similar circuit that would work with one of those or should I order myself a few N-chan MOSFET's? \$\endgroup\$
    – Matthew
    Commented Jan 19, 2014 at 18:32
  • \$\begingroup\$ @Matthew It can be made to work with a BJT too, though that involves setting the base bias etc. The MOSFET method shown is simple. Look up "BJT as a switch" for suitable schematics using BJTs. \$\endgroup\$ Commented Jan 19, 2014 at 22:15
  • 1
    \$\begingroup\$ Thanks! I have a handful of MOSFET's on order. I hope I can implement this in the next week or two and I'll accept your answer. \$\endgroup\$
    – Matthew
    Commented Jan 22, 2014 at 14:59
  • \$\begingroup\$ I haven't gotten to solder it up yet, but it works great on my breadboard to drop a pulled-up resistor just like you laid out. \$\endgroup\$
    – Matthew
    Commented Jan 30, 2014 at 0:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.