Searching \ for '[EE] Floating Analog Signal in' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/io/atod.htm?key=analog
Search entire site for: 'Floating Analog Signal in'.

Exact match. Not showing close matches.
PICList Thread
'[EE] Floating Analog Signal in'
2005\08\09@001802 by Phil Keller

flavicon
face
I am trying to take an analog signal (out of an MP3 player) and
determine its signal amplitude with the PIC's A2D input.  I would like
to keep the sampling frequency down (to reduce the clock speed and save
power) so I thought of adding a large cap outside the PIC in parallel
with a resistor to ground to hold the level.

The problem is that the manufacture spec says that I must never connect
Audio ground to Digital Ground.

I thought of simply having the analog input across a resistor to analog
ground and using a blocking cap to couple the signal to the base of a
PNP (The base is DC biased to Vcc/2 and the Collector to digital ground)
with a diode on the emitter to the PIC and large Cap & resistor to
digital ground.

I tried this with Linear Technology's LTspice and the results were very
ugly.

I am sure that this has been done before but I have been unable to find
anything via Google or in the PIClist archives.  The right keywords have
escaped me so far.

All suggestion, pointers, ideas or answers are gratefully appreciated.

Phil



2005\08\09@064212 by Vasile Surducan

face picon face
Hi Phil,

On 8/9/05, Phil Keller <spam_OUTPhilTakeThisOuTspampkeller.net> wrote:
> I am trying to take an analog signal (out of an MP3 player) and
> determine its signal amplitude with the PIC's A2D input.  I would like
> to keep the sampling frequency down (to reduce the clock speed and save
> power) so I thought of adding a large cap outside the PIC in parallel
> with a resistor to ground to hold the level.

The sampling frequency must be in agreement with the Nyquist theorem,
you must have a bigger sampling frequency than 2x of your maximum
analog signal frequency. Adding a cap will create a crude low pass
filter at the AD input, egual with loosing your frequency bandwith of
the analogic signal (the telephone effect)


>
> The problem is that the manufacture spec says that I must never connect
> Audio ground to Digital Ground.

An analogic or digital ground must be viewed by the user perspective
and not by the manufacturer side. PIC does not have a separately
analogic ground pin, clearly defined in the datasheet. Why ?

Maybe because the system is so small it never need it, if you may keep
the noise level on the "digital" ground acceptable small. So, if you
know how to do this, your PIC digital ground become an analogic
ground.

>
> I thought of simply having the analog input across a resistor to analog
> ground and using a blocking cap to couple the signal to the base of a
> PNP (The base is DC biased to Vcc/2 and the Collector to digital ground)
> with a diode on the emitter to the PIC and large Cap & resistor to
> digital ground.

Try a simple ferrite choke with one wire  between your analogic signal
ground and PIC "digital" ground. On both sides of your choke a pair of
10nF and 100nF from Vcc to ground. But much better try a clean PIC
supply comming from a linear regulator and care for
communication/digital path (RS232 converter or USB ground is quite
noisy)

cheers,
Vasile

{Quote hidden}

> -

2005\08\09@075213 by Michael Rigby-Jones

picon face


>-----Original Message-----
>From: .....piclist-bouncesKILLspamspam@spam@mit.edu [piclist-bouncesspamKILLspammit.edu]
>Sent: 09 August 2005 05:18
>To: PICLIST Post
>Subject: [EE] Floating Analog Signal in
>
>
>I am trying to take an analog signal (out of an MP3 player) and
>determine its signal amplitude with the PIC's A2D input.  I would like
>to keep the sampling frequency down (to reduce the clock speed
>and save
>power) so I thought of adding a large cap outside the PIC in parallel
>with a resistor to ground to hold the level.


Google for "peak detector"

Regards

Mike

=======================================================================
This e-mail is intended for the person it is addressed to only. The
information contained in it may be confidential and/or protected by
law. If you are not the intended recipient of this message, you must
not make any use of this information, or copy or show it to any
person. Please contact us immediately to tell us that you have
received this e-mail, and return the original to us. Any use,
forwarding, printing or copying of this message is strictly prohibited.
No part of this message can be considered a request for goods or
services.
=======================================================================

2005\08\09@170033 by Gerhard Fiedler

picon face
Michael Rigby-Jones wrote:

>> I am trying to take an analog signal (out of an MP3 player) and
>> determine its signal amplitude with the PIC's A2D input.  I would like
>> to keep the sampling frequency down (to reduce the clock speed and save
>> power) so I thought of adding a large cap outside the PIC in parallel
>> with a resistor to ground to hold the level.
>
> Google for "peak detector"

It depends on what you mean by "signal amplitude". If you mean the peak
amplitude, then a peak detector is exactly your thing. If you mean the
equivalent of audible volume in the signal, a peak detector probably won't
give you what you want. In that case you'd need to rectify (small-signal
rectifier) and average (low pass filter) for an approximation.

Gerhard

2005\08\09@184331 by Phil Keller

flavicon
face
The peak detector is what I described, without knowing what it was
called.  It is sufficient for what I need.  (This is not precision, just
an indication of relative volume level.)  My problem is before that.  I
need to be able to translate an audio signal that is referenced to audio
ground to a signal with its reference to digital ground without
connecting the grounds together.

Phil

Phil Keller wrote:

{Quote hidden}

--
===========================================
PK Consulting
Phil Keller
Fremont, Ca

.....PhilKILLspamspam.....PKConsulting.net



2005\08\09@185232 by Bob Blick

face picon face
> The peak detector is what I described, without knowing what it was
> called.  It is sufficient for what I need.  (This is not precision, just
> an indication of relative volume level.)  My problem is before that.  I
> need to be able to translate an audio signal that is referenced to audio
> ground to a signal with its reference to digital ground without
> connecting the grounds together.

Hi Phil,

You're looking for a differential amplifier or instrumentation amplifier.

Are the two grounds tied together somewhere? Because if they are not at
the same voltage you will need to do pay attention to that when you design
your amp.

Cheerful regards,

Bob


2005\08\10@054606 by Michael Rigby-Jones

picon face


{Quote hidden}

A good, old fashioned transformer would also do the job, but of course the resulting signal will be AC so will need rectifying for the peak detector.

Regards

Mike

=======================================================================
This e-mail is intended for the person it is addressed to only. The
information contained in it may be confidential and/or protected by
law. If you are not the intended recipient of this message, you must
not make any use of this information, or copy or show it to any
person. Please contact us immediately to tell us that you have
received this e-mail, and return the original to us. Any use,
forwarding, printing or copying of this message is strictly prohibited.
No part of this message can be considered a request for goods or
services.
=======================================================================

2005\08\10@075005 by Gerhard Fiedler

picon face
Phil Keller wrote:

> The peak detector is what I described, without knowing what it was
> called.  It is sufficient for what I need.  (This is not precision, just
> an indication of relative volume level.)  My problem is before that.  I
> need to be able to translate an audio signal that is referenced to audio
> ground to a signal with its reference to digital ground without
> connecting the grounds together.

Why do you not want to (or why can't you) connect e.g. a PIC's ground to
the analog reference ground? Depending on what you want to achieve, the
ways to do it will be different.

Gerhard

2005\08\10@075327 by Gerhard Fiedler

picon face
Vasile Surducan wrote:

>> I am trying to take an analog signal (out of an MP3 player) and
>> determine its signal amplitude with the PIC's A2D input.  I would like
>> to keep the sampling frequency down (to reduce the clock speed and save
>> power) so I thought of adding a large cap outside the PIC in parallel
>> with a resistor to ground to hold the level.
>
> The sampling frequency must be in agreement with the Nyquist theorem,
> you must have a bigger sampling frequency than 2x of your maximum analog
> signal frequency.

That's only if you want to sample the original /waveform/. Since the OP
wants to sample the volume, the situation is different.

> Adding a cap will create a crude low pass filter at the AD input, egual
> with loosing your frequency bandwith of the analogic signal

Yes, but that's exactly what e.g. the VU meters on tape recorders do (even
the electronic ones that wouldn't have to do it). They do it because for
certain applications, what you want to know is a running average of the
volume.

Gerhard

2005\08\10@121923 by Phil Keller

flavicon
face
My original design had the PIC ground and the analog ground connected
together.  THEN I read the specification for the player and it says
"Analog return - Signal, never to be grounded inside attached device."  
I do not have access to the internals of the device only the interface
specification but since it is a battery powered device I assume (and
that is usually dangerous) that the Analog return is set to a bias point
above DGnd and the audio signal is +/- the return potential.

It's beginning to look like a unity gain differential OP-Amp is in my
future.  Man I hate the addition cost and board area but it may be the
only solution.

Phil

Gerhard Fiedler wrote:

{Quote hidden}

--
===========================================
PK Consulting
Phil Keller
Fremont, Ca

@spam@PhilKILLspamspamPKConsulting.net



2005\08\11@063029 by Gerhard Fiedler

picon face
Phil Keller wrote:

> My original design had the PIC ground and the analog ground connected
> together.  THEN I read the specification for the player and it says
> "Analog return - Signal, never to be grounded inside attached device."  
> I do not have access to the internals of the device

Are you going to power your circuit from the same power source as the MP3
player? Can't you open it and take a peek? Mostly the analog section is not
that complex. This phrase doesn't necessarily mean that you can't connect
the two grounds, if I understand it correctly (without its context).

Can you at least look at the output with a scope -- referenced to the MP3
output ground? A capacitor (to block any DC) and two resistors (to bias the
AC at half the supply voltage) may be all you need.

Gerhard

2005\08\11@065835 by Gerhard Fiedler

picon face
Gerhard Fiedler wrote:

>> My original design had the PIC ground and the analog ground connected
>> together.  THEN I read the specification for the player and it says
>> "Analog return - Signal, never to be grounded inside attached device."  
>> I do not have access to the internals of the device

> Can you at least look at the output with a scope -- referenced to the MP3
> output ground?

That should have been "referenced to the ground you want to hook your PIC
to". Or better both. And look at the analog ground, referenced to the PIC
ground.

Gerhard

2005\08\11@081332 by Alan B. Pearce

face picon face
>> My original design had the PIC ground and the analog ground connected
>> together.  THEN I read the specification for the player and it says
>> "Analog return - Signal, never to be grounded inside attached device."
>> I do not have access to the internals of the device
>
>Are you going to power your circuit from the same power source as the MP3
>player? Can't you open it and take a peek? Mostly the analog section is not
>that complex. This phrase doesn't necessarily mean that you can't connect
>the two grounds, if I understand it correctly (without its context).

You will probably find the analogue ground is at half the digital rail
voltage. I have some analogue FPGA devices where they do exactly that.

>Can you at least look at the output with a scope -- referenced to the MP3
>output ground? A capacitor (to block any DC) and two resistors (to bias the
>AC at half the supply voltage) may be all you need.

This may well be all that is needed - some way of blocking the DC
connection. certainly worth a try, and if it does not work well, then you
have the fallback position of a differential amplifier.

2005\08\12@074208 by Gerhard Fiedler

picon face
Alan B. Pearce wrote:

>>> My original design had the PIC ground and the analog ground connected
>>> together.  THEN I read the specification for the player and it says
>>> "Analog return - Signal, never to be grounded inside attached device."
>>> I do not have access to the internals of the device
>>
>>Are you going to power your circuit from the same power source as the MP3
>>player? Can't you open it and take a peek? Mostly the analog section is not
>>that complex. This phrase doesn't necessarily mean that you can't connect
>>the two grounds, if I understand it correctly (without its context).
>
> You will probably find the analogue ground is at half the digital rail
> voltage. I have some analogue FPGA devices where they do exactly that.

If that is the case, then another option would be to use a double-peak
detector (max and min peaks), and reference them (in the PIC) to the analog
ground.

Gerhard

More... (looser matching)
- Last day of these posts
- In 2005 , 2006 only
- Today
- New search...