# What resistors do I need

Hello community

My first post here. I am fairly new to electronics and I’m building my own pyrography power supply. I have done a couple things to accomplish this but have not yet been successful. I found a tutorial online on how to make one using an Arduino and an ATtiny85 chip.

Here is my question: In the schematic, I can see that I need 2 resistors, but I don’t know what wattage to allow for R1 and what value to use for R2. I know that R2 is connected to an LED, but I don’t know the voltage that comes out of the ATtiny85 to calculate using the formula. Can anyone help me please?

Edit:

Thank you guys for all the help. It clears a lot of my doubts. I’m not sure if I’m allowed to post external links, but here is the project I’m doing:

https://gerritsendesign.wordpress.com/2016/11/03/pyrography-power-supply/

I already made a bench power supply and have a LTC3780 to have variable voltage and current. I thought this was going to be enough, as I am using the 12 V rail which carries 14 A, and I made a pen with nichrome wire. But it doesn’t work. It heats up, but it burns the fuse in my LTC3780. So, I decided to do the project in the previous link, to try my luck.

Thank you very much.

• Maybe try a tutorial for a blinking LED first? That same tutorial might even tell you how to calculate that resistor. Something to look out for is "can that output handle the current to drive that LED?"(look for $I_{OH}$ in the datasheet). – Daniel P Feb 18 '18 at 19:03
• If the LED is red (Vd about 2.1V), a 220 ohm ressistor should do fine. – Scott Seidman Feb 18 '18 at 19:04
• You don't really need R1 at all. Proper selection of the NFET will require no small amount of care, there are relatively few through hole parts with sufficiently low threshold voltage to be fully on with 5v gate drive. – Chris Stratton Feb 19 '18 at 3:51
• Thank you guys for all the help it clears a lot of my doubts, Im not sure if im allowed to post external links but here is the project Im doing gerritsendesign.wordpress.com/2016/11/03/… I already made a bench power supply and have a LTC3780 to have variable voltage and Current, I thought this was going to be enough as I am using the 12V rail wich carries 14A and I made a pen with nichrome wire. But it doesnt work, it heats up but it burns the fuse in my ltc3780, so I decided to do the project in the previous link to try my luck, but as you can see I have some – Gabriel Rivas Feb 19 '18 at 4:00

The micro-controller will output near to 5V as that is what goes into the VCC pin.
As to "..using the formula" , I don't know what formula you have been given.
R2 depends on what type of LED you have. 1K seems a safe value which gives ~4mA through the LED.

R1 can be any value between 100 and 1K.

I would add a 100K resistor from the FET gate to ground to make sure the FET is off when the micro controller is still booting. (And whilst you are developing the software).

I had a quick look at the WWW and most pyrography supplies have a control knob which seems to be missing here. I assume you want to add one because what you have here does not requires a micro controller at all. You can do the same with just a switch.

You're supplying the controller with 5V. As this is as well its IO logic, this is what you will get.

As for R1: You should select a smaller value. You want that gate charged quickyl - so 100R is about fine (to be honest, about everything from 0 to 1k will do fine). Since there is hardly any current through that resistor, power is no issue here - you may choose any one you can find.

As for R2: This depends on the forward voltage of your LED and the current required for the LED. You will do the calculation as follows (assuming a forward voltage of 2.2V for a red LED). We'll also assume a desired current of 5mA. This should be enough to see the LED and the controller should be able to drive that current.

$$U_{IO} = 5V, U_f = 2.2V, I_f = 5mA$$

$$\frac{U_{IO} - U_f}{R_2} = I_f$$ $$\frac{5V - 2.2V}{R_2} = 0.005A \to R_2 = 560R$$

Starting from there, you can the then calculate the power dissipation: $$P_{R2} = U_{R2}*I_{R2} = (5V - 2.2V) * 0.005mA = 14mW$$ Basically this means: Choose anything with a higher power dissipation than that - basically each resistor you can get at a store will do.

As far as considering R1, you can choose a resistor based on the JFET's gate current; for instance, say 1mA is a typical current value of gate, then you need to select a resistor with the value of R=V/I. Here R will be 5V/0.001, which is equal to 5K ohm. This value will vary depends on the gate current of JFET. Mostly a smaller value of a resistor is preferred if it is chosen for on/off purpose.

When coming to R2, you need to select a resistor based on LED forward voltage and its current value for luminescence.

R=(Vs - Vf)/I.
R= 5-2/10mA (typical values)
R=3/0.01 = 300 ohm.

You can use R1 of 330 ohm here. To calculate watt vale of resistor,

Pr1 = I^2R.
Pr1 = (0.01^2)x300 = 30mW.