Motor as potentiometer?

Im thinking of a project that will use a motor like a potentiometer. I will put a handle on the motor and based on how fast im turning it it will produce more voltage thus more output at another pin of the arduino. Is this possible?

In general, yes. Make sure the motor delivers DC, not AC. Also make sure the voltage never exceeds the maximum allowed voltage of the controller pin.

You mention ‘another’ pin… is there a ‘first’ pin in use?

I’d suggest a good size capacitor to smooth out the voltage from the motor, because the analog input doesn’t know where the ‘generator’ poles are is in its rotation.

You may find that you need to crank it fairly fast in order to output a usable voltage.

Note that the voltage output will reverse polarity if you turn the motor in the opposite direction

1 Like

GOOD POINT !

1 Like

yeah thats fine thats what i want

not a usable one i will map the voltage to an analog input so it acts as potentiometer but constantly

well to use it as a potentiometer for the arduino i guess you have to connect the dc motor to the arduino itself so thats the first pin or any pins needed.

How is the Arduino going to measure the negative voltage ?

Remember, the voltage will be nonlinear to the speed of rotation, and as @UKHeliBob pointed put, it will only increase, negative direction is a different proposition!

You’re probably better off with a small encoder or stepper with a knob, but the latter also makes reverse detection tricky.

Maybe a centre-off toggle switch to click up or down.

Use a bridge rectifier.

1 Like

No one mention the problem with brushes, if the motor has brushes. The voltage value being created will bounce around as the segments on the armature will have a different resistance for each segment and will contact two segments at some positions.

1 Like

i guess like that

why? i never mentioned an ac motor

when you say stepper you mean stepper motor ?

Like what ?

How will you be connecting the motor to the Arduino ? Probably between an analogue pin and GND. If so, then what will happen when the motor outputs a negative voltage to the analogue pin ?

Yes, you can use a stepper motor to generate pulses as you turn it, but you still have to use logic to identify which direction it’s moving.

When I replaced my forced air furnace two years ago, I scavenged the old one for parts. Turned out the overall failure was in the in-built motor driver run caps on the blower fan assembly, which were not user serviceable, but I was able to remove the fan motor altogether.
I connected this to a few different loads: just different lights on their own or in series with others and had my kids hand crank the motor to light up the lights.
We found it fascinating how, not only was the rate of rotation critical, but also the increasing torque that was required as the load increased.

You haven't specifically said if you would like to detect which direction the motor is turning as well as the amplitude of its output.
If not, then the suggestion in post #12 can give a positive voltage output regardless of direction.
If so, then accurately detecting the exact point that direction changes will be problematic and you may have to settle for a "dead band" at very low RPMs.