home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   sci.electronics.design      Electronic circuit design      143,102 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 142,806 of 143,102   
   john larkin to All   
   Re: cheap analog square function?   
   17 Feb 26 08:06:11   
   
   From: jl@glen--canyon.com   
      
   On Wed, 18 Feb 2026 00:03:47 +1100, Bill Sloman    
   wrote:   
      
   >On 17/02/2026 5:36 am, Christopher Howard wrote:   
   >>> JL has beaten me to it. In full detail: imagine the sawtooth or   
   >>> triangle wave swings between 0V and 1V and is nicely linear, i.e.   
   >>> straight sloped. The comparator in my circuit (A) compares that with   
   >>> the input voltage to be squared Vx. When Vx is 0 the output is always   
   >>> low; when Vx is 1V the output is always high; and when Vx is 0.5V the   
   >>> output is toggling with 50% duty cycle.  This pulse width modulation   
   >>> can then be used to switch the desired output between input Vx and 0V   
   >>> so when Vx is 0V then output is zero, when Vx is 1V the output is Vx   
   >>> and when Vx is 0.5V the output is 50% of the time that 0.5V and 50% of   
   >>> the time zero or in other words an average of 0.25V. The low pass   
   >>> filter averages the pulsating output to a steady level.   
   >>>   
   >>> In circuit (A) the switching isn't done by an explicit analog switch   
   >>> but by shorting the output to ground - very conveniently done by   
   >>> choosing a comparator with open-drain output.   
   >>>   
   >>> I had multiple square and root channels so it made sense to have one   
   >>> common triwave generator serve them all. Instead of 1V full scale   
   >>> unity I scaled to use 5V so ordinary comparators can be used. If you   
   >>> had no other need for a sawtooth/triwave elsewhere one could build a   
   >>> self-oscillating PWM generator and use that to drive the chopper. Let   
   >>> me know if you want that detailed more fully.   
   >>>   
   >>   
   >> Okay, thank you. I think I grasp the core idea now.   
   >>   
   >> My THAT comes with a few comparators, but already less than I need for   
   >> other things, so I don't want to use those. But I've got a lot of 741 op   
   >> amps to spare.   
   >   
   >The 741 isn't a particularly good op amp.   
      
   And it's a really bad comparator.   
      
      
   John Larkin   
   Highland Tech Glen Canyon Design Center   
   Lunatic Fringe Electronics   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca