Searching \ for '[SX] Wanting to detect no sound from a computers s' 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/ubicom/lib/io/index.htm?key=audi+sound
Search entire site for: 'Wanting to detect no sound from a computers s'.

Exact match. Not showing close matches.
PICList Thread
'[SX] Wanting to detect no sound from a computers s'
2006\10\16@104406 by Sparks-R-Funn/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Sparks-R-Fun wrote:

Kevin,
What comes to mind that might just do what you want is a VOX circuit.  VOX stands for Voice Operated Trans(X)mit.  People who use handheld radios for communication often like these circuits because they allow them to simply start talking without having to press a button to start the transmitter when they want to communicate.  Basically the circuit detects a certain level of sound and then switches on the transmitter for as long as the sound level persists plus some delay that allows for slight pauses or periods of lower volume.

This sounds like it should do exactly what you desire because the circuit will change its output state based upon whether or not it has detected any (loud enough) sounds recently.  Such a circuit can be found at  http://www.rason.org/Projects/basicvox/basicvox.htm, though there are many, many others around.  You may want to search for "VOX circuit".

You should be able to connect the PTT ("Push To Talk" - radio jargon) connection in the circuit I referenced directly to an SX pin configured for input since the transistor is simply pulling the connection to ground.

I hope this helps or at least gives you an idea where to look.

- Sparks
---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=149297#m149623
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2006 (http://www.dotNetBB.com)

2006\10\16@110521 by mgreenn/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, mgreen wrote:

The VOX circuit that Sparks mentioned is essentially an amplifier, a rectifier/filter, and a transistor switch that's intended to connect to a microphone level input.  Your sound card probably has a line level output (maybe 1V max) or a headphone output.  In both cases, you will need less amplification.  You may just need the diode and filter capacitor.  It all depends on the output circuitry of your sound card.

---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=149297#m149629
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2006 (http://www.dotNetBB.com)

2006\10\16@112129 by beann/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, bean wrote:

Kevin,
 If you use the built-in comparitor, you can probably must rectify the speaker output, filter it with a cap, and connect it to the comparitor input through a resistor (10K ?).

Then adjust the other input to the comparitor to the threshold level.

Bean.

---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=149297#m149632
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2006 (http://www.dotNetBB.com)

2006\10\16@193054 by DigitalDjn/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, DigitalDj wrote:

I probably wouldn't want to go over 5 volts on the pins of the SX which i don't think will be a problem. The bad thing i can think of is rectifying the audio out of the sound card would maybe be ok but filtering it will have an effect on the sound quaility unless i use a audio transformer to isolate the circuit.

Bean,
Have you ever programmed anything similar to this with the comparitors?

Thanks,
Kevin
---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=149297#m149741
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2006 (http://www.dotNetBB.com)

2006\10\16@211425 by mgreenn/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, mgreen wrote:

DigitalDJ,
I was going to suggest an audio transformer originally.  Pick up either an 8 ohm to maybe 300-1000 ohm transformer or a 1:1 transformer if you've got a line output and use a bridge rectifier to feed a small filter capacitor.  Decide on the time constant you want for the reaction time for sound on or sound off and pick a resistor to put across the capacitor to discharge it based on the time constant.  Connect the negative side to ground and use a 10K to 100K resistor between the positive side and the SX pin.  The SX will see a high any time the rectified voltage is above roughly 1.4V (without using the comparator).  If you want, you could put a volume control somewhere in the circuit to set the trigger level.
Mike
---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=149297#m149762
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2006 (http://www.dotNetBB.com)

2006\10\17@003738 by g_daubachn/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, g_daubach wrote:

Kevin,
I would not worry about the sound quality when rectifying and filtering the audio signal as long as you take care that the load attached to the soundcard's line out is not too low. Using a tranformer does not reduce the load when you use a 1:1 transformer.

I like Bean's idea using the comparator, as this seems to me the solution requiring a minimum of external components - see the attached schematic. I only estimated the component values, so some experimenting might be in order but using a relatively large resistor in series with the audio signal makes sure that the sound card almost does not "see" this circuit, i.e. there is a minimum load only.

---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=149297#m149770
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2006 (http://www.dotNetBB.com)

2006\10\17@185351 by DigitalDjn/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, DigitalDj wrote:

The sound that will be coming out of the sound card will also be going to an amp so that's why i didn't won't to risk the chance of changing the sound quality. Correct me if i'm wrong but using the diode inline with the audio and then having the capacitor after it then the diode should decouple it from the line correct?

I will try theseideas and see what i come up with! I am waiting on my SX48 board. I may need help on programming the comparators which i can do with my SX28 f it is not to different from the 48. I went with the 48 because i needed more outputs to control.

Thanks for the ideas guys!

Kevin

Bean,
I still have a simple led program you helped me with, if i need to repost this i can if you want to help and show me how to use the comparators.

Thanks,
Kevin
---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=149297#m149961
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2006 (http://www.dotNetBB.com)

2006\10\18@003613 by g_daubachn/a
flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, g_daubach wrote:

Kevin,
in the schematic I have suggested, decoupling is done by the resistor in series with the audio signal, and not with the diode.

Using the comparator is pretty easy:

; Configuring the comparator
 mode $08  ; access CMP_B
 mov w, #%01000000
 mov !rb, w  ;enable comparator, do not enable comp. output at rb.0
; Insert a delay to allow comparator to respond
; Reading the comparator (same as above)
 mode $08  ; access CMP_B
 mov w, #%01000000
 mov !rb, w  ;enable comparator, do not enable comp. output at rb.0, and copy comp. result into w
; When bit 0 in w is set (w = 1), the voltage at rb.2 is greater than the voltage at rb.1
When you don't neet port pin rb.0 for other purposes, you could enable the comparator output (write %00000000 to !rb instead of %01000000). You then can directly check the state of rb.0 for the current comparator result, i.e. you don't need to execute the second
 mode $08  ; access CMP_B
 mov w, #%01000000
 mov !rb, w  ;enable comparator, do not enable comp. output at rb.0, and copy comp. result into w in a loop for reading the result.

Assuming the potentiometer is set correctly, the comparator status would be 1 for no audio, and 0 for audio. You can always exchange the rb.1 and rb.2 pins if you like an inverted result, i.e. 1 for audio, and 0 for no audio.

---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=149297#m150012
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2006 (http://www.dotNetBB.com)

2006\10\18@175952 by DigitalDjn/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, DigitalDj wrote:

I will give this a try thanks!

Is there any differences that i need to change when going from the SX28 to the 48 from a simple SX28 program?

Thanks,
Kevin
---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=149297#m150194
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2006 (http://www.dotNetBB.com)

2006\10\19@021513 by g_daubachn/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, g_daubach wrote:

Kevin,
IMO, the detection should work with a relatively low level on the audio line, as the comparator reacts on the voltage difference between the rb.1 and rb.2 pins. Let's assume, you adjust the potentiometer for 0.5V between Vss and rb.2, the comparator output will change its state when the rectified and filtered audio signal betwwen Vss and rb.1 exceeds 0.5V by some Millivolts. The SX28 data sheet specifies the typical minumum input offset voltage as +-10mV for an input voltage in the range from 0.4V to Vdd-1.5V. So when the rectified and filtered audio signal at rb.1 is 0.5V or more, you are in good shape. Use the potentiometer to adjust the minimum audio level that shall be interpreted as valid audio signal.

When using an SX48, there are some differences concerning the MODE register (besides other differences). Instead of mode $08 in my previous example, you need to use the instructions mov w, $18
mov m, w instead.

Are you planning to write your application in assembly, or in SX/B? When using SX/B, the compiler will handle the differences between the SX28 and the SX48. As I'm not too experienced in SX/B, maybe someone else can bail in with a demonstration how to deal with the comparator in an SX/B application.

---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=149297#m150270
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2006 (http://www.dotNetBB.com)

2006\10\20@182945 by DigitalDjn/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, DigitalDj wrote:

Gunther,
Yes i would like to do it in SXB!

Thanks,
Kevin
---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=149297#m150660
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2006 (http://www.dotNetBB.com)

2006\10\25@184733 by DigitalDjn/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, DigitalDj wrote:

Can someone show me how working with the comparotors is done in SX Basic like Gunther did in assembly?

Kevin
---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=149297#m151574
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2006 (http://www.dotNetBB.com)

2006\10\25@185644 by beann/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, bean wrote:

Did you try the SX/B help file ?
Reference->Compare->Example (in upper right corner)
Bean.

---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=149297#m151576
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2006 (http://www.dotNetBB.com)

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