Is it possible to control the exact amount of voltage to a pin on an arduino board?
Use a calibrated adjustable voltage source. Set it to 3.1V and the pin will receive 3.1V, set it to 4.5V and the pin will receive 4.5V.
But seriously, you will have to give some more detail about what you're trying to achieve or which problem you're trying to solve before somebody can give a sensible answer.
Your topic has been moved to a more suitable location on the forum. Installation and Troubleshooting is not for problems with (nor for advice on) your project See About the Installation & Troubleshooting category.
A device called a digital to analog converter (DAC) will do that (within the resolution of the DAC). Some Arduino compatible boards have 1 more DAC channels built in like the ESP32. There are external modules that can be added to other Arduino boards to get that capability.
Another way is to low pass filter a PWM output. That will also require external hardware and some calibration to get precise output voltage.
What Arduino board?
How precise the output voltage?
How much current will be required of the output?
What voltage range for the output?
Thank you for the answer. I am trying to set a vibrating coin motor to vibrate with defferent intensities.
Oh wow. Thank you for the feedback. I am trying to control the intensity of a vibrating motor.
What Arduino board: Uno
How precise the voltage output: It depends on how different the vibrating motor feels at different voltages
How much voltage will be required for the output: I currently do not need more than 5v
What rage for the voltage output: 0-5 v
Thank you SO much
You may be able to do what you want with just PWM. Varying PWM varies the average voltage that the motor sees.
You will probably need a driver for the motor as an Uno output pin cannot supply the required current for the motor. Here is a motor driver using a logic level MOSFET.
Choose the motor driver based on the stall current of the motor and the motor supply voltage. The stall current can be several times the running current. The stall current will be drawn, briefly, every time that the motor is started. The stall current should be listed in the motor data sheet.
Thank you!
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.