What am I doing wrong??

Hey forum,

Basically my problem is, that I crashed my second bootloader today...
First of all I describe my circuit.
I have an Arduino Uno(R3) and I control 2 SMD-Led Strips via a photo-resistor.
I have connected the photo-resistor to A0, it's doing fine, I controlled it via serial monitor, it's not the problem.
When the voltage goes below 1 (I convert the value to "voltage" - 5V) the Arduino should turn on the 2 SMD-strips, connected to Pin5 and Pin6 via PWM. The 12V side of the strips are connected to a 12V power supply unit, the other sides of the strips go into Pin5 and Pin6. The other cable of the power supply goes into a "GND" of the arduino.
Before that I did it with only one SMD-strip and it worked fine for days. The botloader crashed today after connecting the second strip.
After installing the new circuit, I flashed the new sketch to the board and that crashed the bootloader. After that I changed the Atmel328 with a new one(with a preinstalled Bootloader) , and flashed it to the board with no problems. I changed some settings, still connected to the board, again no problems, the led-strips started after the voltage went below 1. Then I disconnected my laptop and had done some additional changes in the sketch. After reconnecting and flashing it to the board, the bootloader crashed again so it has something to do with the corcuit I suppose...
I don't know what I've done wrong in the circuit...Can you help me?

OK - SMD LED strips pull a significant amount of current. Generally they are designed for 12v operation.

Why are you driving them with an Arduino????

Arduino is 5V (or 3.3v) current sink capability is 40mA.

You fried your Arduino!

Connecting any Arduino pin to a source of 12V is likely to totally destroy the chip.

You cannot draw more than about 30mA per pin without risking destroying the chip.

12V LED strips always need a BJT or MOSFET or relay to drive them because they
are > 5V, but they are also usually above 30mA too.

Your first action is to check if your Arduino pins still work.

Ok I see, I wrote a lot and it's hard to read trough, but I don't drive the led's with the arduino, the power comes from the external supply.
Basically I oriented myself on this sketch:
and as I said, with one strip it works pretty fine for over a week, running 12 hours a day.

Before that I did it with only one SMD-strip and it worked fine for days. The botloader crashed today after connecting the second strip.

Too many amps.

You can't feed that much power into a Mega328 pin. You need a MOSFET to do the switching.

Need to add two transistors as on the right side here.
Otherwise when LEDs are not driven, output gets pulled high from the 12V and eventually blows the output clamp diodes and then the uC.

Hey there,
thank you very much, I got the point!
Any sources for getting the theory of transistors and how to connect a mosfet in my circuit?

Connect it up in place of the NPN.
Make sure to select a Logic Level, Low Rds, Low Input Gate Capacitance, N-channel MOSFET.
Use those search terms at digikey.com
I usually through-hole, and select In Stock.
Sort the list that results by Price, then scroll down the list to find the Rds, Gate capacitance you're willing to pay for.
Or, use a shift register with open drain output & high current, high voltage capability - TPIC6B595 works great.