How do I produce a single ramp pulse? - Page 1
Forum section: electronics / beginners

author: renzoms
author_rank: Regular Contributor
timestamp: December 20, 2021, 05:08:04 pm
content: What would you guys do to implement this function (a single ramp) without a AWG.I suggest an RC / Integrating OP could produce the ramp, but then how do I get it to cut off? (I have the same engineering problem with discharging an RC for a pulsing circuit).I could use a microcontroller/fpga right? Idk how, I’m new to using those so I ask.Open to hearing ideas producing more than one pulse. Maybe a schmitt trigger or some type of threshold involving circuit is used. I’ll include a picture of a waveform generator (wfg?) I found in my book, too.https://imgur.com/a/hxaacHR

author: Ian.M
author_rank: Super Contributor
timestamp: December 20, 2021, 05:18:55 pm
content: CMOS 555 one-shot with a current source in place of the timing resistor that charges the timing cap from the Vcc rail, + a unity gain OPAMP buffer to provide a low impedance output equal to the timing cap voltage.

author: Benta
author_rank: Super Contributor
timestamp: December 20, 2021, 07:07:45 pm
content: Quote from: Ian.M on December 20, 2021, 05:18:55 pmANYone-shot timer. Why does it always have to be a 555?

author: Refrigerator
author_rank: Super Contributor
timestamp: December 20, 2021, 07:20:00 pm
content: Many ways to do this.

author: Ian.M
author_rank: Super Contributor
timestamp: December 20, 2021, 07:23:27 pm
content: @Benta,Because it includes a discharge transistor so you don't need to switch the current source, and its control voltage pin can be used to directly set the ramp amplitude.

author: David Hess
author_rank: Super Contributor
timestamp: December 20, 2021, 07:24:37 pm
content: Set-reset flip-flop controlling a current source, to charge a capacitor, and then a comparator to detect the top of the ramp.

author: Refrigerator
author_rank: Super Contributor
timestamp: December 20, 2021, 07:28:16 pm
content: Here's another one.

author: Benta
author_rank: Super Contributor
timestamp: December 20, 2021, 08:19:33 pm
content: I've just thrown my towel in the ring and now accept that there are two solutions to everything in the world:42 and 555.

author: RoGeorge
author_rank: Super Contributor
timestamp: December 20, 2021, 08:59:33 pm
content: Objection, one can build an AM radio with a 555, but not with 42!About how to produce a single ramp, I would probably use an opamp as voltage integrator, but it depends of the final application and the required parameters for that pulse.Another way could be a constant current generator feeding a capacitor.Even a simple series RC circuit could approximate a linear ramp pretty good when the resistor is big enough, so the resistor will approximate a current source feeding a capacitor. (because an ideal current source will have an infinite impedance, so the bigger the resistor fed wit a constant voltage, the more closer that resistor will emulate an ideal current source, and thus together with the capacitor producing a voltage ramp). This series RC could be connected to a digital out pin of a microcontroller.

author: Benta
author_rank: Super Contributor
timestamp: December 20, 2021, 09:26:47 pm
content: Quote from: RoGeorge on December 20, 2021, 08:59:33 pmI'm pretty sure that you can build an AM radio with an MPSA42.

author: rstofer
author_rank: Super Contributor
timestamp: December 20, 2021, 10:47:31 pm
content: I would want some numbers like amplitude and integration time. There should probably be some indication about how the ramp is going to be triggered.If I just needed to play around with a ramp generator, I would just cheat and use the Analog Discovery 2. Here it is set for an external rising edge trigger and uses 1ms for integration. But the voltage is limited on the upper end to just 5V and that kind of limits things.

author: RoGeorge
author_rank: Super Contributor
timestamp: December 20, 2021, 10:57:47 pm
content: Could be as well a controlled train of PWM or PDM pulses from a digital output, followed by a low pass filter (integrator), pulses like this:

author: TimFox
author_rank: Super Contributor
timestamp: December 20, 2021, 11:18:54 pm
content: The "single ramp pulse" is also known as a triggered time base (as used for horizontal deflection in a CRO).The classic reference can be downloaded from this site:https://www.ebookmela.co.in/download/time-bases-their-design-development-o-s-puckle-pdf-free-download

author: rstofer
author_rank: Super Contributor
timestamp: December 20, 2021, 11:41:06 pm
content: I like the transistor solutions given above. There is just a certain elegance to the circuits.However... I have no idea how to trigger the single ramp. Further, what if I wanted to use a differentiator in the trigger circuit such that I could use the 'make' contact on a toggle switch to get just one fast trigger when the switch closes. And then what to do about the negative spike when the contact opens. Is contact bounce going to be an issue?I'm certain there are equally elegant solutions to triggering.

author: Refrigerator
author_rank: Super Contributor
timestamp: December 21, 2021, 02:40:20 am
content: Quote from: rstofer on December 20, 2021, 11:41:06 pmIn my second circuit pulling down the base of Q2 or Q4, or the emitter of Q3 will restart the ramp

author: ledtester
author_rank: Super Contributor
timestamp: December 21, 2021, 06:51:11 am
content: Have a look at this w2aew video:#105: More Circuit Fun: Simple 3 transistor sawtooth generator / oscillator -- w2aewhttps://youtu.be/2a1I1X3RV0g

author: MarkF
author_rank: Super Contributor
timestamp: December 21, 2021, 01:59:58 pm
content: I mostly see hardware solutions here.So, a microcontroller solution could be an Arduino with a DAC. You could generate any waveform you wished based on the samples you saved in a lookup table. It would be very limited in frequency range (a few kilo Hz at best with an UNO). Using a SPI DAC like a MCP4802.With a fast MCU, you could cover the audio frequency band with a 32-bit MCU clocked at 40MHz. Here's some reference material from Cornell Univ using a pic32mx250f128b. You would need a programmer (PicKit 3 or 4).https://people.ece.cornell.edu/land/courses/ece4760/PIC32/DDS/DDS.htmlor the entire course:https://people.ece.cornell.edu/land/courses/ece4760/

author: Terry Bites
author_rank: Super Contributor
timestamp: December 21, 2021, 08:53:48 pm
content: So sick of 555s its cheap and a pain in the ass.

author: Terry Bites
author_rank: Super Contributor
timestamp: December 21, 2021, 09:05:54 pm
content: https://www.edn.com/linear-ramp-generator-uses-one-op-amp/Of course you will need a FET or Analog switch to discharge the cap to ground. Thats your sync input.A micro? an FPGA? Stop smokin' that stuff!

author: David Hess
author_rank: Super Contributor
timestamp: December 22, 2021, 02:35:30 am
content: Page 14 of theLT1016 datasheetshows an example somewhat like what I described. I would replace the 74121 with a set-reset flip-flop. The ramp rate is fixed in this example with a variable height, but a different current source configuration could be used to generate a variable ramp rate. The ramp itself is available across the capacitor and would need to be buffered.

author: Picuino
author_rank: Super Contributor
timestamp: December 22, 2021, 08:05:55 pm
content: Ramp Generators and Integrators:http://www.csun.edu/~ih20409/SCHOOL1/RAMP%20GENERATORS.pdf

author: Picuino
author_rank: Super Contributor
timestamp: December 22, 2021, 08:09:25 pm
content: I would prefer a miller integrator based on an op amp, with a mosfet that short circuits the capacitor when reaching a high voltage (that voltage can be detected with another op amp)

author: Electro Fan
author_rank: Super Contributor
timestamp: December 23, 2021, 09:10:12 am
content: Quote from: renzoms on December 20, 2021, 05:08:04 pmSounds like you would like to build your own pulse generator. The design might depend on your specs and budget. Here is an example of something with pretty high performance and moderate cost. It might stimulate some ideas.http://www.leobodnar.com/shop/index.php?main_page=product_info&cPath=124&products_id=303

author: David Hess
author_rank: Super Contributor
timestamp: December 24, 2021, 03:01:24 am
content: Quote from: Picuino on December 22, 2021, 08:09:25 pmOperational integrators unfortunately make the worst use of an operational amplifier because they require simultaneous unity gain frequency compensation and high bandwidth. Figure 5 on page 7hereshows the problem.

author: rstofer
author_rank: Super Contributor
timestamp: December 24, 2021, 04:31:38 pm
content: Quote from: David Hess on December 24, 2021, 03:01:24 amThis is true, the math says so but...As A0 gets to be a really big number, say 200,000 V/V, certain simplifications in the math are reasonable. Take Equation 5, for example, and plug in A0 = 200,000. Watch how the bracketed second factor goes toward just 1 and the resulting output expression is the same as the ideal expression in the first bracketed factor. The error from the simplification is vanishingly small.Even the venerable 741 op amp has an A0 of 200,000 V/V. That seems important to the design of analog computers and engineers did some amazing work with such systems back in the day.Quotehttps://spectrum.ieee.org/not-your-fathers-analog-computerThere is something truly satisfying watching 2d order ODEs run on an analog computer while changing the envelope with the 'Damping' potentiometer and the frequency with the 'Spring Constant' pot. Nearly as good is creating the system in MATLAB Simulink.FWIW, the integrators in my Comdyna GP-6 analog computers have a time constant of 1 second so the output voltage changes at a maximum of 10V/sec. There are also 10x inputs so 100V/sec and that's nowhere near the unity gain BW of 0.5V/us or 500,000 V/s.That's a really great pdf you linked - thanks! It's headed straight to my library.

author: David Hess
author_rank: Super Contributor
timestamp: December 24, 2021, 10:28:41 pm
content: Quote from: rstofer on December 24, 2021, 04:31:38 pmDid I give the wrong figure? I meant figure 5 on page 7 which shows the delay or lag because of finite bandwidth. This is why operational integrator are not the best solution in applications like voltage-to-frequency converters and function generators. The problem here is that the operational amplifier must be unity gain stable, but this conflicts with the high bandwidth required for good dynamic response.

author: rstofer
author_rank: Super Contributor
timestamp: December 25, 2021, 03:29:11 pm
content: Quote from: David Hess on December 24, 2021, 10:28:41 pmYou gave the right figure, I just picked an equation that was easier to substitute/solve without using a pencil as an example where A0 swamps the error term. We're looking at two ends of the same GBW product. I have a loop gain of 1 (perhaps 10) and a very low frequency (mechanical systems, not microwaves) and my expectation is to get within a few percent. You are looking at higher frequencies and, perhaps, higher loop gain. These are two very different scenarios. The graph you noted clearly shows what will happen when op amps are running near their maximum. It's not clear to me that it matters much in my scenario.Whatever the errors, analog computers were still instrumental in getting us to the Moon. I worked for a defense contractor one time and there was a monster size analog computer that was used to simulate things like rocket lift-off. Our control systems instructor was instrumental in designed the nozzle control system. It's not easy getting that darn thing to move in a vertical direction.