Maker Pro
Maker Pro

Light sensitive relay switch alternative?

A

Andy Turner

Jan 1, 1970
0
Hi, a few months back I posted about a crackpot plan I had to install
a kind of laser harp in my house by shining a dozen lasers into light
sensitive switches, which in turn were connected to the switches on a
cheap MIDI keyboard (non-velocity sensitive), to provide the MIDI out,
and then on to a decent sound module. You guys gave me some good
advice back then, but I've only just got to the point of trying it.

I bought these two items:

http://www.maplin.co.uk/Module.aspx?ModuleNo=28574&doy=24m7
http://www.maplin.co.uk/module.aspx?ModuleNo=11712&doy=24m7

Then I soldered it all together and tried it. I'm shining the laser
onto the LDR from over a metre away and... it works!

Well sorta.. the problem is with the switch implementing a "delay
circuit to avoid cycling", which I guess I should have spotted when
ordering it.. So this means that it's simply not fast enough for the
application. I presume the delay is implemented in the chip so there'd
be nothing I could do about removing it? Or does the capacitor do the
delay (smaller capacitor, smaller delay?). Alternatively, is there a
different switch I could buy that doesn't have this feature? Ideally
it could do with it coming complete, I didn't realise the switch board
would be a kit! It's OK doing one, but doing another 11 would be
tiresome!!


Cheers!


andyt
 
K

Kristian Ukkonen

Jan 1, 1970
0
Andy said:
Well sorta.. the problem is with the switch implementing a "delay
circuit to avoid cycling", which I guess I should have spotted when
ordering it.. So this means that it's simply not fast enough for the
application. I presume the delay is implemented in the chip so there'd
be nothing I could do about removing it? Or does the capacitor do the
delay (smaller capacitor, smaller delay?).

Yes, make the capacitor at + input of opamp smaller
for a smaller delay.
 
A

Andy Turner

Jan 1, 1970
0
Yes, make the capacitor at + input of opamp smaller
for a smaller delay.

Cheers! I've noticed that it takes longer to switch one way than back
again. Also, I notice that there's two capacitors, one 100uf and one
470uf. Is this implementing the two different delays? What would
happen if I took the capacitors off and just wired direct? Would that
give me no delay or would it stop working or blow something?

I apologise for not knowing too much about what must be GCSE level
electronics. I do very much regret opting for a different subject at
school..!


andyt
 
A

Andy Turner

Jan 1, 1970
0
Well sorta.. the problem is with the switch implementing a "delay
circuit to avoid cycling", which I guess I should have spotted when
ordering it.. So this means that it's simply not fast enough for the
application. I presume the delay is implemented in the chip so there'd
be nothing I could do about removing it? Or does the capacitor do the
delay (smaller capacitor, smaller delay?).

I've just noticed that my problem is almost the exact opposite of the
one that Nikki has in the post "Time delay using relays". Spooky! And
that seems to be a similarly crackpot scheme too!


andyt
 
F

Fred Bloggs

Jan 1, 1970
0
I do very much regret opting for a different subject at
school..!


Well it sure as hell wasn't accounting- you're using about $350 worth of
needless stuff....
 
A

Andy Turner

Jan 1, 1970
0
Well it sure as hell wasn't accounting- you're using about $350 worth of
needless stuff....

heh, well I obviously don't know how to design it more efficiently. If
you've got suggestions, I'm all ears!


andyt
 
K

Kristian Ukkonen

Jan 1, 1970
0
Andy said:
Yes, make the capacitor at + input of opamp smaller
for a smaller delay.
Cheers! I've noticed that it takes longer to switch one way than back
again. Also, I notice that there's two capacitors, one 100uf and one
470uf. Is this implementing the two different delays? What would
happen if I took the capacitors off and just wired direct? Would that
give me no delay or would it stop working or blow something?[/QUOTE]

Do notice: "CAPACITOR AT + INPUT OF OPAMP"

The other capacitors, according to circuit diagram at
the webpage selling the circuit, are just for powersupply.
http://www.maplin.co.uk/Media/product_pdfs/qp97.pdf
I apologise for not knowing too much about what must be GCSE level
electronics. I do very much regret opting for a different subject at
school..!

Schools are just for realizing that by reading books
you can find out ANY information. For learning electronics,
find a book on electronics, read it and start doing stuff.
You can test circuits with free switcher cad 3 download:
http://ltspice.linear.com/software/swcadiii.exe
Most simple electronics, like this circuit, are very easy
to design - it is just resistive voltage dividers and basic
stuff like that.

One resistive divider, 100k potentiometer, gives the
comparator switch level to - input.

Another resistive divider 150k, VDR, 15k gives the
other voltage. There is, in addition, a "delay" circuit
by the 17k and 180k resistors, diode and 100uF capasitor.

When LDR has high resistance (dark), voltage is high and the
100uF capacitor charges slowly to this high voltage (and some
current goes through 100k but to simplify forget this now).
When LDR resistance drops (light), diode prevents the lower
voltage from charging the capasitor, and capasitor discharges
through the 100k resistor until eventually voltage is
lower than the voltage set by the 100k potentiometer, and
the state of the relay changes.

Now, when LDR again has high resistance (dark), the 100uF
cap is starting to charge and voltage eventually becomes
higher than the voltage from 100k pot, and the state of
relay changes again.

The opamp (the triangle part with inputs marked "-" and
"+" is a comparator - it compares whether - or + input
has a higher voltage, and changes output accordingly.

LDR = light dependant resistor

I hope this helps you understand how the circuit works.
You can enter the circuit to switcher cad 3, and replace
LDR with a switch.. See how it works!

To answer your original question: Only the 100uF capacitor
matters for the delay. Take it away and you have no delay.
I'd suggest setting a little delay. Simulate the circuit
with Switcher cad 3, and find out correct size for cap!!
 
F

Fred Bloggs

Jan 1, 1970
0
Andy said:
heh, well I obviously don't know how to design it more efficiently. If
you've got suggestions, I'm all ears!


andyt

How is this "laser harp" supposed to work activation-wise? Do you play
it or does wind blow through it or something else? How do you simulate
pressing a key on the MIDI kbd? Is the key grounded or how is that working?
 
A

Andy Turner

Jan 1, 1970
0
How is this "laser harp" supposed to work activation-wise? Do you play
it or does wind blow through it or something else?

It's just light triggers, so there's a bunch of beams shining above,
down to a row of light sensitive switches and as soon as your hand
breaks the beam and stops the laser reaching the LDR, it triggers the
key. When you move your hand to allow the beam through, the key is
released.

How do you simulate pressing a key on the MIDI kbd?
Is the key grounded or how is that working?

That I haven't tried yet (today's experiment was simply wired to a
multimeter set to buzz on connection). The idea is to buy a very
simple MIDI controller keyboard (one that isn't velocity sensitive),
which hopefully will have simple contact switches for key down/up.
I'll hook each relay into a key on the keyboard. The keyboard will
then think the hay has been pressed or released and send out the
appropriate MIDI signal to a sound module.

This is perhaps the design of someone who doesn't actually know
electronics hence the use of an actual keyboard when perhaps some
latch/MIDI convertor board would do..! However, I figure a keyboard
will give me octave shifting (small keyboards often feature this),
which might be useful when I set the sound module to a drum machine
(which usually starts at key C1), or to a piano, where I would want a
higher octave.


andyt
 
A

Andy Turner

Jan 1, 1970
0
Do notice: "CAPACITOR AT + INPUT OF OPAMP"

The other capacitors, according to circuit diagram at
the webpage selling the circuit, are just for powersupply.
http://www.maplin.co.uk/Media/product_pdfs/qp97.pdf

Ah! Ok, cheers.

Schools are just for realizing that by reading books
you can find out ANY information. For learning electronics,
find a book on electronics, read it and start doing stuff.
You can test circuits with free switcher cad 3 download:
http://ltspice.linear.com/software/swcadiii.exe
Most simple electronics, like this circuit, are very easy
to design - it is just resistive voltage dividers and basic
stuff like that.

OK, I'm gonna play with that. I do want to learn this stuff and with
an actual project to push me into learning it, it should be the
motivation I need.


One resistive divider, 100k potentiometer, gives the
comparator switch level to - input.

Another resistive divider 150k, VDR, 15k gives the
other voltage. There is, in addition, a "delay" circuit
by the 17k and 180k resistors, diode and 100uF capasitor.

When LDR has high resistance (dark), voltage is high and the
100uF capacitor charges slowly to this high voltage (and some
current goes through 100k but to simplify forget this now).
When LDR resistance drops (light), diode prevents the lower
voltage from charging the capasitor, and capasitor discharges
through the 100k resistor until eventually voltage is
lower than the voltage set by the 100k potentiometer, and
the state of the relay changes.

Now, when LDR again has high resistance (dark), the 100uF
cap is starting to charge and voltage eventually becomes
higher than the voltage from 100k pot, and the state of
relay changes again.

The opamp (the triangle part with inputs marked "-" and
"+" is a comparator - it compares whether - or + input
has a higher voltage, and changes output accordingly.

LDR = light dependant resistor

I hope this helps you understand how the circuit works.
You can enter the circuit to switcher cad 3, and replace
LDR with a switch.. See how it works!

Thanks for that. I kinda understand it, but only in that way where you
understand what someone's saying, but you couldn't write it yourself
(if you see what I mean!). I'll play with that software and perhaps
figure out for myself what changes I want to make. At least any
mistakes won't result in real damage or mishaps!

To answer your original question: Only the 100uF capacitor
matters for the delay. Take it away and you have no delay.
I'd suggest setting a little delay. Simulate the circuit
with Switcher cad 3, and find out correct size for cap!!

I'll do that, thanks. And I appreciate your help with the bigger
picture, rather than just telling me what to do, but helping me figure
it out for myself. Teach a man to fish and all that...


Thanks again.


andyt
 
Top