I have project where 90v dc rotating motors(4 of them) must be controlled via Laptop.

What is the most simple solution, Can I go with raspberry pi or need to go lower with arduino or there are maybe some motors which have usb controller module inside ?



Since some of guys told me to explain my problem deeper, I need to have 2 dc motors, on 30cm distance, spinning oposite direction( to be able to launch something(like a sling)

They need to rotate at the same speed(just oposite direction) with option of regulating that speed of rotation (rpms)

As an input, I would prefer raspbery Pi (usb maybe) since the end goal is to be able to control it over web-application.

So to summarize, User press start button with predefined speeds over web app, than controller( raspberry pi can have web server , that's why it's on my mind) modulates voltages and rotation of 2 two motors and when it fires they shut down.


Ok from What I know now, I found out that 2 dc motors of 36v 300w and 3000rpm would be enough. Now tricky part with wiring.

How to connect raspberry Pi with those 2 motors, I need to be able to change rpms so I guess some potentiometer would be good for that.

Is there something like digital potentiometer to take input from raspbery pi up to 3.3V and convert them to up to 36V to be able to control motors?


The easiest approach is to use a commercial DC motor controller per motor that accepts an isolated control input (either analog or digital). Pick one that is matched to your motor and to your requirements for control. For example, you may wish to use one with an encoder feedback input, or you may prefer to use the coarser IR compensation type.

Take care that many low cost DC motor controllers do not have isolation from mains and are designed for use with a potentiometer control input. They are not suitable for your application, in general.

Generating the control input is relatively straightforward- analog might require a digital-to-analog converter circuit (just one I2C-bus chip such as the MCP4728 will do 4 channels) and likely an amplifier and power supply.

  • \$\begingroup\$ Check for update #2 \$\endgroup\$ – Mark O Nov 21 '18 at 14:25

To chose between Arduino and RPi, does your application do anything else ? If there is no calculation. using arduino is better (more adapted)

But you can't control a dc motor with arduino or RPi

you have to design a power circuit (using H bridge, Mosfet or relays depending on the current need and the response time)

If you use arduino there are shields for controling dc motors (they are little expensive but very simple to use)

  • \$\begingroup\$ Check for update #2 \$\endgroup\$ – Mark O Nov 21 '18 at 14:24
  • \$\begingroup\$ This is a comment, not an answer. The question as it presently stands is not answerable. \$\endgroup\$ – Chris Stratton Nov 21 '18 at 14:28

It depends on your application requirements, which you have not documented at all.

The only thing you really say is that the motors need to be controlled by a 'Laptop'.
If by a laptop you mean a Windows or Linux x86/64 device where you will run your controlling software then you need to consider:

  1. What is the connection between the 'Laptop' and the controller? Is it USB, Ethernet, or Wireless (WiFi etc)?
  2. Is there feedback (sensors) from whatever you are driving with the motors? Eg. Are you sensing speed, torque, position etc etc?

Arduino would make sense if a simple serial over USB link will suffice for your needs, but for Ethernet and Wireless, the drivers available in a R'Pi may help simplify the project.

Arduino could be fully powered from the USB connection, and then interfaced to the motor driver switches/relays.
R'Pi would typically need a separate power supply, though USB powered is possible if you have high power ports on the laptop.

Arduino boots in under 2 seconds, an R'Pi takes perhaps 30-40 depending on model and software.

Try defining your problem better and then the choice of MCU may become clearer.


Now you've defined the problem somewhat better, though not completely (no idea of motor power, is it a universal 90VDC motor with brushes or a BLDC? ...suddenly it's 2 motors and not 4?).

If your choice is to use an R'Pi, then trying to IP network over USB is probably the hardest connection you could try to create.

The most obvious way to provide support for a Web application is to use an IP connection over Ethernet. If all you have is a Laptop, then you can connect the Ethernet ports on the Laptop and R'Pi (you don't need a crossover cable or a switch) with static IP addresses.

This would mean separately powering the R'Pi and probably providing isolation between the R'Pi and the motor controller or between the motor controller and the power switching.

If you want to control the motor speed you will need at least a 1ppr sensor, but this will depend on the rpm you desire. Slower speeds may require more than 1pps.

  • \$\begingroup\$ Check my update above \$\endgroup\$ – Mark O Nov 20 '18 at 11:24
  • \$\begingroup\$ @MarkO Boy, you really expect people to work for an upvote. \$\endgroup\$ – Jack Creasey Nov 20 '18 at 16:34
  • \$\begingroup\$ Thank you man for your deep answer. I couldn't give you upvote since I am new here in electronic stackoverflow. But since I know something abot web servers my goal was to set up Rasp web server for each machine( which is made from 2X90v 2500rpm motors) and through it set the speed and oposite rotation of motors. My problem is in wiring, since rasp is 3.3V if I recall and would need to use relay to control 90V. Could you be kind and explain wiring in little bit of details :) \$\endgroup\$ – Mark O Nov 21 '18 at 11:05
  • \$\begingroup\$ Check for update #2 \$\endgroup\$ – Mark O Nov 21 '18 at 14:25

Using a Raspberry Pi's general purpose I/O to drive relays would be a cheap and easy way to get this working.

You need the relays because the Pi cannot switch the 90V for you directly.

Edit after update #2:

You need to research PWM and MOSFET H-bridges. From your update, this seems to be the best way to approach your problem. You should be able to make a MOSFET driver for you motor that can operate from your Raspberry Pi, using PWM.

If you need their speed to match precisely, you will need some kind of feedback. An optical encoder may be a good choice. You can easily handle all that with a Raspberry Pi running a webserver. Googling those keywords produces many example projects that are very similar that you can study.

  • \$\begingroup\$ Check for update #2 \$\endgroup\$ – Mark O Nov 21 '18 at 14:24
  • \$\begingroup\$ This won't work - the application requires that the speeds match, and that is not something you can achieve with relays. \$\endgroup\$ – Chris Stratton Nov 21 '18 at 14:28
  • \$\begingroup\$ @ChrisStratton His update changed the question dramatically. See my edit. \$\endgroup\$ – evildemonic Nov 21 '18 at 15:57
  • \$\begingroup\$ Even so, this is a hand-waving response that is little more than a comment - someone who posted that question is nowhere near being able to design a MOSFET driver that will actually work for a motor of this power. Perhaps the fundamental problem is that the question is too broad to belong here. \$\endgroup\$ – Chris Stratton Nov 21 '18 at 16:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.