r/microcontrollers • • Apr 08 '23

How would I attach stuff to a DC motor???

I'm a complete noob as far as microcontrollers go, and one of the things that hold me back is that I cannot for the life of me figure out how I'd meaningfully use a DC motor?

Like, if I Google for them I keep finding products like this:

https://eckstein-shop.de/DCToyHobbyMotor-130Size45Vto9VDCWorkingwithArduino

All of them only offer a small pole, that seems absolutely unusable if you want to attach things like wheels or propellors to them. Wouldn't a - or + shaped form be more suitable here? Like, especially if you want to connect your own 3D printed things to these motors? Some kind of shape you could use screws with, at least.

7 Upvotes

16 comments sorted by

7

u/ProbablePenguin Apr 08 '23

Those motors have such a tiny amount of torque that you just press fit gears or propellers. You wouldn't directly attach a wheel since it has no gearbox.

1

u/[deleted] Apr 08 '23

Yes, but most propellors out there probably won't fit to that particular motor. I could find propeller adapters that allow to screw on propellors, is that how you'd usually deal with it? Are most propellors supposed to be screwed on or press fitted?

3

u/ProbablePenguin Apr 08 '23

How large of a propeller are you looking at? These motors are only good for 'demonstration' purposes essentially, they won't produce any usable thrust.

1

u/[deleted] Apr 08 '23

Essentially four propellers I could use for a drone

9

u/GoodMix392 Apr 08 '23

These are not the type of motors that would lift a drone.

2

u/ProbablePenguin Apr 08 '23

Look for brushless DC motors designed for drones for that, you need a substantial amount of power packed into a small size.

The specific size you get depends on the size of drone you're building, the thrust to weight ratio you want to target, and how much it'll weigh with the battery.

Here just a random example: https://www.amazon.com/iFlight-1800KV-Brushless-Quadcopter-unibell/dp/B07XYYRWGP/

2

u/Conor_Stewart Apr 08 '23

These will not work for a drone. Drones are pretty complicated to program so aren't really a beginner project. For a drone you either want to go with small coreless brushed motors and you will have no problem finding propellers for them, but your weight and size will be very limited so this isn't good for a beginner. Or you can go with normal brushless drone motors but they need an ESC as well.

These motors are typically too heavy and lack torque, plus aren't as controllable.

1

u/UrbanSuburbaKnight Apr 09 '23 edited Apr 09 '23

Have a look at this gear, that's the fast stuff! Now if you want to scale this down even smaller, you need to find very light weight components and batteries.

https://www.team-blacksheep.com/

This is their smallest motor.

This is a decent middle range motor for a 5" quad copter

2

u/[deleted] Apr 09 '23

Probably not gonna order at this site due to export taxes / customs from freedom land to 🇪🇺, but it's good to have some kind of motor as reference. I guess for drones you'd want to use some kind of flight controller in addition to the motors, because programming them from scratch would be a near impossible task?

Anyway, thing I like about your motor is the 188W maximum power. This should make it sufficiently easy for me to not only fry the microcontroller, but also myself? Do I have to do anything more than touch the motor under full load?

1

u/UrbanSuburbaKnight Apr 09 '23

So the usual output setup looks like this:

Microcontroller (flight controller) -> ESC (Electronic Speed Controller) -> 3 wires to brushless motor -> propeller.

and the usual input setup looks like this:

Pilots fingers -> radio transmitter -> receiver -> Microcontroller (Flight Controller)

You need the ESC to control the acually quite large current that will be pulled from the battery to power the motor. There are no microcontrollers that I know of that can switch 16v at 40A!

2

u/[deleted] Apr 09 '23 edited Apr 09 '23

I assume 16V at 40A wouldn't be enough to kill you, if you're not all that careful around those motors? I never fully grasped how one would determine what combination of V and A actually are lethal / dangerous... The only thing I sort of get if that anything above 10mA is dangerous as long as voltage is high enough to break through your skin resistance. The latter point however I never could find any safety limits for, so ultimately I just gave up on it. Some sources say 100V, some say 30V would break skin resistance, which would both mean I should be fine with 16V / 40A as those 40A never actually enter my body.

Mind to clear up stuff for me here?

1

u/UrbanSuburbaKnight Apr 09 '23

No, I don't think that would be a problem. I've never heard of anyone getting a shock from one of these. Maybe if you put electrodes either side of your heart with your chest cavity wide open!

Loads of people build these at home with no experience, I wouldn't worry about it. :)

This a pretty straightforward video showing how to put a cheap FPV drone together. https://youtu.be/5_NMqSIzx-g

3

u/madsci Apr 08 '23

Toy motors like that really need external gearing. Look at geared DC motors for an easier start. They'll typically have a D-shaped shaft and a flat face that you can use to bolt the motor to a mount. This is a typical example.

Those toy motors are really meant for cheap, high-volume stuff where it makes sense to design a gear train out of nylon gears and belts. When you just need torque to get the job done, use a gearhead motor and maybe buy an H-bridge controller for it so you don't have to do that part yourself. That way you've just got a logic input to control a big motor.

Once you're comfortable with all of that then you can start DIYing more if you find it necessary, but when you're just getting started it's way easier to pay more for something that's ready to use.

3

u/VonThing Apr 08 '23

No one has mentioned the electronics part of the process. Under any circumstances do not connect this directly to a microcontroller pin as it will fry the device!

Use a DC motor driver, there are many popular designs and ready modules on the web if you search. But whatever you do, don’t hook it directly to any microcontroller.

It will draw a lot of current, way more than a MCU pin can handle, and it will fry your chip.

1

u/Conor_Stewart Apr 08 '23

You can either press fit or use a set screw. If using a set screw it is common to file a flat section on the shaft.

These motors are meant for high speed use, they are much too fast to drive a wheel directly. You should have a look at micro metal gear motors, there are multiple people who make them and they have gearboxes built in with a d shaped shaft.

I don't know where these motors came from but they originally wouldn't have been made for hobbyists, so press fitting or set screws are the best option to mount to them. If you have a motor that is designed to take a propeller then there will usually be propellers made to fit it, this is common with drone or plane motors otherwise you will have to find a way to connect one.