sine analog compare triangle signal to pwm

Google "Voltage Divider"