Multiple motors on 1 board?

Hello all, I've started a pet project and need to control 3 motors at once, but have minimal experience in arduino. I need to know which board(s) are capable of doing this so i know where to begin, but all im finding is that arduino cant do more than 1 at a time.

If it matters its a bldc paired with a magnetic encoder, a linear actuator, and a stepper. I need at least 2 to be able to operate at the same time. I was looking at the arduino due.

poor, poor 3D printers and quadcopters... they don't know that...

2 Likes

Probably a bad choice since all the I/Os are at 3.3V and that will limit you choice of motor drivers/controllers.
No reason why you can't just use an Uno.

1 Like

From what ive seen theres 3.3v & 5v. So i should do 5v? And ive heard the uno being thrown around, can it run multiple simultaneously? Have a dac for magnetic encoder?

Do quads run on arduino?

Where? In tiktok?

To do what?

Where? In my research & other board i have controlling a pump.

And the magnetic encoder i want to use uses (si)? or whatever and cursory searches show connecting with dac

The DAC (aka digital to analog converter) is a kind of output, and the magnetic encoder is an input device, so the "connecting encoder with DAC" looks no sense for me.

I don't recommend you to use a Due since the board is not very popular among hobbyists - so if any problem occurs in your project, not many people can help you.

To clarify; most microcontrollers cannot do 2 things at a time.
But they are sufficiently fast to perform several tasks in such a way that it seems simultaneous.
Something like:

loop(){
   Read position motor 1.
  Calculate desired speed motor 1
  Adjust speed motor 1
  Read sensor 2
  Do something
  Stop motor 2
  Calculate desired speed motor 3
  Set desired motor speed
}

In the meanwhile the controlller can process the interrupts from encoder motor 3...

You do not want 3 parallel cores to handle 3 motors. It will make programming much more difficult as you need to align information exchange in between cores.

Yes.

And ive heard the uno being thrown around, can it run multiple simultaneously?

Yes.

Have a dac for magnetic encoder?

You don't need a dac for an encoder.

Thanks for the insight!
But for what im doing they all will actually run independently. No need to know what the other is doing. Just need to control all of them from one remote with either analog controls or touch screen

Thank you!
How do i connect an encoder then?
It says its spi serial interface.

https://www.monolithicpower.com/en/ma702.html?srsltid=AfmBOooFcXoAlM2kkxTWSez6rKqYEmNTaKYaQZxxEkTX_nxomJ9PuHhF

Arduino  Encoder
MOSI  --> MOSI
MISO  <-- MISO
SCK   --> SCK
CS 	  --> CS

Sometimes CS is called SS
Sometimes MOSI is called COPI
Sometimes MISO is called CIPO

What does that mean for spi though?

Not sure I understand your question, that is SPI.
This explains SPI.

oooh, ok. so you were saying that spi has those connections. I thought that spi was a single type and all those were as well. sorry for the confusion. do i need to connect all of the pin types from the encoder or just one? for instance the uno r4 wifi has cs, copi, cipo, & sck. The only one the encoder has that matches is cs.

This is from the datasheet you posted
image

It shows all 4 signals

MOSI is the same as COPI
MISO is the same as CIPO

And sck is the same as SCLK

It's as in real life: sometimes the same thing has different names :wink:

1 Like

ok thank you so much. i was unclear on that diagram if what it showed was the connections on the encoder itself or the encoder connecting to external devices. im currently also trying to watch videos that explain things so i can see whats going on.

so i connect this to pins d10 to d13 (uno r4 wifi), place it behind my bldc with an encoder magnet attached to the shaft. Connect bldc to uno. Then i need code to read the output from the encoder, and use that data to control the bldc correct?

does the bldc need a relay or motor driver between it and the uno as well?

sorry for all the questions