Motor Control

Thread Starter

Mr Michael

Joined Oct 7, 2020

I've recently been tinkering with my first Arduino and would like to try and apply some of the things I've learned to modify a DC motor control unit and would like to ask the community for some advice.

My plan is to replace the existing potentiometer and switch with a custom control circuit that can be controlled programatically with the use of a distance sensor and some code. I come from a software background but don't have a great deal of experience with electronics so would appreciate it if anyone could guide me in the right direction.

The first step for me is understanding how the unit currently works; soo far I've hooked up my multimeter to the output terminals (+/-) which read 38v, when turning the pot I expected this value to change however it did not. So instead I measured the voltage across the pot and output terminals which did show a range between 1v - 3.3v when adjusting the pot. I assume that this voltage signal goes into the microcontroller which then generates an appropriate PWM signal to activate a transistor and then to the output terminals? Perhaps if I invested in an oscilloscope, this would allow me to see this signal?

Does this sound about right?



Joined Jan 18, 2008
Does you multimeter read peak or RMS voltage? What is the operating voltage of the DC motor? Yes, it is possible that an oscilloscope will show the PWM change while your meter does not. As a crude test, you might put a low-pass filter (resistor in series, capacitor to ground) to effectively integrate the PWM signal and see whether the integrated output changes.

From Wikipedia:


Joined Jul 10, 2017
The slider of the potentiometer is connected to one of the analog input pins of the arduino. The switch is connected to a digital input pin, probably with a pull up or pull down resistor. If you look at the listing of the program you will find where the analog pin is read and how it's value is used to change the on/off ratio of the PWM signal to the motor.
I have attached a link to an an arduino distance measuring project. There, the distance is measured using an ultrasonic transducer. The result is displayed on an LCD display. If you read through that program, you will be able to find where the value from the transducer is received. You could include parts of that project in your motor shield hardware and software, using the distance value to control the speed of the motor Measurement using Arduino Ultrasonic Sensor is a,Sensor HC SR-04, which is a low-cost sensor..