electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Articles  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links  |  Store
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
Live streaming at radio.electro-music.com

  host / artist show at your time
  Twyndyllyngs Live tonight Chez Mosc
Please visit the chat
 Forum index » DIY Hardware and Software » Lunettas - circuits inspired by Stanley Lunetta
Trying to solve a stuck state pushbutton gated oscillator.
Post new topic   Reply to topic Moderators: mosc
Page 1 of 1 [13 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
Musica_En_Fuego



Joined: Jun 19, 2018
Posts: 24
Location: New Castle, Delaware, USA

PostPosted: Fri Aug 02, 2019 11:29 pm    Post subject: Trying to solve a stuck state pushbutton gated oscillator.
Subject description: having some issues with pushbutton gated 4093 and a 4040.
Reply with quote  Mark this post and the followings unread

This issue has been driving me nuts. So, I have a push button gated 4093 connected to a 4040 IC. The issue i've been having is that whenever I release the button.

The output of the 4040 randomly stays in one state or the other. This wouldn't be much of an issue if I didn't have any LED connected.

I've tried to create an inverter using one of the other gates of the 4093 so it would output a positive state to the reset pin of the 4040 which should ground all the outputs.

But, well I kinda figured that would just create a standstill state.
I just want to get this damn project finished...
Back to top
View user's profile Send private message
JovianPyx



Joined: Nov 20, 2007
Posts: 1844
Location: West Red Spot, Jupiter
Audio files: 218

PostPosted: Sat Aug 03, 2019 5:02 am    Post subject: Re: Trying to solve a stuck state pushbutton gated oscillator.
Subject description: having some issues with pushbutton gated 4093 and a 4040.
Reply with quote  Mark this post and the followings unread

Musica_En_Fuego wrote:
This issue has been driving me nuts. So, I have a push button gated 4093 connected to a 4040 IC. The issue i've been having is that whenever I release the button.

The output of the 4040 randomly stays in one state or the other. This wouldn't be much of an issue if I didn't have any LED connected.

This could be a switch bounce problem.

Quote:
I've tried to create an inverter using one of the other gates of the 4093 so it would output a positive state to the reset pin of the 4040 which should ground all the outputs.

But, well I kinda figured that would just create a standstill state.
I just want to get this damn project finished...

For better answer details, it would be helpful if you could post a schematic.

_________________
FPGA, dsPIC and Fatman Synth Stuff

Time flies like a banana.
Fruit flies when you're having fun.
BTW, Do these genes make my ass look fat?
corruptio optimi pessima
Back to top
View user's profile Send private message Visit poster's website
PHOBoS



Joined: Jan 14, 2010
Posts: 4454
Location: Moon Base
Audio files: 625

PostPosted: Sat Aug 03, 2019 6:10 am    Post subject: Re: Trying to solve a stuck state pushbutton gated oscillator.
Subject description: having some issues with pushbutton gated 4093 and a 4040.
Reply with quote  Mark this post and the followings unread

How fast is the oscillator running ? Can you see the status of the LED before you release the button or does it run too fast for that ?
If you can't see it it makes sense it's 'random' otherwise it could indeed have something to do with switch bounce.

Also which output(s) of the 4040 are you using,. does is change or is it a fixed output ?

Quote:
I've tried to create an inverter using one of the other gates of the 4093 so it would output a positive state to the reset pin of the 4040 which should ground all the outputs.

This should work but I am not exaclty sure what you are trying to achieve, although I got a hunch it can be solved with a flipflop.
A schematic would of course also be helpful. Right now I assume you have 4093 oscillator with the other input connected to a
switch and the output connected to a 4040.

_________________
"My perf, it's full of holes!"
http://phobos.000space.com/
SoundCloud BandCamp MixCloud Stickney Synthyards Captain Collider
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Musica_En_Fuego



Joined: Jun 19, 2018
Posts: 24
Location: New Castle, Delaware, USA

PostPosted: Sat Aug 03, 2019 6:32 am    Post subject: Reply with quote  Mark this post and the followings unread

Here is a schematic.

https://drive.google.com/file/d/1-8pulU4UqYqbNQoP0eBOTpOb6IFxKRHv/view?usp=drivesdk
Back to top
View user's profile Send private message
PHOBoS



Joined: Jan 14, 2010
Posts: 4454
Location: Moon Base
Audio files: 625

PostPosted: Sat Aug 03, 2019 1:07 pm    Post subject: Reply with quote  Mark this post and the followings unread

I think this should work:


Button gated oscillator.gif
 Description:
 Filesize:  35.54 KB
 Viewed:  31 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

Button gated oscillator.gif



_________________
"My perf, it's full of holes!"
http://phobos.000space.com/
SoundCloud BandCamp MixCloud Stickney Synthyards Captain Collider
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Musica_En_Fuego



Joined: Jun 19, 2018
Posts: 24
Location: New Castle, Delaware, USA

PostPosted: Tue Aug 06, 2019 3:54 pm    Post subject: Reply with quote  Mark this post and the followings unread

You got damn genius. It finally works the way I wanted to work for the longest time. Now I can add the rest of the circuit. And I'll post the completed circuit once I'm finished with it.
Back to top
View user's profile Send private message
PHOBoS



Joined: Jan 14, 2010
Posts: 4454
Location: Moon Base
Audio files: 625

PostPosted: Tue Aug 06, 2019 4:11 pm    Post subject: Reply with quote  Mark this post and the followings unread

great to hear that works Very Happy

btw you can probably leave out U1c. I forgot that the 4040 counts on a high to low clock transition and I added U1c
so that when you push the button you immediately get a low to high transition. If it's for high frequencies
it doesn't make much of a difference though.

_________________
"My perf, it's full of holes!"
http://phobos.000space.com/
SoundCloud BandCamp MixCloud Stickney Synthyards Captain Collider
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Musica_En_Fuego



Joined: Jun 19, 2018
Posts: 24
Location: New Castle, Delaware, USA

PostPosted: Tue Aug 06, 2019 7:22 pm    Post subject: Reply with quote  Mark this post and the followings unread

PHOBoS wrote:
great to hear that works Very Happy

btw you can probably leave out U1c. I forgot that the 4040 counts on a high to low clock transition and I added U1c
so that when you push the button you immediately get a low to high transition. If it's for high frequencies
it doesn't make much of a difference though.


So i was close with my previous schematic. If only I experimented a little more. But i was a bit frustrated to see a solution.
Back to top
View user's profile Send private message
PHOBoS



Joined: Jan 14, 2010
Posts: 4454
Location: Moon Base
Audio files: 625

PostPosted: Wed Aug 07, 2019 7:20 am    Post subject: Reply with quote  Mark this post and the followings unread

Yes you were close I was actually surprised you didn't have the NAND for the reset connected to the button but instead to the oscillator.
I have no idea what you were trying to achieve with the capacitor connected to the first NAND gate though.

_________________
"My perf, it's full of holes!"
http://phobos.000space.com/
SoundCloud BandCamp MixCloud Stickney Synthyards Captain Collider
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
PHOBoS



Joined: Jan 14, 2010
Posts: 4454
Location: Moon Base
Audio files: 625

PostPosted: Wed Aug 07, 2019 5:54 pm    Post subject: Reply with quote  Mark this post and the followings unread

let my dissect the circuit a bit so you know exactly why it works although you will probably already understand it.

When the button isn't pressed the capacitor is charged through the resistor so both inputs of U1a are high and as a result the ouput is low.
When you press the button one input immediately goes low which results in the output going high. Because of the capacitor (which is now discharged)
and the resistor the pin can't go immediately high if there would be any switch bounce. This gets even improved because of the schmitt trigger
inputs of the NAND gate. (If you would add a much larger capacitor the ouput will stay high for a while after you release the button, which can be useful.
You can also replace the resistor with a potentiometer to make the time adjustable, but you do need to add a resistor in series with the pot)

When the gate input of the oscillator (U1b) is low (button not pressed) the output will be high and thus the capacitor is charged. When the gate input
goes high the output immediately goes low and then (after a short delay) it starts oscillating. When the button is released the output will return back
to a high state. With U1c it's the otherway around so it is in a low state when not oscillating.

U1d inverts the output of U1a so that the 4040 is reset when the button isn't pressed. Because there are actually 2 inverters in series (U1a & U1d)
you could also connect the reset input of the 4040 directly to the button (before U1a). But U1a helps with debouncing and if you're not using the
spare NAND gates for anything else you might aswell add it. There is also a small chance the 4040 would react a bit weird because the reset input
doesn't go high immediately as a result of the resistor and capacitor.

_________________
"My perf, it's full of holes!"
http://phobos.000space.com/
SoundCloud BandCamp MixCloud Stickney Synthyards Captain Collider
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Musica_En_Fuego



Joined: Jun 19, 2018
Posts: 24
Location: New Castle, Delaware, USA

PostPosted: Thu Aug 15, 2019 1:07 am    Post subject: Reply with quote  Mark this post and the followings unread

here is the complete schematic. Even though every looks about right. I'm getting some weird problems. it used to work just fine, but now for some reason it doesn't function properly. It may be the jumper wires/alligator clips.


Thank you for the explanation of the circuit. I didnt know that the RC circuit could affect the reset pin of the 4040.


schematics_gio.png
 Description:
 Filesize:  120.63 KB
 Viewed:  10 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

schematics_gio.png


Back to top
View user's profile Send private message
Steveg



Joined: Apr 23, 2015
Posts: 108
Location: Perth, Australia

PostPosted: Thu Aug 15, 2019 3:35 am    Post subject: Reply with quote  Mark this post and the followings unread

Hi Musica En Fuego,

I have some concerns about that circuit.
The switch on the far left shorts V+ directly to earth. That won't be good for your power supply. Possibly you need a high value resistor between the top of the switch and V+.
The DPDT switch in the centre shorts the outputs of the 4040 directly to earth which will probably destroy the 4040. Just leave that terminal of the switch un-connected.

That link from Pin 2 of the 386 to earth doesn't look good. Without checking the pin-out of the 386 I can't say what effect it will have but it could block the signal.

I'm not sure what the circle of dots at the bottom represents. As far as I can tell the trimpot should connect directly to the potentiometer.

Cheers!
Back to top
View user's profile Send private message
PHOBoS



Joined: Jan 14, 2010
Posts: 4454
Location: Moon Base
Audio files: 625

PostPosted: Thu Aug 15, 2019 6:21 am    Post subject: Reply with quote  Mark this post and the followings unread

yes, there are several errors in that schematic which Steveg already mentioned. Maybe you've actually connected things differently, but I can only go by how it is drawn.
1. The button/switch creates a dead short between V+ and GND.
2. The capacitor and resistor connected to the other input of the NAND gate have no use connected like that. (have another look at the schematic I posted)
3. The DPDT switch does indeed short the outputs of the 4040 to GND.
You actually don't need a DPDT switch there, you could just switch the input of the LM386 amp between the output of the NAND oscillator or the 4040.
If you do use a DPDT switch I would add a pulldown resistor to pin 10 of the 4040, although that's not really needed in this case. Also you'd normally add
a pulldown resistor to the point where all the diodes are connected together but in this case the level pot for the LM386 already takes care of that.
The LM386 is actually connected ok, although it looks a bit weird how it is drawn. The circle of dots seems to be a rotary switch but there's nothing connected
to the other contacts so I am not sure what its function is, but maybe you have some plans for that.

_________________
"My perf, it's full of holes!"
http://phobos.000space.com/
SoundCloud BandCamp MixCloud Stickney Synthyards Captain Collider
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic Moderators: mosc
Page 1 of 1 [13 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software » Lunettas - circuits inspired by Stanley Lunetta
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
e-m mkii

Please support our site. If you click through and buy from
our affiliate partners, we earn a small commission.


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use