I have a signal from a microcontroller that varies from 0 V to 5 V. I also have a separate 6 V supply to power a motor. I'm trying to design a circuit that allows the microcontroller signal to proportionally control the amount of voltage the 6v supplies to the motor. So when the signal is 5v, the motor receives 6 V, when it's 2.5 V, the motor is getting 3 V from the 6 V supply.
Vsig = 0 < Vsig < 5 VMot = Vsig * (6 / 5)
How do implement this relationship as a circuit?
All I have so far is a basic NPN amplifier circuit that doesn't do anything I want it to. R1 represents the motor resistance. Vsig is a sine wave with amplitude 5 V and is offset 2.5 V (oscillating between 5 V and and 0 V). Am I along the right lines and what do I have to add to make the functionality I've described?
EDIT: The 5 V controller signal is a PWM signal acting like a 10 Hz sine wave. Motor does not go in reverse. 0 V is stationary to 5 V is full speed.