Ping sensor to control fading in/o 2 sets / 5 LED

Hello,

I looked through the forum but could not find exactly what I was looking for but maybe because I am new to this I do not realize how to modify existing information.

This is what I am trying to do:

One set of 5 White LED 3.5v 30mA connected together I assume serial is the way to go to only use 2 of the PWM.

Set 2 of 5 Red LED 1.7V at 20mA connected attached to other PWM.

A Ping ultrasonic range finder sensor module attached.

At a certain distance recorded by sensor. All 5 white LED fades in.
At a closer distance All white fade out and All red LED fade in.
Both sets have default automatically fade out 10 sec no motion.
If no motion detected everything stays off.

The programing I think I am ok with (naturally any suggestions welcome) but the hardware wiring confuses me.

Seems like I am not suppose to be able to drive the 2 sets of LEDs of 5V but I have tried to direct connect to 3V without resistor and they shine fine.

Shall I go with this? How does adding another LEd affect it?
In this schematics what is the Q12N2222?
arduino.cc/playground/uploads/Learning/multiple_leds2.jpg

For the sensor I assume this standard wiring is what I shall go with?
arduino.cc/en/Tutorial/Ping

Thank you!

direct connect to 3V without resistor and they shine fine.

Yes they shine fine but not for long. NEVER NEVER do this. It will overload the LED or the Aurduino or both and shorten their lives.

Each LED MUST have it's own resistor even when they are driven in parallel.
To drive 5 white LEDs you will probably need to go through a transistor like in the tutorial.

In this schematics what is the Q12N2222?

Q2 is a transistor called a 2N2222

Ops...

well I definitely follow that advise! Thanks!!!

So with the added correct transistor I should be able to plug in each connected set of 5 to 2 of the PWM slots?

This is probably very basic to most of you but, any suggestion where-how I calculate what transistor to use for the different sets? Are they as specific as resistors are?

Transistors are in general for these sorts of applications none critical. Just use the same on for all your sets.

So with the added correct transistor I should be able to plug in each connected set of 5 to 2 of the PWM slots

You can connect the base of all transistors (thought the base resistor) to the same PWM output if you want them all to follow the same pattern. Driving a transistor takes very little current and an output pin will cope with driving lots of them.