Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Photomicrosensor On/Off Too Slow

Status
Not open for further replies.

wuchy143

Member
Hi All,

I"m using photomicrosensors and encoder wheels to sense movement.(Quadrature encoding) My circuit is below. It's in a +5V system with a micro controller which connects up to the USB bus and enumerates as a mouse(trackball).

My problem is when I turn the encoder wheel very fast(turning it on every 2-3ms) the transistor inside the photomicrosensor cannot switch fast enough to reach +5V. Essentially what you see is a signal that goes from a solid 0V up to about 4.0V. Then when I slow down the encoder wheel the signal now transitions a full 0V to +5v.

Intuition told me that if I put a stronger pull up(lower the resistance from 7.5k to 2k) that will fix my turn on and off times. It worked. I'm able to get the full transitions now matter how fast my hand can move the encoder wheels.

Can anyone clear what's going on here for me? I'm unfamiliar with these types of transistors and the datasheet is a little confusing. It appears that it should switch plenty fast enough but it clearly is not....any help?

The topology here is an common emitter. I've tried the common collector and you probably guessed that I have the same problem but now it's not reaching 0v when you move the wheel very fast.....

Thanks all

Datasheet for the part is: https://media.digikey.com/pdf/Data%20Sheets/Omron%20PDFs/EE-SX19x,10xx.pdf

-mike
 

Attachments

  • circuit.jpg
    circuit.jpg
    20.2 KB · Views: 485
The attached is from your data sheet. The typical rise and fall times are 4 uS with a Vcc of 5 volts and a R load of 100 ohms. What is your series resistor for the LED side? You want to drive the transistor into stauration as in right now. Thus the R load of 100 Ohms. Why are you using such high collector resistances?

Ron
 

Attachments

  • Rise and Fall.gif
    Rise and Fall.gif
    15.6 KB · Views: 425
Hi Ron Thanks for the reply.

This is a design which is not mine.(though I own it as I'm the EE) I was working with our products and noticed that when you try to move the cursor on the screen very fast the cursor moves incorrectly.(the opposite direction that was intended, it hovers then goes the way you want, that type of bad stuff) So, I don't know the intent on such high collector resistance. I'm still trying to figure that out. The previous engineer was using different collector resistors depending on what chip it interfaced to. So, I"m thinking depending on the internals of the specific chip that will change the value of our collector resistor...weak design? yes..I'd say so but I need to look deeper before I say that :)

The series resistor is a 220 ohm 1/8 watt resistor. I did play with the values(to increase the base current/led brightness) but then lower you go obviously puts stress on the LED. I went down to 10 ohms and that helped a little but the resistor was heating up due to so much current. Yes I blew out a few LED's :(

I did see that part of the datasheet.

So,

With a 220 ohm series resistor on the "base". And with a Forward voltage drop of ~1.2V I get a current of:

V = IR
1.2 = I*220
I = 5.4mA

From the datasheet that gives me 1ma of light current

Now you can see that using anything higher than a 4.7k resistor on the output will make the switching slower and slower the higher you go. It looks like I'm on the hairy edge huh?

I think I need to just makes those resistors smaller now and call it a day. Do you agree?

-mike
 
The series resistor is a 220 ohm 1/8 watt resistor. I did play with the values(to increase the base current/led brightness) but then lower you go obviously puts stress on the LED. I went down to 10 ohms and that helped a little but the resistor was heating up due to so much current. Yes I blew out a few LED's :(

I did see that part of the datasheet.

So,

With a 220 ohm series resistor on the "base". And with a Forward voltage drop of ~1.2V I get a current of:

V = IR
1.2 = I*220
I = 5.4mA

You have a 5v supply and 1.2v across the LED. This puts 5 - 1.2 or 3.8v across the 220Ω resistor for a current of I = E/R = 3.8/220 = 17.3ma. Just about what a common LED would work at.
 
I think I need to just makes those resistors smaller now and call it a day. Do you agree?

I agree with the LED resistor resolved. :)

Ron
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top