I wrote: > > I am trying to implement control loops with the pwm output of an > > 16C73. As I am not an engineer, I don't have the theoretical > > background to do it properly myself. The following two projects are on > > my mind: > > > > 1. A more or less stabile adjustable output voltage 0..4V that can > > source a current of 0..1A. I thought of the following schematic: > > > > ---------------+ > > | feedback > > A/D input +------------------------------------+ > > | | > > | +5V | > > 16C73 | / | > > | +-----+ |< | > > PWM output +------+ R +-----| PNP | > > | +-----+ |\ | > > ---------------+ \ L | > > ----UUUUUUU----+------> > > _|_ > > ___ C output > > | > > GND--+------> > > > > 2. A regulation of the RPM of a small dc motor. I thought of using the > > pwm feature of one ccp module to generate a pwm signal that > > drives the motor (buffered with a transistor) and use the capture > > feature of the other ccp module to measure the RPM with some kind of > > optical sensor. > > > > In both cases I would like to have a resolution of about 6 bits if > > possible. The changes in voltage and RPM won't be faster than 1s for > > 0%-100% or 100%->0%. > > > > I guess that somebody has done something similar already. I would > > appretiate any ideas/corrections/code fracments/schematics. Gvran Mvrk wrote: > 1: Your circuit won't work. Add a rail-to-rail op like LMC7101, put > an NPN emitter follower to the output and the RC-filtered PWM to the > +input The -input goes to the emitter. Do I understand you correctly? You mean that I should create the DC before the Transistor? I can't do that because I want prevent the transistor to heat up. The purpose behind the L-C-circuit was that I don't need to cool the transistor. Why do you think my circuit won't work? Gvran Mvrk wrote: > 2 You don't need the CCP or A/D to do that. We've used a 4MHz 16C620 to > generate a 20 kHz PWM with 4 bit resolution. Speed feeedback is obtained > from the EMF-voltage obtained when drive is removed,comparing it against > the programmable reference. This gives 5 bits resolution and simple > statistical proessing adds the remaining bit(s). The time constant is a > problem, an ironless armature motor with short mechanical time-constant > usually has too low inductance, so an external inductor will be needed. > The EMF feeedback will need some RC filtering to remove the commutation > spikes My problem with EMF is that I don't know what moter will be connected to the output of (1). The motor in (2) won't change but I maight not have enough space to use EMF. How big is such a circuit? Do you have a schematic to share? BTW: I use a very small Faulhaber-motor in (2) -- Stefan Bormann s.bormann@tu-bs.de http://www.stud.uni-hannover.de/~toci/stefan_d.htm