did i crash my aruino with ac power?

hello together!

i just started my first arduino project. i want to use a button to give power to a bulb. with a friend i built up the whole electronic stuff with an transostor and an relay. in the arduino i used the blink-script from the examples. i guess that should work for my purpose. but i used an ac 9 volt power plug to give power to the arduino.... now i´m afraid i crashed the board. when we build up everthing, the relay gives a buzzing sound and the led of the relay is on. do i push the button, the relay is quiet and the led-light is a little bit brighter(?). my bulb starts to shine. sometimes when i push the button some sparks appear inside the relay...

can somebody help me with that problem?

thanks a lot!

greetings, franzi

OK for a start don't connect it to 9V ac. Go back to powering it from the USB port. Try uploading say the blinking LED sketch. Is everything fine? If yes you haven't trashed your board.

sometimes when i push the button some sparks appear inside the relay.

What voltage / current are you trying to switch, generally sparks inside a relay are bad news and normally an indication that something is wired up wrong on the contacts side.

Dont use AC! As mike stated above, I'd go with usb connection, and always use DC.

Probably best for you to go back to the USB connection until you get an appropriate DC power supply. My arduino has an SS14 diode at the barrel power connector that hopefully protected your arduino. With the ac power source, you are in effect resetting your board 60 times a second, depending on the capacitors in that part of the circuit.

most designs I have seen have a diode on the voltage input, so do as suggested as above (and make sure you have it hooked up right)

that 1 diode acts as a half wave rectifier so its flipping on and off at whatever speed your mains is running at (50-60hz)