Ok, this circuit looks like it is working fine: +12V ----------------+----------------------+-------- OPTO | 220 | +--------+ | +\/\/\/-+ _ /| | _|_ |/C | +-| | | INPUT /_\ --> | -+--| |----|_| | | | |\E |/C 1uF \| +-\/\/\/-+ | E---+--| 1K | | |\E | | ----+ | | 10K | / ----+-\/\/\/-+------+ INPUT POT \ |/E | 10K /<--| +----PWM INPUT | \ |\C / | | | \ PWM POT | | +--->/ | | \ 10K | GND -----------------+----------+--------------+----- As you can see, the input signal drives the base of a transistor, which either turns on or off the PWM signal which is then fed to another transistor to amplify it for output. Currently I'm testing with no PWM (haven't got that part ready yet), so with the input at +12V (and varying the pot). About 0.6V in the pot center tap is totally off, and about 1.5V is full volume (when the input pot is adjusted properly, since its setting changes this too), so I'd have to offset the signal 0.5V and then use the pot to adjust the range of PWM voltages to that range. So the only thing left is cleaning up the PWM output to a constant DC voltage to feed it into the circuit. -- Hector Martin (hector@marcansoft.com) Public Key: http://www.marcansoft.com/hector.asc -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist