I've been reading a variety of books and I'm trying to apply some basic electronics information to a breadboard circuit. The setup: A PIC microcontroller sets an output pin to high. A 100 ohm resistor is between the PIC and the transistor (see diagram).I use a resistor to increase the voltage enough to turn on the transistor (2V to 6V). I then allow the emitter and collector to pass electrons, which allows current to flow across the emitter and collector from the battery. I put the relay along the wire which is flowing electrons with the 5V potential of the battery and the battery supplies the current to turn on the relay (see diagram).
When I build this circuit the transistor collector cycles from 5V to 2.5V as the PIC output pin goes from high to low (PIC output changes every 300ms or so), which I believe is a good sign. There's 82mA of current across the diode, which should be enough current for the relay. I hear faint clicking noises from the relay, but when I measure the resistance change on the relay, the relay isn't switching.
Please let me know if I don't understand how to properly setup the transistor or if there's a component I'm missing. I enjoy being able to practice ohms law and calculate currents, so any explainations that tell me how and why I should change my setup would be very appreciated.
When I build this circuit the transistor collector cycles from 5V to 2.5V as the PIC output pin goes from high to low (PIC output changes every 300ms or so), which I believe is a good sign. There's 82mA of current across the diode, which should be enough current for the relay. I hear faint clicking noises from the relay, but when I measure the resistance change on the relay, the relay isn't switching.
Please let me know if I don't understand how to properly setup the transistor or if there's a component I'm missing. I enjoy being able to practice ohms law and calculate currents, so any explainations that tell me how and why I should change my setup would be very appreciated.