How do I control 4066 with a LDR

Status
Not open for further replies.

AllanBertelsen

New Member
I removed some IC's from a dead video machine. One is MC14066B. It’s a 4066 type quad analog switch. The other is a quad nand.
Now I want to control a switch with a LDR. How do I do that? It's going to be part of a picaxe project. Input and output will have to go to and from the picaxe. I have to be able to adjust the sensibility of the switching.
/Allan
 
To be more specific.
I want a pic to read a binary pattern on a paperband using 4 LDR's but only 3 pins. When pin 1 is low, LDR1 and LDR2 is read. When pin 1 is high, LDR3 and LDR4 is read. But LDR's not very digital, so I want to make them switch a digital switch. I know I can do this by transistors. But there will be a lot of Transistors in this circuit. The two IC's I found could maybe be used.
What do I put in the black box?
 

Attachments

  • picaxe_multi_ldr.gif
    4.9 KB · Views: 484
A part of the solution

Hi myself
Here is a part of the solution. You got to put the LDR in serie with a resistor R2 to make a voltage divider. The resistance of R2 has to be near the resistance of the LDR at the light level where switching shall take place. If R2 is a pot it can be adjusted.
Place a LED beside the LDR. When the light hits a white patch on the paper, the LED will trigger the 4066 switch. The LED at right hand will then be turned on. When it hit a black patch it will be turned of.

What about R3 and R4? Will it be necessary to use both resistances? One to protect the I/O and another to protect the LED?

I hope somebody else will take part in this discussion whit myself. Course I'm just new to this stuff.
 

Attachments

  • picaxe_multi_ldr_sol1.gif
    4.1 KB · Views: 457
I've modified my circuit as shown below. I've turn I/O around. I skipped R3. It works fine. But I don’t know if the input can handle this in the long run. The output from picaxe will be the input on 4066 instead of 5V at point A. I need some help at this point. I know to little about pull down resistors and thinks like that. I don't feel secure about reading the datasheets either.
R1 and R4 is 330 ohm. R2 is 22K ohm.
 

Attachments

  • picaxe_multi_ldr_sol2.gif
    4.1 KB · Views: 408
Please comment on this. Will it work or burn or will nothing happen.
 

Attachments

  • picaxe_multi_ldr_sol3.gif
    10.5 KB · Views: 422
Why no answers?

You don't have to reply. Not that it's an issue in this forum - apparently.
I found another solution.

What I don't understand is why no one answers. No rules of posting are broken. There are a lot of clever people at the forum.

Why no answers?

Here's a new guy – make him at least feel welcome.
 
I'm a bit suprised nobody has answered this. I don't know anything about PICS etc, but I might advise against using LDRs. They really are quite slow for an application like this. A photodiode is more suitable, but they are only really sensitive to infrared light. If you make your light source infrared, then you can use the detector I have posted. However, i'm not sure how infrared responds in terms of being reflected or absorbed by different colour materials. The detector will give a logic changeover in response to different levels of infrared light. The sensitivity is controlled by the 220k resistor (higher = more sensitive, but don't try and go over 1M).
 

Attachments

  • detector_306.gif
    1.5 KB · Views: 318
Thank you Dr.EM
Now I don't feel so lonely anymore.
The photodiode solution is very interesting. I will consider it in future projects. This project has advanced since my original posts. The only thing I kept in the original project was the LDR's. Fortunately timing is not essential.
Thank you very much for the reply.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…