2N2222 Transistor to Switch 433 MHz RF Transmitter

I have 1 Uno R3 and would like to test 433 MHz transmitter and receiver through one board, using 2N222 transistor as a switch. From what I've read, transistor emitter to ground, base takes resistor (I'm using 720 ohms) to digital input on Uno, and collector interfaces with transmitter...vcc? I'm not sure how to connect all this together with transistor.

I also have 555 timer IC's; are they a better option? Explanation or links to diagram of 2N222 or 555 timer linking to any sensor's vcc/ground/data, and the board, would be appreciated.

No, you cannot switch Vcc with an NPN transistor.

NPN transistors act as low-side (ground) switches, PNP as high-side (Vcc) switches.

So you could use the 2N2222 to switch ground on the transmitter. Make sure before you switch it off that the Arduino pin connected to the transmitter is made into an INPUT by pinMode, so it can float up to Vcc. The Vcc must be the same as the Arduino's (ie the 5V pin).

The 555 isn't really meant to be a switch, although is can source or sink about 200mA I think, so might be workable.

I have a drawing I made for a higher current LED strip but if you replace the TIP120 with your 2N2222, this is how it would get wired up. (No PWM pin is not required unless you were driving LEDS and wanted brightness control)

|500x278

Not a good idea to do low side switching of RF circuits. You really need to keep all ground connections bonded with low impedance.

Why not use high side switching with a PNP transistor?

Russell.

If you are using the cheap 433 MHz transmitters, they draw only 10 mA or so, and can safely be powered directly by a digital output. No transistor needed.

jremington: If you are using the cheap 433 MHz transmitters, they draw only 10 mA or so, and can safely be powered directly by a digital output. No transistor needed.

I think all the cheapo 433mhz transmitters I tested didn't even draw that current from the data pin, but from the supply pin, so you have nothing to worry about. The quiescent current of those modules is also tiny. You can, for example, do a key-fob style transmitter, using batteries, with the MCU in sleep mode when buttons are pressed, and you don't need to disconnect the transmiter while it's sleeping.

The digital input on those "FS1000-A" OOK transmitters just gates power to the transmit circuit through an on board NPN transistor. So if your output connected to it is logic low, the supply current is reduced to the leakage of the transistor - not much.

Are transistors supposed to get really hot? Emitter and collector to breadboard ground and 5 v. respectively (linked to Arduino 5v/ground); base (720 ohm resistor) and transmitter Data linked to Arduino TX pin; and the receiver 5v/ground/RX pin plugged directly into Arduino.

I’m trying attached code using RadioHead, combining transmit/receive code from Examples (with digitalWrite HIGH and LOW for transistor switch), and only getting Serial debug response Nope.

RH_Trans_Rec_test.ino (925 Bytes)

If it is getting hot, you have a serious wiring error. You have been told that you don't need a transistor.

Please read my original post. Thanks in advance.

jremington: If it is getting hot, you have a serious wiring error. You have been told that you don't need a transistor.

+1 about wiring error...that's why I explained how I wired, and included a picture, being a help forum and all.

About not needing a transistor, please read original post. Thanks in advance.

It is nearly impossible to tell from the photo or your description what is wrong.

Good luck.

Would someone please help me out here, given description/photo above, and what I'm trying to achieve using 2N222 as switch so that I can transmit/receive with 1 Uno? .ino file is attached above also. Thanks.

For one thing, your red wire appears to connect to IOREF instead of 5V. You have wires going to D0 and maybe D1, those are used for serial so it will mess up any serial comms that you have. Your transistor should not even be warm, let alone hot.

It is impossible to see where all the wires go in your picture. Please post a schematic or else you are just wasting time.

p1ne: Are transistors supposed to get really hot? Emitter and collector to breadboard ground and 5 v. respectively (linked to Arduino 5v/ground); base (720 ohm resistor)

If, as you've said, you've connected the Collector directly to +5 and the Emitter to directly to gnd, the transistor will get hot if you then turn it on. Nothing is limiting the collector/emitter current when the transistor is on -- you're essentially shorting +5 to gnd through the transistor.

Not a good idea.

Post a photo of a hand drawn schematic of how you wired it. As already mentioned, it sounds like you have made a serious wiring error.

jcanderson: If, as you've said, you've connected the Collector directly to +5 and the Emitter to directly to gnd, the transistor will get hot if you then turn it on. Nothing is limiting the collector/emitter current when the transistor is on -- you're essentially shorting +5 to gnd through the transistor.

Not a good idea.

thanks I'll read up on how to limit collector/emitter. I'll also learn how to draw schematic instead of posting pictures. I'll remove that one as it's not helping.

Are transistors supposed to get really hot? Emitter and collector to breadboard ground and 5 v. respectively (linked to Arduino 5v/ground);

Not suprised it’s getting hot with the emitter to ground and the collector to 5V.
You are expected to learn how to use a transistor before actually doing it. Does that make sense ?
Just out of curiosity, have you ever actually read the datasheet for a 2N2222 transistor ? Do you know what the maximum current is ? Do you know Ohm’s Law ? Do you know how to calculate the current across the CE junction with the emitter to ground and the collector to +5V based on the collector-emitter saturation voltage ? (0.3V @ Ic=150 mA => Rce=2 ohms.
Ice with e=0V, c = 5V , =5V/2 ohms = 2.5A . (actually, I think you loaded the onboard 5V regulator down enough to put it into shutdown mode which probably saved the transistor. If you put a meter on the arduino 5V and repeat that experiment I think you will see that it was not 5V at all but much lower.

thanks I’ll read up on how to limit collector/emitter. I’ll also learn how to draw schematic instead of posting pictures. I’ll remove that one as it’s not helping.

Really ? You have to “read up” on that ? How about just putting a LOAD between +Vcc and the COLLECTOR ? (as shown in Pwillards schematic) (instead of shorting out the C-E junction) .
( If it were a PNP I would suggest adding the load between the Emitter and GND). You limit the current by having a LOAD. If you need to "read up " to know that then maybe you aren’t quite ready to design your own circuits. I think I would use a 5V micro relay to switch the radio Vcc. If you’re going to use a solid state device I think a high side PNP/P-channel Mosfet switch between +Vcc and radio Vcc would be better than using an NPN transistor for the reason given by Russelz (in case you didn’t notice he has 40 years experience designing RF circuits. I think he knows what he is talking about)

What exactly are you trying to switch? The common 433.92 Mhz OOK transmitters are simply a keyed oscillator, and they only transmit when the data pin is high, as the data pin forward biases the oscillator transistor , thus making it oscillate. When the data pin is low the Transmitter draws no current.

mauried: What exactly are you trying to switch? The common 433.92 Mhz OOK transmitters are simply a keyed oscillator, and they only transmit when the data pin is high, as the data pin forward biases the oscillator transistor , thus making it oscillate. When the data pin is low the Transmitter draws no current.

As in reply #6. But the receiver does draw idle current.

mauried: What exactly are you trying to switch? The common 433.92 Mhz OOK transmitters are simply a keyed oscillator, and they only transmit when the data pin is high, as the data pin forward biases the oscillator transistor , thus making it oscillate. When the data pin is low the Transmitter draws no current.

I thought a transistor might be able to switch transmitter on/off so that 1 Arduino could transmit and receive (presently it can't do both at the same time). Something like this post.