Turn any DC Motor into a Servo Motor

Поділитися
Вставка
  • Опубліковано 26 вер 2024

КОМЕНТАРІ • 199

  • @HowToMechatronics
    @HowToMechatronics  11 місяців тому +3

    Check out my favorite 3D printers, the K1 Max: amzn.to/3txQUC6 or if you are on a budget, the Ender-3 V3 SE: amzn.to/3FkCPus
    I hope you enjoyed this video and learned something new! If you'd like to support me making more content like this, please consider supporting me on Patreon: www.patreon.com/howtomechatronics

    • @etmax1
      @etmax1 10 місяців тому

      I have done a lot of soldering of small components and if you don't want to go the whole paste mask route I suggest you get some 0.35mm solder instead of the 0.56 or 0.71 which you are using, it dramatically reduces blobs and bridging. Also for soldering QFN's and SOIC's it's advisable to use a no clean gel Flux, I use Multi-core BGA flux but there are others.
      I also like to use a low temperature solder (~180C). as it flows much nicer and reduces risk of thermal damage if you have to do rework.

    • @vikramnageshwarrao
      @vikramnageshwarrao 6 місяців тому

      I have a hall effect encoder, IBT_2 motor driver, Arduino Uno and flysky transmitter receiver. I want to run brushed dc power window motor as servo type. how to get arduino code for this

  • @deone-entity3935
    @deone-entity3935 11 місяців тому +4

    I research on this so long ago, I think u are first one get on this topic thanks alot. I waited so long.

  • @maxhouseman3129
    @maxhouseman3129 Рік тому +17

    I recommend using a switching power regulator instead of a linear one. Reason is that the voltage doesn’t have to be super precise and switching regulators don’t waste the power from converting 12 V to 5 V.

    • @2150dalek
      @2150dalek Рік тому

      I tried using one of those small voltage changing switching pwr supply, loses notable current. Perhaps a larger pwr. supply located elsewhere would provide enough amps if you go that route.

    • @hexidev
      @hexidev Рік тому

      ​@@2150dalekwell yeah your only converting the voltage not the amprage :)

    • @enteente6027
      @enteente6027 Рік тому +4

      I don't see that as a big problem here. The only notable devices using 5 V are the atmega, as5600 and the led. I asume all these components together draw less than 10 mA (atmega is 0.5 mA, as5600 is 6.5 mA). The voltage difference is 12V - 5V = 7V and 7V * 0.01 A = 70 mW of power wasted. This is nothing compared to what the motor uses.

    • @maxhouseman3129
      @maxhouseman3129 Рік тому +2

      @@enteente6027 yes you are right, I didn’t see that the motor gets 12 V in the first place. Thought it gets also 5 V.

    • @AnnaVannieuwenhuyse
      @AnnaVannieuwenhuyse 7 місяців тому

      @@enteente6027 The ATmega328P will use more power than just 0.5mA.

  • @DigiLab360
    @DigiLab360 11 місяців тому +2

    I wish UA-cam had an option to give 5XThumb ups. You sir, certainly deserve 5X👍

  • @piconano
    @piconano Рік тому +83

    The PID needs work. It overshoots a lot.

    • @enteente6027
      @enteente6027 Рік тому +1

      I was thinking that too. It should definitely not be overshooting that much with such slow movement. The whole point of a servo like this is having fast movement with positional accuracy. Considering he's using a multiturn encoder it might even be smarter measuring the angle of the motor shaft before the gear reduction. That might add some mechanical challenges of where to place the PCB though.

    • @nrdesign1991
      @nrdesign1991 Рік тому +2

      @@enteente6027Measuring the motor shaft angle will make it lose the ability to measure the absolute position of the output shaft, also losing the ability to compensate for play in the gears

    • @enteente6027
      @enteente6027 Рік тому +1

      ​@@nrdesign1991no, you will still know the absolute position of the output shaft since you know the gear ratio, as he is using a multiturn encoder. Play in the gears can also not be compensated either way, because even when measuring the output shaft there's nothing the motor can do about it

    • @HowToMechatronics
      @HowToMechatronics  Рік тому +18

      Yep, that's right. I will leave that for another tutorial I guess.
      Cheers! :)

    • @giovanni4151
      @giovanni4151 11 місяців тому

      Yeah, was thinking the same. Perfect shield though!

  • @IdRatherBeMaking
    @IdRatherBeMaking 11 місяців тому +3

    Thank you, this is an outstanding project. I'm adding it to my build list. It looked like the servo is overshooting the position somewhat. I saw a feature you may want to consider researching and/or implementing. I think it was James Bruton who programmed the controller to half the remaining rotational distance and go there, half it again, half it again.... That would allow the servo to ramp down and stop the servo at a more precise point.

    • @justinc2633
      @justinc2633 7 місяців тому +2

      a PID would be better but that would take a bit more of your MCU

    • @adamsalem-s
      @adamsalem-s Місяць тому

      @@justinc2633 was gonna say that PID is good for control

  • @YoutubeBorkedMyOldHandle_why
    @YoutubeBorkedMyOldHandle_why 11 місяців тому +8

    Super informative video ... thank you.
    Personally, I'd have made a couple of changes:
    1. My opinion: the 328p has been over-hyped because of the Arduino community, but by today's standards it has some issues, so I'd use something else. Being 8 bits is probably not an issue here, but it's more expensive than 32 bit alternatives, such as the CH32V003 or the ESP32-C3. Besides this, Atmel(Microchip) debuggers are 'really' expensive and the 328p is very easy to brick. Even one of the newer ATTiny chips would be a better choice.
    2. I had an issue with pcbway, so I much prefer JLCPCB. They are very reliable, high quality and probably cheaper anyway. They just don't advertise as much.
    Otherwise, Great project ... looking forward to more.

    • @Factory400
      @Factory400 9 місяців тому +1

      The 328P not 'hyped' as much as it is easy to leverage a ton of available code and support. I put it in a lot of my commercial designs, not because it is amazing, but rather because it is easy. I have a lot of code ready to go so firmware dev cycles are short and the final performance is easy to predict.

  • @007TiFi
    @007TiFi 11 місяців тому +1

    Great work, wanted to build this for a while, saved me a lot of time

  • @wing2999
    @wing2999 10 місяців тому +1

    Great video as always! You are my inspiration, man.

  • @apbosh1
    @apbosh1 Рік тому +2

    What's it like to actually complete a project that works? I've always wondered lol. Very nice design!! Thanks for sharing.

  • @TheAstronomyDude
    @TheAstronomyDude Рік тому +1

    I like the gears. I've never seen that herringbone geometry before.

  • @ismettopal7564
    @ismettopal7564 11 місяців тому +1

    As always another high quality work. Thank You. I hope you will make a self balancing bicycle with reaction wheel one day.

  • @enteente6027
    @enteente6027 Рік тому +1

    Great video and interesting idea. One thing i would add though is two header pins that can be used as external reference inputs or endsrops for driving things like a linear axis

    • @HowToMechatronics
      @HowToMechatronics  11 місяців тому

      Thanks! Yeah, that's a good point.
      I've been thinking about it right now, to make an linear actuator with the same PCB. I mean, the board already has digital pins available, the SPI pins, MOSI, MISO and SCK, which are used only for burning the bootloader, so we can use those as digital inputs.

    • @enteente6027
      @enteente6027 8 місяців тому

      ​@@HowToMechatronicsIt seems you did much more than just some thinking. I really liked your design for a 3d printed linear actuator. I used to work as a test engineer for linear actuators and I probably couldn't habe done it much better myself.

  • @TheEvertw
    @TheEvertw 9 місяців тому +1

    One comment about your PCB: for IC connections, the pad for pin 1 should have a different shape than the pads for the other pins. Usually, pad 1 is square and the other pads are rounded.

  • @MaxLevine
    @MaxLevine 11 місяців тому +1

    Having an option to use Encoder separately (on a daughter board) will be great addition!

  • @lightman500
    @lightman500 11 місяців тому +1

    Terrific job! Outstanding description....thanks for sharing your design

  • @UdhamsArtAndCraft
    @UdhamsArtAndCraft 11 місяців тому +1

    Plz make video demonstrating mpu9250 and calculating ots roll witch and yaw from accelerometer, gyroscope and magnetometer

  • @2150dalek
    @2150dalek Рік тому

    Ingenious. I have a need for something like this.....soon as I finish your RC transmitter project, that is.

  • @GNARGNARHEAD
    @GNARGNARHEAD 11 місяців тому

    great project. a tip for your soldering, bring the solder in first and use it to transfer the heat to the board 😉

  • @aviator267
    @aviator267 Рік тому +29

    You are doing a great job for the community. Thank you for these informative videos. You’re amazing

  • @AjinkyaMahajan
    @AjinkyaMahajan Рік тому +2

    Very nice project. I will try out but only issue is that i lack 3d print design.
    Cheers !!

  • @Chsch5
    @Chsch5 11 місяців тому +3

    What tool was used to make the circuit diagram? It’s very nice!

  • @Ozzy3333333
    @Ozzy3333333 11 місяців тому +1

    Why haven't you tuned the PID loop?
    You have either too much I or not enough D.
    Nice project, thanks for sharing!

    • @HowToMechatronics
      @HowToMechatronics  11 місяців тому +1

      Already spent too much time making this project, so I left that for those who will build this project. Cheers :)

  • @GoatZilla
    @GoatZilla 9 місяців тому

    Neat project. It would be interesting to pair that Hall sensor with a wireless controller like an ESP32 in case your "output" is actually physically pretty far away from the drive section.

  • @ferdm9646
    @ferdm9646 11 місяців тому

    Next time try knife type K type soldering head for the best results. You can solder better with these. I soldered most of the smd by hand and been doing that for over 15 years and never had a problem also temperature is important, hakko inline temperature control works best too. Cheers

  • @MrManojsoparkar
    @MrManojsoparkar 9 місяців тому +1

    Where to give the inputs of step & direction in this circuit for CNC machine

  • @Will_Huff
    @Will_Huff 5 місяців тому

    Curious if you have tested the torque of this new servo. Are the gears PETG or PLA? Great video. Hoping you make a video creating a servo (close loop positional) BLDC 3 phase motors used in drones and hoverboards!! Seems that is what they use for a lot of robots axis these days.

  • @ayushchakraborty1222
    @ayushchakraborty1222 11 місяців тому +1

    on pins 5 and 6 in the ckt diag at 8:39 , won't Atmega328p require pull up resistors from drv8871 as they are signal pin? I mean i have started learning hardware for my line tracer bot, and wanted to build my own pcb, this ckt diagram looked helpful for my whole motordriver, thats why am asking.. any help is appreciated.

  • @jasonguthrie4691
    @jasonguthrie4691 2 місяці тому

    What software did you use for the circuit diagram?
    It is very nicely laid out and clear!

  • @DIYMachineYT
    @DIYMachineYT 11 місяців тому

    Really amazing video ❤

  • @temyraverdana6421
    @temyraverdana6421 Рік тому

    It's an amazin project. Thanks a lot for share your study

  • @savageolatunde6731
    @savageolatunde6731 11 місяців тому +1

    Please which software do you use to draw the pcb and 3d redering.
    Which software did you use to design the circuit diagram

  • @villageidiot8718
    @villageidiot8718 Рік тому

    very interesting project and well done.

  • @noweare1
    @noweare1 8 місяців тому

    Very useful video, thanks

  • @grahamnichols1416
    @grahamnichols1416 6 місяців тому

    Excellent explanation. Here, take my subscription.

  • @cat-cambodia1801
    @cat-cambodia1801 9 місяців тому

    Good job friend 🤩

  • @villanousvic323
    @villanousvic323 11 місяців тому

    Odd question but could you add a how to on converting the scara robot arm into a 3d printing robot arm, I always see space x and all the big time manufactures of heavy machinery always using 3d printers that are usually arm mounted for a larger project, and I know they use direct metal printing but I would love a how to just to understand it a little better

  • @sahiedu
    @sahiedu 11 місяців тому

    What an amazing video! Are you planning to use this custom servo in another project?

  • @MD_Builds
    @MD_Builds 2 місяці тому

    Great project and good one for me to reference, as im doing a linear servo design at the moment.
    I have to ask, is the PID configured correctly? Im seeing lots of over shoot and correction happening. If the PID is configured it shouldnt over shoot?

    • @HowToMechatronics
      @HowToMechatronics  2 місяці тому

      Hey, thanks!
      No, the PID was not configured all the way.

  • @BrainSlugs83
    @BrainSlugs83 11 місяців тому

    If you plan to use this on a battery powered device, I would steer clear of linear regulators like the AMS1117, and instead opt for an equivalent switching regulator.

  • @ИгорьЧерноусов-б5ж
    @ИгорьЧерноусов-б5ж 10 місяців тому

    Interesting project, please tell me the values ​​of subrack resistors and the possibility of using a more powerful module to control the motor, for example IBT-2 or BTS 7960

  • @Cam-wu9jw
    @Cam-wu9jw 10 місяців тому

    What are the benefits and tradeoffs of such a project as opposed to simply buying a servo with the features you desire? Wouldn't this burn out the DC motor if you use it to rapidly swing back and forth?

  • @Plastic_Velocity
    @Plastic_Velocity Рік тому +1

    very useful, thanks

  • @googleyoutubechannel8554
    @googleyoutubechannel8554 7 місяців тому

    This is a fun project, but I thought the AS5600 was supposed to be pretty good, within 1deg, looks like you're getting a ton of slop, 5-10deg in your position control?

  • @TheEvertw
    @TheEvertw 9 місяців тому

    When soldering SMD components, tin only a single pad and solder the device to it. Then the other pads can then be soldered while the IC is being held in the right position by the first connection. DON'T tin multiple pads, as the bumps of tin will prevent correct positioning of the device.

  • @TNERA
    @TNERA 11 місяців тому

    Very nice presentation! For future servo discussions, can you indicate the torque you were able to achieve with the home build?

  • @phakalanep7241
    @phakalanep7241 8 місяців тому +1

    I have noticed you don't answer any of the questions supporter post????

  • @Nayel-Khouatra
    @Nayel-Khouatra Рік тому +1

    That's a superb video, great job ! I was wondering how do you make your schematics ?

    • @HowToMechatronics
      @HowToMechatronics  Рік тому +2

      Thank you! I draw the schematics manually with Illustrator.

  • @jasoncoker5369
    @jasoncoker5369 10 місяців тому

    Awesome video!

  • @JeremySpidle
    @JeremySpidle Рік тому

    Clean that soldering iron tip!! It will make your work much easier :)

  • @makis_chatzopoulos
    @makis_chatzopoulos 9 місяців тому

    Excellent work!!! Thank you for your valuable information. What gear (camera, lens) do you use? I need something similar for my lectures.

  • @MichaelOfRohan
    @MichaelOfRohan 11 місяців тому

    Can you fit all that on a 8 pin tiny? The 5th pin can be fused for use in logic. I cant imagine youd need more than 5 pins on that 328p.

  • @azyfloof
    @azyfloof 11 місяців тому

    I wonder how easy it would be to code an auto calibration routine, where the motor spins up as fast as at it can, stops as quickly as it can, and measures the overshoot to calibrate the PID values? Have a button that you have to hold down and power the device up to run the calibration :D
    So many possibilities with this. Even adding an option for BLDC motors. This is a great video :D

    • @HowToMechatronics
      @HowToMechatronics  11 місяців тому

      Yeah, there are so many possibilities. Thanks! :)

  • @mikecarlson6416
    @mikecarlson6416 10 місяців тому

    very well done

  • @arieverveer665
    @arieverveer665 Рік тому

    Most Impressive, Thank you

  • @Allan-mf1he
    @Allan-mf1he 11 місяців тому

    Awesome stuff. I am a copier tech and there are ready to go gearboxes with DC that just need your circuit. I have made DC servos using photo interrupters but not close to 4096 accuracy. Great content! Did you use onshape for the PCB design?

  • @nickush7512
    @nickush7512 11 місяців тому

    Great work Dude :)

  • @pfabiszewski
    @pfabiszewski Рік тому

    Awesome video! Consider using a lot more of "external" flux while soldering those SMD components ;)

  • @clemtunnell5836
    @clemtunnell5836 10 місяців тому

    Thanks

  • @stephanc7192
    @stephanc7192 11 місяців тому

    Great video

  • @VeganRashad
    @VeganRashad 7 місяців тому

    OMG!!! I want to do this with a Crown Vic or Chevy Malibu window/ wiper Motor.

  • @wisestfernando
    @wisestfernando 11 місяців тому

    Impressive ! Awesome ! Great !

  • @hello81642
    @hello81642 Місяць тому

    What is causing the latency between the RC input and motor movement (arrow)

  • @MichaelWoodrum
    @MichaelWoodrum Місяць тому

    What diagram software are you using for your circuit layout that was presented?

  • @goshenable
    @goshenable 11 місяців тому

    Fantastic video! May I ask what field of engineering you went to school for or if you went to school?

    • @HowToMechatronics
      @HowToMechatronics  11 місяців тому +1

      Thank you! Mechatronics, of course. Cheers :)

  • @TilmanBaumann
    @TilmanBaumann 11 місяців тому

    The servo in the video has quite a bit of overshoot. But that's just a matter of PID tuning

  • @diepieche
    @diepieche 11 місяців тому

    can you show a closed loop diagram with feedback?

  • @aliawrang9503
    @aliawrang9503 Рік тому

    Great video, could you make a tutorial Video on Arduino cnc shield?

  • @ismailaksu1140
    @ismailaksu1140 11 місяців тому +1

    Which program do you use to draw schematic at 8:34

  • @GeneralChangFromDanang
    @GeneralChangFromDanang 8 місяців тому

    I think you just need a smaller soldering iron tip and you would have no problem with these smaller components.

  • @gradientascent4218
    @gradientascent4218 11 місяців тому

    The servomotor knows it's current position at all times...

  • @antoniosanford4675
    @antoniosanford4675 11 місяців тому

    Would this drive a treadmill motor? They are 12 volts. I don't know about the amperage.

  • @shawnalfaro6943
    @shawnalfaro6943 11 місяців тому

    Can this board be made to use potentiometers tho? I rehab robot toys and the vast majority of the motors used are DC servos but unlike hobby servos, the controller circuitry is on the often broken main board. so i have 3 potentiometer wires and 2 motor wires and rather than take apart good hobby servos and use their boards for this, i want to make a drop in replacement thats like the boards in servos. can your circuit support potentiometers rather than magnetic encoder?

  • @RalphSmith-ed2xk
    @RalphSmith-ed2xk 7 місяців тому

    I have the boards I ordered from PCBway (a great company BTW) and am getting the components together. A few things though, can you provide a more complete schematic that corresponds to the component numbers on the PCB? I am having to reverse engineer the board to match all of the capacitor and resistor values with the diagram provided, and it is very time consuming and can lead to mistakes.
    Also, there are many components that you don't source (i.e. center select button, chip resistors with sizing, SMD electrolytic capacitor, etc.)
    I had to research the chip resistors and found they were 0805 resistors, which would have been nice to know beforehand, as I already had 0402's on hand and thought they would work before I received the boards.
    Anyway, other than that I love this project and am looking forward to working on it.

    • @gokulkrishnan2317
      @gokulkrishnan2317 4 місяці тому

      Bro what is the value of c11 capacitor in the PCB board

    • @RalphSmith-ed2xk
      @RalphSmith-ed2xk 4 місяці тому

      @@gokulkrishnan2317 c11 is the 100nF capacitor that is coming off the AREF leg of the Atmega328p.

  • @hernancurras
    @hernancurras 11 місяців тому

    This is an engineering marvel. @howtomechatronics... question... how do you "home" this servo? Do you need an endstop? I'm asking on the continuous rotation mode. I would need to use them on a Sailboat, and a multiturn potentiometer (near ˜10 turns from end to end) is not an option (humidity environment).

    • @HowToMechatronics
      @HowToMechatronics  11 місяців тому +1

      Thanks!
      Well yeah, you need to have an end stop for homing for making use of the continuous rotation mode.

  • @JM_Tushe
    @JM_Tushe Рік тому

    That's pretty damn cool.

  • @kide2010
    @kide2010 7 місяців тому

    Хороший драйвер получился. Я взял ASMC- 04 драйвер и модуль AS5600, хочу заменить родной потенциометр магнитным as5600.
    Шестерни каким пластиком печатали?

  • @tonalliisaiasgarciagarcia3973
    @tonalliisaiasgarciagarcia3973 8 місяців тому

    I loved

  • @ChitchaiWongtri
    @ChitchaiWongtri 11 місяців тому

    We need to read real time temperature on the remote control then order the motor move to adjust speed of blower by the remote control ,can you?

  • @deankay4434
    @deankay4434 3 місяці тому

    I have subscribed but unable to use social media nor have a working laptop. I fixed vehicles for 40+ years and seem heater controls go from cable to all electronic. Today, for $10, I can have a 12Vdc electric motor that couples to a door. It directs air thru the heater core or around it. The dash controller is no more that a potentiometer to move from cold to warm, then hotter or full hot. I have the actuators that drive a pot using an internal gear. I am building an air distribution box for a 67 Chevy C10. You have fascinating devices but I was looking for something simple. I can scan your channels for a video but if you think of something that helps. Thank you!! DK. Retired. ASE Master tech.

  • @MaxPivovarov
    @MaxPivovarov 11 місяців тому

    It would be cool if it were possible to use the bldc motor.

  • @bimodesign1815
    @bimodesign1815 10 місяців тому

    Then the PCB design is now good to go? With no problems?

  • @zoenagy9458
    @zoenagy9458 11 місяців тому

    Why the huge overshoot? Have you seen openServo?

  • @chrismayer8990
    @chrismayer8990 11 місяців тому

    Great job! Is the center position permanently stored even without power supply?

    • @HowToMechatronics
      @HowToMechatronics  11 місяців тому +1

      Thanks! Well the default center position is always the same, even after power loss because it depends on the magnet orientation. However those new center positions that we can set with the push button are not stored, they are lost with power loss. However, that can be easily solved, we can store last center position value in the EEPROM of the microcontroller.

  • @Dasol0246
    @Dasol0246 10 місяців тому

    Why not use a common microcontroller like ESP32?

  • @simpleguy9334
    @simpleguy9334 Рік тому +1

    Next upgrade - use bldc motor 💚

  • @paulcohen1555
    @paulcohen1555 11 місяців тому

    Getting an perfectly symmetrical magnet and mounting it perfectly over the shadt center isn't trivial.

  • @manbox866
    @manbox866 8 місяців тому

    can you pleas make a proper flight controller for drone

  • @Suryatech007
    @Suryatech007 5 місяців тому

    Can you share project details

  • @cjjagodana3151
    @cjjagodana3151 9 місяців тому

    Sir Can You Build Small Spring Coiling Machine . Diy Spring Coiling machine available on youtube but not how to made. please sir made it .

  • @tienanma6045
    @tienanma6045 11 місяців тому

    you may try other control methods, maybe the overshot can be avoided

  • @sjb8178
    @sjb8178 26 днів тому

    isn't this closed loop stepper motor???

  • @robojassi9187
    @robojassi9187 Рік тому

    Good

  • @ArielBaravalle
    @ArielBaravalle Рік тому

    good work !, i try to order pcb and the web detect a 4 layers , but is a 2 layers . where i can download the firmware? , don't see the link in description. thanks

    • @HowToMechatronics
      @HowToMechatronics  Рік тому

      Thanks! The PCB is 4 layers. The middle layers are for GND. The source code will be available in couple of days on the website article.

  • @abrampl
    @abrampl 11 місяців тому

    It has some backslash ... goest to set deg, passes it, then back a little....

  • @Suryatech007
    @Suryatech007 5 місяців тому

    Can this pcb with components available

  • @pondechkoonkadee9614
    @pondechkoonkadee9614 10 місяців тому

    R4,R5 How much resistance is there?

  • @mugiraharjo6270
    @mugiraharjo6270 Рік тому

    long time no see bro..

  • @chrisBruner
    @chrisBruner Рік тому +1

    Are you making the source code available?

  • @BrainSlugs83
    @BrainSlugs83 11 місяців тому

    A big problem with this design is that it needs homing every time you use it. If power is lost, you lose the home position. Even if you know the output shaft location, that isn't helpful because it is not constrained to a single turn. Commercial servos like this use a backup battery, so that the position is not lost during power off.

    • @flyingmonkey3822
      @flyingmonkey3822 11 місяців тому

      What about absolute encoder?

    • @HowToMechatronics
      @HowToMechatronics  11 місяців тому

      You need homing for the continuous rotation mode, that's right. But for the limited rotation mode, up to 360 degrees, you don't need homing. The AS5600 is like an absolute encoder. It reads the magnetic field orientation of the magnet on the output shaft.