8
\$\begingroup\$

I want to build a simple device with 2 inputs and 1 output, all TRS 1/8" audio jacks. The device picks one of the inputs to pass through to the output depending on the time of day (at night, it chooses B, but for the rest of the day it chooses A).

How would I go about doing this?

For completeness, it's for a stereo that is inaccessible almost all the time. By default it plays (through speakers) from the radio. I want to attach this device between the stereo and the speakers, and plug in a simple FM receiver (configured to some unused frequency), so that at night I can transmit over FM to control the speakers. If there's an easier way, please do tell, but consider the stereo+speakers locked away after I install the device, so I need to be able to transmit audio wirelessly to the speakers while falling back on the stereo's output.

\$\endgroup\$
5
  • 1
    \$\begingroup\$ Any chance that this is in an area where ambient light can substitute for knowing precise time of day? \$\endgroup\$
    – scld
    Sep 9 '13 at 19:42
  • \$\begingroup\$ Light, not reliably. Although the alternative is to only switch to input B if it is producing sound, and switch back to A after 30 seconds of radio silence. This would actually be preferable. \$\endgroup\$
    – DanRedux
    Sep 9 '13 at 19:47
  • \$\begingroup\$ Ah, that is a much "easier" task in my opinion. I don't have time to flesh it out now but that info should definitely help those who do. In fact, you should be able to purchase an A/V switch that detects active inputs relatively cheaply. I would look for something that does component video/audio and just leave out the yellow connection. If you are also looking for a side project, a threshold detector triggering an SPDT or multiplexer might do the trick. \$\endgroup\$
    – scld
    Sep 9 '13 at 19:51
  • \$\begingroup\$ Could you deal with manually plugging in a cable at night? If so, a simple 5 pin stereo jack, where Input A is physically connected when nothing is plugged in, and Input B is physically connected when a plug is in. \$\endgroup\$
    – Passerby
    Sep 10 '13 at 9:22
  • \$\begingroup\$ This isn't a complete answer, hence posting as a comment: You can buy day/night relay devices, such as from MaxiSwitch, which automatically toggle between one of two sets of lines per time of day. While this particular device switches a 10 Ampere power connection between two sockets, other, cheaper ones with lower ratings might well fit your requirements. \$\endgroup\$ Sep 10 '13 at 9:27
1
\$\begingroup\$

A set of relay switches hooked up to a real time clock and calendar (RTCC) on a MCU could do it: Set the date and time in the MCU's RTCC peripheral. Make sure it is hooked up to a relatively accurate e.g. 32kHz crystal (if you can't get at it, the clock will drift). Have it wake every 12 hours, switch off one channel's relays using a driver that can handle the current, and then switch on the relays for the other channel. Make sure not to have both relays connected at the same time; I'd use a 100ms delay between turning one off and turning one on, YMMV. A single relay that could do the whole trick, or two double pull single throw relays like in my schematic would work best, but I included the link to the Hamlin relay because I have used it and I am familiar with it.

RTCC's are cool because you can use real times and dates, so the programming is pretty intuitive, and you can get fancy and have it change switching times throughout the year (to match sunset times for example) and you can have it correct for daylight savings. Just make sure to mind your power usage if you are only using batteries, and you should have it hooked up to a backup battery if you are powering off the AC, or you will lose the time when the power goes out, which is a bummer.

Please note that the 1k resistors were picked to demonstrate that a limiting resistor will probably be needed, and not to say that is the correct value or resistor.

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
0
\$\begingroup\$

You need to split your problem in 2 parts, one that will determine the time to switch inputs and the actual switch, i would do it with a programmable microcontroller but you said you have no electronics background so you need to combine an A/V switch and some programmable timer like the ones used for outdoor lights.

\$\endgroup\$
0
\$\begingroup\$

I would use a commercially available mains timer (either the mechanical type that rotate or a digital one - they're all dirt cheap these days) and wire it to the switching part, which can be any number of designs.

You could go really basic / dumb and use relay(s) with mains-voltage coil, or build some more elegant circuit / device to switch the source using solid-state components.

A low-volt wall-wart (old phone charger etc.) plugged into the timer powering a small signal relay or whatever would be slightly nicer and avoid bringing high voltage near the audio signal.

If you use an Arduino for this, the ghost of Bob Pease will hunt you down and stab you with a Tektronix scope probe.

\$\endgroup\$
0
\$\begingroup\$

I might have an "out of the box" solution which involves no electronic skills, but require internet connectivity and minimal php programming skills.

You could use a YoctoHub-Ethernet and a YoctoRelay

http://www.yoctopuce.com/EN/products/usb-actuators/yocto-relay+Ethernet

The YoctoHub-Ethernet is able to contact a php server and launch a script which will take control of the relay. From there you can do anything you want, time-based control, direct control from a web page, etc...

\$\endgroup\$
-2
\$\begingroup\$

I wrote you a nice post about using switched jacks, but that is not the correct solution.

I recommend you get an FM transmitter with enough power level to drown out your commercial station. Place the transmitter next to the radio and run a cord to your device that will be sending music to your speakers.

As for day/night control: turn off the fm transmitter during the day. You aren't giving enough information to fully answer the question.

\$\endgroup\$
6
  • \$\begingroup\$ I did say I can't access the stereo / speakers / device after installation (hence the time control). However, I spoke to an EE about overpowering the radio signal, and they said it would violate FCC rules just to get even close to the required signal strength. \$\endgroup\$
    – DanRedux
    Sep 9 '13 at 20:05
  • \$\begingroup\$ Does your stereo have a remote? I think most home AV receivers do. FWIW, this is an industrial solution uk.farnell.com/omron-industrial-automation/h3cr-f8n-ac100-240/… \$\endgroup\$
    – HL-SDK
    Sep 9 '13 at 20:09
  • \$\begingroup\$ This stereo does not have a remote. For all intents and purposes, it's locked in a treasure chest that, once locked, cannot be unlocked, and should only play from input B during the night. \$\endgroup\$
    – DanRedux
    Sep 9 '13 at 20:14
  • \$\begingroup\$ I'll experiment in the car on my way home and see if my fm transmitter can overpower some commercial stations. It is about 4 feet away from my radio antenna. I'll let you know how it goes in a few minutes :) \$\endgroup\$
    – HL-SDK
    Sep 9 '13 at 20:21
  • \$\begingroup\$ Thanks! I've been hoping someone cold do that. My stereo will be about 10 feet, behind a door, from the transmitter... But still, it would be progress. \$\endgroup\$
    – DanRedux
    Sep 9 '13 at 20:26

Not the answer you're looking for? Browse other questions tagged or ask your own question.