Djuke - DIY Audio

build your own audio equipment

  • Increase font size
  • Default font size
  • Decrease font size
Outside EU customers: create an account and log in to see prices excluding VAT
Home Projects Power Amplifiers Pic-based Signal Detection

Pic-based Signal Detection

Print PDF

Signal detection prototype

Products related to this project are for sale. It is available as pcb+uc, a kit with all components or completely built and tested

Introduction

This project describes a small circuit that can be considered as an automatic on/off switch for power amplifiers. A line-level signal is monitored and a power amplifier is switched on, when a signal is detected. When no signal is detected for 20 minutes, the power amplifier is automatically switched off again. The circuit was intended as an extension to use my Mosfet Power Amplifier in an active speaker, which is not supposed to stay on 24 hours a day and is inconvenient to switch on/off with a button. The project can of course be used to switch other equipment other than power amplifiers as well.

Optionally, a DC detection circuit can be incorporated to switch an output (or supply) relay in case of DC voltage on the speaker output. Delayed switch on of the output relay is available to prevent the switch on thumb.

Schematic

The schematic is shown below. The heart of the circuit is a PIC12F675 microcontroller, using the internal oscillator 6 pins can be freely used:

  • GP0 and GP1 are used as input for the signal detection using the internal comparator.
  • GP2 is an output connected to the comparator led, to give visual feedback if signal is detected.
  • GP3 is an input for the DC detction circuit, which is normally high using R13. DC detection circuit pulls this pin low in case of DC detected.
  • GP4 is an output for the output relay of the amplifier, which is switched with Q2.
  • GP5 is an output for the power relay, which is switched with Q1. This pin is also connected to the power led for visual feedback.

The bottom left part consists of a conventional supply, with an unregulated 12V for the relays and a regulated 5V for the microcontroller. Note that the unregulated supply can depend quite strongly on the transformer load, so resistor R1 and R12 can be used to limit the current through the relays.

 

Signal setection schematic

The components R2, R4, R5, R6, R11 and C7 are used to generate two stable voltages for the comparator. The voltage difference is set by potmeter R11, which sets the sensitivity. With the current values, sensitivity can be set between 0 and 250mV, which should be fine for most applications. Capacitor C5 prevents high frequency disturbances from triggering the circuit. Using C6 and R7 the line level signal is added to the comparator input. The input impedance of the comparator in combination with resistor R7 make sure that the circuit effectively has no influence on the line level signal.

Software functionality

Most of the functionality is implemented in software:

  • After powerup, the Comparator LED starts blinking for 4s to show that the microcontroller is functional
  • After detection of a line-level signal the power relay will be switched on. About 4s later, the output relay will be switched on to avoid the switch on thumb when the supply comes in.
  • After 15 minutes without signal, both the power and output relay will be switched off.
  • If a DC error is detected, the output relay will be switched off and the Comparator LED will be on continuously. The power relay will be switched off as an extra safety feature.

Prototype

A first prototype is ready and working. Pcb's and kits are available. Let me know your ideas/comments by adding a comment below!

Last Updated on Friday, 21 September 2012 15:27  

Comments  

 
0 #7 Menno de Graaf 2016-11-21 08:46
Quoting didier godefroy:
With no listing of the program and no explanation about how to program this, it's not actually a diy project.
There is one other thing that makes no sense, the ICSP pinout doesn't match the standard one, such as used by the pickit or whatever. So the connection to a programmer would have to be custom for it.
I am wondering what the effect would be when doing the programming. I think the power should not be applied to this circuit while doing the ICSP.

Thanks for your kind words. Of course this still is a DIY project, even though the firmware comes pre-programmed with it. You still have to mount-it-yourself.
Suppose there would be a standard for PIC ICSP programming, it would be a 6-in-a-row header, so it is very clear that this ICSP is different. Also, the circuit is meant for external programmers like http://www.voti.nl/wisp648/ for which the +5V is certainly needed.
 
 
0 #6 didier godefroy 2016-10-21 15:01
With no listing of the program and no explanation about how to program this, it's not actually a diy project.
There is one other thing that makes no sense, the ICSP pinout doesn't match the standard one, such as used by the pickit or whatever. So the connection to a programmer would have to be custom for it.
I am wondering what the effect would be when doing the programming. I think the power should not be applied to this circuit while doing the ICSP.
 
 
0 #5 Menno de Graaf 2015-12-22 23:14
Quoting Orson Parra Zurita:
I don¨t find any instruccions to assembly the kit but I found on the schematic almost all the resistor values.

The mounting instructions (in your case for revision 4) can be found on the PicSignalDetect ion product page:
http://www.djuke.nl/index.php?page=shop.product_details&flypage=flypage.tpl&product_id=249&category_id=1&vmcchk=1&option=com_virtuemart&Itemid=8
 
 
0 #4 Orson Parra Zurita 2015-12-22 22:45
Mr djuke, I received the picSignalDetect ion Kit today, thanks for your fast service. I have some questions about such Kit: I don¨t find any instruccions to assembly the kit but I found on the schematic almost all the resistor values. The resistors R16 and R17 are missing at the schematic, the resistor R6 have a value of 1k Ohm ( has to be 1k or 100k ?). If you have any additional Info please let me know. Kind Regards. Orson Parra.
 
 
0 #3 JS Arcand 2014-10-20 14:22
Hi! I'm interested in your device, but i live in North America and the voltage is 120v. What kind of transfo should i use/buy? can i order the kit with the appropriate transfo bundled with it?
Thank you!! 8)

Regards,
JS from Canada
 
 
0 #2 Torsten Stutz 2014-10-18 08:07
Hello,
Many thanks for fast shipping,
It works fine :-)
Best Regards
torsten Stutz Germany
 
 
0 #1 Charles Rignall 2013-01-29 19:50
Hello and good day.

I am looking for a way to simplify control of a mixture of components so a normal person can turn things on and off.

I would like a device that had several (say 3) RCA inputs, could detect which has a signal, and route that signal to an amplifier. The amplifier should have a remote control to adjust volume, and, possibly, an override to manually select which RCA input is being streamed. The signal then could be split between speakers.

Another issue is my TV. The damn thing requires me to choose between TV input and input from the DVD/BD player. If I could detect which input has a signal, maybe I could program a chip to send messages to make the selection automatic.

That would just leave me with the problem of the cable TV box and the DVR function. But that is a subject for another day.

Regards,

Charles Rignall
 

Shopping Cart

Your Cart is currently empty.



List All Products


Advanced Search

Copyright © 2017 Djuke - DIY Audio. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.