Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

I ran into a problem with my switch

Status
Not open for further replies.

psecody

Member
ok let me start off this thread by stating that this project in no way shape or form has anything to do with school, its just something I've been playing around with.

Well now that I figured out the 4013 ic and got all that working I took an IR reciever module and hooked it up with the output going into a transistor instead of the switch thats in the schematic but the problem is when the power is connected the light lights up then when you press the remote it just blinks it doesn't shut off completely what could be causing this?

Do you think its because the tv remote I'm using pulses and that there needs to be a constant signal for a short time for it to turn on? It seems to me, in theory that it should operate just like the switch was but thats not the case I guess.

Thanks for any thoughts on this.

I think if I get a chance I'm going to build a transmitter that gives out a constant signal instead of pulses and see if that does anything.
 

Attachments

  • Switch Final.png
    Switch Final.png
    11.4 KB · Views: 182
The remote for a TV transmits pulses. An IR receiver has an output of these pulses. You need to increase the value of the capacitor a lot, so that the pulses are smoothed into DC. But then the DC won't be high enough to trigger the 4013.
Add a Schmitt trigger circuit (one gate from a CD4093) to boost the voltage of the smoothed DC, speed up its edges and invert it.
 
so I need a bigger capacitor to smooth out the pulses but why would the voltage not be high enough to trigger the 4013? I mean once the transistor is open then it comes 9volts directly from the source.
 
The output of the IR receiver goes high to +5V and goes low to 0V. The smoothed average voltage when it is pulsing is only 2.5V. The minimum voltage for a logic high for the CD4013 is +6.3V when it has a 9V supply so it must be amplified.

Even a CD4093 has a minimum logic high voltage that is about 5.3V so it also won't work. You need a transistor to convert the voltage then a Schmitt trigger to speed up its edges.
 
ok I redrew the circuit and added some stuff. Is this what you were talking about with the other IC? I'm not sure I got it right but its what I gathered from your description. Thanks for the help
 

Attachments

  • ir.png
    ir.png
    12.9 KB · Views: 178
hi pesecody,
The first problem is that the TV remote is transmitting a stream of pulses,
which if you keep your finger on the remotes button will be a continuous stream.

If your detector is feeding these pulses via the 4093 into the 4013 clock input
then the outputs of the 4013 will be switching at the same rate as the TV pulse stream and you will not be able to see it switching with your eye.

If you increase the value of the capacitor from the 4013 clk input to ground,
to average out these pulses to a dc voltage, then you are going to have the same problem as your first circuit.

That is when you take your finger off the TV remote button the voltage at the 4013 clk input will decay slowly and cause the 4013 to switch erratically.
Remember the 4013 expects clean/fast edges on the clock pulse.

Regards
EricG
 
Assuming you are trying to make a remote control switch?, you're going about it in completely the wrong way!.

You need a micro-controller, either programmed yourself, or the Holtek pre-programmed remote control endocer/decoder chips.
 
The IR receiver needs a 5V supply but the CD4013 needs 9V for the LED to be bright enough. Therefore the IR receiver needs a 5V regulator and the transistor converts the smoothed 5V pulses to a +9V ramp. The CD4093 Schmitt trigger makes the edges fast enough to clock the CD4013 flip-flop.

You had your transistor upside down.
Your entire schematic is backwards since usually the input is on the left side.
This circuit might work. Increase the value of the smoothing capacitor if it mutiple triggers.
 

Attachments

  • ir receiver.PNG
    ir receiver.PNG
    19.8 KB · Views: 184
hi pescody

Attached a sketch for the 'front end' of the TV Remote detector.
[Follow what audioguru states about the IRX module/transistor]

The 4093 i/c is wired as a re-triggerable monostable.

The principle is, while you are pressing any TV remote button a train of
pulses is being detected and amplified. The first part of the 4093 is a high going
pulse train which charges up the capacitor 'Ctant'. When the charging voltage on
the Capacitor reaches the switching threshold of the second stage of the 4093,
this will drive the output low. The final stage of the 4093 is just used as
an invertor in order to give a positive going clock edge, which the 4013 clk
requires.

When you take your finger off the TV remote, the Ctant will discharge via
the variable resistor P1. As the voltage on the Ctant decays it will reach a
point where the second stage of the 4093 will switch off, its output going high.
The final stage of the 4093 will invert this and apply a low going edge to the
4013 clock, which will not toggle the 4013.

As a starting point for Ctant and P1, choose say a 1MegOhm for P1 and 2.2uF
for Ctant. [Ctant is a low leakage tantalum capacitor]

Adjust P1 while you press the TV remote key and release the key.
[Do this slowly at first]

You should get a point on P1 where you can toggle the LED ON and OFF with
alternate keypresses. I cannot give you more guidance on P1 and C as I don't
have info on your TV remote.


I have drawn this front end from the leftside, which is the conventional way.


Regards
EricG
 
Last edited:
psecody said:
ok let me start off this thread by stating that this project in no way shape or form has anything to do with school, its just something I've been playing around with.
It wouldn't matter if it was related to school work, we are all to happy to help people with educational projects providing they actually do some work and don't expect us to carry them.
 
Hi Eric,
You and I forgot that the output of an IR receiver (TSOP kind) is active low, not high. So my circuit needs to have another inverter added from the CD4093, and yours needs to have the 3rd one removed.
 
I'm puzzled as to why you both iused a transistor after the IR detector. Can't it go directly into the Schmitt?
 
The IR receiver's ouput is 5V data pulses. The RC ahead of the transistor smooths the data pulses into DC then hopefully the flip happens when you push a button on the remote then flop happens if you push a button again.

When the Schmitt trigger IC has a 9V supply then its minimum logic high voltage is much higher than the smoothed average output voltageof the IR receiver, so the transistor shifts the levels.
 
hi pescody.
As I am not upto speed on the IRX module, I have, as suggested by audioguru
used the spare gate on the 4093 to invert the IRX/Transistor output.

Revised dwg attached, let us know how it works out.

EricG

thanks agu for the info
 
Last edited:
Ok I thought of something and I know its probably not going to work but I figure its worth suggesting because at the moment my town is trapped in bad weather and our radioshack doesn't have IC's for squat so I can't get parts at the moment. I have a few IR emitter LED's laying around, so couldn't I make a remote out of those that gives a steady signal with no pulses then connect the IR reciever to a transistor and plug the transistor from V+ to clk?
 
An IR receiver is tuned to a modulated IR signal. It doesn't do anything with a steady IR beam.
 
oh ok thanks. See I thought it wouldn't work but couldn't tell you why, I guess because it seemed to simple haha.
 
ok now that I've got the push button part working I was going to work on the relay part because I won't get to go get more IR stuff till thuresday so I'm stuck for now on that but I have the relay stuff and wanted to make sure that this relay will work. The ratings on it are:
Coil voltage: 9VDC
Coil Resistance: 500 Ohms
Nominal Current: 18mA
Contact Rating: 2A at 125VAC

I''m not sure this will work in fact the reason I'm asking is because I think the leads on it look to small to use on ac so I have a slight feeling that this would just melt but I wanted to make sure just in the off chance it would work.

I bought another relay before this one but I don't think it can operate on just 9vdc. Its specs are
continuous coil voltage: 132VAC
rated voltage: 110/120VAC
Coil resistance: 4.430 ohms
pull in voltage: 9.6VAC max
dropout voltage: 36VAC min
nominal coil current: 8.4/9.2mA
contact rating 10A at 110VAC or 24VDC
maximum operating voltage: 250VAC/125VDC
minimum load: 100mA 5VDC

I know the second one is way more robust and I believe it could take it but its got a clear case on it and just out of curiosity I hooked a 9VDC up to the coils and nothing happened(the switches didn't move) so I believe it takes more than 9v to throw the switch, am I thinking right?

Basically I was going to put a relay on notQ so that when the relay is off the led is on to show that its in standby then when the led is off the relay would be thrown.
 
psecody said:
ok now that I've got the push button part working I was going to work on the relay part because I won't get to go get more IR stuff till thuresday so I'm stuck for now on that but I have the relay stuff and wanted to make sure that this relay will work. The ratings on it are:
Coil voltage: 9VDC
Coil Resistance: 500 Ohms
Nominal Current: 18mA
Contact Rating: 2A at 125VAC

I''m not sure this will work in fact the reason I'm asking is because I think the leads on it look to small to use on ac so I have a slight feeling that this would just melt but I wanted to make sure just in the off chance it would work.
But the contact rating is 2A @ 125 VAC so it should be OK unless you want to switch more current than 2A or a higher voltage.
psecody said:
I bought another relay before this one but I don't think it can operate on just 9vdc. Its specs are
continuous coil voltage: 132VAC
rated voltage: 110/120VAC
Coil resistance: 4.430 ohms
pull in voltage: 9.6VAC max
dropout voltage: 36VAC min
nominal coil current: 8.4/9.2mA
contact rating 10A at 110VAC or 24VDC
maximum operating voltage: 250VAC/125VDC
minimum load: 100mA 5VDC
This does not make sense. The operate voltage (they call it "pull in") is less than the release (dropout) voltage.

The operate voltage of a relay is always greater than the release voltage.

It is designed for AC so it is not suitable for your application.
psecody said:
I know the second one is way more robust and I believe it could take it but its got a clear case on it and just out of curiosity I hooked a 9VDC up to the coils and nothing happened(the switches didn't move) so I believe it takes more than 9v to throw the switch, am I thinking right?
It is designed for AC so it is not suitable for your application.
psecody said:
Basically I was going to put a relay on notQ so that when the relay is off the led is on to show that its in standby then when the led is off the relay would be thrown.
This sounds right. But the correct terminology for relays (I spent many years designing complex relay circuits) is - a relay is either operated or released.
 
Your circuit needs a transistor to drive the 9V relay. The relay coil needs 18ma which can't be supplied by a CD4013 IC.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top