pwm control of a dc 12 volt motor with a potentiometer

Thread Starter

butch28

Joined Oct 14, 2020
12
i have a arduino and or a pwm control board! i need to know how to take a pot and only move the pot 20 degrees and go from 0 to 100% in 1 direction only. i am green on arduinos and pwm i know they take 0 to 5 volts! but i only want the pot to turn 20 degrees and be adjustable to set points start and end! does anyone have ideas? thank you
 

KeithWalker

Joined Jul 10, 2017
3,063
i have a arduino and or a pwm control board! i need to know how to take a pot and only move the pot 20 degrees and go from 0 to 100% in 1 direction only. i am green on arduinos and pwm i know they take 0 to 5 volts! but i only want the pot to turn 20 degrees and be adjustable to set points start and end! does anyone have ideas? thank you
Build one of any of the Arduino projects that control the speed of a DC motor using a pot. Then use the "map()" function to change the range of the signal from the pot.
https://www.arduino.cc/reference/en/language/functions/math/map/
Regards,
Keith
 

djsfantasi

Joined Apr 11, 2010
9,156
What Keith said...

In doing so, learn how to use a pot with an Arduino. How do you read the pot position. What do the values mean? How do you map the analog pot values to a different range?

Go to the Arduino reference site, and research the following commands:
pinMode()​
analogRead()​
analogWrite()​
map()​

 

Thread Starter

butch28

Joined Oct 14, 2020
12
Build one of any of the Arduino projects that control the speed of a DC motor using a pot. Then use the "map()" function to change the range of the signal from the pot.
https://www.arduino.cc/reference/en/language/functions/math/map/
Regards,
Keith
thank you both for the info! this is awsome! i will see if this stupid guy can get it done! i have been looking at arduinos for a long time i have so many different things i want to do! i will be back i have some other things i need done also! thank you again.
 

Thread Starter

butch28

Joined Oct 14, 2020
12
You guys are pretty good! here is one for you i need to make this! want to use my phone blue tooth or wifi to a timer control to turn on and off in minutes and hours and program the arduino by phone and run the arduino off a battery and put out a relay output to turn on and off the relay. would need to know how long the battery will last and what voltage i would need! 5 to 12 volts is what i can use to run the project and would like to run off a small battery for months if possible. i was going to buy a timer but if i can program the arduino by phone it would be great.B
 
Last edited by a moderator:

djsfantasi

Joined Apr 11, 2010
9,156
What do you mean by “program the Arduino”? That has a pretty standard meaning, which I think you’re not using.

What you’re proposing can be done, but it’s significantly more difficult than you think.

How are you going to communicate with the Arduino? You’re going to need different hardware depending on your answer. And you’re going to have to learn some sort of communications protocol.

Plus, you’re going to need an app on your phone. Can you program for IOS or Android?

Relays use a lot of power. Which is going to make running for months on a battery difficult to accomplish.

What do you think?
 

Thread Starter

butch28

Joined Oct 14, 2020
12
there are wifi moduals available.
https://store.arduino.cc/usa/arduino-uno-wifi-rev2
this is what i was looking at! can you check it out and see what you think? if it will work as a remote timer by wifi. i read it a bunch it looks like it! more like a garage opener but use your phone to program the code of the arduino! i am pretty sure there is a app for this job! i am looking at a raspberry p4 to communicate with the arduino by wifi! i think this will work for sure.
once i get the project arduino i will get this wifi unit and a p4 and see if i can get it to work.
i have one more problem with the pwm controller. will post it.
 

Thread Starter

butch28

Joined Oct 14, 2020
12
so i have a arduino coming to control the motor by pwm. i purchased this unit and am hoping i can intgrate it to the arduino.
the motors i will be running will need up to 60 amps for ms and maybe 20amps to run it! as you see this unit comes with a pot to control the speed! what i need to do is use the arduino to send the pot signal of 0 to 5 volts, i think that is what all pwm use for off to full on! and you told me i can set the rotary distance on the pot to what distance i want. i will control the pot with a trigger on the pot shaft but only need about 20 degrees of rotation and i need this unit for the amps needed.
https://www.amazon.com/gp/product/B073S3P1FY/ref=ppx_yo_dt_b_asin_title_o02_s01?ie=UTF8&psc=1

i have other things i need to add to the controller,
no. 1 would be a choke
no 2 i need a pulsing adjustable brake with adjustable time length.
no 3 when i make full power i need that to be an adjustable time on the choke, before full power. will do this by contacts.
i will try to explain more, i adjust the choke so i only get 80% of full power, but when i make contact of a button at full stroke i want the choke to turn off and go to full power, ( i am thinking by a relay )

i hope i explained what i want to do and you understand.
2 or more brains are better than one!
This is what my head does to me! i been making machines for 50 years that no one ever thought would work. 4 patents, but i am like edison i never get paid for them
 

KeithWalker

Joined Jul 10, 2017
3,063
That motor controller does not have an input for an external control signal. The only way to control it is with the manual potentiometers and reversing switch. I have no doubt that you will damage it if you try to replace the pots with an external signal from an arduino and you will also damage the arduino. The potentiometers could be connected anywhere in circuit with who knows what voltage across them.
What you need is a DC brushed motor controller designed for radio control. They do have an input for a 0 to +5V PWM signal.
You should do a little more research before you waste any more money on things you do not fully understand.
Regards,
Keith
 

Phil-S

Joined Dec 4, 2015
238
YOU GUYS ARE PRETTY GOOD! HERE IS ONE FOR YOU I NEED TO MAKE THIS! WANT TO USE MY PHONE BLUE TOOTH OR WIFI TO A TIMER CONTROL TO TURN ON AND OFF IN MINUTES AND HOURS AND PROGRAM THE ARDUINO BY PHONE AND RUN THE ARDUINO OFF A BATTERY AND PUT OUT A RELAY OUTPUT TO TURN ON AND OFF THE RELAY. WOULD NEED TO KNOW HOW LONG THE BATTERY WILL LAST AND WHAT VOLTAGE I WOULD NEED! 5 TO 12 VOLTS IS WHAT I CAN USE TO RUN THE PROJECT AND WOULD LIKE TO RUN OFF A SMALL BATTERY FOR MONTHS IF POSSIBLE. I WAS GOING TO BUY A TIMER BUT IF I CAN PROGRAM THE ARDUINO BY PHONE IT WOULD BE GREAT.
That's some shopping list.
If you got one running successfully, you would be doing well.
By doing things one step at a time, you have a far better chance of getting the whole thing to work.
When you say program the Arduino by phone, you need to look at Over the Air (OTA) programming.
You could run some of the Arduino stuff past the Arduino forum but you would need to choose your questions carefully and avoid capital letters and exclamation marks
 

bobcroft

Joined Aug 22, 2011
12
That is one heck of a list of requirements and whilst it can probably be done it would need a lot of experience. I doubt very much whether anyone on here would be willing to design it for you but they would help with specific issues. I would tackle the project one stage at a time. I would highly recommend you 'Google' Ruis Santos at 'Random Nerd Tutorials'. He has published a lot of stuff around some of the aspects of your project. You can use your phone to send commands to a ESP8266/ESP32 enabled Arduino via WiFi which is what I think you are wanting to do. Ruis covers this aspect and, where necessary, appropriate security it you want to control your device via the internet.
 
Top