Step 14Adding Infrared Output
Now, the output pin is going to be PD0, or PORT D, PIN 7. In numerical pins, that is number 13. Locate it (it's the second from the bottom on the left hand side of the chip) so you know where to plug things into.
Next, take a look at your FET. Check the data sheet so you know which pins are Gate, Drain and Source. Plug in the FET across three rows on the breadboard. Take a wire and connect the gate (generally the middle pin, but check) to PD7, pin 13. When we tell PD7 to go high, the FET will start conducting.
The datasheet for the 2N7000, recommended, is included below.
Connect the source pin on the FET straight to ground.
Connect the resistor in series with the Drain pin. Then, connect the LED up to the 3V power rail, making sure to get the polarity the right way round (short legs are generally negative, but do make sure).
The resistor value was calculated based on the following assumptions:
1. We have a 3V power source going through a resistor and the LED to ground via a FET
2. The LED should have a current of around 60-80mA with a forward voltage of 1.7V (could be different for your emitter!)
3. Current is equal over all components in series
4. This means that to load 60mA and drop 1.3V over the resistor, we need a resistance of 22 Ohms. The FET provides up to 5 Ohms extra, so you could go with 18 or even 12 to get a higher current going.
With that all set up, we can start writing the code!
2N7000.pdf(612x792) 94 KB| « Previous Step | Download PDFView All Steps | Next Step » |
![]() |
Add Comment
|



























































