Open a circuit with a small delay. How?

Thread Starter

gnolivos

Joined Jul 14, 2011
28
I have an Adafruit SoundFX board that runs on 4.5V.
There are several terminals on the board that allow sounds to be played. You simply connect a terminal to ground and it will play a sound. Generally I achieve this via a pushbutton that shorts the terminal to ground.

Now, for complicated reasons not worth detailing I need to close two terminals at the same time (i.e. 2 different sounds at the same time, but then the tricky part is when I release the button I need terminal 1 to release immediately while terminal 2 to release shortly AFTER (0.1 secs or so). Net, how can I device a way to close simultaneously, yet open with a small delay between the 2? Simplifying the problem: Heck may if someone can point me to a way to close a momentary switch immediately (hold close), and yet open it after a delay when "opened" (hold release).

I don't think there is voltage running through those terminals, certainly not the 4.5V circuit.... not sure how to approach this. Purely mechanical I think is out of the question as I am not aware of switches that are delayed (except a relay etc).

Is there a simple passive way to achieve this? Other alternatives?
 

Marley

Joined Apr 4, 2016
502
So if you are grounding the terminal, there must be some kind of "pull - up" on the circuit board. This must be a certain current - which could be measured. You could do this by connecting a current meter (DVM on micro-amp range) between the input and ground.
If you connect a small capacitor from the terminal to ground it will charge up with this current in a time dependent on the value of the capacitor and the current. This should give your release delay.
You could have different values of capacitor on different inputs - or no capacitor at all for "instant" release.
To use a single push button, use a diode from each input to the push button - cathode end to the button. This will seperate the inputs when the button is released.
 

Thread Starter

gnolivos

Joined Jul 14, 2011
28
So if you are grounding the terminal, there must be some kind of "pull - up" on the circuit board. This must be a certain current - which could be measured. You could do this by connecting a current meter (DVM on micro-amp range) between the input and ground.
If you connect a small capacitor from the terminal to ground it will charge up with this current in a time dependent on the value of the capacitor and the current. This should give your release delay.
You could have different values of capacitor on different inputs - or no capacitor at all for "instant" release.
To use a single push button, use a diode from each input to the push button - cathode end to the button. This will seperate the inputs when the button is released.
Ah this makes sense. I will give it a try with a small cap and see what kind of release delay I get first. Then will use the diode for single way current as you've described... will report back!
 

Thread Starter

gnolivos

Joined Jul 14, 2011
28
I just checked and the voltage is 3V across the terminals and ground. More than I thought!

What size cap would give me a 0.1 sec delay?
 

Marley

Joined Apr 4, 2016
502
The important thing is the current. Switch your meter to current and measure. Will probably be quite small in the region of microamps (0.000001A to 0.0001A) .
Then you can approximately calculate the delay.
Or try a 10uF capacitor and see what happens. Larger value capacitor = longer delay.
 

Thread Starter

gnolivos

Joined Jul 14, 2011
28
Thanks Marley.
I researched and found some calculators online, on this very site.. They call for a capacitor AND a resistor in series. The values of 100uF and 1Kohm yields a 0.1 sec dis charge.

Not sure why the resistor is needed but I will test this on my protoboard and report back.
 

Marley

Joined Apr 4, 2016
502
The timing resistor is inside the device. This is what generates the pull-up current.
This is why it would be good to measure the current. Gives some idea of the value of the internal resistor.
Also it would be good to have a low value resistor in series with the button. 100 ohms or so. This is to limit the current when the capacitors discharge through the button. Nothing to do with the time delay , Just to be nice to the button contacts and the diodes!
 

Thread Starter

gnolivos

Joined Jul 14, 2011
28
Ok I measured 29 uAmp from the terminals to ground.

Also I tested on my proto board with a 22pF cap and I actually don’t ever get the circuit to “close”. It basically never shows continuity from one end of the cap to the other, even when connecting one end to a terminal, the other to ground. Not sure what’s going on. I will keep on playing with it.
 

djsfantasi

Joined Apr 11, 2010
9,156
Continuity tests apply a small voltage in order to determine continuity. With a cap, once the cap charges there will be no continuity. Caps block DC.

The time to charge a 22pF cap with a multimeter is dependent on the internal resistance of the meter. Call it R. Thus the time to charge is 22Rx10^-12 seconds. You probably can’t detect it.
 

Thread Starter

gnolivos

Joined Jul 14, 2011
28
So it would appear the timing resistor inside the device is of 100k ohm. Using ohms law that is, 3V/30uAmp=100k ohm.
With this, I calculated that a 1uF cap would yield a 0.1sec discharge delay.

I tested it an it works a few times then not at all. Still messing with it. I will post a pic of my circuit next.
 

Thread Starter

gnolivos

Joined Jul 14, 2011
28
I decided to test the simple concept first. In this circuit, if I hold the switch it will first close the circuit but as soon as the capacitor charges the circuit is effectively open again even as I continue to push the button. (Because the charged cap I assume acts as an open gate).
This isn’t gonna work for me. I need the circuit to remain closed for as long as I am holding the button down, and then I need a delay for the circuit to open once I release the button.
Can someone draw me a circuit that would do what I am asking for? Maybe then I’ll understand a little better.
 

Attachments

Reloadron

Joined Jan 15, 2015
7,501
Reading the data sheet I was not aware you could trigger more than one pin at a time? There are 5 trigger options they cover.

Trigger Effects
What do we mean by trigger effects? Well, depending on your project you may need to have audio play in different ways. We thought of the five most common needs and built it into the Sound Board so you just rename the file to get the effect you want.

1. Basic Trigger - name the file Tnn.WAV or Tnn.OGG to have the audio file play when the matching trigger pin nn is connected to ground momentarily
2. Hold Looping Trigger - name the file TnnHOLDL.WAV or .OGG to have the audio play only when the trigger pin is held low, it will loop until the pin is released
3. Latching Loop Trigger - name the file TnnLATCH.WAV or .OGG to have the audio start playing when the button is pressed momentarily, and repeats until the button is pressed again
4. Play Next Trigger - have up to 10 files play one after the other by naming them TnnNEXT0.WAV thru TnnNEXT9.OGG. Will start with #0 and each one on every momentary button press until it gets through all of them, then go back to #0
5. Play Random Trigger - just like the Play Next trigger, but will play up to 10 files in random order (TnnRAND0.OGG thru TnnRAND9.OGG) every time the button is pressed momentarily

Along the lines of what was already known:
Trigger Pins
Finally, we're at the trigger pins!
These are the 11 inputs that can be used to trigger audio playing. We'll go over how to set the file for each pin in a later page.
Each pin has a pullup resistor, use a button/switch to connect to ground when pressed in order to 'trigger' it. The board has debouncing logic built in.

Reading the initial post which began the thread:
Now, for complicated reasons not worth detailing I need to close two terminals at the same time (i.e. 2 different sounds at the same time, but then the tricky part is when I release the button I need terminal 1 to release immediately while terminal 2 to release shortly AFTER (0.1 secs or so). Net, how can I device a way to close simultaneously, yet open with a small delay between the 2? Simplifying the problem: Heck may if someone can point me to a way to close a momentary switch immediately (hold close), and yet open it after a delay when "opened" (hold release).
You are sure that two files can be played at the same time? I can see ways, albeit not simple, to get the timing you want with a button push I just don't see where the board itself will simultaneously play two files? What trigger effect (above) are you using?

Ron
 

Thread Starter

gnolivos

Joined Jul 14, 2011
28
Reading the data sheet I was not aware you could trigger more than one pin at a time? There are 5 trigger options they cover.

Trigger Effects
What do we mean by trigger effects? Well, depending on your project you may need to have audio play in different ways. We thought of the five most common needs and built it into the Sound Board so you just rename the file to get the effect you want.

1. Basic Trigger - name the file Tnn.WAV or Tnn.OGG to have the audio file play when the matching trigger pin nn is connected to ground momentarily
2. Hold Looping Trigger - name the file TnnHOLDL.WAV or .OGG to have the audio play only when the trigger pin is held low, it will loop until the pin is released
3. Latching Loop Trigger - name the file TnnLATCH.WAV or .OGG to have the audio start playing when the button is pressed momentarily, and repeats until the button is pressed again
4. Play Next Trigger - have up to 10 files play one after the other by naming them TnnNEXT0.WAV thru TnnNEXT9.OGG. Will start with #0 and each one on every momentary button press until it gets through all of them, then go back to #0
5. Play Random Trigger - just like the Play Next trigger, but will play up to 10 files in random order (TnnRAND0.OGG thru TnnRAND9.OGG) every time the button is pressed momentarily

Along the lines of what was already known:
Trigger Pins
Finally, we're at the trigger pins!
These are the 11 inputs that can be used to trigger audio playing. We'll go over how to set the file for each pin in a later page.
Each pin has a pullup resistor, use a button/switch to connect to ground when pressed in order to 'trigger' it. The board has debouncing logic built in.

Reading the initial post which began the thread:

You are sure that two files can be played at the same time? I can see ways, albeit not simple, to get the timing you want with a button push I just don't see where the board itself will simultaneously play two files? What trigger effect (above) are you using?

Ron
Ron:


Button 1 plays as long as it is kept pressed. When released it stops.
Button 2 plays once if clicked.
The trick is that the way this board works, if you press both then audio 1 plays ONLY. Button 2 is also pressed simultaneously but won’t play until button 1 is released and ends audio 1. But for audio 2 to play after audio1, you must release button 2 shortly after button 1. If you release both at the same tme then audio 2 doesn’t play.
I’ve tested it manually.
Basically I’m trying to overcome a limitation of the board.

Can you draw a circuit of what you have in mind?
 
Here is an idea.

1. You need an external switch
2. You need a de-bouncing circuit for the switch. e.g. http://www.labbookpages.co.uk/electronics/debounce.html
The device with the triangle and circle with the S shaped thing is a schmidt trigger inverter. This https://eu.mouser.com/datasheet/2/308/mm74c14-1193355.pdf may not be the best part. Unused input have to be tied to Vss or Vdd.
3. You trigger on an edge 2-monostables e.g. https://www.analog.com/en/products/ltc6993-1.html#product-overview
Pick the appropriate edge and appropriate part.

4. One has a longer time delay than the other.

To figure out what's the cheapest way, you need to find what size resistor will also act as a switch. A FET Optoisolator. Thos http://www.farnell.com/datasheets/1...26.2090509748.1580355638-513168693.1580355638 one isn;t available anymore, but you can see that the current changes it's on resistance.

You can get FET opto-isolators.

OPTOMOS relays are IC's that act like relays but only need about 1 mA of current. The FET portion would go across your current switches.

A tough circuit to put together for a first-timer.

One-shots are re-triggerable and non-retrigerable. non-retrigerable means that the timing period must end before another is started. You have to think that through too. Pushing the button 2x fast.
 

Reloadron

Joined Jan 15, 2015
7,501
Basically I’m trying to overcome a limitation of the board.
What I initially had in mind won't work. You may want to give the solution KISS presented a shot. My thinking involved using a few one shot timers and rather than a button to ground using a transistor (NPN) for that with the transistor(s) driven by a one shot.

Ron
 
You need a little bit of reverse engineering around the button area.
e.g.
1. Will a simple diode activate the button: Can you use an NPN transistor.
2. What maximum size resistor can you use: A FET optocoupler may work. A transistor optocoupler might work.
3. An OPTOMOS relay stands the best chance because of the low current, isolated output, low resistance output 1 mA needed.
 

Thread Starter

gnolivos

Joined Jul 14, 2011
28
I gave up on this. Bought a premade sound solution. Someone close the thread if you wish to do so.

I appreciate everyone's input very much!
 
Top