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 from Howard's! Chez Mosc
Please visit the chat
 Forum index » DIY Hardware and Software
Circuit Design Issue
Post new topic   Reply to topic Moderators: jksuperstar, Scott Stites, Uncle Krunkus
Page 1 of 1 [9 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
BARD



Joined: Nov 21, 2015
Posts: 5
Location: Portland, OR

PostPosted: Sat Nov 21, 2015 5:51 pm    Post subject: Circuit Design Issue
Subject description: LM324 amplifcation circuit into 7414 hex schmitt trigger inverter
Reply with quote  Mark this post and the followings unread

Hey all,

I am designing a drum trigger circuit to clock sequencers.

I started by designed a dbounce circuit using the 7414 and a momentary push button. This part of the circuit is represented in the attached schematic on the right side. The circuit worked well with the momentary switch and so I started to design an auxiliary input to allow piezos/mics to trigger the 7414 as well.

I introduced a 3904 transistor and this worked well. I could tap the piezo and it would generate a 5v pulse out of the 7414. I went to go use this with a bass drum and found that it would only trigger off the more intense/direct vibrations from the drum. I wanted both the rim and drum head to trigger the 7414 so I decided to design an amplification circuit to increase the gain coming from the piezo.

I designed an amplification circuit with an LM324, represented on the left side of the schematic. Because I had already built/soldered a prototype of the 7414 circuit, I made a prototype of the amplification circuit separately. They each had their own power supply headers coming off the 5v rail of a distribution board (I am designing it for eurorack). I put a jack at the output of the LM324 and patched it to the input of the 7414 circuit with a patch cable. This worked very well. I was able to use a potentiometer to increase/decrease the gain of the piezo and was able to tune in the trigger amount to where I wanted it.

At this point I decided the circuit was complete. I designed the schematic attached to this post and sent it off to get made into a PCB. I got it back in the mail and build it up. It appeared to work well. The momentary switch worked perfectly and I was able to generate triggers with a piezo going into the input.

I went to go test the board with a bass drum as I had with the protoype. But I found that it was still only triggering from direct vibrations. It was acting as if the amplification circuit wasn't doing anything.

I checked the board against the schematic and it was spot on. So I decided to breadboard the circuit off the schematic from eagle. I was still having the same issue after breadboarding. I decided to check the output from the LM324 on a scope and I noticed it was only outputting 1V with each peizo hit. But when I disconnect the wire from the LM324 to the trigger circuit, the output shoots up to 5v with each hit as it was designed to do.

I need the output of the LM324 to output 5v with each hit in order for it to properly trigger the 7414 but when I connect the two circuits it cuts the LM324 output down to 1v. I'm not sure why this worked when I had two separate prototype circuits (amplification and trigger) and patched them together with a patch cable.

Is it a buffering issue? Any ideas would be helpful.

Thanks so much. This is my first post on here Shocked
-Zach


trigger circuit sch.JPG
 Description:
 Filesize:  28.58 KB
 Viewed:  50 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

trigger circuit sch.JPG


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



Joined: Feb 27, 2013
Posts: 203
Location: San Diego

PostPosted: Sat Nov 21, 2015 7:56 pm    Post subject: Reply with quote  Mark this post and the followings unread

You need a resistor between the output of the LM324 and the base of the 3904. 1k will probably do.

I would consider replacing the 3904 and LM324 as it's possible you've damaged one or both.

The patch cable may have provided enough resistance for it to function, but when you integrated the two parts together on the same board you reduced the resistance of the connection.

Without getting into too much detail, the base and emitter of a BJT basically form a diode which needs a current limiting resistor (like and LED does). That's why you only see 1V out of the LM324 when it's connected. You've essentially created a short circuit. Google BJTs to learn more about them, lots of info out there.

_________________
My synth build blog: http://gndsynth.blogspot.com/
Back to top
View user's profile Send private message
BARD



Joined: Nov 21, 2015
Posts: 5
Location: Portland, OR

PostPosted: Sat Nov 21, 2015 8:22 pm    Post subject: Reply with quote  Mark this post and the followings unread

Hey Gdavis,

Thanks for your reply!

That was one of the first things I considered when trying to fix this circuit. I just tried it out again with a few different resistors (1, 100, 1k, and 10k) and it did not solve the issue.

Double checked to make sure the LM324 was working by disconnecting it from the rest of the circuit. Took a measurement from the output and it is working still as it should.

Checked the 3904 and it is also working as it should but I switched it out with a fresh one just to be sure.

-Zach
Back to top
View user's profile Send private message
gdavis



Joined: Feb 27, 2013
Posts: 203
Location: San Diego

PostPosted: Sat Nov 21, 2015 8:31 pm    Post subject: Reply with quote  Mark this post and the followings unread

BARD wrote:
Hey Gdavis,

Thanks for your reply!

That was one of the first things I considered when trying to fix this circuit. I just tried it out again with a few different resistors (1, 100, 1k, and 10k) and it did not solve the issue.

Did you tap the feedback before or after the resistor? Should be before.

Quote:
Double checked to make sure the LM324 was working by disconnecting it from the rest of the circuit. Took a measurement from the output and it is working still as it should.

Don't trust that it's working when it's not driving anything. It may be able to provide the correct voltage without a load, but as soon as it's loaded it can't supply the current.

Also, if I'm not mistaken it looks like your piezo input is going to create a negative pulse to the opamp when you want a positive one. There might be a little bit of a positive pulse when it recovers which is probably why it triggers but needs amplifying. If you got your polarities right the amplification may not be necessary.

_________________
My synth build blog: http://gndsynth.blogspot.com/
Back to top
View user's profile Send private message
BARD



Joined: Nov 21, 2015
Posts: 5
Location: Portland, OR

PostPosted: Sat Nov 21, 2015 8:51 pm    Post subject: Reply with quote  Mark this post and the followings unread

I probed it with the scope both before and after the resistor.

I switched out the LM324 as well and tried it over again with the added resistor and it yielded the issue I've been having.

And yes! I realized I drew the jacks incorrectly on this schematic. I sent it out like this and didnt know why it wasnt working when I got it back. I noticed my mistake later and fixed it. It was a really ridiculous error haha.

Also, the piezo by itself does not trigger enough for what I'm using it for. I want to be able to increase the gain to make it super sensitive to any vibration.
Back to top
View user's profile Send private message
gdavis



Joined: Feb 27, 2013
Posts: 203
Location: San Diego

PostPosted: Sat Nov 21, 2015 10:07 pm    Post subject: Reply with quote  Mark this post and the followings unread

BARD wrote:
I probed it with the scope both before and after the resistor.

I think you may have misunderstood me. I'm asking where the feedback (gain pot) is connected.

Quote:
I switched out the LM324 as well and tried it over again with the added resistor and it yielded the issue I've been having.


So even with the 1k resistor connected you still only see 1V directly out of the opamp (before the resistor)? That's baffling, I can't imagine that happening with everything connected correctly.

Quote:
And yes! I realized I drew the jacks incorrectly on this schematic. I sent it out like this and didnt know why it wasnt working when I got it back. I noticed my mistake later and fixed it. It was a really ridiculous error haha.

Ha, I didn't even notice that, but that's not what I meant. I don't know, you say the original prototype was working so maybe I'm wrong but from my experience with piezos you should get a negative pulse (backwards jack notwithstanding).

Quote:
Also, the piezo by itself does not trigger enough for what I'm using it for. I want to be able to increase the gain to make it super sensitive to any vibration.

Variable sensitivity is certainly nice to have, nothing wrong with that, just not sure that you aren't getting reduced sensitivity due to the negative pulse I mentioned above.

I'm not sure I'm following everything you've done, maybe I can try and breadboard it up myself and see what's going on. Do you have a link to the piezo element you're using?

_________________
My synth build blog: http://gndsynth.blogspot.com/
Back to top
View user's profile Send private message
BARD



Joined: Nov 21, 2015
Posts: 5
Location: Portland, OR

PostPosted: Sun Nov 22, 2015 1:55 pm    Post subject: Reply with quote  Mark this post and the followings unread

Quote:
I'm asking where the feedback (gain pot) is connected.


Sorry I misunderstood you. The gain pot is shown in the schematic. Leg 1 feeds back into the non inverting input and leg 2 receives the out put on the LM324.

Quote:
from my experience with piezos you should get a negative pulse

I did notice this when I first started working with this circuit. It still worked well. The M324 amplifies the positive pulse that follows the negative pulse. And since the LM324 is a single supply, it doesn't amplify the negative.

HOWEVER, I probably could have just used an inverting amplifier. Don't see any reason it wouldn't work and maybe it will give me better results.

The only issue is if I ever want to use this circuit with other types of microphones and instruments, will an inverting amplifier be an issue?


Quote:
Variable sensitivity is certainly nice to have, nothing wrong with that, just not sure that you aren't getting reduced sensitivity due to the negative pulse I mentioned above.


And yah I see what you're saying. It must be amplifying the 2nd transient from the piezo - the positive upswing. Not sure the exact term for it. But it has worked perfectly as two separate modules. I've been able to decrease and increase the sensitivity with my gain pot so that it triggers off of the lightest drum hits or barely triggers unless I hit a spot on the rim close to where the piezo is mounted.

That is what's blowing my mind right now. It has worked. I've used it. I've seen it work exactly the way I wanted. But there's some issue with having it in the same circuit.

If you think it could be the resistance between the two separate modules then maybe I was connecting something incorrectly when I tried it out. Although I'm pretty sure I did it right.

I'm also wondering if there's some sort of buffering issue. I tried a unity gain follower between the circuits on the breadboard but that did nothing.

Again I appreciate your responses. They've been helpful regardless of the unsolved mystery.
Back to top
View user's profile Send private message
gdavis



Joined: Feb 27, 2013
Posts: 203
Location: San Diego

PostPosted: Sun Nov 22, 2015 5:20 pm    Post subject: Reply with quote  Mark this post and the followings unread

BARD wrote:
Quote:
I'm asking where the feedback (gain pot) is connected.


Sorry I misunderstood you. The gain pot is shown in the schematic. Leg 1 feeds back into the non inverting input and leg 2 receives the out put on the LM324.

Ya, but the resistor isn't shown. I wanted to make sure that the pot is connected directly to the opamp output and not after the resistor.

Quote:
Quote:
from my experience with piezos you should get a negative pulse

I did notice this when I first started working with this circuit. It still worked well. The M324 amplifies the positive pulse that follows the negative pulse. And since the LM324 is a single supply, it doesn't amplify the negative.

HOWEVER, I probably could have just used an inverting amplifier. Don't see any reason it wouldn't work and maybe it will give me better results.

An inverting amp would probably fix the polarity, but I don't think it's necessary. You can just reverse the resistor and piezo so that the piezo is connected to 5V, the other end is connected to the resistor and the resistor is connected to ground. This should give a positive going pulse.

Quote:
The only issue is if I ever want to use this circuit with other types of microphones and instruments, will an inverting amplifier be an issue?

By itself, no. If you're combining the signal with another (i.e. if you used two mic's on something and ran them to two different preamps) you could have phase issues.


Quote:
Quote:
Variable sensitivity is certainly nice to have, nothing wrong with that, just not sure that you aren't getting reduced sensitivity due to the negative pulse I mentioned above.


And yah I see what you're saying. It must be amplifying the 2nd transient from the piezo - the positive upswing. Not sure the exact term for it.

Good, sounds like we're on the same page Smile

Quote:
But it has worked perfectly as two separate modules. I've been able to decrease and increase the sensitivity with my gain pot so that it triggers off of the lightest drum hits or barely triggers unless I hit a spot on the rim close to where the piezo is mounted.

Ya, I don't think the polarity thing is the cause of it not working, just something I noticed.

Quote:
That is what's blowing my mind right now. It has worked. I've used it. I've seen it work exactly the way I wanted. But there's some issue with having it in the same circuit.

If you think it could be the resistance between the two separate modules then maybe I was connecting something incorrectly when I tried it out. Although I'm pretty sure I did it right.

Ya, this kind of thing is frustrating. Real circuits have parasitic capacitance, resistance and inductance. This is going to change between the patched circuits and the combined circuit. So assuming you didn't make any mistakes this is what I'm focusing on.

There may be more than one thing going on.

You absolutely need a resistor between the opamp and transistor to prevent damage. Any functionality you get out of the circuit without that is just going to be luck. So that's one issue, but if it still doesn't work, we need to look at other things.

Another possibility might be that the pulse is too quick. The capacitance of the patch cord might have lengthened the pulse allowing the circuit to work, but when you combined the circuits you lowered that capacitance and narrowed the pulse to the point that it doesn't trigger the inverter.

Quote:
I'm also wondering if there's some sort of buffering issue. I tried a unity gain follower between the circuits on the breadboard but that did nothing.

I don't think it's a buffer issue, the opamp shouldn't have any trouble driving the transistor (assuming the opamp and transistor haven't been damaged by being connected without the resistor).

Quote:
Again I appreciate your responses. They've been helpful regardless of the unsolved mystery.


No problem, sorry I haven't been able to solve it. Need to keep going through step by step. You still haven't told me exactly what's happening when you put the resistor in between the opamp and transistor. Does the opamp output look OK? Do you see a pulse on the collector of the transistor? Do you still see it at the inverter input?

_________________
My synth build blog: http://gndsynth.blogspot.com/
Back to top
View user's profile Send private message
BARD



Joined: Nov 21, 2015
Posts: 5
Location: Portland, OR

PostPosted: Mon Nov 23, 2015 7:05 pm    Post subject: Reply with quote  Mark this post and the followings unread

I threw a 1k resistor from the lm324 output into the 3904 again. Then I took a measurement before the resistor which I thought I had already done....but apparently I didnt because I'm now getting a little under 4 volts out of the 324!

I havent been able to fully test out whether or not this will fix the mystery of why the proto works and the PCB doesn't. I need to test it out with a real drum I think.

When I take the measurements after the resister going into the 3904, it is still only putting around 1v into the transistor. From what you've said this is normal and I believe you! But whats the science behind this? Is there really no way to overdrive the base of the 3904?

Thanks for your help, for real! I'm feeling good about this.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Moderators: jksuperstar, Scott Stites, Uncle Krunkus
Page 1 of 1 [9 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
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