LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Photocell

I need to control the voltage going out of digital channel 0 on an elvis board controled by the signal I am getting from a photocell on analog input o. The problem I am having is tghe resistance I am reading is a very noizy wave. Is there a way to filter this or does anyone have any ideas to get around this? What happens is that the signal pulses to quickly so the digital signal out that powers my indicator pulses as well, I need to regulate this and I think that by filtering the signal I can control better.

 

Thanks

0 Kudos
Message 1 of 10
(3,514 Views)
I'm not exaclty sure of your application. Are you trying to switch the output on when the input is above or below a specified level? There are a number of ways to do this...

Take a rolling average of your input as a simple "filter"...

Require the the condition is true for a period of time...

If the noise is a fairly low percentage of your threshold, create a deadband. For instance if you wanted the output to switch on at a threshold of 5v, make it stay on until the level drops below 4.5v.

hope one of those helps!

Message Edited by tlivingston on 04-24-2006 08:11 PM

0 Kudos
Message 2 of 10
(3,506 Views)
Yes, I am trying to control power to a motor. The resistance with light on my cell reads between -1 and 1, in without light it is between -3 and 3. I want to control a motor to power on when the resistance is high and off vise-versa. Becase of my lack of experiece with NI, I set up my vi to read the signal and if it exceeded the lower resistance on the positive side (exceeded 1) power the motor. The problem with that is the wave. What would you suggest to enable me to power the motor once the parameter is met.
 
Thanks
0 Kudos
Message 3 of 10
(3,497 Views)
What type of cell is this? Is it producing a voltage, or changing resistance? Are you measuring resistance or voltage? I dont know what your setup looks like, but I wouldnt expect a photoresistive cell to fluctuate so much.

Assuming your electronics are okay and you just have to deal wth a noisey signal....


You could play all sorts of tricks. Run it through an absolute value function so the wave is all positive. Then take an average.... get creative.. 🙂


0 Kudos
Message 4 of 10
(3,490 Views)
It is a photocell that measures resistance. I have tried to control the sinusoidal wave by adding a resistor but it just changes the peak. I will try your suggestion to add a fuction to filter. I should work.
 
0 Kudos
Message 5 of 10
(3,486 Views)
Again, i dont know what your setup looks like... But if the photocell changes resistance with light, chances are you need to measure a voltage drop across the sensor- which means it needs to have current flowing through it so you can measure the voltage drop. Either your analog input needs to be set up for measuring resistance (unlikely). Most DAQ cards are setup to read voltage or current, not resistance.

If theres no current flowing through it you may only be measuring noise...
0 Kudos
Message 6 of 10
(3,483 Views)
We tried your suggestions but again, the cadmium-sulfide photocell measures resistance. We could not get a signal when we tried to measure voltage. I will try to add a function to filter the signal if you have any other suggestion I would greatly appreciate it.
0 Kudos
Message 7 of 10
(3,482 Views)
I remember building a little "robotic" car as a kid that would follow a black line on white paper using two CDS cells. My father ended up introducing me to a voltage divider circuit and a cmos comparator circuit. Your basically doing the same thing here from waht i gather. Except the voltage comparison is done in software.

Put a resistor in series with the CDS cell. Put a AA battery across the circuit. Now you can measure voltage across the CdS. Google "voltage divider circuit" to help you figure out an appropriate resistor value.

When you put a multimeter across the CdS by itself, and the meter is in resistance mode, it is actually placing a small bit of currenton the cell and measuring the voltage across it. If the meter were in voltage mode, you wouldnt be measuring much at all.

0 Kudos
Message 8 of 10
(3,467 Views)

tlivingstone is correct about the use of the photocell.

One word of caution- depending on the speed of response of the cell, you  may pick up 100 or 120Hz 'noise', this being generated by light fixtures running off of 50 or 60Hz AC power. The lights are acturally turning on and off that many times a second but your eyes do not really detect it.

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 9 of 10
(3,458 Views)
Thanks for the suggestion guys.
 
0 Kudos
Message 10 of 10
(3,445 Views)