electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links
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 
 Forum index » DIY Hardware and Software » YuSynth
Sample and Hold problem
Post new topic   Reply to topic Moderators: Scott Stites
Page 1 of 1 [10 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
john trials



Joined: May 12, 2020
Posts: 14
Location: CT

PostPosted: Sun Nov 08, 2020 8:00 am    Post subject: Sample and Hold problem
Subject description: sample not accurate if input signal is decreasing in voltage
Reply with quote  Mark this post and the followings unread

see photo for illustration of my problem. You can see that the input signal (blue triangle wave) is VERY slow (2.5 seconds per division), yet the sample (yellow signal trace) can't keep up with it when the input is decreasing.

When the input gets faster (higher frequency) the samples really can't keep up, and the samples are always positive, since it seems like the sample capacitor cannot discharge fast enough.

schematic: https://www.yusynth.net/Modular/Commun/NOISE/NoiseSH-sch.jpg

My S&H works well only if the input signal is increasing in voltage. It doesn't sample correctly when the input signal is decreasing in voltage.

I have disconnected the power to the noise portion of the circuit, and the S&H problem still exists, so the noise is not causing the problem.

It seems like the "hold capacitor" (C5?) is not able to discharge fast enough to track a decreasing voltage. Yet it seems to me that if I add a resistor to allow C5 to discharge, then the HOLD function won't work well (the held signal will discharge, and decrease in voltage).

Any thoughts?


sample and hold problem.jpg
 Description:
 Filesize:  210.02 KB
 Viewed:  381 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

sample and hold problem.jpg


Back to top
View user's profile Send private message
blue hell
Site Admin


Joined: Apr 03, 2004
Posts: 24422
Location: The Netherlands, Enschede
Audio files: 297
G2 patch files: 320

PostPosted: Sun Nov 08, 2020 10:09 am    Post subject: Reply with quote  Mark this post and the followings unread

Hmm .. I'm not too good at FET's but .. juging it's data sheet ..

pin11 of U2 should be negative ..

If it is .. I'd either replace U2 (as it apparently won't go negative on it's output (and your scope should show that too then) .. or the FET .. as that thing should be symmetrical in operation .. it should be able to get charge out of the holding capacitor (C5) just as well as it can get it in.

And when that U2 pin 11 is not negative something is wrong with the power or the power lines I'd think.

And yeah ... a resistor will not make it better.

_________________
Jan
also .. could someone please turn down the thermostat a bit.
Posted Image, might have been reduced in size. Click Image to view fullscreen.
Back to top
View user's profile Send private message Visit poster's website
john trials



Joined: May 12, 2020
Posts: 14
Location: CT

PostPosted: Sun Nov 08, 2020 12:01 pm    Post subject: Reply with quote  Mark this post and the followings unread

U2 is powered +/-15v, and the output can go negative. In the photo, the sampled output does go negative.

I like your comment that the FET should be able to "get the charge out of the holding capacitor C5". Does the charge dissipate through R14?

I also forgot to mention that I could not get a BF245B FET, so I used a J201, which Yves (YuSynth) mentioned will work (in a different forum post).

Further testing: with very small input signals (under 1Vp-p), the S&H works well. Unfortunately, this is not very usable in real synth situations, since that is a pretty small Control Voltage.

Further testing: the S&H tracks the 5Vp-p input signal well if the clock speed is fast, but again, this is not always useful in a synth, either. Most times, I want a slow clocking.

The S&H does not track the noise well at all. It's almost like the noise just continues to charge C5, and C5 never gets a chance to dissipate any charge.
Back to top
View user's profile Send private message
blue hell
Site Admin


Joined: Apr 03, 2004
Posts: 24422
Location: The Netherlands, Enschede
Audio files: 297
G2 patch files: 320

PostPosted: Sun Nov 08, 2020 12:24 pm    Post subject: Reply with quote  Mark this post and the followings unread

No, R14 is just a bias for the FET, the opamp should set the level on C5 when the FET conducts.

Setting the level means it should be able to source and to sink current, and it's either that which is failing (the sinking bit), or the FET doesn't conduct in reverse ..which per data sheet it should do.

Hmm maybe it's gate does not go high enough .. which should be done by R14 when U2d 's output goes high ... diode reversed or broken?

Maybe look ar pin 14 U2d's output and after the diode.

_________________
Jan
also .. could someone please turn down the thermostat a bit.
Posted Image, might have been reduced in size. Click Image to view fullscreen.
Back to top
View user's profile Send private message Visit poster's website
john trials



Joined: May 12, 2020
Posts: 14
Location: CT

PostPosted: Mon Nov 09, 2020 1:32 pm    Post subject: more data Reply with quote  Mark this post and the followings unread

I was wondering if the FET was allowing current to flow one way and not the other, which might explain why the S&H doesn't track well on negative slopes. So I swapped the FET drain and source leads, and that didn't change a thing, so the FET is working properly (source and drain should be interchangeable as far as I know).

So I measured the gate signal. Two photos attached. The yellow trace is U2-pin 14 (the gate signal produced by the internal clock...it sits at -15V until a rising edge comes along on U2-pin12, and then pin14 goes to +15v for about 350us). The blue trace is the node at R14, D3, and the FET gate. It sits at -15v also, but the voltage when gate is high varies!

The FET gate signal (blue) changes in amplitude when "high". It ranges from about +4v to -4V. It tracks the S&H input voltage fairly closely. In my test, the S&H input is a slow triangle signal (shown in the previously attached photo where the S&H isn't tracking well on the falling slope). The FET gate signal peaks fairly closely to the triangle wave voltage during the "high" gate signal.

Is this what the FET gate signal is supposed to look like? Is the diode D3 doing its job correctly? I am not skilled enough at circuit analysis to know if the signal at the FET gate terminal is correct in my circuit.


S&H gate high.jpg
 Description:
 Filesize:  105.83 KB
 Viewed:  336 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

S&H gate high.jpg



S&H gate low.jpg
 Description:
 Filesize:  113.93 KB
 Viewed:  309 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

S&H gate low.jpg


Back to top
View user's profile Send private message
blue hell
Site Admin


Joined: Apr 03, 2004
Posts: 24422
Location: The Netherlands, Enschede
Audio files: 297
G2 patch files: 320

PostPosted: Mon Nov 09, 2020 3:26 pm    Post subject: Reply with quote  Mark this post and the followings unread

Yes, when U2d.pin14 goes high that signal is blocked by the diode, allowing for R14 to let the gat go to the S&H input voltage, which makes the FET conduct.

350 µs seems like plenty enough time for the FET to go into conductance mode, as the flattening of the blue line shows (the 2M2 will have to cgharge the FET input capacitance and also the input capacitance of your probe, so without a probe it will be faster even).

The scope traces also show U2d.pin14 to work ok.

Sooo .. next question is .. what happens at U2a.pin1 ? hmm .. the blue signal actually tellsus that, it seems to be fine too.

Leaves only that FET to be suspect IMO.

Let me look at the data sheet for the J201, had look at the BF one only, ok ... looks like that one should just work too.

_________________
Jan
also .. could someone please turn down the thermostat a bit.
Posted Image, might have been reduced in size. Click Image to view fullscreen.
Back to top
View user's profile Send private message Visit poster's website
john trials



Joined: May 12, 2020
Posts: 14
Location: CT

PostPosted: Mon Nov 09, 2020 5:04 pm    Post subject: Reply with quote  Mark this post and the followings unread

Blue Hell, thanks so much for the help and info. I really appreciate it.

Since I couldn't get any BF245 FETs, I tried to get some equivalents (although I don't exactly know what parameters are most important for the FET in this circuit). Yves mentioned the J201 in another forum post, and searching the Internet, I also found BS170 and 2N5485 mentioned, but I don't remember where I found those FET equivalents (so they may not be equivalent...I don't know if the source of that information is trustworthy).

So I have the J201, BS170, and 2N5485 FETs. I can try the last two FETs in the circuit soon to see if they will work better than the J201.
Back to top
View user's profile Send private message
gabbagabi



Joined: Nov 29, 2008
Posts: 652
Location: Berlin by n8
Audio files: 23

PostPosted: Tue Nov 10, 2020 10:43 am    Post subject: Reply with quote  Mark this post and the followings unread

sorry if it is a dumb question but,
did you have tried to make C5 (100nF) smaller? like 10nF or 1nF?

like here:
http://www.sdiy.org/ensign/1.jpg

may it worth also try to add a resistor to GND from PIN14 (U2D)?
Back to top
View user's profile Send private message
john trials



Joined: May 12, 2020
Posts: 14
Location: CT

PostPosted: Tue Nov 10, 2020 1:25 pm    Post subject: FIXED! Reply with quote  Mark this post and the followings unread

I soldered in a 2N5485 FET and the sample and hold works beautifully, even with slow inputs varying over large voltage ranges!!!

I did not try the BS170, but hopefully if someone else has trouble getting the correct FET, they can find a 2N5485.

Gabba, thanks for the suggestions. No suggestion is dumb.

Blue Hell, thanks for the tips and motivation to keep trying. I am isolated here and I don't know any electronics guys locally, so having guys like you help me is fantastic.

I recently fixed a flaw in my YuSynth Comparator, too (using an op amp as a comparator creates trouble, but adding positive feedback introduces a bit of hysteresis, and fixed the problem). It'd mess up at slow speeds. I am so happy to have both of those problem modules fixed!
Back to top
View user's profile Send private message
blue hell
Site Admin


Joined: Apr 03, 2004
Posts: 24422
Location: The Netherlands, Enschede
Audio files: 297
G2 patch files: 320

PostPosted: Tue Nov 10, 2020 6:23 pm    Post subject: Reply with quote  Mark this post and the followings unread

great you got it working Cool
_________________
Jan
also .. could someone please turn down the thermostat a bit.
Posted Image, might have been reduced in size. Click Image to view fullscreen.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic Moderators: Scott Stites
Page 1 of 1 [10 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 » YuSynth
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


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