Resistor bias for IMP002

Has anyone determined a good value for the resistor bias when using the Honeywell phototransistor with the 002 module? Thanks!

@jwehr,

for “lab” use you can go with a value between 100k and 330k and should work without problems, just try to avoid direct and strong light over the phototransistor. Higher the value you will use and higher the signal you will get, but don’t go too far, as 1M will not work for example.

If you have a scope, you can get some hint about how to find your “good” value from this video (jump to 9:30 to avoid the boring Italian talking about soldering):

Dimitri

Thanks. I was trying 150K like the video mentioned and not having success. I’ll bump it up a little and see what happens.

@jwehr,

it’s strange because even with 100k it should work.

Which phone are you using for blinkup?

if you don’t have a scope, do you at least have a multimeter? You could try with a very low scale, like 2V or 200mV if available. The frequency of the blinkup is not high, you can see the values moving on the multimeter if you have a scale low enough.

I’ve experienced correct blinkup with less than 100mV of signal, even if the datasheet requires 500mV. It could be possible the problem is somewhere else.

Also you could test your setup on a side, applying 3.3V on the phototransistor and an LED instead of the opto in. You should see the LED blink and this could make sure that your setup is coorect.

Dimitri

I’m using an iPhone 4. No problems blinking up my other imp001 module. I dont have a scope, but I do have a multimeter. The imp seems to be working fine, my dual color led is flashing away, but no blink up. I’ll try your suggestions.

Still having problems. I have a multimeter hooked up to the opto bias side of the phototransistor, and it is clearly working, but I can’t the voltage high enough with the blinkup app. If I use the camera flash on my iPhone, i can easily get the voltage high enough. Ive used a number of bias resistor values. If I use a 470 Kohm resistor, my bias voltage reads about 10 mV in a low lit room. If I run blinkup, I have seen values go as high as 55 mV. If i keep stacking 470Kohm resistors in series, I can get it to go over 100mV, but then my base voltage keeps rising as well. I tried powering the phototransistor at 5 volts instead of 3.3, but that barely made a difference. Any thoughts?

The one thing I do notice is that the bias voltage reading jumps up a lot when connected to the imp, vs just reading it alone. For example, I see 10 mV when not connected to the imp, and 40ish when connected.

Went to Radio Shack and picked up the phototransistor that they carry. I am getting a proper voltage change now… but the imp is still flashing orange at me…

So, bear in mind that you can load down the phototransistor’s voltage with your test gear - we’ve seen people run into this before!

Generally, you use 100k or less (68k is a popular value).

Sure you have the phototransistor the right way round?

@jwehr,

I think the very first step it should be to ensure you are using the right setup.

AS I’ve suggested in one of the very first answers, I think you should try to setup a separated circuit to check your phototransistor.

A 3.3V connected to the collector (the flatside) and an LED in series with a 330 ohm resistor between the emitter and ground.

Then with light on and off, or with the blinkup app, you should be able to switch on/off the LED.

When this works, move the phototransistor (in the same direction) to the imp.

As @Hugo said, make sure you are positioning the phototransistor correctly. On SDP8405-003 the flat side is collector, round side the emitter, so the flat side connect to the bias, the round side in series with a resistor to the ground and to the opt-in.

Ugh. Your right, I had it in backwards. I looked closely at the video and thought that it was in the other way around.
Now I am getting a huge change in voltage at OPTO IN. I should have my bias set to get a change between 0 and 500 mV max right? I am getting a change of several volts if I use 68K as a resistor bias value.

Dimitri. I set up the test circuit, and it works. I can make the LED pulse with the blinkup flashes. Maybe I’ve damaged my imp? It pulses orange slowly and randomly takes a slight pause in between pulses.

So I was powering the imp with the 3.3v source from a raspberry pi. I switched to using a battery source that is reading about 3.15v. Now, using 10K or less, the imp will go to solid orange after blinkup. Since that isn’t an actual code, could I have damaged my imp?

@jwehr,

the RPI as source it was for sure the first of the potential issues. The current available from RPI 3.3V output (officially 50mA) is not enough to power up properly an imp. It can apparently work but it will not be stable an it can make the RPI not stable as well.

So the external source is a solution.

I don’t think your imp is damaged. But I’m pretty sure that 10k is not a good value for the resistor. A low resistance will allow an higher amount of current drain to ground and your input signal will not be strong enough.

Again, start from at least 100k. I think the several volts that you are reading are due to some strange behavior of you DMM.

If you try a basic setup with a 100k it should work.

The solid orange is something that I never heard or saw. But I still think that you haven’t broken the imp, unless you forgot to say that you have tried to power it up with an high voltage :wink:

Dimitri

Well, It did get a little over powered at one point. I had a variable rate voltage supply that was supposed to give me 3.3v and when I read it it was in the 4’s somewhere, so I stopped using it. Any idea how high you would have to go to damage the chip? I’ve been using a battery and also tried the 3.3v supply from a sparkfun april board with no imp in it. Do you still have imp002’s available? I might order another if I don’t get this one sorted soon.

So, I ordered a second imp002, thinking that I might have damaged the first one. I am powering it with the 3.3v pin from a sparkfun april board with no imp in it. My opto circuit seems to be working just fine, as I can make an LED blink along with the blink up. I’ve tried a number of bias resistor values starting at 68k and up through 200k. My circuit seems fine, but the imp just blinks orange at me. I guess its time to get an oscilloscope and make sure everything is solid. I’m not sure what I could be doing wrong.

If I hold my iPhone with the blink up app open and ready to blink, meaning the screen is about nearly as bright as it will get, and I use a 100k resistor, I read 3.12 volts on my meter at the OPTO IN pin, vs nearly 0 if I cover the P-T. Does this sound right? Doesn’t that mean I am getting a 3.12 volt swing?

Ok, I give up, and I’ve ordered a USB oscilloscope. I’m also having trouble getting an LCD to consistently talk over I2C, so I guess its time to do proper troubleshooting. I haven’t touched a scope since 1996!

I don’t know if the smartmaker board does this, but check that the VDDA pin on the imp002 is connected to 3.3v too. If not, blinkup will not work at all (this powers the ADC in the cpu).

facepalm I think you are right. Pin 34 appears to be VREF on the breakout, and I haven’t tied anything to it, so unless there is something internal, that is likely my problem. Nearly time to bail on work and go find out.