PIC input selector ( preamp ? ) - diyAudio
Go Back   Home > Forums > Source & Line > Digital Source

Digital Source Digital Players and Recorders: CD , SACD , Tape, Memory Card, etc.

Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 19th May 2003, 04:00 PM   #1
diyAudio Member
 
breguetphile's Avatar
 
Join Date: Mar 2003
Location: Indiana, USA
Default PIC input selector ( preamp ? )

I have recently programmed a pic 16f84 to decode a sony remote and I was wondering what the best way to switch between input sources is. One of my profs recommended using the analog cd4066, but I was wondering if relays would do the job better. I currently have the outputs I need all outputting as "one-hots" so I could easily fire a relay to switch. Is this the best way or is there a better way? What is the best way to control the volume remotely? (is it the relay based APOX I read about?)

Thanks
__________________
Dawn: When men of reason go to bed. ~Ambrose Bierce
  Reply With Quote
Old 19th May 2003, 05:04 PM   #2
diyAudio Member
 
Andypairo's Avatar
 
Join Date: Sep 2002
Location: near Milano , Italy
IMHO a relay will do the job better, since it contains no active elements.
Does your code provide latching momentary outputs ?
I'd like to have a look at the schematic you are using and, if possible, to have access at the firmware since I have some of these chips lying around doing nothing....

Cheers

Andrea
  Reply With Quote
Old 19th May 2003, 05:23 PM   #3
diyAudio Member
 
breguetphile's Avatar
 
Join Date: Mar 2003
Location: Indiana, USA
You'll have to excuse anything I did poorly as this was my first pic programming. I will take any suggestions for improvement.

I have the source for the decoding here:
www.brentcastle.com/irdec.c

schematic is here:
www.brentcastle.com/irdec.png

As you can see from the code I give very loose counts for high and low (these are pulse-width defined logic pulses). If you are curious the start bit should be around 165 (which i just said i was looking for >140) , the '0' bit is about 47 timer ticks, and the '1' bit is about 75 timer ticks. As stated before this is to output a one-hot. In other words, pressing a 1 will output (and latch) rb7, pressing 8 will output and latch rb0. This code was compiled using picclite and is for a 16f84a.
__________________
Dawn: When men of reason go to bed. ~Ambrose Bierce
  Reply With Quote
Old 19th May 2003, 05:33 PM   #4
diyAudio Member
 
jackinnj's Avatar
 
Join Date: Apr 2002
Location: Llanddewi Brefi, NJ
Default Relays will be much nicer

but there are some very good switches from Analog Devices, Maxim. I would completely avoid the generic CMOS switches.

if you are going to use relays, consider using a relay driver like the ULN2803a -- each gate will drive 500ma.
  Reply With Quote
Old 20th May 2003, 04:09 PM   #5
diyAudio Member
 
breguetphile's Avatar
 
Join Date: Mar 2003
Location: Indiana, USA
Default What relays?

Allright, now that I know what driver is recommended could anyone give me advice on what relays are good? I'm not really sure how much of a difference it makes in audio. I must admit I do like the idea of the input selection being audible (with a nice click!!). I suppose I'd do the same thing with the volume control. Are there any reasonably priced relays that I could acquire in bulk to handle both of these jobs?

Thanks!!
__________________
Dawn: When men of reason go to bed. ~Ambrose Bierce
  Reply With Quote
Old 21st May 2003, 07:51 AM   #6
diyAudio Member
 
Jan Dupont's Avatar
 
Join Date: Apr 2003
Location: Copenhagen, Denmark
Send a message via MSN to Jan Dupont
Hi,
Last week I started the design of a preamp also using a PIC (as input selector) and analog switches for the inputs.

The idea is taken from the exelent QUAD 34 and 44 preamps which I got a couple of....

QUAD uses the 4066 analog switch, and even that this circuit has been on the market for a long time, the s/n ratio and channel separation is quite good.

With the QUAD design in mind (and 20 years experience with bad and noisy relays) I have layed my eyes on the SSM2402 and SSM2404 analog switches from Analog Device. With a s/n ratio of up to 120 dB and a COMPLETE clickless operation I think this is the most obvisous choice, when designing a new High End preamp.

Don´t misunderstand. Relayes are good!!!! However having a preamp with NO MECHANICAL CONTACTS what so ever in the signal path is just great.
__________________
Free Schematic and Service Manual downloads www.audio-circuit.dk, Company: www.dupont-audio.com, Joint venture: www.DupontMantra.com
  Reply With Quote
Old 21st May 2003, 06:55 PM   #7
mlloyd1 is offline mlloyd1  United States
diyAudio Member
 
mlloyd1's Avatar
 
Join Date: Feb 2001
Location: illinois
Default Re: Relays will be much nicer

There is probably some useful stuff in this post from the past

The Hafler 915 preamp (full manual with schematic on Hafler web site, just do a search) and the Parasound PHP-850 preamps (schematic available on request from Parasound) use CMOS analog switches as input source selectors.

As preamps go, you can do much worse than these.

I use Maxim switches cause I have a BUNCH

mlloyd1

Quote:
Originally posted by jackinnj
but there are some very good switches from Analog Devices, Maxim. I would completely avoid the generic CMOS switches.

if you are going to use relays, consider using a relay driver like the ULN2803a -- each gate will drive 500ma.
  Reply With Quote
Old 28th May 2003, 11:45 PM   #8
Bjerre is offline Bjerre  Denmark
diyAudio Member
 
Join Date: Mar 2003
Location: Aalborg, Denmark
One issue at least with mechanical relays you should consider is to implement a make-before-break when changing input channel. By doing this a changeover does not include the possible annoying state 'all-inputs-off'.
  Reply With Quote

Reply


Hide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Input selector Simo88 Everything Else 25 15th July 2009 02:33 AM
Boz AP1.7 Input Selector PCB Stones Pass Labs 2 14th November 2006 07:08 AM
Preamp Input Selector & Buffers Devil_H@ck Chip Amps 9 2nd May 2004 11:29 AM
Input selector: need help Cobra2 Parts 1 8th March 2003 08:31 AM


New To Site? Need Help?

All times are GMT. The time now is 08:53 PM.


vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
Copyright ©1999-2014 diyAudio

Content Relevant URLs by vBSEO 3.3.2