FYI, there are conventions for schematic representations, one of which you don't rotate the transistor 90 degrees unless there is a reason to.
Also, positive voltages are at the top and gnds or negative voltages are at the bottom, which means
your schematic is upside down. I suggest you learn
some discipline when creating schematics so it doesn't like like it was designed by an amateur.
You need to know how much current the relay coil needs. Then divide by the transistor's (worst case) current gain (Beta) = 40. That tells you the minimum current into the transistor's base. Now multiply that by a factor of 2-10 to make darn-sure the transistor is saturated. Most of the 5V will be dropped across the base-resistor, so use Ohm's Law to calculate the resistance.
Or... Since the coil voltage is the same as the "signal" voltage (5V) you can get an approximate value by simply dividing the coil resistance by 10 or 20 (for 1/10th or 1/20th of the coil current into the transistor's base). If they don't give you coil resistance you can use Ohm's Law to calculate it.
(R16) Resistor to limit the current in Led
Value ?
Subtract the LED's on-voltage from the 5V supply to find the desired voltage across the resistor. Then use the desired current and the now-known voltage to calculate the required resistance (again with Ohm's Law) For example, if the LED is rated for 2V and 20mA (0.02A) you the resistance is 3/0.02 = 150 Ohms. ...I'm not sure if 150 Ohms is a standard value, but you can go-up for less current. (10mA is usually fine.)
...In series circuits the voltage divides, but the same current flows-through all series components.
The opto-coupler provides additional isolation - It isolates the relay coil from the Arduino circuit for extra protection against glitches from the coil's inductive kick-back.
The manufacturer will have all of the information on their website. Eagle will generate the required Gerber files.
P.S.
Something will probably "go-wrong" with your 1st batch of boards and you'll probably have to fix it and re-order. Just be mentally (and financially) prepared for that...
I've never done this myself but I work in electronics and the even with experienced engineers & PCB designers, the 1st version usually isn't perfect.
I'm testing some boards now that are "Rev.1". We use a different numbering system for the 1st prototype boards and then the 1st production release is Rev 0. So this is the 2nd production release and there was at least one prototype version before that.
I recall one of my customers ordered, perhaps 500 circuit boards for a new version of their product. One of the footprints for an IC was the wrong size for the IC in the design. An amateur mistake for a seasoned engineer. IT happens!
Well , not be nit picky but why bother putting the transistor part number if the resistors
values are not shown ? The resistor values are chosen for the transistor used. Of course
you would be hard pressed to find an arduino hobbyist that wouldn't know the values
of R13 & R16 but that's not the point. You asked, so that's my answer. They could probably tell you the transistor part number , (but I know some could not)
Resistor before transistor (I saw on a Website that there is a voltage drop on the transistor around 0.6V when the transistor is saturated, I will count it on my calcul, tell me if i'm wrong, so the formula is :
With a Security Factor of 4, I get 10kOhms for ResistorBeforeTransistor. Is value correct ? Because when I do Ohm Law with coil resistance (U/I = R => R = 5 / 71.4 * 1000 = 70 ohms), I get 70 ohms xD
Resistor = (VIN - VLED ) / I = (5 - 3) / (5 / 1000) = 400 Ohms Is value correct ?
For the Opto-Coupler
Is it a crucial element or it is used for specifics applications ?
For the Gerber Files :
Thanks for the tutorial's link
For the Tips :
Thanks you for this, to be honest, that's doesn't surprise me.
It's okay, I want to learn so if I fail at first, I will continue to success
Thanks a lot !! It really helped me !
I hope, values are corrects.
What Larry is so tactfully pointing out is that it is rare for any new poster to do their due
diligence. The norm is a game of 20 questions because the OP (Original Post) tells us next to nothing. On a grading scale of 1-10 , when comparing you to the typical poster,
you get a 20.
I would normally set the base current resistor for circuit like this depending on the maximum output of the microcontroller pin. 15 or 20mA is fine for an Arduino, so I'd plan on that for the base current, and THEN check the transistor characteristics to make sure it is "reasonable" 20mA * gain of 50 to 200 is 1 to 4 Amps, which is comfortably above the relay coil current, so I'd be pretty confident...
Then I'd put the LED in series with the base resistor. The currents are compatible, and it eliminates a component. (5-1.8-0.6)/20mA is about 150ohms...
@LarryD@raschemmel Thanks, I doesn't post often but when I search and look at some posts, it is horrible when nothing is clear.
So I prefered do my own researchs first, then come here with all elements to have a complete startpoint for you which help me
Very good Idea for the Led in Series !
Thanks for SecurityFactor, oops xD
LED :
"""
Then I'd put the LED in series with the base resistor. The currents are compatible, and it eliminates a component. (5-1.8-0.6)/20mA is about 150ohms...
"""
Is 1.8V the voltage of the led ?
In the doc I gave, the forward voltage is 2.6V to 3.2V.
Am I wrong ?
Transistor :
Understood, thanks for the curve and the explanation