Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Encoder, phototransistor problem

Status
Not open for further replies.

janisj

Newbie level 2
Joined
Mar 8, 2007
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,306
mouse phototransistor

Hello,

I have crisis of faith .. :(

It's seems that I'm missing something obvious only novice can miss

I have 2 PC USB rotary encoder mices. When the firts one is connected to USB and oscyloscope is connected to phototransistor left or right ping I see excelent curves. signal is changing from almoust 0 till +5.

I took other mouse and soldered wires to
- phototransistor middle pin (it goes to +5 in breadboard)
- phototransistor left pin (it goes to ground via 10K resistor, and right before resistor to PIC 18F452 RB5, TRISB.5=1)
- two wires to IR LED (and checked with camera that there is light in it)

I've connected everything, powered up, nothing is burning. Connected oscyloscope as with previous mouse (phototransistor left pin) and ... almous nothing. Something is going on, but on the level of milivolts.

Any ideas why phototransistor when connected to mouse native chip shows excelent signal and when directly to PIC port, made as input, show almoust nothing? I suspect that in that chip in mouse there is some sircuit which makes phototransistor happy.

Any help will be appreciated!
 

dual phototransistor encoder

Check if you need to put a pull up resistor, sometimes they are integrated into the ICs.
 

phototransistor mouse circuit

How have you set up internal pullup:

Each of the PORTB pins has a weak internal pull-up. A single control bit can turn on all the pull-ups. This is performed by clearing bit RBPU (INTCON2<7>). The weak pull-up is automatically turned off when the port pin is configured as an output. The pull-ups are disabled on a Power-on Reset.

Or, as suggested by DAVIDDLC, try external pullup ..

Regards,
IanP
 

phototransistor problems

Most phototransistors are NPN devices. From your description, it sounds like you wired it up as a common collector (emitter follower configuration) with the collector directly connected to VCC and the emitter connected to ground through a 10K resistor and you take your signal from the emitter.

This is not the most sensitive configuration. The usual configuration is common emitter. The emitter is connected directly to ground. The collector is connected to VCC via a pullup resistor and the signal is taken from the collector.

Also, make sure that you did not reverse the transistor and have the collector and emitter backwards. If you connect it that way, it works but only very poorly.

Finally, make sure that your PIC is not loading down the circuit. If the PIC's pin is configured as an output is will swamp out the majority of your signal.
Try disconnecting the PIC and see if your amplitude increases.
 

dual phototransistor pc mouse

Banjo,

Thank you for answer! I will deffinatelly look up info for NPN transistors.
Just one question, as far as I understand transistor pins have 3 core functions
- voltage input, voltage output and controll pin.

In phototransistor there are no controll pin, as light is doing that.
Voltage supply is middle pin (logically) one for both transistors in one package.
So two pins left are output for each phototransistor (in one package).

I just possibly can not immagine how to wire this differently ... Can you give some exaples?

Thank's again for response! :!:
 

npn phototransistor computer mice

Ok, first are you sure that there are two phototransistors in the same package? On some optocouplers, they also bring the base lead out of the package. Most people leave this connection open-circuit. Its purpose is to allow you to provide bias resistors to reduce the sensitivity on the transistor.
Does the component have a part number on it? If so you may be able to find the manufacturer's datasheet on the Internet.
Do not assume that the middle pin must be the common collector pin. Assuming that the device does include two phototransistors, they could wire them with the two collectors in parallel, or they could wire them with the two emitters in parallel. Also the order of the pins in the package is that which made the most sense to the manufacturing process, not the user. It could be that the common terminal is one of the end terminals.
If you are not familar with bipolar transistors, please do a web search for the dual diode check for bipolar transistors. It is very common and is well documented everywhere. If possible get a regular transistor and using your multimeter practise this testing method. When you are comfortable with this method, test the three leads of the phototransistor. If you find that it passes the dual diode test, then it is only a single phototransistor in the package with the base lead brought out of the package.

Once you are sure that it is a dual phototransistor arrangement, do the following.
1. Set you multimeter to the diode check/continuity setting. and connect it to two pins of the device. In this method the multimeter is acting as the power source, load resistor and sensor all in one.
2. Get your IR remote control from the TV and place it a few inches from the device and hold down the volume up button. (This usually give a constant stream of IR data.) The phototransistor should start to conduct if wired properly and the meter should beep or the display should show something other than open circuit. If it does not work reverse the multimeter leads and try again.
3. Once you get the device to respond, make a matrix on a piece of paper and start testing the pin combinations. From the matrix results you should be able to deduce whether the emitters are tied in common or the collectors are and which pin is which.

Finally, remember where you got the parts. The computer mice are very low cost devices. The internal parts only have to work in the dark environment within the mice. These phototransistors may not have very good optical filters on them. The room light or sunlight within the room could be turning them on all the time. Try turning off the room lights and closing the window shades to darken the room. If it starts to work much differently, then you know the problem.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top