According to input voltage motor driving with different RPM - Page 1
Forum section: electronics / projects

author: elefurtronik
author_rank: Regular Contributor
timestamp: September 03, 2022, 11:42:13 pm
content: Hello,I would like to create a circuit that controls a motor.I will give 12v and 6v input separately and the circuit should inform the Arduino's analog input.Who can help me to create this circuit with the most cost effective way?

author: Terry Bites
author_rank: Super Contributor
timestamp: September 20, 2022, 09:04:16 am
content: Firstly you need to define the motor type and power. A BLDC type will need more complex control.So you need to switch between 6V and 12V to a regular DC motor and have the Arduino measure the voltage is being applied?Divide down the motor voltage by 10 and use an arduino analog input to check the value. You need to filter the pwm and brush noise from the motor as shown.The zeners protect your arduino inputs.If you want basic electronic control over the drive voltage use a PWM signal from the arduino and control a power MOSFET.Adjust PWM duty cycle to control motor voltage. Lots of code for this kind of application out there.Not all motors will be happy with a high frequncy PWM- experiment.Note there is no motor short or motor stall protection.Or just use a ready made solution (recomended) with handy protection features. eg L6202 or L6258.

author: elefurtronik
author_rank: Regular Contributor
timestamp: September 26, 2022, 07:51:55 pm
content: Hi,The motor is a 6v mini pump motor. I supply 6v from the battery and 12 volts from the power supply separately.Why do I need to divide by 10?This noise is a very big issue for me, especially on the current side. I see some spikes at the beginning and after that, there is huge PWM noise.I chose the L9110S motor driver. Thanks for the recommendation, I am also going to check those ICs.One last question will be how can I give a constant voltage with battery to my motor? I just don't want while my motor is working the supply voltage is changing. Can I make it with Zener diode? Do you have any recommendations?

author: DavidAlfa
author_rank: Super Contributor
timestamp: September 27, 2022, 09:19:16 am
content: You can add a small DC/DC switching regulator from ebay/AliExpress so It outputs 6V from the 12V supply.You need to divide the voltage because the analog input won't tolerate 6-12V, only 3.3 or 5V depending on the controller used.10 is perhabs a bit too much if you're going to measure 12V max., 5 should be enough, but add a zener after the resistor divider to protect the analog pin from spikes, also a small qnF capacitor will add some basic filtering and improve the ADC sampling.

author: elefurtronik
author_rank: Regular Contributor
timestamp: September 27, 2022, 06:42:36 pm
content: Is there any other more cost-effective and compact way to do it instead of huge DC/DC converter?

author: DavidAlfa
author_rank: Super Contributor
timestamp: September 27, 2022, 11:07:58 pm
content: Huge? There're 3A transistor-sized modules for cheap.https://a.aliexpress.com/_EIKpxsFOr you could feed 25% 12V pwm, that would put the same power on the motor as 6V. But given the small cost of the step-down modules, I'd go with them.

author: elefurtronik
author_rank: Regular Contributor
timestamp: September 30, 2022, 12:24:25 pm
content: Quote from: DavidAlfa on September 27, 2022, 11:07:58 pmHey,Link doesn't work.

author: Zero999
author_rank: Super Contributor
timestamp: October 01, 2022, 06:41:12 pm
content: Quote from: DavidAlfa on September 27, 2022, 11:07:58 pmThe required duty cycle is 50%, not 25%. This is because a DC motor is not a resistive load.