I am fairly new here and for school I have to make a DC motor rotate at variable speed by using an arduino. The nominal voltage of the motor is 12V (external battery), so I want to control this battery voltage in order to steer the motorspeed. I also have to make a control loop in order to keep the motor running at the same rotational speed untill I decide to set a new speed. Is it possible to make only with an arduino such a controllable voltage program? Or do I need other electric components like transistors or such?
Any ideas how to make this? Is there perhaps someone who can show it on a scheme on 123d circuits?