CytronTechnologies / MAKER-PI-PICO

MIT License
112 stars 49 forks source link

Suggestions for controlling motors? #13

Open sgbaird opened 2 years ago

sgbaird commented 2 years ago

How would you recommend driving a motor using the Maker Pi Pico base? I'm interested in controlling this peristaltic pump. Or is there something other than the Maker Pi Pico base that you'd recommend? For me, I want it to be WiFi-enabled, so preferably something that works with the Pico W.

https://github.com/CytronTechnologies/MAKER-PI-RP2040/issues/4

EDIT: Perhaps https://shop.pimoroni.com/products/automation-2040-w

kiate commented 2 years ago

If Pico W is your preferred choice, you may consider to use Maker Drive for motor control. This little motor driver not only allows you to control the motor speed, it has a 5V output which can be used to power up the Pico W via the VSYS pin too. You may even skip Maker Pi Pico Base if the expansion and onboard features are not needed. However, it would come in handy for creating projects. The MicroPython library for motor control is available here

kiate commented 2 years ago

@sgbaird I got super excited with the Pico W... quickly connect a few things together and it works! All thanks to wonderful getting started guide by Raspberry Pi. You may take a look at my proof-of-concept here.

sgbaird commented 2 years ago

@kiate thanks for the link to the Maker Drive and your example code! I think this will help a lot. Agreed about the nice getting started guide, and the Pico W has also been exciting to me :grin:. For provenance, I came across a few more options:

Powering the Pico W via VSYS seems like a nice option! And probably OK to have both VSYS and USB connected when needing to upload code to the Pico W. I.e. do whatever code stuff needs to happen via USB, then unplug and let it run via main.py.

I've been developing MicroPython code for the Pico W here.

kiate commented 2 years ago

Oh It's a shame that the item is not available in stock. Btw getting from distributors might be a good idea due to shipping cost and taxes. Great info of all the parts listed there. Kitronik's board has a small form factor and is flexible for wiring with its terminal block. Do you mind sharing what kind of project are you working on?

sgbaird commented 2 years ago

Oh It's a shame that the item is not available in stock. Btw getting from distributors might be a good idea due to shipping cost and taxes.

Yeah, I'll probably go with a distributor.

Great info of all the parts listed there. Kitronik's board has a small form factor and is flexible for wiring with its terminal block.

Thanks! Agreed that the Kitroniks board seems nice, though it might be nice if it had a second row of headers on each side to make arbitrary pins more easily accessible (similar to the Maker Pi Pico).

Do you mind sharing what kind of project are you working on?

Sure! The motivation for my project is nicely captured at https://acceleration.utoronto.ca/vision and was largely in response to a call for white papers. A recent manuscript version is available here. In a nutshell, it's a demo that helps teach "Industry 4.0" style principles of automation hardware and machine learning focused on laboratory-scale research settings and materials discovery. [hackaday], [github], [youtube]

kiate commented 2 years ago

That's a really unique use case for a product. Even a very simple feature as a built-in RGB LED can be utilized for machine learning research.

sgbaird commented 2 years ago

That's a really unique use case for a product. Even a very simple feature as a built-in RGB LED can be utilized for machine learning research.

Thanks! :)

sgbaird commented 2 years ago

As a side note, one observation is that cheaper peristaltic pumps are generally 12 V devices; however, the Maker Drive (and several others) only support output voltages up to ~10V. I can go with a 5 V peristaltic pump, but it's over 2x the cost of some of the cheaper ones. Any thoughts here?

EDIT: perhaps just using the max input voltage and driving the DC motors at the lower voltage with the Maker drive is fine.

sgbaird commented 2 years ago

Essentially the Maker Drive, but tolerant of higher currents (3A) and voltages (4-16V): https://www.cytron.io/p-3amp-4v-16v-dc-motor-driver-2-channels

kiate commented 1 year ago

Hi, we've just launched a robot controller board, and it works with Raspberry Pico and Pico W https://www.cytron.io/p-robo-pico-simplifying-robotics-with-raspberry-pi-pico

sgbaird commented 1 year ago

@kiate fantastic! This looks so good. Thank you for pinging me on this. I used two MDD3A's for https://github.com/sparks-baird/self-driving-lab-demo#clslabliquid. I will keep this one in mind!