Using Photocell to replace on/off switch.

Thread Starter

Celler1

Joined Jul 16, 2010
10
Hello,

I am trying to replace a on/off push-button with a photocell. With the push button my device works as follow; when the button is pressed the device is ON and when the button is released the device is OFF. To replace this button with a photocell I need to have the following specs. When the light is on the device is OFF when the light the off the device is ON. I tired a photocells with different resistances such as 15K-30K --- 1M-1.5M but no of them worked. When I connect the photocell it immediately shots the circuit. I think the sepcs need to be 0K to 1M+. But I was unable to find such a photocell.

If some electronic engineer can tell me what can I do to solve the problem using the photocells I already have, that would be great. Or maybe you know where I can find a photocell with 0K it would be even better.

I am sure you might have some questions so please ask and I will give you all of the information that will help to solve my problem.
 

BMorse

Joined Sep 26, 2009
2,675
If the original circuit used a switch as an input, you need to measure those 2 points where the switch connects to the circuit with a multimeter....

Most likely just adding a photocell will not work, you will have to include some kind of open collector transistor circuit switched by the photocell....

Post a clear png format picture of the said circuit, both top and bottom... visual aid is always best when figuring these things out...

B. Morse
 

Wendy

Joined Mar 24, 2008
23,421
At this point we don't know if you are using AC or DC. If you are using low voltage DC this would work, it is basically what BMorse is talking about...

 

Bernard

Joined Aug 7, 2008
5,784
Always questions: What is the voltage between switch contacts & current required to activate?. May need a comparator & transistor, with a few resistors & pot.
 

Thread Starter

Celler1

Joined Jul 16, 2010
10
WOW guys, thank you for all of this. I am really happy to have found you. You have restored my hope for this thing. I am not in a way an expert with electronics so please pardon me if I am not grasping this right away. But I will provide all the information you ask for. I am uploading the pics right now.
 

Thread Starter

Celler1

Joined Jul 16, 2010
10
I have posted the pictures on my blog.

http://maybelateroneday.blogspot.com/

Pic 1) the power source 2 double A batteries.

Pic 2) White and Blue wires that I have soldered to the button and extended them so I can try out the photocell system. In the pictures the wires are connected to the cell and the green light is on. Indicating that the button is "ON"

Pic 3) Back of the board. On the button right corner you can see where I have connected the blue and white wires.

Pic 4) The front.

Ignore the extended black wire. It just the ground wire. It has no effect on anything. I was trying somethings with it and I have just reconnected it how it was. The other black wire with the connector on the end is to charge the car.
 

Thread Starter

Celler1

Joined Jul 16, 2010
10
I can also use my multimeter and take pictures to show you the number that you might want to see. Just tell me what I have to set the multimeter too and where I should connect it to.
 

BMorse

Joined Sep 26, 2009
2,675
Ok, from what I can tell, the switch shorts the input right to the ground plane, acn not see if there are any pullup resistors for the input, but that doesn't mean the controller IC does not have them built in....

So, my first assumption about the open collector transistor circuit would actually do, what you will need is a couple of resistors and a 2N3904 Transistor...

Do you have a multimeter handy? If you do measure the resistance of the CDS photocells you have on hand and see what the resistances are when fully covered and exposed to light...

Or do you know the values of the CDS photocells you have on hand (Such as the value when completely saturated with light, and when completely covered and in the dark)?

B. Morse
 

Thread Starter

Celler1

Joined Jul 16, 2010
10
Here is what I have
http://3.bp.blogspot.com/_7wdzNKVRNaI/TEDuVAR0BrI/AAAAAAAAAAs/wTCafPdXw2E/s1600/CAM_0171.JPG

I have a bunch more cells that I have pulled off from garden lights. I can run those with multimeter and tell you the specs. Just tell me what to what position do you want me to turn the knob too

Here is the multimeter that I am using.Also tell me if I have the wires plugged in the right holes.

http://3.bp.blogspot.com/_7wdzNKVRNaI/TEDwGWXLDTI/AAAAAAAAAA0/kLoIgLwpqm4/s1600/CAM_0172.JPG
 

tom66

Joined May 9, 2009
2,595
It is unclear whether you have the leads in the right sockets, because the leads are covering up the text below them.

To measure the photocell, you need to attach the probes to the photocell (for basic components, I find wrapping the wires round the leads works well as a temporary solution), set your multimeter to measure ohms on the 2M range, then record the numbers with it covered and uncovered. If the value is too small when uncovered, try ranging the multimeter down until you use all the digits on the display, remember to tell us at what range you took the measurements.

I suggest you use one of the transistor circuits suggested. You *might* be able to get away with the light sensors used in some night lights which to my knowledge are just wired in series with the light, these have to have low on resistance and they might work, but they could be difficult to find. (It might even be easier to take a night light apart and see if you can salvage the LDR.)
 

Thread Starter

Celler1

Joined Jul 16, 2010
10
Before I measure the resistance on the sensors what is the reading that will work for me, or in any outcome I will have to build a some kind of circuit? In addition I can get a specific photocell from an electronics parts store in my city. That is where I go all of mine so far. Apart from the ones that I pulled from the night lights and a bunch from a garden lights. And if I have to build a circuit what parts will I need for that circuit and in what order do I put them together? And for the list of parts could you also tell me the specs for the parts. Because when I go to the store and tell them I want a resistor they ask me all bunch of specs that I want that resistor in and I have no idea what they are talking about. If you will post a diagram that I will have to use to build the circuit could you also please label it so I would understand. Because looking at the diagram that was posted earlier in this thread I realize that I don't understand it at all. I would need more simple labeling such as: "resistor goes here" and "photocell goes here" and "you connect your button here", kind of labeling. Because I am not really familiar with all the symbols that are used in the diagram.

Thank you for sticking out with me so far. I realize that I must be hard to deal with but I really appreciate this. I know how you must feel as I myself is a very knowledgeable auto-tuner and I spend a lot of time explaining performance to people who think that if the tire goes flat, the air must be put only at the button part of the tire.

Thank you.
 

Bernard

Joined Aug 7, 2008
5,784
Need a distinction from photocell to LDR, photocell as used in garden light might be voltage generator from light as oposed to light dependent resistor, LDR. Good range for LDR- 100k dark- 1kΩ light.
 

tom66

Joined May 9, 2009
2,595
Do you want the output to switch on if there is light, or off if there is light?

If you want it to switch off if there is light, reverse R1 and LDR1.

I have provided all the specifications you need.

R1 - 100k, 1/4W, 5% (one-quarter watt carbon or metal film, plus or minus 5 percent tolerance resistor)
R2 - 1k, 1/4W, 5% (same type)
LDR1 - whatever you already have
Q1 - 2N2222 NPN bipolar transistor

In the circuit, R1 and LDR1 condition the input signal, and R2 and Q1 act to invert it.

Note that since this provides a signal to your device you will probably need to use the same power supply as the device, unless you connect the grounds and be sure you're using the same voltages; but it's easier to use the same supply.
 

Attachments

Thread Starter

Celler1

Joined Jul 16, 2010
10
It does not matter when the switch will be on or off. Because the light that will trip the LDR is modified by my computer. So I can adjust what the light does from the computer. The purpose for this whole thing is to be able to control the RC car with my computer. I will replace all of the switches with the LDRs so I can control the whole car. If this thing works I will post a video of this in action. But there is more to this whole project. And this car is just a beta tester. Its just a micro car. Once this works I will use the same method to hook up more substantial RC car and put a wireless cam on it so I can drive it around without even being in the same building.

THANK YOU< THANK YOU> THANK YOU> I will try this and tell you how this turns out.
 

tom66

Joined May 9, 2009
2,595
If you are controlling this with your computer... why not just wire up one of the serial or parallel ports? If you don't have a serial or parallel port, you can get a converter for USB to whatever you need.
 
Top