First of all, I'd like to say I'm not an Electrical engineer so please bear with me. I haven't got a sketch for what I'm trying to achieve but hopefully I can explain it ok.
I have an NPN transistor (2n2222 specifically) and am doing the following.
- Connect 9V battery to transistor collector
- Connect transistor base to Arduino PWM output pin (1k transistor in between)
- Connect ground of 9V battery to Arduino ground
- Write a for loop (i = 0-255) which increments by 1 every 100ms and do analogWrite(PWMOutputPin, i)
I then take a multimeter to measure the voltage between ground and the emitter leg and what I'm getting is values between 0-4.5 volts while the battery has about 7.68V in it by measuring it directly.
I thought the purpose of the transistor is to send the full voltage between the collector and emitter provided that there's sufficient voltage being sent to the base. Is this correct? Am I doing something wrong?