electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Articles  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links  |  Store
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
 Forum index » DIY Hardware and Software » Lunettas - circuits inspired by Stanley Lunetta
Creating solid +V logic values from LDR light triggers
Post new topic   Reply to topic Moderators: mosc
Page 1 of 1 [9 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
Top Top



Joined: Feb 02, 2010
Posts: 198
Location: California

PostPosted: Mon Oct 14, 2013 5:29 pm    Post subject:  Creating solid +V logic values from LDR light triggers Reply with quote  Mark this post and the followings unread

Hi men and women, been a while!

I am working on a project where I want to trigger 4093 oscillator gates from LDRs which are being hit by a light source. When the light is bright enough, I want to trigger the oscillator ON.

If you are not familiar with 4093 (4x two input NAND gate) gate-able oscillators, the idea is that one of the inputs on the dual input NAND gate can act as a gate input to turn the oscillator on when a +V is present. I've done this a bunch, but not usually from an LDR, usually just from a trigger source like an LFO or step sequencer.

I did some tests on the breadboard and found that generally it works to put an LDR from +V to the 4093 oscillator gate input, but what I found is that the brightness of the light affects the pitch of the 4093 oscillator, within a certain range (at a certain dimness, the osc gate finally shuts off).

That might be interesting for some applications (synth drum sounds triggered by a simple envelope generator anyone?) but what I would like is a completely solid ON at a stable pitch when ON, and then OFF when the light drops below a certain threshold, with no variation in pitch of that oscillator when it is on.

If I took a 2 input AND gate, and put +V to one input and the LDR to the other, would I get a gate output at full +V when it is in ON logic state?

Or instead, maybe 40106 oscillators gated by a AND gates with the LDR into one input, or a 4016 switch with the LDR into the input?

This is all supposed to be LOGIC ON/OFF, but practical testing shows that it is not all always as digital as we would sometimes like.

_________________
A. MAGIC PULSEWAVE ELECTRONICS
Back to top
View user's profile Send private message
elektrouwe



Joined: May 27, 2012
Posts: 45
Location: Germany

PostPosted: Tue Oct 15, 2013 12:47 am    Post subject: Re: Creating solid +V logic values from LDR light triggers Reply with quote  Mark this post and the followings unread

Top Top wrote:
put an LDR from +V to the 4093 oscillator gate input

you just use the LDR from V+ to gate input without a pull down resistor
from gate input to ground ? I wonder how this can work without voltage divider ?!

And yes,varying bias voltages at multiple input gates have an effect on
the switching level. 1973 MC MOS handbook from Motorola shows a 4011
VCO based on this effect; tuning range and stability are not so famous though...
Back to top
View user's profile Send private message
Top Top



Joined: Feb 02, 2010
Posts: 198
Location: California

PostPosted: Tue Oct 15, 2013 1:16 pm    Post subject: Reply with quote  Mark this post and the followings unread

I put +V into the LDR to the gate input, with 1K pulldown resistor to ground to stabilize the gate.

Could there be a simple way to bias a more stable gate input by additionally putting another fixed resistor from +V to gate input? Like, say 2K or something?

_________________
A. MAGIC PULSEWAVE ELECTRONICS
Back to top
View user's profile Send private message
PHOBoS



Joined: Jan 14, 2010
Posts: 1748
Location: Moon Base
Audio files: 347

PostPosted: Tue Oct 15, 2013 1:42 pm    Post subject: Reply with quote  Mark this post and the followings unread

Connect the LDR between GND and the input of a seperate NAND gate with a resistor to V+. You probably need something larger than 1K or use a
potentiometer so you can set the light level at which it reacts. Connect the other input of the NAND to V+ and use the output of this NAND to gate your
oscillator. That should get rid of the pitch change.

One thing though, because those 4093 NAND gates are schmitt triggers they have some hysteresis. So there will be a difference between the light levels
that it turns on and off. I actually tried this last sunday and ended op using opamps (configured as comparators) instead of NAND gates because of this.

_________________
"My perf, it's full of holes!"
http://phobos.000space.com/ http://www.acidtrash.com/ Stickney Synthyards
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Top Top



Joined: Feb 02, 2010
Posts: 198
Location: California

PostPosted: Tue Oct 15, 2013 2:44 pm    Post subject: Reply with quote  Mark this post and the followings unread

PHOBoS wrote:
Connect the LDR between GND and the input of a seperate NAND gate with a resistor to V+. You probably need something larger than 1K or use a
potentiometer so you can set the light level at which it reacts. Connect the other input of the NAND to V+ and use the output of this NAND to gate your
oscillator. That should get rid of the pitch change.

One thing though, because those 4093 NAND gates are schmitt triggers they have some hysteresis. So there will be a difference between the light levels
that it turns on and off. I actually tried this last sunday and ended op using opamps (configured as comparators) instead of NAND gates because of this.


Thanks, that's great. I thought it might be something like that - provide some other trigger source as a "buffer" essentially.

I am actually wondering if I could make this whole thing more interesting and flexible if I did the LDR to + to the input pin on a 4016 and then could patch anything I wanted to switch on/off through the in/outs of the 4016 - tones, triggers, etc.

Looking at datasheets, it looks like the threshold for most 4000 series cmos inputs to read a "+" is 70-80% of the supply + voltage. Anyone with experience feeding varying DC levels into inputs on 4000 series feel free to chime in with your experience.

That is something I suppose I could very easily test as well. Back to the breadboard!

_________________
A. MAGIC PULSEWAVE ELECTRONICS
Back to top
View user's profile Send private message
Top Top



Joined: Feb 02, 2010
Posts: 198
Location: California

PostPosted: Wed Oct 16, 2013 12:23 pm    Post subject: Reply with quote  Mark this post and the followings unread

For anyone's curiosity, I got it to work well with 4016 quad bilateral switches. Fed an always active oscillator into the analog input, analog output to an audio jack.

Using 4016 is an extra chip, but I like the idea that any audio source could be fed into the 4016 to be gated on/off.

I fed +12v (supply voltage) -> LDR -> control pin on the 4016, with a 1K pulldown from the control input to ground. I found that on the 4016, a pretty low value pulldown resistor (1K) was needed, or else the resistance of my particular LDRs was too low even in ambient light and the switch was just on all the time. That would depend of course on the LDR in use and it's dark and light resistance values. I wasn't able to measure the resistance of my particular LDRs at the moment because my multimeter is dead.

Ultimate plan here is to make a synth that is sequenced from projected video images. Will post some videos when done.

_________________
A. MAGIC PULSEWAVE ELECTRONICS
Back to top
View user's profile Send private message
JingleJoe



Joined: Nov 10, 2011
Posts: 878
Location: Lancashire, England
Audio files: 14

PostPosted: Sun Oct 20, 2013 9:46 am    Post subject: Reply with quote  Mark this post and the followings unread

all good ideas above but I'd like to share what in my experience is the best way, especially for generating a Cv from light:
Code:
+V---\/\/\/----\/\/\/---GND
        LDR      10k pot     

Just a simple voltage divider using a pot for the lower resistor.
Take the output from the 10K pot and you can get some degree of range control. Change the pot value to get some greater degree of range control. You could put another pot wired as a rheostat in parallel with the pot for a sort of "master range control".

_________________
As a mad scientist I am ruled by the dictum of science: "I could be wrong about this but lets find out"


Green Dungeon Alchemist Laboratories
Back to top
View user's profile Send private message
Top Top



Joined: Feb 02, 2010
Posts: 198
Location: California

PostPosted: Sun Oct 20, 2013 2:17 pm    Post subject: Reply with quote  Mark this post and the followings unread

Great. Yea, I definitely thought about pots to allow a sensitivity control. Problem in my case is that I am going to be using at least 18 LDRs to trigger different switches, and don't intend to have 18 sensitivity pots, though it might not be a bad idea to have trimpots inside for some initial calibration.
_________________
A. MAGIC PULSEWAVE ELECTRONICS
Back to top
View user's profile Send private message
JingleJoe



Joined: Nov 10, 2011
Posts: 878
Location: Lancashire, England
Audio files: 14

PostPosted: Sun Oct 20, 2013 2:52 pm    Post subject: Reply with quote  Mark this post and the followings unread

if i were you, in this case, I'd use pots to find which value works best then round them up or down to resistors of the appropriate value Smile
_________________
As a mad scientist I am ruled by the dictum of science: "I could be wrong about this but lets find out"


Green Dungeon Alchemist Laboratories
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Moderators: mosc
Page 1 of 1 [9 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software » Lunettas - circuits inspired by Stanley Lunetta
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
e-m mkii

Please support our site. If you click through and buy from
our affiliate partners, we earn a small commission.


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use