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.

Newbie building a USB powered relay circuit

Status
Not open for further replies.

damirksi

New Member
This is my first project so please excuse my ignorance and my long winded explanation.

THE DEVICE

I have a home theatre power amplifier and I want to turn it on and off automatically from my computer. The power amplifier has a +12V trigger input that allows it to be controlled from another device. The manual for the amplifier states that the trigger will work with any voltage from +3V to +30V AC or DC.


MY SOLUTION

My solution is to build a USB device. I think this is an elegant solution because the USB port will also supply the power to drive the trigger input on the power amplifier. To make the circuit easy to build I purchased a DLP-USB232M USB-to-serial adapter board **broken link removed**.

I bridged the RTS and DTR pins and use them to control a reed relay.

DTR-RTS---[5V 500ohm 10mA SPST Reed Relay]---GND

When DTR and RTS are both high the +5V USB power is switched by the relay to drive the trigger on the amplifier. I have also connected an LED to supply to show if the device has power and another LED on the other side of the the relay to show if the relay is open or closed.


THE PROBLEM

I have built this device and it does actually work. By clearing or setting DTR and RTS in software I can turn the amplifier on and off. But, there is a problem.

When the computer is first turned on the relay will switch on and off maybe 5 times in a few seconds then when Windows XP loads the USB drivers this will happen again. I assume this is because the BIOS and Windows are searching for and initialising the USB devices.

Is there some way I can protect the amplifier from this? Can I use capacitors to even out the current flowing to the amplifier? If so, how do I work out which size capacitor to use and where do I put it in the circuit?


Just for the hell of it I wired a 100uF 16V capacitor accross the wires leading to the amplifier. The LED that I used to show if the relay was closed and that power was going to the amplifier started blinking. I guess I accidently created some kind of timer circuit.
 
solution a: timer (turns the whole thing off while computer boots)
solution b: do the whole thing over the serial port

by the way, the link doesn't work
:D
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top