Newbe circut advice

Forgive my poor photoshop skills.

This is I have it right (and I may not) is a example of a circut from the getting started with Arduino book.

I'm a bit of a n00b with the electronics.

Placement

Why does the resistor go behind the phototransistor? Shouldn't it be in front to prevent the peak from exceeding that of the transistor?

The resistor

R = V / I

5V, How do I know what the dropoff of the phototransistor is?
it has a I=50 milliamp on the back of the box. Is that the drop off?

R = 5v / 20ma

R = 4? (how many V's are a ma?)

Where to connect it to the Arduino

Is it normal to split the ground wire so that it goes directly to ground and into the arduino?

Will any analog port be fine? (assuming I define that in the code?)

Thank you very much for your help.

Why does the resistor go behind the phototransistor?

Because this circuit is a common collector amplifier or an emitter follower as it is known.

Is it normal to split the ground wire

That is just a drawing convention, both points are electrically the same there is no split they are all connected together.

Will any analog port be fine?

Yes any port

The resistor

Forget all that calculation you have the wrong end of the stick and you don't need to calculate anything for this circuit.

It shows it going into pin 1 this is wrong it should go into an analogue input pin. Also the ground doesn't go to pin 1 this is another mistake.

Forget all that calculation you have the wrong end of the stick and you don't need to calculate anything for this circuit.

Are you using it doesn't need a resistor?

All you've done in your diagram is to pull pin 1 LOW - it is tied straight to ground.

Yes, your circuit simply grounds pin 1 (presumably you mean analog input 1). You need to connect the analog input pin to the junction of the transistor and the resistor.

(I don't have the Getting Started With Arduino book; is this really the circuit in there or has the OP mixed it up?)

yes and no.

The diagram above is a circuit I made in paint, from memory of a paragraph from the book I read a day or two ago. (it didn't have a schematic)

So I may have messed it up, but my questions are so basic, I didn't really think it mattered that much.

It matters, because all we (I) have to go on is that diagram! And taking the diagram at face value, it connects the input pin to ground, which won't work. Now, from what you've said, there's a good diagram in the book, so there' no need to worry.

I didn't say you don't need the resistor, I said that you don't have to calculate it. All it is is a load resistor and can be anything between 1K and 100K. However, that all changes if that is not the circuit we are talking about.

There isn't a good diagram in the book, which is why I'm asking. More importantly I would like the the Why's of this. So I can stop asking such questions.

It should look more like the above? or I'm I stilll not following something?

The whole project is: phototransistor into a analog port in the arduino. In a way that I won't harm the hardware, myself, or the quality of reading on these boards.

Edited for clarity

Sorry that diagram is rubbish as well.
Try looking at the playground for circuit ideas.

I'm also not sure on the resistor that is needed,

You do need a resistor with a photo transistor.

Look at this paper:- www.physics.csbsju.edu/~awhitten/reference/Sharp_photodevices.pdf

Page 5

Thank you very much, that is an awesome link :slight_smile:

I would like to learn the how's and why's and not just getting something to work, and very new to hardware side of electronics.

Thanks for the nudge in the right direction.

OK, this is my sketch of the circuit we're aiming for:

Imgur

Note that the Arduino's Ground pin is connected to the circuit ground. The value of the resistor (in Ohms) will depend on the transistor and the expected light levels.

Hope that makes sense!