I'm trying to design a circuit that will sweep an RC servo motor (an SG90) continuously from -90deg to 90deg position and to repeat this process indefinitely. I'm aiming to use one IC (a quad op amp 14pin DIP) as the main component. The circuit will be used to sweep a laser across its' ~180deg range of motion, for example, during a live performance.
I've designed a three op-amp circuit using a schmitt-trigger(U1A in fig.2)/integrator(U2A in fig.2) pair to feed a triangle wave into one terminal of an opamp comparator (U3A in fig.2). I know ideally what voltage values I need on my reference input to tell the servo which position to go to [fig. 1]
My current design is below. The pictured waveforms demonstrate my reference potentiometer set to be such that a 1ms pulse (in red) with a period of 20ms total is fed into the control line of my servo. The pk-pk values are not finalized as I'm simply trying to visualize the output [fig. 2/fig. 3 below]
My predicament is that I can't think of a way to automatically cycle between the three comparator reference voltages that I need in order to output the three particular pulse-widths of 1ms, 1.5ms, and 2ms. You'll notice that at the moment I have a place-holder potentiometer (R4) just for visual reference so that I can confirm what voltage drop I need at the reference input of the comparator to get these pulse-widths at the output. Ultimately, though, I don't want to have to manually adjust a pot to control the pulse-width as this doesn't achieve my goal of having an RC servo automatically sweeping back and forth.
I have considered other design topologies such as using two single op amp triangle wave generators of different time-periods, fed into opposing inputs of a comparator, but scrapped that idea since I need such a particular fraction of the pulse width for my duty cycle. Has anyone ever encountered a similar problem? How would you automate this pulse-width cycle?
EDIT: Thanks all for your thoughtful responses. I will more thoroughly go through these ideas after my work day and try and get back to you all!
EDIT 2: The final design incorporates the last op amp as a large time period triangle wave generator as suggested by Jens, which is then fed into the inverting input of the comparator U3A. I'll just round up and calibrate a few pots with my DVM for the funky resistor values. See below: