Notifications
Clear all

Controlling 4 DC motors with Raspberry Pico

6 Posts
3 Users
1 Likes
134 Views
(@viduka)
Active Member
Joined: 7 months ago
Posts: 7
Topic starter  

Hello! I have a project where I need to control 4 DC motors independently with a Raspberry Pico. I found a couple of shields that make it easier to achieve this like the Waveshare Pico Motor Driver and Kitronik Robotics Board. Is it possible to do it by simply using a coupe of Dual H-bridge motor driver modules. For example the L298N board where I could possibly power the pico from the 5V output from one of the L298N boards.


   
Quote
Ron
 Ron
(@zander)
Illustrious Member
Joined: 3 years ago
Posts: 4801
 

@viduka Tell us a little more about your project. Also there are more efficient and newer H bridge modules, you might want to check Bill's video at Video  and the article at Article

Arduino says and I agree, in general, the const keyword is preferred for defining constants and should be used instead of #define
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon
My experience hours are >75,000 and I stopped counting in 2004.
Major Languages - 360 Macro Assembler, Intel Assembler, PLI/1, Pascal, C plus numerous job control and scripting


   
ReplyQuote
ElectricRay1981
(@electricray1981)
Estimable Member
Joined: 5 months ago
Posts: 115
 

Posted by: @viduka

Hello! I have a project where I need to control 4 DC motors independently with a Raspberry Pico. I found a couple of shields that make it easier to achieve this like the Waveshare Pico Motor Driver and Kitronik Robotics Board. Is it possible to do it by simply using a coupe of Dual H-bridge motor driver modules. For example the L298N board where I could possibly power the pico from the 5V output from one of the L298N boards.

 

Like @zander wrote a bit more details about your project would help. But I can reccomend you to have a look on a TB6612FNG this is a H-bridge with MOSFET's and it's more efficient so uses less power. It works pretty good IMO but there are also better bridges but come with higher prices. Im looking at a bitter better briges for my project as I have noticed differences between the left and right (or A and B motors) on those bridges. I'm not sure if it is software related or hardware. 

Besides of all that as far as I know the L298N is for two motors only. Do yo uwant to use one driver board for the four motors? In that case you should consider also the current that those boards can handle.

 

Grtz,
Ray


   
ReplyQuote
(@viduka)
Active Member
Joined: 7 months ago
Posts: 7
Topic starter  

Sorry that I didn't provide more information about the project earlier. I have a decoration like this where 4 'hot air balloons' are hanging from the ceiling using fishing line.

image

I'd like to control these using 4 motors independently so that they could go up and down randomly. I'm thinking of using the small yellow motors that come with robotics kits. I'll attach a thread spool to the shaft of the motors and wind the fishing line around it. This would make the balloon go up and down as the motor moves forward or backward.
The main constraints are the size of the overall setup, so that they tuck in neatly without being much of an eyesore. The other constraint is how I power the whole thing but that is probably a topic for Power Supply & Battery.
I'm wondering if this is possible to achieve this with Raspberry Pico and 2 Dual H-bridge motor drivers. It is not a problem if there are slight differences between the drivers as it doesn't really affect the end result.


   
ReplyQuote
Ron
 Ron
(@zander)
Illustrious Member
Joined: 3 years ago
Posts: 4801
 

@viduka It sounds like you are on the right track. As others have said, look at the more modern and more efficient H bridges as well. Bill has an excellent video HERE  click more to see link to the article

Arduino says and I agree, in general, the const keyword is preferred for defining constants and should be used instead of #define
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon
My experience hours are >75,000 and I stopped counting in 2004.
Major Languages - 360 Macro Assembler, Intel Assembler, PLI/1, Pascal, C plus numerous job control and scripting


   
ReplyQuote
(@viduka)
Active Member
Joined: 7 months ago
Posts: 7
Topic starter  

@zander Thanks for pointing me to that video. Very very informative. I went ahead and ordered a few MX1508 modules. Now will have to wait for them to arrive 🙂


   
ReplyQuote