Peak detector with load? - Page 1
Forum section: electronics / beginners

author: FriedMule
author_rank: Frequent Contributor
timestamp: August 26, 2019, 07:49:49 pm
content: I have made a peak detectorIt has zero droop and, do I think, deliver a constant result until shut offSince KiCad do not have the components I want to use as the Digital Potentiometer I have just put one in the circuit.Suddenly the thought occurred to me, what if I added an load to the output of the peak detector, would it then work as an PSU with constant, no ripple 5V voltage?I have added a Zenor (D3) that goes from output to ground if above 5V

author: 741
author_rank: Frequent Contributor
timestamp: August 27, 2019, 02:33:42 pm
content: HiI think there is a mistake with the 2x LM358: A real op-amp will not function reliably/long term with (+) input "floating".( Have you tried it for real? )I can not understand how the AD5293 works without any programming-pins (SPI) connected - is this OK? ... what happens to the 'resistor' when the /CS pin is enabled, does it change?Re: "...would it then work as an PSU with constant, no ripple 5V voltage?"Although you might see a nice low ripple, that ripple reduction (if any) would come from the U4a's "PSRR", and the peak detector would be "irrevelevant".That is, U4A's output is notpowered byit's signal input.Best wishesStephen

author: FriedMule
author_rank: Frequent Contributor
timestamp: August 27, 2019, 03:12:00 pm
content: Quote from: 741 on August 27, 2019, 02:33:42 pmThanks for your reply, no I have about no components yet, is just started on the electronical journey:-)I am trying to learn KiCad but can't get the simulator part to work, lots of "pin not driven" and no lines on the scope even if I tell it where to probe.I was also a bit confused it's all from the following links:https://www.nutsvolts.com/magazine/article/op-amp-cookbook-part-4The peak detector is from this video:https://youtu.be/5Pz7Mx0WRUk?t=375

author: Bassman59
author_rank: Super Contributor
timestamp: August 27, 2019, 03:58:06 pm
content: Quote from: FriedMule on August 27, 2019, 03:12:00 pmFor simulation, Kicad uses ngspice. You should look for how to use it. Then there's the question of obtaining models.

author: Zero999
author_rank: Super Contributor
timestamp: August 27, 2019, 04:55:56 pm
content: It's not the LM358, but the LMV358, which is totally different. It's only rated up to 5.5V and has rail-to-rail inputs. The LM358 is rated up to 30V, but its common mode range is about 2V less than the +V rail, although it can tolerate either input going to 30V, irrespective of the supply voltage.I don't see how this circuit will work. No op-amp will work with its inputs floating. Pins 5 and 3 on U1 will just pick up stray noise causing the output to flip from 0V to 5V unpredictably.

author: FriedMule
author_rank: Frequent Contributor
timestamp: August 27, 2019, 05:07:23 pm
content: Thanks, could you please tell me what and how to change it?My thought was that the result would be a straight line of 5V and sines it can not go under it's max value, it would never make any ripple.

author: Zero999
author_rank: Super Contributor
timestamp: August 27, 2019, 09:46:50 pm
content: I don't believe it's possible to make a peak detector, with zero droop, without some kind of memory element. The standard way is to charge a capacitor, via a precision rectifier, but there will always be some leakage in the capacitor and bias currents on the op-amp's inputs, so the value will drift slightly. The easiest way to achieve zero droop would be to sample the input using an ADC, storing it in a register and converting it back to an analogue voltage, with a DAC, if necessary.

author: mikerj
author_rank: Super Contributor
timestamp: August 27, 2019, 10:18:37 pm
content: Quote from: Zero999 on August 27, 2019, 09:46:50 pmThe OP's schematic is very misleading since he's using the incorrect digipot symbol. The "zero droop" peak detector uses a digipot with an "up/down" input to track the output of a conventional peak detector. Obviously the output of the digipot is considerably quantised since they are limited to around 10 bits.

author: FriedMule
author_rank: Frequent Contributor
timestamp: August 27, 2019, 11:01:11 pm
content: After have seen a great deal of KiCad videos, I have tried to make a more correct schematic.About zero droop, I have about no idea on what I am doing, so I did just trust the info in the video, so again no idea:-)

author: FriedMule
author_rank: Frequent Contributor
timestamp: August 28, 2019, 12:41:30 pm
content: Added question: I have asked KiCad to check the electrical rules but it say something that I do not understand and cant seem to find any clear answer to.ERC report (28-08-2019 14:38:38, Encoding UTF8 )***** Sheet /ErrType(3): Pin connected to other pins, but not driven by any pin@(29,21 mm, 88,90 mm): Pin 3 (Input) of component U1 is not driven (Net 1).ErrType(3): Pin connected to other pins, but not driven by any pin@(20,32 mm, 82,55 mm): Pin 1 (Power input) of component #PWR01 is not driven (Net.ErrType(3): Pin connected to other pins, but not driven by any pin@(154,94 mm, 45,72 mm): Pin 1 (Power input) of component #PWR06 is not driven (Net 10).ErrType(3): Pin connected to other pins, but not driven by any pin@(110,49 mm, 78,74 mm): Pin 1 (Power input) of component #PWR02 is not driven (Net 11).** ERC messages: 4 Errors 0 Warnings 4

author: mikerj
author_rank: Super Contributor
timestamp: August 28, 2019, 09:56:48 pm
content: I don't use this tool but theKiCad Forumhas a detailed answer addressing the cause and solution to this. Essentially the design rules check sees a bunch of power input pins tied together (i.e. Vdd/Vss on the ICs) but you need to tell it which node the power is being supplied from.

author: FriedMule
author_rank: Frequent Contributor
timestamp: August 28, 2019, 10:50:36 pm
content: Quote from: mikerj on August 28, 2019, 09:56:48 pmGreat thanks, I'll try to look again:-)

author: FriedMule
author_rank: Frequent Contributor
timestamp: August 30, 2019, 09:39:57 am
content: Quote from: mikerj on August 28, 2019, 09:56:48 pmThat hint was all I neaded to solve the errors, thanks a lot! :-)

author: mikerj
author_rank: Super Contributor
timestamp: August 30, 2019, 01:49:33 pm
content: Glad I could help, and thanks for posting the resolution.