Author Topic: Convert 0.3V RMS AC signal to trigger relay?  (Read 1514 times)

0 Members and 1 Guest are viewing this topic.

Offline LooseJunkHaterTopic starter

  • Frequent Contributor
  • **
  • Posts: 288
  • Country: de
Convert 0.3V RMS AC signal to trigger relay?
« on: May 02, 2021, 08:19:35 pm »
I'm trying to create a DIY light alarm clock, using a alarm clock radio as the base of the project (I know I could use an Arduino + a RTC, or simply buy a daylight radio, but I'd rather not). [Here's](https://i.ibb.co/ZLjp2kq/image.png) a super basic diagram showing what I want to do.

[And here's](https://i.ibb.co/HDYbhpy/image.png) how I plan to do it. The circuit itself is simplistic, but I'd imagine there's a much simpler way to have the radio trigger the turn-on of the high-power LED, and to of course shut off after the radio stops sending the signal.

How does my idea sound? Can it be done more efficiently? All feedback welcome!
 

Offline Manul

  • Super Contributor
  • ***
  • Posts: 1109
  • Country: lt
Re: Convert 0.3V RMS AC signal to trigger relay?
« Reply #1 on: May 02, 2021, 08:29:24 pm »
Why take audio output? Why not take some voltage from radio own power supply when it turns on? You can probably power small relay directly from that, or use a mosfet.
 

Offline LooseJunkHaterTopic starter

  • Frequent Contributor
  • **
  • Posts: 288
  • Country: de
Re: Convert 0.3V RMS AC signal to trigger relay?
« Reply #2 on: May 02, 2021, 08:37:10 pm »
Why take audio output? Why not take some voltage from radio own power supply when it turns on? You can probably power small relay directly from that, or use a mosfet.

I would have assumed a signal going to the OP-amp (powering the radios speaker) would be a lot weaker, and at a lower voltage? Where else would I pull a signal from when the "alarm" function is on?
 

Offline Manul

  • Super Contributor
  • ***
  • Posts: 1109
  • Country: lt
Re: Convert 0.3V RMS AC signal to trigger relay?
« Reply #3 on: May 02, 2021, 08:45:55 pm »
I never owned an alarm radio, but as I know it powers the radio receiver and starts playing your favorite radio station in the morning. It is very unlikely that it keeps radio on mute all the time or something like that, probably it powers the whole radio circuit when it needs (when alarm goes off). So you can use that power supply voltage to turn on relay or mosfet. Thats is my first thought.
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Convert 0.3V RMS AC signal to trigger relay?
« Reply #4 on: May 02, 2021, 08:50:13 pm »
In every clock radio I've seen, the clock is based on a large IC that integrates all of the functions of an alarm clock. This IC will usually have at least two alarm outputs, one of which is intended for switching a radio and will be a standard logic level signal used to turn on a transistor that controls power to the radio. Look up what IC is used and see if you can find a datasheet. This will certainly be easier and more reliable than trying to sense the audio output.
 

Offline LooseJunkHaterTopic starter

  • Frequent Contributor
  • **
  • Posts: 288
  • Country: de
Re: Convert 0.3V RMS AC signal to trigger relay?
« Reply #5 on: May 02, 2021, 08:53:19 pm »
In every clock radio I've seen, the clock is based on a large IC that integrates all of the functions of an alarm clock. This IC will usually have at least two alarm outputs, one of which is intended for switching a radio and will be a standard logic level signal used to turn on a transistor that controls power to the radio. Look up what IC is used and see if you can find a datasheet. This will certainly be easier and more reliable than trying to sense the audio output.

Ohhh, I didn't know that! I'll look into doing it this way then, thanks!

So then I assume I'll use a transistor to then power the relay, correct, and excluding the full bridge rectifier + TDA2030?
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Convert 0.3V RMS AC signal to trigger relay?
« Reply #6 on: May 02, 2021, 08:57:25 pm »
Well, a transistor will probably make the most sense. If you can find a datasheet that should tell you what you need to know.
 

Offline Manul

  • Super Contributor
  • ***
  • Posts: 1109
  • Country: lt
Re: Convert 0.3V RMS AC signal to trigger relay?
« Reply #7 on: May 02, 2021, 09:01:17 pm »
As I said, I would try to go even more simple - drive relay directly from radio power supply. Radio turns on, relay turns on. Maybe add flyback diode just for the sake of sanity. If relay needs something like 50mA, it should not be a problem for radio supply as an extra load.
 

Offline LooseJunkHaterTopic starter

  • Frequent Contributor
  • **
  • Posts: 288
  • Country: de
Re: Convert 0.3V RMS AC signal to trigger relay?
« Reply #8 on: May 02, 2021, 09:22:12 pm »
So I just took apart the radio (Sony ICF-C212), and the IC's within are the [LM8560](http://www.unisonic.com.tw/english/datasheet/LM8560.pdf) and the [Sony CXA1019S](https://pdf1.alldatasheet.com/datasheet-pdf/view/169514/SONY/CXA1019S.html].

Going to read the datasheets now and see what I can discover, but TBH, I'm not 100% sure what I'm looking for.
 

Offline LooseJunkHaterTopic starter

  • Frequent Contributor
  • **
  • Posts: 288
  • Country: de
Re: Convert 0.3V RMS AC signal to trigger relay?
« Reply #9 on: May 02, 2021, 09:33:04 pm »
So it seems that the Sony IC is an AM/FM radio, so I don't think that will be of any use, since when I use my crappy oscilloscope, the alarm signal output does appear to be similar to what is described in the LM8560 datasheet, as a "output signal consists of 900Hz 2Hz  intermittent  (50%  duty)  modulation  signals."

What I'll do next is measure the signal of pin 16 of the LM8560, but based on the example schematic, it appears that it may be similar/the same as to my original measured output signal (0.3V RMS), which AFAIK, isn't high enough to trigger a transistor. 
 

Offline LooseJunkHaterTopic starter

  • Frequent Contributor
  • **
  • Posts: 288
  • Country: de
Re: Convert 0.3V RMS AC signal to trigger relay?
« Reply #10 on: May 02, 2021, 10:45:45 pm »
Another update... I was sadly trying to avoid reverse-engineering the radio, but alas, I had to do it.

One end of the speaker is connected to ground, while the other end is connect to pin 28 of the CXA1019S.  :palm:
 

Offline LooseJunkHaterTopic starter

  • Frequent Contributor
  • **
  • Posts: 288
  • Country: de
Re: Convert 0.3V RMS AC signal to trigger relay?
« Reply #11 on: May 02, 2021, 11:08:19 pm »
Final update I think?

So when measuring between pin 16 and gnd of the LM8560, I get ~10V output when the alarm is going off. I accidentally probed the wrong pin, and somehow thought that the alarm signal was coming from the CXA1019S, but nope. It appears that the LM8560 sends the alarm signal to the CXA1019S, to then be outputted by the speaker.

Anyway, thank you all for the help and pointing me toward looking at the IC's on the board; it really helped, and now I think I may be able to exclude a lot of components and make this project much simpler!
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Convert 0.3V RMS AC signal to trigger relay?
« Reply #12 on: May 03, 2021, 07:44:52 pm »
Yes, the alarm signal will come from the clock IC and will be mixed with the audio signal from the radio. The datasheet for the clock IC shows a circuit for interfacing to the alarm output pin with it driving a transistor so that should get you 80% of the way there. You could probably use the power signal going to the radio but that would make it so turning the radio on also turns on the light. If you pick off the alarm signal instead that will keep it independent so that you can activate the light and still use the radio.
 

Offline LooseJunkHaterTopic starter

  • Frequent Contributor
  • **
  • Posts: 288
  • Country: de
Re: Convert 0.3V RMS AC signal to trigger relay?
« Reply #13 on: May 04, 2021, 07:27:14 pm »
Attached is an image of a quick schematic I drew up.I'm using a Schottky to reduce v-drop, and without that diode, it will actually change the "alarm" sound being outputted by the radios speaker (in case I also decide to have the "alarm" sound + light both turn on during use).

Any feedback on this schematic? Looking at the circuit design, I think there may be the possibility of actually excluding the relay if I can find a BJT in my spare-parts bin with a low base input voltage (when I was seeing what sort of voltage the capacitor gets filled to, it was only around 2-5V) and supports 1.5A between C&E, and a voltage of 35V+ betrween C&E.

Edit: For the 330-500ohm resistor, the reason for this choice is because I want to limit the amount of current outputted by the LM8560 to a *max* of 50mah, to not accidentally burn out the IC. On the datasheet, I couldn't find the max power/current output by this IC.
« Last Edit: May 04, 2021, 07:28:54 pm by LooseJunkHater »
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19527
  • Country: gb
  • 0999
Re: Convert 0.3V RMS AC signal to trigger relay?
« Reply #14 on: May 04, 2021, 09:02:46 pm »
Just Google the part numbers and get the data sheets. The schematic for the clock radio is likely to be similar to the examples.
http://www.paulanders.com/G5-LED/ver1/datablad.pdf
https://cdn.datasheetspdf.com/MoV/web/viewer.html?file=/pdf-down/C/X/A/CXA1019M_SonyCorporation.pdf
 

Offline LooseJunkHaterTopic starter

  • Frequent Contributor
  • **
  • Posts: 288
  • Country: de
Re: Convert 0.3V RMS AC signal to trigger relay?
« Reply #15 on: May 04, 2021, 10:33:24 pm »
Just Google the part numbers and get the data sheets. The schematic for the clock radio is likely to be similar to the examples.
http://www.paulanders.com/G5-LED/ver1/datablad.pdf
https://cdn.datasheetspdf.com/MoV/web/viewer.html?file=/pdf-down/C/X/A/CXA1019M_SonyCorporation.pdf

No mention of the power capabilities of the "alarm output" pin, however because it can be directly used to power a speaker, i'd imagine it can handle at least 50mah.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19527
  • Country: gb
  • 0999
Re: Convert 0.3V RMS AC signal to trigger relay?
« Reply #16 on: May 05, 2021, 07:34:09 am »
Just Google the part numbers and get the data sheets. The schematic for the clock radio is likely to be similar to the examples.
http://www.paulanders.com/G5-LED/ver1/datablad.pdf
https://cdn.datasheetspdf.com/MoV/web/viewer.html?file=/pdf-down/C/X/A/CXA1019M_SonyCorporation.pdf

No mention of the power capabilities of the "alarm output" pin, however because it can be directly used to power a speaker, i'd imagine it can handle at least 50mah.
You mean 50mA. mAh is milliamps per hour. Yes, I know I'm being pedantic.

The data sheet shows it driving a piezo buzzer, not a speaker. Why use a zener diode? An ordinary one will do. The pull-down resistor should go between the base an emitter, rather than the capacitor.
 

Offline LooseJunkHaterTopic starter

  • Frequent Contributor
  • **
  • Posts: 288
  • Country: de
Re: Convert 0.3V RMS AC signal to trigger relay?
« Reply #17 on: May 05, 2021, 08:11:15 pm »
Why use a zener diode? An ordinary one will do. The pull-down resistor should go between the base an emitter, rather than the capacitor.

I'm using a zener diode to reduce v-drop. By the time the 12V PWM signal is smoothed by the capacitor, it becomes ~3V. I'm trying to reduce the v-drop to ensure the transistor is triggured in a stable manner.

Regarding the pull-down resistor, the reason I have it beside the cap is to ensure the cap gets drained quickly; I'm trying to minimze the amount of time the transistor is on, when the alarm signal is off.

Will there be a signifcant difference of where it's placed (either between B/E - G/S, or between the 12V/Gnd of the cap)?
 

Offline LooseJunkHaterTopic starter

  • Frequent Contributor
  • **
  • Posts: 288
  • Country: de
Re: Convert 0.3V RMS AC signal to trigger relay?
« Reply #18 on: May 05, 2021, 08:21:08 pm »
Attached is my schematic V2. Removed the relay and a few other components. Added exact values for components.

I decided to go with a mosfet to reduce power losses (as well as decrease the amount of current the LM8560 needs to deliver), as with my little bit of research, it seems that BJT's are more inefficient and run hotter overall. I specifically used the [K3407](https://datasheetspdf.com/pdf-file/533912/Toshiba/K3407/1) because it was in my spare-parts bin, supports a G/S voltage of up to 30V and min of 2.4V, and a D/S current of 10A (I'll be pushing around 4A, but the mosfet will be heatsinked in case it gets hot). It's not the best mosfet that I have, but it seems like it'll do the job.

I've tested the circuit by feeding in 9V from a alkaline battery, and the mosfet does triggure upon adding 9V. Removing the 9V battery, the mosfet shuts off after about 1 second (capacitor is 47uf, 25V).

I'm debating on adding a low-value resistor between the mosfet and the buck converter, because I don't want the mosfet to die due to overcurrent when the buck-converters caps are filling up, but IDK if it necessary. Feedback on this idea, or on the rest of the circuit? Any feedback is greatly appreciated!
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19527
  • Country: gb
  • 0999
Re: Convert 0.3V RMS AC signal to trigger relay?
« Reply #19 on: May 05, 2021, 09:53:03 pm »
Why post such a big arse file? It looks like it's been through some JPEG compression which makes it more tricky to edit. The image I've posted uses a tiny fraction of the bandwidth and is more than clear enough.

There's no need for a zener diode, plain old silicon will do and you don't need a series gate resistor either.

Are the input and output 0V connections of the DC:DC converter isolated? If not, breaking the 0V like that will be troublesome.
 

Offline LooseJunkHaterTopic starter

  • Frequent Contributor
  • **
  • Posts: 288
  • Country: de
Re: Convert 0.3V RMS AC signal to trigger relay?
« Reply #20 on: May 07, 2021, 09:17:44 pm »
There's no need for a zener diode, plain old silicon will do and you don't need a series gate resistor either.

Why to both of these changes? When I was watching the GreatScott video on the series gate resistor, he made it seem neccessary. Also, why not to the zener diode, and instead use the regular silicon diode? I'm a noob, so I'd love to know the reasoning.

Are the input and output 0V connections of the DC:DC converter isolated? If not, breaking the 0V like that will be troublesome.

In and out gnd are commoned (non-isolated).
 

Online BrianHG

  • Super Contributor
  • ***
  • Posts: 7740
  • Country: ca
Re: Convert 0.3V RMS AC signal to trigger relay?
« Reply #21 on: May 07, 2021, 09:53:39 pm »
Doesn't your boost converter have an Output Enable input/feature.

You wouldn't need a power transistor/mosfet.

Also, because the the boost converter's internal wiring, you may need to wire the output & LED's GND to the mosfet unlike 'Zero999' post above.  The GND coming out of the boost converter will just be shorted to GND keeping the thing always on, shorting out the mosfet.
 

Offline Manul

  • Super Contributor
  • ***
  • Posts: 1109
  • Country: lt
Re: Convert 0.3V RMS AC signal to trigger relay?
« Reply #22 on: May 07, 2021, 10:51:47 pm »
When I was watching the GreatScott video on the series gate resistor, he made it seem neccessary.

Generally, gate resistor may serve two functions:

1. Slowing down gate charge / discharge
2. Damping of parasitic LC tank circuit

In many cases these two functions interleave and can be thought to be same, but I believe it is better to think of them as separate. Slowing down happens because the resistor limits the gate charge / discharge current. For example, in some cases you may use really high value resistors to achieve slow and smooth switching. You may also use very low value resistors to achieve maximum speed and low switching loss (reduce the time spent in linear region).

If you think about it in frequency domain, you may notice, that the speed at which gate is charged /discharged (rise and fall time) defines the frequency content of gate current waveform. For example, fast rise time = high frequencies involved.

The gate has capacitance plus the mosfet package, leads, PCB tracks has inductance. So it forms the LC tank, which no one wants, but it is still there (hence, generally called parasitic). This LC tank resonates if it is excited by currents containing high enough frequencies. So if gate is switched fast enough, parasitic LC tank will resonate and create ringing (and overshoot / undershoot). Here gate resistor not only lowers the frequencies involved, but also reduces the quality (Q factor) of this LC tank (damps it), so the energy dissipates and the resonance becomes weak. Generally, every combination of mosfet and PCB layout has an optimal value of gate resistor to damp the ringing enough (critical or near-critical damping) to achieve clean gate signal.

In your schematic, the gate driving source (peak detector circuit) is so very slow, that the ringing is impossible. The gate resistor is not needed, because it will change nothing and thus has no practical function. Hope, this makes sense.

Also, why not to the zener diode, and instead use the regular silicon diode? I'm a noob, so I'd love to know the reasoning.

First of all, I never saw a zener in your schematic, just a schottky diode. Anyway, Zero999 suggestion of a 1N4148 is a good one. It is a nice, fast, low capacitance widely available diode, which you can trust for most low current, small signal applications. This is not the case where you should worry about forward voltage drop.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf