Connect with us

Controlling a motor from computer

Discussion in 'Sensors and Actuators' started by Rickmc3280, Dec 29, 2013.

Scroll to continue with content
  1. Rickmc3280


    Dec 29, 2013

    I am new here and I have a few questions in order to get me started.

    The project that I am working on is controlling a treadmill motor via PC and/or monitoring the revolutions per minute from the sensor. I am completely new to Electronics. I have a hobby kit that I have barely used but would like to learn where to start.

    The Idea:

    Interface a computer program to a treadmill and controll it by touchscreen using windows or linux.

    What My question is:

    What components will I need, how can you get a computer to control how much power is getting to the motor without potentially frying the computer?
  2. Stese


    Dec 27, 2013

    I'm fairly new here, so I apologise if I step on any toes...

    One way you can control a motor with a computer, would be to use a Raspberry Pi. (

    It has pins on the GPIO (General Purpose IN/OUT) header that specifically cater for PWM (Pulse Width Modulation) which will allow you to control the speed of the motor. Other GPIO Pins on the board also can be used as inputs for the RPM Sensor, and other hardware you might wish to use.

    Please bear in mind, that the Pi is designed as a teaching tool, with a focus on programming, so you might not be able to find a program already written to do what you want it to do, and thus, you'll be encouraged by the Pi Community to write the software yourself!


  3. Harald Kapp

    Harald Kapp Moderator Moderator

    Nov 17, 2011
    In addition to the computer you will need a motor controller that is capable of controlling the treadmill's motor. You need to know the specs of the motor (type of motor, voltage and current required etc.). With that information you can look for a suitabel controller.
    You may want to read the information here to help you get started.

    Once you have the controller, you need to hook it up to the computer. How this is done depends on the controller and your choice of computer. Possibly a serial connection (RS232, USB) can be used, so you don't have to tinker with the hardware.
  4. Thedarkb


    Sep 7, 2013
    If I were you I'd get a large transistor and put the power to the motor through that and use some device with pwm to control it, as for power you should just use a generic transformer of the correct voltage.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day