On Thu, 13 Aug 1998 11:53:31 +0000 Dan Larson writes: >I want to make an "absolute value" amp to output the same positive >voltage for a negative input as it does for a positive input. Circuits with this function are commonly found in op-amp application circuits or op-amp cookbook type of books. It is often called a "precision full-wave rectifier" instead. > >But how do I simply this with a 16F84 with no A/D? > The back emf voltage could be used with a single-slope ADC (capacitor charge timer) often used with PICs. If the charging cycle is short enugh to fit in the motor off period, no sample and hold would be required. Another way to look at it is it is a synchronous voltage to frequency converter where the period of one cycle at a time is measured. >Anyway, I need an op amp circuit that an perform an absolute >value operation so I can experiment with this idea. If your motor always turns the same direction, of course the motor voltage is always the same polarity. Another way to avoid the absolute value amp would be to use two differential amps wired so one is positive and one is negative, and choose the one required via two sample gates ro two ADCs. If the motor doesn't reverse very often, consider a single-ended driver and a relay to reverse the motor connections. If you use a full "H-bridge" to drive the motor, during the emf sampling interval turn on one of the bottom transistors only. The other end of the motor is the emf referenced to ground so no differential amp is required. If you connected both ends of the motor through resistors to the ADC, then turning on the right transistor would always result in a positive voltage. _____________________________________________________________________ You don't need to buy Internet access to use free Internet e-mail. Get completely free e-mail from Juno at http://www.juno.com Or call Juno at (800) 654-JUNO [654-5866]