Question: I'm using the following [two rf433 modules](http://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2015/05/433-Copy.jpg?resize=450%2C251) in combination with two Arduino Unos.

After testing them both at 5V (in combination with the RadioHead library), which worked, I decided to test the improvement in the range, while powering the transmitter with 12V (I'm using an external power supply). [This](https://electronics.stackexchange.com/a/103358/137122) answer suggested that a NPN transistor can be used to provide enough voltage for a logic HIGH (I tried connecting everything as depicted on that picture). I used a RFP30N06LE MOSFET and wired everything as depicted in the picture below:

[![this](https://i.stack.imgur.com/ypwCe.png)](https://i.stack.imgur.com/ypwCe.png) 

After a minute or so, I noticed that two wires started to melt, so I quickly disconnected everything. One wire is the orange one, connecting the drain of the MOSFET with the DATA pin of the transmitter, the other one is the ground wire from the source of the MOSFET to the GND. I also noticed that the MOSFET got quite hot.

Can someone explain what I'm doing wrong? Thank you.

\*\*EDIT:\*\*As @Andy aka suggested, the data pin doesn't need level shifting. Upon removing the MOSFET and both resistors from the circuit the transmitter is now working at 12V. The grounds of the external power supply, the transmitter and the Uno have to be tied together.

Answer: 
If you are going to use a BS170, use it like this (with the PCA driver configured as a totem pole output): -

[![enter image description here](https://i.stack.imgur.com/EDEFi.gif)](https://i.stack.imgur.com/EDEFi.gif)

At the moment you have the source connected to the positive rail and the internal body diode will conduct all the time and you won't be able to turn the LED off.

Regards the other LED outputs connected directly the the PCA device take note what its data sheet says: -

> 
> The LED output driver is programmed to be either open-drain with a 25
>  mA current sink capability at 5 V or totem pole with a 25 mA sink, 10
>  mA source capability at 5 V.
> 
> 
> 

In other words, if you are trying to source current into an LED you will only get 10 mA LED current.
If your IC is an open-drain, then you are required to pull that pin to 5V with a resistor. The resistor value will determine the rise time of the high signal. Right now, all your PWM is doing is toggling between 'floating' and GND, when it should be 'high' and GND.