Servo Motor With Raspberry Pi and Maestro board

  Рет қаралды 15,981

RimstarOrg

RimstarOrg

6 жыл бұрын

How to use the Pololu Maestro servo controller board with the Raspberry Pi 3 to control servo motors. The Maestro is the Micro Maestro 6-Channel USB Servo Controller board. A python module for controlling the board is also available.
This video was made possible in part by these Patreon supporters:
Jonathan Rieke
Printable Science
Robert Büchel
Support RimstarOrg on Patreon www.patreon.com/user?u=680159
or make a one-time donation at rimstar.org/donate_support_rim...
Subscribe so that you don't miss new videos as they come out kzbin.info...
Go to the main channel page here / rimstarorg
Here's the webpage with the Maestro python source code and more details, including a lot about power issues:
rimstar.org/science_electroni...
See also:
Make USB Power Cable
• Make USB Power Cable
Pin Headers - soldering, cutting, male, female, etc.
• Pin Headers - solderin...
Follow behind-the-scenes on:
Twitter #!/RimStarz
Google+ plus.google.com/1163951251362...
Facebook / rimstarorg
rimstar.org

Пікірлер: 39
@ThinkTank255
@ThinkTank255 6 жыл бұрын
Liked just because the explanations were one of the best I've ever heard for anything on KZbin.
@methebeachbum5548
@methebeachbum5548 3 жыл бұрын
So this is how we open whole new world to the maestro board such as blending with opencv and such, make own algorithms in python and send command to the board.
@sablezubshruz9811
@sablezubshruz9811 4 жыл бұрын
THANK YOU SO SO MUCH! Very helpful, with lots of details video. I used Pololu Maestro for my robot control with Pololu C# sample code under Windows, and now moving to Python and Raspberry Pi under Linux. Definitely will use you code. Thank you!
@Whiteoverred5
@Whiteoverred5 6 жыл бұрын
Thank u this really helps with a project I’m working on
@RimstarOrg
@RimstarOrg 6 жыл бұрын
My pleasure. Glad to hear it helps. I'll be adding to the code on the webpage as I progress through my project.
@GREENPOWERSCIENCE
@GREENPOWERSCIENCE 6 жыл бұрын
Awesomee info. Thank you!!
@fidelcatsro6948
@fidelcatsro6948 6 жыл бұрын
i didnt know you can program as well super cool!
@RimstarOrg
@RimstarOrg 6 жыл бұрын
Yup, been programming since I taught myself BASIC and 6809E assembly on a TRS-80 Color Computer in the early 80s. C was my main language but I'm learning python now since I'm doing neural network stuff and most neural network these days seems to be done in python.
@AirborneSurfer
@AirborneSurfer 6 жыл бұрын
Cool stuff!
@RimstarOrg
@RimstarOrg 6 жыл бұрын
Thanks!
@RealBadWolf
@RealBadWolf 6 жыл бұрын
That is awesome!!!!!
@RimstarOrg
@RimstarOrg 6 жыл бұрын
Thanks!
@ianmin9614
@ianmin9614 5 жыл бұрын
How do I expand the range of motor? seems like the motor moves only in the range of 992 - 2000, but it actually moves only 30 degrees. Even without the if logic regulation the motor doesn't wanna move more than that. Could you help me to solve this? Thank you :)
@qzorn4440
@qzorn4440 Жыл бұрын
wow, nice. Would this run on the Orange Pi5 with OPi.GPIO? Thank you.
@johngrezmak1043
@johngrezmak1043 4 жыл бұрын
Very helpful tutorial. I've actually been able to use your Python module to send commands to the Maestro both via the UART and USB connections. For the USB connection, you have to set the serial mode of the Maestro as 'USB Dual Port', and when creating the instance of the MaestroUART class you must set the serial port as '/dev/ttyACM0', since from what I understand the Maestro creates two virtual ports when connected via USB: '/dev/ttyACM0' for commands and '/dev/ttyACM1' for communications. I didn't have to change anything in cmdline.txt to get it to work. I also haven't seen any problems with having the Maestro's power coming from the USB connection, even when moving many servos at once.
@sablezubshruz9811
@sablezubshruz9811 4 жыл бұрын
John, thank you - very helpful comment with explanation how to use USB.
@RimstarOrg
@RimstarOrg 4 жыл бұрын
Thanks for sharing that.
@PedroOliveira-ir9sb
@PedroOliveira-ir9sb 6 жыл бұрын
Is it possible to use the 6 channels to controll 6 servos? Or two of them must be used fot leve-shifting and signal?
@RimstarOrg
@RimstarOrg 6 жыл бұрын
You can use all 6 channels to control 6 servos. See the video at 2:25. Instead of using jumper wires to connect all that, I could have flipped the board over and soldered wires to those points underneath. That way all the servo pins on top would still be available. I did it the way I did so that I could have easier flexibility when trying to power things in different ways.
@AvTheWolf
@AvTheWolf 6 жыл бұрын
For what it's worth, what you're doing by removing the "console=ttyAMA0,115200" is disabling the serial console in the Linux kernel on the Pi (which is probably obvious). Linux supports having a serial console just in case something truly terrible happens and the regular consoles can't be brought up -- the serial console is extremely low-level and can be used for debugging. ttyAMA0 is, of course, the serial device, and the 115200 is the baud rate. You've got to disable the kernel's serial console since you're going to be using the serial port, and you don't want the linux kernel to think that it's allowed to use (and monopolize) the serial port. I think on bigger iron, the kernel is configured to use one of the later serial ports (though I admit, I haven't tried to read or write to the physical serial ports in ages), but of course, it makes sense that the Pi's designers would want to give the kernel the serial port that is accessible on a Pi, if they intended people to be able to use the serial console. It might be more clear to put it this way: The kernel has to get exclusive access to the serial port it's using as a console -- it produces "monitor" output and takes "keyboard" input on that serial port and anything else trying to use it would send garbage to the operating system. Hence the need to take that serial port away from the kernel in order to use it to talk to the Maestro.
@RimstarOrg
@RimstarOrg 6 жыл бұрын
Thanks.
@narayanbandodker5482
@narayanbandodker5482 6 жыл бұрын
Well, the PI has a USB port, so couldn't you connect the Maestro directly to the PI, without the level conversion? Or would it require some other quirks and software to get working? Anyway, nice video!
@RimstarOrg
@RimstarOrg 6 жыл бұрын
I saw that others couldn't get it to work so I didn't try it.And thanks!
@jmyrng
@jmyrng 4 жыл бұрын
@@RimstarOrg What´s the problem with running the Maestro via USB?
@thebeststooge
@thebeststooge 6 жыл бұрын
Why would the pi have trouble controlling a servo like those pictured but the Arduino (a far inferior setup) not?
@RimstarOrg
@RimstarOrg 6 жыл бұрын
The Pi is running the Linux operating system with multiple things going on. Depending on the priorities set for things, the servo software running on the Pi can be interrupted at any time, which means you'll have delays. It is doable, just won't be perfect. The Arduino has far less going on. There are interrupts for timing, but that's far less than a full-blown non-realtime OS. Of course, even an Arduino can have delays depending on what else your code is doing. Feel free anyone else to pipe in on this...
@thebeststooge
@thebeststooge 6 жыл бұрын
Well, the pi is magnitudes faster in clock speed, and operations per second, than an Arduino too so it should be able to handle it unless someone was playing a video game on the pi but just sitting there calculating, and computing, and controlling the Pi should blow the socks off of an Arduino.
@paranoidpanzerpenguin5262
@paranoidpanzerpenguin5262 6 жыл бұрын
Real time operations like controlling machinery requires a controller with a real time clock that lets the controller start and finish operations in exact time frames. You also need the software that times and schedules your operation exactly in the time you expect. Regular OS like Linux and Windows schedule threads to run whenever based on whatever algorithm they use to efficiently give every program time to run, which is how they can handle multithreading hundreds of programs running in the foreground and background.
@thebeststooge
@thebeststooge 6 жыл бұрын
Precisely what I wanted to know Panzer and the #1 reason I never jumped on the Pi bandwagon and your explanation confirmed my suspicions from a few years ago when PI was first released . Seems it would be better, and cheaper, to use a Pic or an Arduino for these sorts of things. Thank you.
@paranoidpanzerpenguin5262
@paranoidpanzerpenguin5262 6 жыл бұрын
No problem, the Pi is a fun tool though. AFAIK it's basically what you'd find in a smartphone, which is why people use Pis for stuff like media hosting servers for home, streaming boxes (like chromcast), very light-weight desktop for internet browsing, and other stuff you would normally need a personal computer for. Arduinos are more for robotics and machinery and other types of control systems.
@evaying7540
@evaying7540 5 жыл бұрын
Hey, what should I do if motor runs at least 6V
@RimstarOrg
@RimstarOrg 5 жыл бұрын
That's not a problem. See the Maestro manual pages88-89 www.pololu.com/docs/pdf/0J40/maestro.pdf.
@evaying7540
@evaying7540 5 жыл бұрын
Thank you so much!! Also, which way did you use to control pi as I didn't see either HDMI wire or wireless Bluetooth adapter. Sorry to have so many problems...I'm new to raspberry pi and your video really helped me a lot! There are so resources I've checked but they can be very complex or just not working..
@RimstarOrg
@RimstarOrg 5 жыл бұрын
The Raspberry Pi has WiFi built in. I connect it to my WiFi network and access it from my computer. But the question then is how do you set up the WiFi on the Pi in the first place? Most people connect an HDMI monitor and USB keyboard and mouse to it and boot it up like a regular desktop. That way they can set up the WiFi. After that they can boot it up like I do and access it remotely. If you don't have a monitor and keyboard to connect to it then it's more tricky. I talk about all these options and some solutions on my webpages here rimstar.org/science_electronics_projects/connect_to_raspberry_pi_via_wifi_wirelessly.htm Another getting started resource is the main Raspberry Pi website here www.raspberrypi.org/
@evaying7540
@evaying7540 5 жыл бұрын
RimstarOrg XD I forgot I have the WiFi adapter, it’s in the box. Thank you!!
@Oinikis
@Oinikis 6 жыл бұрын
Why not Arduino?
@RimstarOrg
@RimstarOrg 6 жыл бұрын
Do you mean instead of the Maestro servo motor controller board or instead of the Raspberry Pi? If you mean instead of the Pi, I'm going to run some big neural networks on the Pi with a Pi Camera. If you mean instead of the Maestro, in my experience I'm getting finer servo movement with the Maestro than I ever did with the Arduino's main loop.
Make USB Power Cable
3:13
RimstarOrg
Рет қаралды 230 М.
The Petabyte Pi Project
22:27
Jeff Geerling
Рет қаралды 2,1 МЛН
Increíble final 😱
00:37
Juan De Dios Pantoja 2
Рет қаралды 16 МЛН
Как быстро замутить ЭлектроСамокат
00:59
ЖЕЛЕЗНЫЙ КОРОЛЬ
Рет қаралды 13 МЛН
ПООСТЕРЕГИСЬ🙊🙊🙊
00:39
Chapitosiki
Рет қаралды 60 МЛН
Sprinting with More and More Money
00:29
MrBeast
Рет қаралды 164 МЛН
Raspberry Pi Servo Motor Control
17:36
ExplainingComputers
Рет қаралды 381 М.
Making a Servo Controlled Eyeball for Pi Camera 2
7:51
RimstarOrg
Рет қаралды 30 М.
Droid servo animation and control with Padawan and Maestro
21:22
Imperial Light and Magic
Рет қаралды 3 М.
Getting Started with the Pololu Maestro Servo Controller
6:19
Pololu Robotics and Electronics
Рет қаралды 258 М.
Raspberry Pi Servo Motor Control - No Jitter!
13:52
Gary Explains
Рет қаралды 51 М.
Do Volts or Amps Kill You? Voltage, Current and Resistance
5:16
RimstarOrg
Рет қаралды 3,5 МЛН
The Raspberry Pi Pico WAS Overrated! But that changed!
10:18
GreatScott!
Рет қаралды 589 М.
Top Fifteen Mistakes People Make When Designing Prototype PCBs
12:26
Cosplay Light and Sound
Рет қаралды 128 М.
How To Unlock Your iphone With Your Voice
0:34
요루퐁 yorupong
Рет қаралды 20 МЛН
С ноутбуком придется попрощаться
0:18
Up Your Brains
Рет қаралды 399 М.
Где раздвижные смартфоны ?
0:49
Не шарю!
Рет қаралды 718 М.
ЭТОТ ЗАБЫТЫЙ ФЛАГМАН СИЛЬНО ПОДЕШЕВЕЛ! Стоит купить...
12:54
Thebox - о технике и гаджетах
Рет қаралды 157 М.