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.

Which relay to be used? DC or AC?

Status
Not open for further replies.

bananasiong

New Member
i need to switch a relay with 3V, 10KHz square wave, on off time almost the same. can i use a 3V DC relay? i've tried it but it can't be switched. can i use an AC relay? is there any 3V AC relay available in the market? or maybe 5 volts..

thanks a lot... i just learned how a relay works..
 
bananasiong said:
i need to switch a relay with 3V, 10KHz square wave, on off time almost the same. can i use a 3V DC relay? i've tried it but it can't be switched. can i use an AC relay? is there any 3V AC relay available in the market? or maybe 5 volts..

thanks a lot... i just learned how a relay works..

You can't switch a relay anywhere near that fast, it's a mechanical switch moved by a solenoid.

What EXACTLY are you trying to do?, I suspect you're going about it in completely the wrong way!.
 
Nigel Goodwin said:
bananasiong said:
i need to switch a relay with 3V, 10KHz square wave, on off time almost the same. can i use a 3V DC relay? i've tried it but it can't be switched. can i use an AC relay? is there any 3V AC relay available in the market? or maybe 5 volts..

thanks a lot... i just learned how a relay works..

You can't switch a relay anywhere near that fast, it's a mechanical switch moved by a solenoid.

What EXACTLY are you trying to do?, I suspect you're going about it in completely the wrong way!.

Only mechanical relays are for sure out of the question. The OP didnt say it must be mechanical and he gives no hints that it should because he did not talk about the load that he needs to switch. It may be possible to switch a small geometry FET output SSR that quickly. But again, the OP has to provide more info..
 
one end of the coil connected to the output of 555 timer and the other end connected to a 100R and the resistor connected to GND.
when there is a wave form, the erlay has to switch, it's ok if it switches only once..
 
bananasiong said:
one end of the coil connected to the output of 555 timer and the other end connected to a 100R and the resistor connected to GND.
when there is a wave form, the erlay has to switch, it's ok if it switches only once..
do u want to switch the relay at 10Khz , impossible, as already pointed out.
u didn't said ur requirement.
 
akg said:
do u want to switch the relay at 10Khz , impossible, as already pointed out.
u didn't said ur requirement.

okay.. i state clearer...
the NC is connected to the GND, NO to the +5V, COM to a pin of input port of micro controller. when the relay is switched, the microcontroller will response to it. i have only square wave to switch it.

any other suggestion instead of using relay?
i mean.. when the switch is off, it is around 0.6V, and when the switch is on, it is the square wave around 3V. get what i mean??
 
NO! - we still haven't got the faintest idea what you're trying to do!.

Tell us EXACTLY what you are wanting to do, and NOT how you think it should be done.
 
bananasiong said:
okay.. i state clearer...
the NC is connected to the GND, NO to the +5V, COM to a pin of input port of micro controller. when the relay is switched, the microcontroller will response to it. i have only square wave to switch it.

any other suggestion instead of using relay?
i mean.. when the switch is off, it is around 0.6V, and when the switch is on, it is the square wave around 3V. get what i mean??
as far as i understand , when the relay is on the micro will get a +5V as i/p.
now why r u trying to switch the relay with a square wave ,

wht's ur purpose.??
 
bananasiong said:
akg said:
do u want to switch the relay at 10Khz , impossible, as already pointed out.
u didn't said ur requirement.

okay.. i state clearer...
the NC is connected to the GND, NO to the +5V, COM to a pin of input port of micro controller. when the relay is switched, the microcontroller will response to it. i have only square wave to switch it.

any other suggestion instead of using relay?
i mean.. when the switch is off, it is around 0.6V, and when the switch is on, it is the square wave around 3V. get what i mean??

This sounds meaning less to do. If all you want to do is get your 10KHz square wave into the microcontroller, then you dont even need a relay. Just run your 555 output right into an input pin.


Your last statement makes me think all you really want to do is GATE the 555 output. If so, why not use an AND gate to do it. You could even run it into the uC and have it gate the output for you.

I still dont understand your application that requires a relay.
 
You don't need a relay and you don't want a relay.

You have a 3V, 10kHz square wave and you want an input of a microcontroller to respond to it. But the input to the microcontroller should be 5V.
So just amplify the 3V square wave to 5V with a transistor and a couple of resistors. Its output will be inverted unless you add a 2nd transistor circuit.
 
Optikon said:
Just run your 555 output right into an input pin.
If a 555 has a 5V supply then its output high voltage is not 5V. It is somewhere between 2.75V and about 3.8V.
Maybe just use a Cmos 555 oscillator which has an output voltage of 0V to 5V if the load has a low current.
 
okay.. fine..
do u all remember this circuit?

at
https://www.electro-tech-online.com/threads/assembly-and-c-language.20867/

this circuit works well.. from the CRO.
when the "antenna" goes near to the LC, the output gives squre wave like what i mentioned on top around 3V. when the "antanna" goes further, the output gives a DC around 0.6v.

i've tried to connected the output straight away to the input of my microcontroller (with common ground!!) but my microcontroller keeps responding to it. my microcontroller is too sensitive.. the input can only be 1 or 0. if it is connected to nothing, maybe the floating voltage causes it to respond.

so, i plan to use a relay because NC gives 0 and NO gives 1 to my microcontroller.
before that i was told to control my microcontroller by counting the on time of the square wave in a certain time. but i can't do it..


sorry for not telling the details.. thanks for helping :D
 
The output of the receiver should be Vcc without a signal, depending on its input offset voltages. It has a gain of a few hundred thousand which is so high that it probably amplifies its own noise and any noise that is around. It might even oscillate.
If you add a 0.01uF capacitor to ground at pin 3 then it won't oscillate.

When the signal is received then the output of the receiver should alternate between 0V and Vcc at the frequency of the input.
 
audioguru said:
The output of the receiver should be Vcc without a signal, depending on its input offset voltages. It has a gain of a few hundred thousand which is so high that it probably amplifies its own noise and any noise that is around. It might even oscillate.
If you add a 0.01uF capacitor to ground at pin 3 then it won't oscillate.

When the signal is received then the output of the receiver should alternate between 0V and Vcc at the frequency of the input.

you're right.. when there is no signal.. it gives a very high frequency square wave output. i don't want that squarewave..

is it will be constant if i add the 0.01uF capacitor at that pin and GND?? that's great if yes.
 
bananasiong said:
okay.. fine..


i've tried to connected the output straight away to the input of my microcontroller (with common ground!!) but my microcontroller keeps responding to it. my microcontroller is too sensitive.. the input can only be 1 or 0. if it is connected to nothing, maybe the floating voltage causes it to respond.
D

But if you connected receiver out directly to your microcontroller, it never sees a floating input. It is pulled up by the 1k to VCC and if the output is low, it is driven to 0.6 volts (also low impedance). No floating input! you dont need a relay as already talked about.
 
The 0V of the receiver and the 0V of the microcontroller must be connected together. Both should have the same +5V supply.
 
audioguru said:
The 0V of the receiver and the 0V of the microcontroller must be connected together. Both should have the same +5V supply.

yes.. they will be common grounded...
i thought, if i connect a capacitor to pin3 and GND, the capacitor will charge and discharge and become a saw tooth wave?? :roll:
 
Right now, pin 3 has capacitive-coupling from the output pin1. The very high gain causes the circuit to oscillate due to the positive feedback.
A capacitor from pin 3 to ground will ground pin 3 to AC signals.

Use a 0.1uF ceramic disk capacitor with short wires to make sure.
 

Attachments

  • receiver.png
    receiver.png
    9 KB · Views: 322
audioguru said:
Right now, pin 3 has capacitive-coupling from the output pin1. The very high gain causes the circuit to oscillate due to the positive feedback.
A capacitor from pin 3 to ground will ground pin 3 to AC signals.

Use a 0.1uF ceramic disk capacitor with short wires to make sure.

yes, i just tried to connect the 0.01uF capacitor from pin3 to the GND. but it gives nothing at the output., and.. the transistor is build-in in the LM393 right? is there any different if i use a 0.01uF and the 0.1uF??
 
bananasiong said:
yes, i just tried to connect the 0.01uF capacitor from pin3 to the GND. but it gives nothing at the output.
It is good if the capacitor stops the circuit from oscillating without having an input signal, but it is bad if the capacitor stops the circuit from detecting the transmitter. What is it?

the transistor is build-in in the LM393 right?
Yes. The transistor doesn't have much power so has difficulty driving a resistor as low a value as 1k at a supply voltage higher than 6V. Maybe a 10k resistor is best.

is there any different if i use a 0.01uF and the 0.1uF??
A 0.1uF capacitor provides better filtering.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top