1

I have connected digital pin 2 of arduino to the circuit as shown: pin 2 to 1kOhm resistor to base of 2N222 transistor. Emitter to -ve of 9v battery. Collector to -ve of LED, +ve of LED to 330Ohm resistor, resistor to +9v The problem is that the LED is not turning on normally its only turning on when I touch anything on collector side of circuit. What seems to be the reason? Seems like grounding problem as its turning off when I don't touch my legs to ground. turns on when I touch it

Thank you in advance.

asked Mar 11, 2017 at 10:25
2
  • if that's an npn, it's (probably) backwards. you also need to common the ground with the MCU Commented Mar 11, 2017 at 11:40
  • Hint: Use wires intended for breadboards. The battery wires lack pins. Commented Mar 11, 2017 at 12:50

1 Answer 1

4

Sounds like you have guessed it: although it's very hard to say from those photos, it doesn't look like you have the circuit grounded.

Connect a ground from the Arduino to the black wire from the battery.

answered Mar 11, 2017 at 13:30
2
  • Yes, you are right its working now. Thank you very much :D. Commented Mar 12, 2017 at 8:00
  • Sorry for the photos, I uploaded this from my phone and I put connections in image descriptions, but they are not visible in the post. Commented Mar 12, 2017 at 8:04

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.