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 
 Forum index » DIY Hardware and Software » Developers' Corner
battery powered mini-mini-minimalist op amp sample & hold
Post new topic   Reply to topic Moderators: DrJustice
Page 1 of 1 [24 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
beep



Joined: May 05, 2013
Posts: 84
Location: Germany

PostPosted: Sun May 12, 2013 6:47 am    Post subject:  battery powered mini-mini-minimalist op amp sample & hold
Subject description: will this really work like on falstad simulator (with link) ???
Reply with quote  Mark this post and the followings unread

I took this simple design from synthesizers.de

Posted Image, might have been reduced in size. Click Image to view fullscreen.

tried it in the falstad simulator and it didnt work. so I removed the
transistor trigger section and the display section and added
a 1% duty cycle square wave at the switch input.

It worked. two op amp and a switch and it works. it does
what a s&h does. This is unbelievable. Does it only work in the
software simulation? The op amps are powered from v+=9V and v-=0V


Link to falstad simulation (java applet window)


greetings Very Happy

_________________
Is the future obsolete?
Back to top
View user's profile Send private message
johncronan



Joined: Feb 24, 2013
Posts: 42
Location: Chicago

PostPosted: Mon May 13, 2013 6:48 pm    Post subject: Reply with quote  Mark this post and the followings unread

Yeah, it works fine. There are some application notes on S&H amplifiers - you will see this type of circuit. Two voltage followers buffering a switched capacitor. Switching analog signals with a 4066 is no problem. As far as I know, the only time you need a "true" analog switch IC is if you're dealing with varying voltage levels for signal vs control logic, as those ICs offer a separate logic supply.

Actually, you can buy this very same circuit in a single IC, for example the LF398.

John
Back to top
View user's profile Send private message
beep



Joined: May 05, 2013
Posts: 84
Location: Germany

PostPosted: Mon May 13, 2013 10:54 pm    Post subject: Reply with quote  Mark this post and the followings unread

I found a pretty simple circuit with the lf special chip too
but made from op amps appears more elegant to me.

Pretty low parts count and basic components. I love that shit.

Can't wait to breadboard it *__*

Is the 741 okay for it or should I try another opamp?

Also have lm324, tl074 and lm358.

I would like to power it from 9-12v, 4,5-6v (which is gnd) and 0v, (which is v-)
single supply resistor divider

_________________
Is the future obsolete?
Back to top
View user's profile Send private message
johncronan



Joined: Feb 24, 2013
Posts: 42
Location: Chicago

PostPosted: Mon May 13, 2013 11:14 pm    Post subject: Reply with quote  Mark this post and the followings unread

If you choose the LM324 you could try it without any virtual ground, but there would be a little bit of offset error near ground. If you do use a virtual ground I think it would be a good idea to put a buffer after the divider.

Hope it works well for you!
Back to top
View user's profile Send private message
beep



Joined: May 05, 2013
Posts: 84
Location: Germany

PostPosted: Thu May 23, 2013 3:25 pm    Post subject: Reply with quote  Mark this post and the followings unread

It's alive <3




It works. My very first hardware sample&hold. my reaction
when I got it working was very emotional.

sample&hold is my all-time favourite part of a synth,
cause it creates a very musical "controlled chaos"
from something simple like a triangle LFO or even
better two triangle lfos mixed Very Happy


Can I stabilize this? on slower clock the output voltage goes down
edit:I forgot the buffer. at the virtual ground divider?

_________________
Is the future obsolete?
Back to top
View user's profile Send private message
elmegil



Joined: Mar 20, 2012
Posts: 1505
Location: Chicago
Audio files: 14

PostPosted: Thu May 23, 2013 5:49 pm    Post subject: Reply with quote  Mark this post and the followings unread

It's great to make something work, isn't it? Very Happy
Back to top
View user's profile Send private message
johncronan



Joined: Feb 24, 2013
Posts: 42
Location: Chicago

PostPosted: Thu May 23, 2013 6:35 pm    Post subject: Reply with quote  Mark this post and the followings unread

Nice! Look up the TI app note on sample and hold amplifiers (I'm on my phone now or I'd link you) and try out the variation called the "closed loop" configuration. I think it may help with your stability issue. -jkc
Back to top
View user's profile Send private message
fonik



Joined: Jun 07, 2006
Posts: 3759
Location: Germany
Audio files: 23

PostPosted: Thu May 23, 2013 10:58 pm    Post subject: Reply with quote  Mark this post and the followings unread

what capacitor are you using? polyester is nto the best solution.

try C0G/NP0, Polypropylene, or Polysterene. with these the voltage drop should be less.

_________________
Posted Image, might have been reduced in size. Click Image to view fullscreen.
cheers,
matthias
____________
fonitronik at
FlickR (pix) / SoundCloud (sounds) / YouTube (vids) / Vimeo (vids) / facebook (news)
Back to top
View user's profile Send private message Send e-mail Visit poster's website
beep



Joined: May 05, 2013
Posts: 84
Location: Germany

PostPosted: Thu May 23, 2013 11:32 pm    Post subject: Reply with quote  Mark this post and the followings unread

yeah, it feels really great! addictive as hell.

I used different ceramic caps. worked with 1uF ceramic cap and also 470nF foil cap. but don'T know if it was polyester or polystyrene. 22nF was too small, 100nF worked, 100uF was too big Very Happy

But now I have to interrupt the analogue madness till next week,
preparing girlfriend'S birthday.

gonna try more different foil caps Smile yeah, that's the moment when
cap types become important.

And I'm gonna look for the texas instruments S&H app notes.


I'll draw the schematic of what I actually built and post it.

edit: gonna try the NPO again.

I'm using LM741, maybe a tl07x could improve this?

_________________
Is the future obsolete?
Back to top
View user's profile Send private message
PHOBoS



Joined: Jan 14, 2010
Posts: 1801
Location: Moon Base
Audio files: 351

PostPosted: Wed Jan 08, 2014 1:40 pm    Post subject: Quad Sample & Hold with noise generator
Subject description: produces 4 random CV's
Reply with quote  Mark this post and the followings unread

Thanks for posting that, I needed a single supply S&H but got stuck with FET's needing a negative voltage and the 4066 did the trick Very Happy.
I'm using a NAND gate to create the trigger pulse from a gate signal and since there are 4 gates in one chip and also 4 switches in the 4066 I made a
quad version (using a quad opamp). I also added the noise generator that Richardc64 posted here so it can produce 4 random CV's with an
output level of roughly 2 to 10V.

It might be a good idea to isolate the noise generator from the rest of the circuit using some ferrite beads. And if you don't use the noise source but
just use it as a Quad S&H then maybe some buffers on the signal input(s) are necessary (like in the original circuit).


PHOBoS - Quad Sample & Hold with noise generator.gif
 Description:
Quad single supply Sample & Hold with noise generator.
produces 4 random CV's.
 Filesize:  39.32 KB
 Viewed:  169 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

PHOBoS - Quad Sample & Hold with noise generator.gif



_________________
"My perf, it's full of holes!"
http://phobos.000space.com/ http://www.acidtrash.com/ Stickney Synthyards

Last edited by PHOBoS on Fri Jan 10, 2014 12:28 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
beep



Joined: May 05, 2013
Posts: 84
Location: Germany

PostPosted: Wed Jan 08, 2014 9:46 pm    Post subject: Reply with quote  Mark this post and the followings unread

Hey, that's great!!!

How did you manage the voltage drift?

On slower clock rates the output cv of the S/H
went from slightly lower to slightly higher, ut it should
be a steady tone. I used LM358 and 100nF ceramic caps.

Would a low-noise op amp like a tl07x help?
Or power supply decoupling (100uF from V+ to gnd)

??

plz. help. I need a clean sample/hold for DIY CV keyboard.

_________________
Is the future obsolete?
Back to top
View user's profile Send private message
elektrouwe



Joined: May 27, 2012
Posts: 46
Location: Germany

PostPosted: Thu Jan 09, 2014 6:44 am    Post subject: Reply with quote  Mark this post and the followings unread

beep wrote:
... manage the voltage drift....

the opamp following the sampling C should be a JFET or MOSFET type
with input voltage range including ground. A TLC 27x will work, a TL07x
not ( unless you have +- power supply).
With a TL272 and a polystyrene C even a small 22nF should work.
you must use a well cleaned and high insulating PCB (FR4) or even better
"free air" wiring of the "hot" trace (switch output, C,opamp +input).
Only then you can get hold times >>1s
Back to top
View user's profile Send private message
PHOBoS



Joined: Jan 14, 2010
Posts: 1801
Location: Moon Base
Audio files: 351

PostPosted: Thu Jan 09, 2014 8:09 am    Post subject: Reply with quote  Mark this post and the followings unread

beep wrote:
Hey, that's great!!!

How did you manage the voltage drift?

On slower clock rates the output cv of the S/H
went from slightly lower to slightly higher, ut it should
be a steady tone.


Good question, I probably should have mentioned that voltage drift isn't important for what I am using it for. As long as it's somewhat stable for
about 20 seconds it does what I need. However to my surprise I didn't really notice any drifting on my scope, but let me hook it up directly to a
VCO and see if I can hear it,.. hold on,..

ok I recorded something,.. after a minute I just stopped the CLK to see how much it would drift,. but I don't really notice it.

Quote:
I used LM358 and 100nF ceramic caps.

Would a low-noise op amp like a tl07x help?
Or power supply decoupling (100uF from V+ to gnd)

yes an TL07x (or TL06x, TL08x) would make a lot of difference, not so much low noise, but they have a high imput impedance (much higher then an LM358) so they don't drain the capacitor. Also a ceramic cap is probably the worst choice for a S&H, those are far from stable. I'm not using anything special btw, probably metalfilm, but as I mentioned a bit of drift doesn't matter for what I need it for.

Power supply decoupling is always good, try to use a small (10nF..100nF) close to each chip and a couple of larger ones at several points depending on how big the circuit is.


PHOBoS - Sample and Hold drift test (Jan 9, 2014).mp3
 Description:
drift test with Quad S&H using modular lunetta VCO.

Download
 Filename:  PHOBoS - Sample and Hold drift test (Jan 9, 2014).mp3
 Filesize:  1.88 MB
 Downloaded:  103 Time(s)


_________________
"My perf, it's full of holes!"
http://phobos.000space.com/ http://www.acidtrash.com/ Stickney Synthyards
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: 1801
Location: Moon Base
Audio files: 351

PostPosted: Thu Jan 09, 2014 8:13 am    Post subject: Reply with quote  Mark this post and the followings unread

elektrouwe wrote:

the opamp following the sampling C should be a JFET or MOSFET type
with input voltage range including ground. A TLC 27x will work, a TL07x
not ( unless you have +- power supply).
With a TL272 and a polystyrene C even a small 22nF should work.
you must use a well cleaned and high insulating PCB (FR4) or even better
"free air" wiring of the "hot" trace (switch output, C,opamp +input).
Only then you can get hold times >>1s


ah you beat me to it Cool
a TL07x does work,. but you don't have as much headroom (hence why the output is roughly 2...10V instead of 0...12V, allthough you won't reach 12V
with a 12V dual supply either. And yes polystyrene caps and the rest of what you said would be the best ways to get the most out of it.

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



Joined: Nov 10, 2011
Posts: 878
Location: Lancashire, England
Audio files: 14

PostPosted: Fri Jan 10, 2014 7:36 am    Post subject: Reply with quote  Mark this post and the followings unread

beep wrote:
Hey, that's great!!!

How did you manage the voltage drift?

On slower clock rates the output cv of the S/H
went from slightly lower to slightly higher, ut it should
be a steady tone. I used LM358 and 100nF ceramic caps.

Would a low-noise op amp like a tl07x help?
Or power supply decoupling (100uF from V+ to gnd)

??

plz. help. I need a clean sample/hold for DIY CV keyboard.


just thought I'd add, having done some work with a sample and hold of my own recently, that the lm358 or lm324 charges the cap up, as current flows out of the input. a larger capacitor makes this less noticable and it's not noticable at sample frequencies >5Hz with a cap about 10n.

_________________
As a mad scientist I am ruled by the dictum of science: "I could be wrong about this but lets find out"


Green Dungeon Alchemist Laboratories
Back to top
View user's profile Send private message
beep



Joined: May 05, 2013
Posts: 84
Location: Germany

PostPosted: Fri Jan 10, 2014 5:14 pm    Post subject: Reply with quote  Mark this post and the followings unread

The op amp charges the capacitor up? YEES! That fits perfectly to what
I'm hearing. And a TL072 wouldn't do that?

I know there are other opamps around 3€ rather than 30 cents
and they have even higher input impedance

_________________
Is the future obsolete?
Back to top
View user's profile Send private message
L´Andratté



Joined: Sep 23, 2012
Posts: 60
Location: Hamburg, Germany
Audio files: 5

PostPosted: Tue Jan 14, 2014 1:30 pm    Post subject: Reply with quote  Mark this post and the followings unread

Hi Beep, maybe this is of interest for you:
you could even make the switch a jfet, like this:
http://urekarm.tripod.com/synth/sh09_shn.pdf
(reported to work good)

Greets!
Back to top
View user's profile Send private message
fantozzi



Joined: Jan 15, 2012
Posts: 10
Location: Berlin
Audio files: 1

PostPosted: Wed Feb 05, 2014 4:27 am    Post subject: Reply with quote  Mark this post and the followings unread

some simulation


sh.png
 Description:
TL07x
 Filesize:  108.54 KB
 Viewed:  68 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

sh.png



sh2.png
 Description:
LM358
 Filesize:  107.52 KB
 Viewed:  47 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

sh2.png


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



Joined: Nov 10, 2011
Posts: 878
Location: Lancashire, England
Audio files: 14

PostPosted: Thu Feb 06, 2014 5:28 am    Post subject: Reply with quote  Mark this post and the followings unread

beep wrote:
The op amp charges the capacitor up? YEES! That fits perfectly to what
I'm hearing. And a TL072 wouldn't do that?

I know there are other opamps around 3€ rather than 30 cents
and they have even higher input impedance


To elaborate; the lm324/358 has a pnp transistor input, and current flows OUT of the base of a pnp transistor so a tiny amount of current flows out of the input (nice and confusing, eh?).

TL074 op amps have FET based inputs which, if I remember rightly, theoretically have no current flowing in or out of the input. In reality there is a small amount but it's orders of magnitude lower than the LM324.

You can go one better still with something really high end like a CA3140E, I hear the TS912 is really good aswell.




Hey fantozzi, do those circuits work as well in reality? Wink

_________________
As a mad scientist I am ruled by the dictum of science: "I could be wrong about this but lets find out"


Green Dungeon Alchemist Laboratories
Back to top
View user's profile Send private message
fantozzi



Joined: Jan 15, 2012
Posts: 10
Location: Berlin
Audio files: 1

PostPosted: Thu Feb 06, 2014 7:28 am    Post subject: Reply with quote  Mark this post and the followings unread

[quote="JingleJoe"]
beep wrote:

Hey fantozzi, do those circuits work as well in reality? Wink


unfortunatly i dont have the possibility to test it , but i think : yes

it is very close to the standard S/H circuits


sh fet.png
 Description:
 Filesize:  101.09 KB
 Viewed:  49 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

sh fet.png



Last edited by fantozzi on Mon Apr 21, 2014 12:11 am; edited 1 time in total
Back to top
View user's profile Send private message
PHOBoS



Joined: Jan 14, 2010
Posts: 1801
Location: Moon Base
Audio files: 351

PostPosted: Sun Apr 20, 2014 12:52 pm    Post subject: Reply with quote  Mark this post and the followings unread

Although the quad S&H works, I noticed that the ouputs didn't correspond with their trigger inputs. I expected I made a wiring mistake somewhere so I
recently did some tests to get that problem fixed. Well, it wasn't a wiring mistake, instead I discovered that all 4 S&H's got triggered no matter which
trigger input I used. I actually had the same problem with my TR-808MC (triple cowbell clone) and 'fixed' it by adding a small capacitor (1.2nF)
between the trigger inputs and GND.

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



Joined: May 05, 2013
Posts: 84
Location: Germany

PostPosted: Thu May 22, 2014 11:07 am    Post subject: Reply with quote  Mark this post and the followings unread

Yaay,

Thank you for your advice.

I have the hold circuit on breadboard now,
using a TL072 and a 100nF poly cap.

there is no audible upwards-drift anymore :DDD yaay.
and the voltage holds pretty long. for minutes. just slightly
going downwards, which is more than enough for a modular synthi S&H.

but I have problems now feeding a 4066 into it.

_________________
Is the future obsolete?
Back to top
View user's profile Send private message
animalman



Joined: Jan 21, 2013
Posts: 9
Location: out past midnight

PostPosted: Mon May 26, 2014 10:56 am    Post subject: Reply with quote  Mark this post and the followings unread

@Beep: Would be really thankfull if you could post the schematic of what you have on your breadboard. Great if there was a stable version. Big thanks!
Back to top
View user's profile Send private message
beep



Joined: May 05, 2013
Posts: 84
Location: Germany

PostPosted: Mon May 26, 2014 11:19 am    Post subject: Reply with quote  Mark this post and the followings unread

my test circuit which I had on breadboard was just a quarter TL074 set up as a non-inverting buffer with a 100nF poly capacitor to ground at the non-inverting input. I had a LFO signal and I just held it against the input pin and removed it, no buffer before the switch, no switch.

When I replaced it with a 324, it showed the same characteristics, I complained a few posts
before. After a minute or so I got a slight downwards drift on the TL074, at the 324 I got
upwards drift within a second.

_________________
Is the future obsolete?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Moderators: DrJustice
Page 1 of 1 [24 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 » Developers' Corner
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