Wiring Forum
Other questions >> Other electronics/hardware questions >> phototransistors

Message started by John Keszler on 03/28/10 at 14:37:27

Title: phototransistors
Post by John Keszler on 03/28/10 at 14:37:27
Dear Forum members,

I have bought two types of phototransistors
here are the links for their data sheet:
but I don't know how to connect them :P
witch pin goes to ground, vcc, digital in or analog in.
that's another thing, I don't know whether they give me
an analog or digital signal ...
PS: i look in examples but the phototransistor there look
much different form the ones I got.



Title: Re: phototransistors
Post by barragan on 03/28/10 at 18:04:33
hi John, you can connect them like this: http://books.google.com/books?id=6JRcqhVUszEC&pg=PA365&lpg=PA365&dq=connecting+phototransistor+to+microcontroller&source=bl&ots=q1zeulP56k&sig=gHaCVl4f5KpEPrdQIxNoO0uWEps&hl=en&ei=hpmvS8n5H8T7lwf876HPAw&sa=X&oi=book_result&ct=result&resnum=10&ved=0CCcQ6AEwCQ#v=onepage&q=&f=false

the ECB pins are marked in the diagram on your datasheet for each device. I'll add a diagram for the next site update. Let me know of this helps.

Title: Re: phototransistors
Post by Titus on 03/29/10 at 16:14:16
The 22K Ohm resistor adjusts the sensitivity. You might want to exchange it for a Potentiometer.

Or connect it to an analogIn, rather then a digitalIn.
In that case the 22K Ohm resistor also regulates the sensitivity, but you can still adjust your calibration in the program(given the fact you will get value's from 0-1023).

Good luck,

Title: Re: phototransistors, solenoid
Post by John Keszler on 03/30/10 at 09:11:19
Thanks Barragan,
I'm waiting for the site update, :D
but now i have to connect a 6v Dc solenoid
I understand a solenoid is an electronic coil with a magnet in it ...
I was reading the forum ,and i found this :
and from there i tried going here:
but my browser kept saying 404 not found
should I connect in to an h-bridge or straight to wiring :-/?
what is the circuit ?
and also when you want to power
the wiring ,were can you get batteries, that are
connectible to the"external power supply connector'.
and I read in the hardware section that you can also
power wiring by a regulated 5 volts and you connect it to and you connect it to any vcc pin?



Title: Re: phototransistors
Post by barragan on 04/01/10 at 16:36:37
that's an old link, here you can find useful information about coils: http://www.kpsec.freeuk.com/components/relay.htm
also for transistors http://www.kpsec.freeuk.com/trancirc.htm
this one too, has a lot of diagrams for interfacing relays, coils and solenoids, I'll add this diagram to my list, perhaps we could do the example with your specific device :)

Title: Re: phototransistors
Post by John Keszler on 04/04/10 at 20:14:19
Dear Barragan

I can't find anything on the web, on my solenoid and besides
the one I'm using is a practice solenoid (it's not even mine)
When I get one for myself i will send you specs, but until then
can you send me a link on how to connect a 10 A 6Vdc
solenoid with a relay .
That's anther thing , if my solenoid is 10A and 6 V dc then
do I have to use a relay that is exactly 10A and 6 V dc
or any thing in the vicinity would work


John Alex

Title: Re: phototransistors
Post by John Keszler on 04/16/10 at 19:06:48
HI all

Ok ... i ask to many questions :D
I found this in the web:
I'm asking can i use the same thing to control a solenoid:
I would replace the bulb with the solenoid .
and in the image the power pin is connected to a 5v
would i connect the power depending on the voltage of the coil?  and the other pin the is the ground, digital pin
do i need to use a transistor for it ?
my idea for a circuit is the attached file please
tell me if it's right.
This is the relay I'm using :

John Alex Keszler
solenoid_cicuit.jpg (43 KB | 243 )

Title: Re: phototransistors
Post by barragan on 04/16/10 at 20:51:51
hi john, the circuit looks fine, note that the relay you're using already is a solenoid, it is also possible to use a MOSFET to control a solenoid, check out this circuit: http://wiring.org.co/learning/basics/mosfetirld024.html
replace the bulb for the solenoid and it should work, as you mentioned before "if my solenoid is 10A and 6 V dc" you don't need the relay just use the solenoid instead of the relay in the diagram you sent: http://interactive.usc.edu/members/phoberman/relayCircuit.gif

Wiring Forum » Powered by YaBB 2.5 AE!
YaBB Forum Software © 2000-2010. All Rights Reserved.