If i were to use a transtor as an analog input device is that the proper way to connect it to the arduino?
Thanks!
nope ur diagram is wrong
try using a pnp transistor
Why do you say that? I think the diagram is fine.
Now if it were an inverted PNP then the base would have to be biased with a voltage divider (using the 'Duino PS) and the input analog signal could be capacitively coupled to the base.
The electrons flow from negative to positive in all three.
1. from the N (emitter) to the P (base)
2. Power Supply One.
3. 'Duino Ground to 'Duino +5V
The only down side to the given circuit is that the analog input will only ever see a max. voltage of 3.6 V.
Your first drawing will work if you swap the Analog in and Arduino 5V labels.
OK , so i use an NPN (or a pnp im not sure if the edition you made is an arrow pointing in)
then i have the collector to Ain and what is that resistor before the 5v (regulating current or something?)
The emitter is connected to GND
Thanks for the help!
and sorry for the delay in my reply!
"... what is that resistor before the 5v ... ?" Good question.
As the input signal increases and current, I(b), begins to flow out of the base; a much larger current, I(c), flows out of the collector and that current, my friends, creates a voltage drop across R(c) which the 'Duino will sense on its analog input pin, Ain. Just to make it clear, yes, the output signal is amplified but also inverted.
Oh, and by the way, taydaelectronics.com has some very attractive prices on PNP and NPN transistors. See their facebook page for frequenct coupons to help pay part of your S&H charges.
Thanks for the explanation!What value should i use for Rc?
Oh and 0.01$ for a transistor is nice..
The data sheet for the transistor will have a max. I(c) value. Reduce by one half and you have R(c) = 2* [V / I(c)]. Via the Application of Ohm's Law : V=I*R. The R(b) will be about 100*R(c).
Say, dirtdriver, where do you go to school anyway?
well its a "high school of electronics and electrical engineering" or it should be something like that in english
But im 10th grade (now to be 11th) and so far the stuff i have learned are 5% related to "electricity",
and what i know i know from the enterner or books...but the real education starts next year(not that im waiting for it, i try to learn as much as possible, couse its when i see the chinese dudes making A.I. robots that i realise how little i know...
)