Need help with led driver circuit

I am making a reflow oven controller circuit board :slight_smile: and im gonna have two status leds;
One for power indication (Red/Green)
And
One for reflow status indication (RGB) 8)
I am concerned that the leds and all the other outputs will consume more than the maximum 200ma max for the atmega chip :o
so... I added a transistor led driver circuit, but I am unsure of the values of R1, R2, and Q1 :confused:
also... can you check if i have done something any mistakes in the circuit ::slight_smile:
Thanks, Eirik

Picture of led driver part:
http://postimg.org/image/kn2j2geol/

Here is the link(s) to the schematic:
https://upverter.com/Eirikki211299/f839efe34f517e4e/Reflow-oven-controller/
https://tools.upverter.com/eda/#tool=pcb,designId=5803839f6bb9e5b5

I am concerned that the leds and all the other outputs will consume more than the maximum 200ma max for the atmega chip

You only need to bother about the current the chip sources or sinks, nothing else.
As an LED will take only 20mA I would not think you would have any trouble.

It is good if you post your schematics here, that site was poor from my perspective and I could not make out what part of it you wanted help with.

Please read this:-
How to use this forum
As it will tell you about posting images here.

Reflow-oven-controller.pdf (518 KB)

Thanks, that is a lot better. That web site would do daft things with the mouse and I could not scroll round it.

The LED driver looks OK, but as I said it is a bit overkill. You can use any PNP transistor, nothing special needed. The R1,R2 ... should be calculated like you would calculate any resistor for an LED. 5- Vf * current = resistance.

Look's like you only drive some LED's, read some switches and drive a SSR? Then the power is nor really a problem. The LED's are probably blindingly bright at 20mA. To use them as a signal light 1mA will probably be just fine. So that makes 5mA for the LEDs in total. Nothing to worry about, just connect them to the ATmega.

And I see pull down resistors on the switches and door switch. You can just use the internal pull up of the Arduino and get rid of them.

And why the complicated reset circuit?

Grumpy_mike:

Grumpy_Mike:
The LED driver looks OK, but as I said it is a bit overkill. You can use any PNP transistor, nothing special needed.

Ok but i still dont know much about transistors, can you recommend one for me?
And it was a mistake writing R1, R2 i was going to make an example sketch fo those resistors.
What i ment was that R1 was the base resistor(s) and R2 was the current limiting resistor(s)
Because its the whole satursation, forward bias voltage, vce, bce, beta, thingy i dont understand. ::slight_smile:

septillion:
To use them as a signal light 1mA will probably be just fine. So that makes 5mA for the LEDs in total. Nothing to worry about, just connect them to the ATmega.

And why the complicated reset circuit?

1mA? :astonished:
What if the lights will get so dark i wont see any light emitting?
Then it whould already be implemented in the circuit and it whould be difficult to change the resistors...

And i built the complex reset circuit because i was actually just cloning an arduino mega into the cticuit, without all the headers, so it whould be easier. :smiley:

Well, when you put 1mA through the LEDs you're using, how bright are they? You should do this before you make the design.

I usually default 1k resistors for 5v circuits, leaving me with like 2mA for LEDs, and it's fine.

I do not understand why people feel a need for the full eye-pain-inducing 20mA going through their LEDs.

Just experiment. Test the LED brightness on the workbench to find a suitable resistor value.

Ok but i still dont know much about transistors, can you recommend one for me?

Not sure what part of ANY you are having difficulty with, you find your supplier and find the cheapest and then buy about 25 to get the first price break.
How about this one:-

What i ment was that R1 was the base resistor(s) and R2 was the current limiting resistor(s)

It matters little, I would use a 1K.

It is not worth trying to calculate, the answer always comes out about the same for small loads like this. It is only when you start switching 100s of mA do you have to pay a little attention and then not much.

What about the transistor driving LS2 (buzzer) connected to the atmega?
The max current for the buzzer is 35 mA, but the datasheet says nothing about nominal current.
thats alot compared to the current going trough the led transistors

The max current for the buzzer is 35 mA, but the datasheet ......

Which you have not posted a link to.

http://www.puiaudio.com/pdf/AT-1220-TT-9-R.pdf

The max current for the buzzer is 35 mA, but the datasheet says nothing about nominal current.

Wrong way round. It says the nominal or rated current is 35mA, but it also tells you the resistance of the coil and the nominal voltage. So at 5V the 42R coil will pull a maximum of 5 / 42 = 119 mA. That maximum will occur at DC. When you feed an alternating voltage into it the current will drop due to the inductive reactance.

Grumpy_Mike:
So at 5V the 42R coil will pull a maximum of 5 / 42 = 119 mA. That maximum will occur at DC. When you feed an alternating voltage into it the current will drop due to the inductive reactance.

Cant i just it in series with a resistor?
So much easier

Yes sure you can do that. The only down side is that it won't be as loud.

But it whould be loaud enough for just signal beeps (start/stopp/on/off/warn) just like a pc buzzer at 35ma?

But it whould be loaud enough for just signal beeps

No idea, the concept of "loud enough" is not defined very accurately is it? You are going to have to try it.

But does everything else look good to go?

Yes try it.

This is the tested led circuit:

an this is the circuit thats going to be on the pcb:
http://s7.postimg.org/65pyemrbv/ledkrets.png