No video

Controlling DC and Stepper Motors With A Raspberry Pi - How to use Adafruit DC & Stepper Motor HAT

Пікірлер: 85

  • @fredwupkensoppel8949
    @fredwupkensoppel894927 күн бұрын

    Clear instructions, simple language, safety advice where necessary - that's a good tutorial, great even!

  • @Roxomus
    @Roxomus3 ай бұрын

    You have a really good way of explaining things. Clear, at a good pace, and in the right amount. Thanks for this video!

  • @awensman25
    @awensman255 ай бұрын

    I've done nothing with rasberry Pi, but your explanations make it so easy to understand. Keep it up!

  • @marlonsamaniego7884
    @marlonsamaniego7884 Жыл бұрын

    Excellent video. I am trying to get a very similar setup to work so this was very helpful.

  • @Core-Electronics

    @Core-Electronics

    Жыл бұрын

    Cheers mate 😊 Glad to of helped!

  • @zechenwei1139
    @zechenwei1139 Жыл бұрын

    Thank you for the video! Exactly what I needed

  • @Core-Electronics

    @Core-Electronics

    Жыл бұрын

    Sweeet 😊!

  • @minhtruong9408
    @minhtruong94084 ай бұрын

    Thank you so much to show how to working with i2c stepper motor control. have a nice day.

  • @barrythelad7793
    @barrythelad7793 Жыл бұрын

    incredible video, thank you so much

  • @Core-Electronics

    @Core-Electronics

    Жыл бұрын

    Thanks for your kind words 😊😊❤️❤️

  • @YINGAI1995
    @YINGAI1995 Жыл бұрын

    Just stumbled upon your channel, great production quality and steps!! Subscribed

  • @Core-Electronics

    @Core-Electronics

    Жыл бұрын

    Welcome aboard!

  • @fosterdexing5673
    @fosterdexing567310 ай бұрын

    Great Video! Very informative and useful links too. Thanks!!

  • @user-cf4rw6bt4h
    @user-cf4rw6bt4h4 ай бұрын

    In your video, you used separate power sources for the motor controller and the Raspberry Pi, totaling two power sources. Instead of doing that, isn't there a Raspberry Pi component, similar to a computer supply unit, that automatically supplies the necessary power to each module?

  • @lukalovric4872
    @lukalovric4872 Жыл бұрын

    Great video! Can you show us how to control more than 4 stepper motors with this HAT?

  • @Core-Electronics

    @Core-Electronics

    Жыл бұрын

    The full written up article explains how to stack multiple HATs 😊 the trickiest part is assigning I2C Addresses in the script which requires only one line to be altered in the demo Python scripts.

  • @ownage3523
    @ownage3523 Жыл бұрын

    When soldering the piece at 3:37, is it ok if the solders on different pins end up connecting? Will this mess up anything electronically?

  • @Core-Electronics

    @Core-Electronics

    Жыл бұрын

    Definitely could cause issues (including the dreaded puff of magic smoke)! For instance if you accidentally electrically connected a 5V Pin to the 3.3V Pin that will break your Raspberry Pi. pinout.xyz/ Removing solder can best be done with a lot of flux and solder wick - core-electronics.com.au/solder-wick-desolder-braid-0-8mm-5ft-8015.html You can flick off solder by heating it up and whipping the soldering pencil away from you but it is no where near as elegant or as easy to do.

  • @shubhamkale7420
    @shubhamkale74204 ай бұрын

    Have the same setup as you but motor is not giving the required output. Any suggesttions?

  • @DanielGeri
    @DanielGeri Жыл бұрын

    This is great! Any chance you have advice on how to add a "homing" mechanism to the stepper?

  • @Core-Electronics

    @Core-Electronics

    Жыл бұрын

    The Free and unused GPIO pins are shown in this forum post - forums.adafruit.com/viewtopic.php?f=8&t=115770 With that knowledge you can then add limit switches coming from those previously free GPIO pins. Then you just got to program in what you need 😊

  • @richardliu6163
    @richardliu6163 Жыл бұрын

    Good tutorial.

  • @gilles4332
    @gilles4332 Жыл бұрын

    Hello and thank you for your work, could you show the hall effect sensor connection for the direction limits and the home return with this configuration and the stepper motors, no information on this subject, thank you.

  • @Core-Electronics

    @Core-Electronics

    Жыл бұрын

    Love your idea! That is something I'm definitely interested in pursuing. Until I get to it here is a fellow using hall effect sensors with a Raspberry Pi - kzread.info/dash/bejne/gqqfj8hvoZaTc8Y.html Then all you need to do is write up a Python script to turn it into a Edge/Limit Switch

  • @ownage3523
    @ownage3523 Жыл бұрын

    I have a power supply that delivers 12V at 2A. If I have a stepper motor rated for 12V at 1.68A, will the extra 0.32A from the power supply damage the motor?

  • @Core-Electronics

    @Core-Electronics

    Жыл бұрын

    You are totally safe. The system will only pull the amps that it requires. Come check here if you want to know my Golden Rules when it comes to Power supply selection 😊 core-electronics.com.au/guides/prototyping/power-supply-which-to-choose/

  • @KSp33dlin
    @KSp33dlin Жыл бұрын

    Hi @core electronics! Thanks for the very informative video. I’ve learned to control step motors using a DRV8825 driver with which one usually tunes the step motor current using a potentiometer. Could you explain to me why this board does not require this kind of tuning? Also, what happens if I connect, say, a 1.5A motor to the board? Will the motor try to draw too much power from the board? Sorry if these questions have obvious answers - I’m just getting into electronics. Thanks again and best wishes!

  • @gilles4332
    @gilles4332 Жыл бұрын

    as I told you issac uses an arduino and I want to replace it with an rpi with the hat that you present, I have already printed and assembled all the parts, and modify for the rpi, I also have the stepper motor and my two cameras (an rpi hq and a usb), the one in usb to serve me as a pointer, I think to use open cv, and have an automatic mode and a manual mode, if you can help me it would be great otherwise thank you anyway

  • @Core-Electronics

    @Core-Electronics

    Жыл бұрын

    Sounds like a formidable project 😊 the best place to get help for big project knowledge is our Core Electronics Forum, definitely come write up a post there if you need - forum.core-electronics.com.au/

  • @flickmew99
    @flickmew99 Жыл бұрын

    If I don't have those hat for running my stepper motor, could I directly connect my raspberry pi directly to the regular stepper driver? I heard that you should convert the logic level from the stepper driver first (because most of the pinout using 5v logic), so it would not damage your Pi. But I have seen people directly connect the driver to Pi and had no issued with it. I'm confused

  • @fonz7697
    @fonz7697 Жыл бұрын

    Where can I find the wires used at 5:39

  • @Core-Electronics

    @Core-Electronics

    Жыл бұрын

    I used these Jumper wires here and cut/stripped off one end with my clippers - core-electronics.com.au/catalog/product/view/sku/ADA1954

  • @mickzexe3086
    @mickzexe308618 сағат бұрын

    Hey there, can i also stack the Adafruit 16-Channel PWM + Servo HAT on top of this?

  • @Core-Electronics

    @Core-Electronics

    35 минут бұрын

    These use I2C which can have (theoretically) dozens of them stacked on top of each other. As long as you solder the right pin headers to stack them, it should work!

  • @leftmindmedia
    @leftmindmedia8 ай бұрын

    Is it possible to connect other things with the hat on? I'd like to control both a motor and a light.

  • @Core-Electronics

    @Core-Electronics

    8 ай бұрын

    That depends on what light you are trying to control and how you are setting it up. You can think of the M terminals as a controllable voltage. You can increase and decrease or swap the polarity of the voltage. So if your light is suitable, you can happily run it off another motor channel, and you could even change the brightness of it the same way you would control motor speed, but it all depends on the light. If you want some more help, chuck us a post on our forums, we have a lot more eyes on there. Just give us some more details of the light you are using and the setup: forum.core-electronics.com.au Cheers!

  • @vincentma6792
    @vincentma67929 ай бұрын

    I am receiving an error when running the installation package for the adafruit circuit python motorkit. It is saying that it is an "externally-managed-environment". What could be causing this issue?

  • @gilles4332
    @gilles4332 Жыл бұрын

    Thank you the problem is that I do not speak English, the subtitles are not available and therefore the translation either, despite everything I can understand the principle, is if you could make a video on the subject using the dc stepper hat would be great, my current project is to take the turret from isaac879 and replace the Arduino with the rpi and make it a stellar observation turret, thank you.

  • @Core-Electronics

    @Core-Electronics

    Жыл бұрын

    Subtitles should be available now, sometimes it takes a couple of days. Hopefully that will help. And I would love to see that project completed! Pointing Pan-Tilt systems are the Stars are the best possible use case (in my opinion). Come check out project which does a very similar thing as to what you want - core-electronics.com.au/projects/auto-camera-tracking-system/

  • @gilles4332

    @gilles4332

    Жыл бұрын

    @@Core-Electronics Yes thank you, looking on my side I was stumbling on this project, unfortunately it uses an arduino for engine control, and on my side I do not know programmed in python, it would help me a lot to know how can self-control the engine step by step with video detection (either motioneye or opencv) via the hat, Is there a code that I could import, in any case thank you anyway.

  • @wamtm
    @wamtm Жыл бұрын

    could I stack another board on top of the ada that gives me access to the underlying gpio pins so i can run some solonoids in addition to the stepper motor? Thanks

  • @Core-Electronics

    @Core-Electronics

    Жыл бұрын

    I've added a comment to the bottom of the Article that Address just this 😊. The HAT has pads that break out the unused GPIO pins. That means you won't need to add anything extra to gain access to the GPIO for your Solenoids/Relay Control. Check here for more information - forum.core-electronics.com.au/t/guide-by-tim-how-to-use-stepper-motors-and-dc-motors-with-a-raspberry-pi-adafruit-dc-stepper-motor-hat/15071

  • @wamtm

    @wamtm

    Жыл бұрын

    @@Core-Electronics thank you so much for your fast reply and resource . Really helpful

  • @petrasvestartas4359
    @petrasvestartas4359 Жыл бұрын

    Is it normal that the stepper motor moves and vibrates a lot and in microsteps the sound is like breaking glass?

  • @PickYourPoisons
    @PickYourPoisons Жыл бұрын

    can u add other sensors/inputs with the hat?

  • @Core-Electronics

    @Core-Electronics

    Жыл бұрын

    Absolutely, that protoboard section is ready to be utilised on the HAT and a number of GPIO pins are not being used by the HAT and are free to power/control other hardware - pinout.xyz/pinout/adafruit_dc_stepper_motor_hat

  • @danachristie3862
    @danachristie3862 Жыл бұрын

    is there a way to run a python script using gcode, such as the ending script gcode of a 3d printer?

  • @Core-Electronics

    @Core-Electronics

    Жыл бұрын

    Sweet question and there is indeed come check out these two resources - www.reddit.com/r/klippers/comments/nlxx59/run_python_script_with_gcode/ and github.com/th33xitus/kiauh/blob/master/docs/gcode_shell_command.md

  • @zakariatamzarti8034
    @zakariatamzarti8034 Жыл бұрын

    what is the maximum speed of the stepper motot

  • @Core-Electronics

    @Core-Electronics

    Жыл бұрын

    This 12V stepper motor hums along nicely at 50 RPM with the Adafruit Arduino Motor HAT. The Adafruit Arduino Motor HAT has the exact same Driving IC's as the Raspberry Pi Motor HAT so that's your answer 😊.

  • @brasportt4667
    @brasportt46677 ай бұрын

    Top 😊

  • @X-Ray76
    @X-Ray76 Жыл бұрын

    Does this hat also work with an Arduino Mega 2560 board? (With loose wire connections)

  • @Wizardnil
    @Wizardnil Жыл бұрын

    Can you use this on top of the servo hat?

  • @HairyHitman
    @HairyHitman10 ай бұрын

    Hi @core celectronics Awesome video which I'm using as a base to build a dog treat dispenser with a stepper motor. I've bought the none- soldering version and have set it all up but I'm getting an error on the stepper motor script saying it can't find the i2c devices. I've googled and ran i2cdetect which isn't bring back anything. I've double checked I've enabled i2c, is there a step I've missed? The bonnet does seem loose but I don't know if I'm meant to use too much force putting it on. Any help would be appreciated, thanks!

  • @Core-Electronics

    @Core-Electronics

    10 ай бұрын

    Hey Hitman, flick us the question over on our forums: coreelec.io/forum Our staff check there several times a day during work hours and someone can help you out with that (and if anyone is having the same issue its easier for them to find), we aren't as frequently on KZread support.

  • @anneother6224
    @anneother62246 ай бұрын

    I kind of imagined that I'd be able to buy some kit which would allow the pi to control a stepper with very high level commands such as " rotate clockwise at rate n" But I'm not finding it. Looks like I need something like a pico or arduino. But hasn't someone bundled all that stuff and the driver for me?

  • @fredwupkensoppel8949

    @fredwupkensoppel8949

    27 күн бұрын

    Well, you can basically do that yourself - write a function that converts mm/s into steps/s (clockwise can be found in the example code shown in the video), then you can pass "rotate clockwise at 10 mm/s" to that function.

  • @carloscabrera6683
    @carloscabrera6683 Жыл бұрын

    Can I use a Dc encoder with this motor hat?

  • @Core-Electronics

    @Core-Electronics

    Жыл бұрын

    This simple questions is an excellent one. The libraries made for this HAT won't know what to do with the encoded data from the DC Motor. You can just hook up a DC Motor (which has an encoder) and not use the encoder part just fine with this HAT. There are empty/free pins on the Raspberry Pi. You could write your own script that runs along side the Adafruit scripts that would analyse the encoding for you. You could also use a board more designed for DC Encoded Motors like this one here - kzread.info/dash/bejne/ZJabw9CPlK_NZbQ.html I hope that helps you\ - Tim

  • @hghlndr2
    @hghlndr2 Жыл бұрын

    i tried installing the dependencies and now the module board has no attribute I2C

  • @chrisoology6932
    @chrisoology69323 күн бұрын

    How would I install motor kit on the pi 5 ... it does not install?

  • @Core-Electronics

    @Core-Electronics

    2 күн бұрын

    The Pi 5 has the same 40 GPIO pinout as the previous Pi's so the installation should be the same!

  • @abu8422
    @abu8422 Жыл бұрын

    how many dc motors raspberry pi can move

  • @demetriuscurry2697
    @demetriuscurry2697 Жыл бұрын

    What if someone is using a unipolar stepper motor?

  • @Core-Electronics

    @Core-Electronics

    Жыл бұрын

    You will need to identify which wire is the Centre Tap and connect that one to the Center GND Screw-Down Terminal. The remaining 4 wires make up Two Coil Loops. You can Identify a Coil Pair by checking the end of two wires for continuity with a Multimeter. If the Multimeter beeps (confirming continuity) you have identified coil pair. Come check the full written up article for more help if you need 😊 core-electronics.com.au/guides/raspberry-pi/raspberry-pi-dc-stepper-motor-guide/

  • @ownage3523
    @ownage3523 Жыл бұрын

    If I instead wanted to use a stepper motor and a servo motor, would the setup be similar? What if the servo motor needs to be connected to the same pins as the stepper? Is it ok to connect wires from the servo and the stepper to the same pins?

  • @Core-Electronics

    @Core-Electronics

    Жыл бұрын

    Heyya champ 😊 come check it out here as it is exactly what your interested in - learn.adafruit.com/adafruit-motor-shield-v2-for-arduino/using-rc-servos

  • @ownage3523

    @ownage3523

    Жыл бұрын

    @@Core-Electronics Thank you! This looks like it will allow me to easily control a servo and stepper at the same time! Unfortunately, however, it looks like the shield is out of stock.

  • @ownage3523

    @ownage3523

    Жыл бұрын

    Is this compatible with the Raspberry Pi 3 Model B V1.2?

  • @ownage3523

    @ownage3523

    Жыл бұрын

    If not, would you have any similar recommendations that would work for that model of Raspberry Pi?

  • @Core-Electronics

    @Core-Electronics

    Жыл бұрын

    Both shields are compatible with that model of Raspberry Pi and much like how that Motor shield has GND, 5V and Data pins right next to each other so does the DC and Stepper Motor HAT (from above video). You'll be able to set up servo control with the exact same connection set up for both of them 😊

  • @bhandarkarvivekvasanta8464
    @bhandarkarvivekvasanta8464 Жыл бұрын

    but the hat hides camera slot! Further, we wont be able to add any other device to be controlled1

  • @Core-Electronics

    @Core-Electronics

    Жыл бұрын

    "There are not solutions... only tradeoffs!" Perhaps you can work around this constraint by extending the Pi's headers

  • @bridgetclinch3678
    @bridgetclinch36782 жыл бұрын

    Ah my first pi hat

  • @That_droper
    @That_droperАй бұрын

    Hello I am new to ras pi but u have an 80 dollar gift card for micro center and I want to know what raspberry pi and what stepper motor to get and how to connect them and power it. thanks guys and is there a way to connect more than on stepper motor to only one ras pi thanks again

  • @Core-Electronics

    @Core-Electronics

    Ай бұрын

    This depends on what the project you are using it for. Raspberry Pis come in their main series boards, the Pi4 is the last Gen, and the Pi 5 is the newer generation which is a tad more expensive but worth the upgrade. They also come in different RAM sizes, for general day to day tasks I've had no issus on 2 or 4gb. The Pis also come in a much cheaper Rsapberry Pi Zero form factor, which is a fair bit slower, but great for simple tasks that don't need the power. As for what stepper you need, it also depends on the project. We have a comprehensive guide here on different motors that has a lot of good information: core-electronics.com.au/guides/digital-electronics/servos-steppers-or-solenoids-choosing-an-actuator-to-move-your-project/ Happy making!

  • @That_droper

    @That_droper

    Ай бұрын

    @@Core-Electronics thanks would you know where to find a power cable for the raspberry pi 4 and a 12 volt stepper motor

  • @codiegagne7055
    @codiegagne705510 ай бұрын

    does this guy only wear one shirt....?