Simonyeee
Posts: 1
Joined: Fri Feb 22, 2019 9:17 pm

Choosing motors

Sat Feb 23, 2019 9:13 am

Hi all,

I recently started working with the Raspberry Pi and now I wanted to build a robot and I don't know which motors to choose.
My robot will be approximatly 20cm x 20cm x 20cm and I want to use 4 motors for 4 wheels. The robot should be able to drive really straight, so sometimes it has to travel 1 meter and should stay on the exact line and not change its orientation. It should also be able to do this if there is more weight on one wheel, because of an uneven ground. If possible it should also be affordable.

I would be really thankful if you could give me suggestions or links to tutorials.
Simonyeee

User avatar
Joel_Mckay
Posts: 289
Joined: Mon Nov 12, 2012 10:22 pm
Contact: Website

Re: Choosing motors

Sat Feb 23, 2019 2:11 pm

You probably could use $2 stepper motors with gear-boxes for such a small platform (700g/cm). This would allow you to easily keep the two wheels on each side synced while moving. However, you may want to think about the zero turning radius a normal turtle-bot platform gets with only 2 motors (have a look at how the Roomba was designed).

In general, dead-reckoning a small platform is a lot harder than it looks, as odometer based control-loops are not perfect.
;-)

Best of luck,
J

pcmanbob
Posts: 7255
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Choosing motors

Sat Feb 23, 2019 2:53 pm

Hi.

No matter what motors you use there will always be a slight variation between the drive on each side of your robot just because of slippage between wheel and the surface its running on, any unevenness in the surface will also cause the robot to turn due to each wheel having to travel a different distance to get to the same point.

These differences may be very small but they can soon start to mount up if you are using dead-reckoning.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

Infraviolet
Posts: 22
Joined: Wed Jan 30, 2019 10:47 pm

Re: Choosing motors

Sat Feb 23, 2019 6:37 pm

Post #2, stepper motors with gearboxes for £1.54? How physically small, how much torque possible from them? I'd be interested to know for future projects of my own.

User avatar
Gavinmc42
Posts: 4027
Joined: Wed Aug 28, 2013 3:31 am

Re: Choosing motors

Sun Feb 24, 2019 1:52 am

Not much torque with those tiny steppers, the gears help but that makes it slower.
Steppers have the most control for synchronized speed, but wheel slip is the next issue.

Some of my bots with DC brush motors actually have a mechanical clutch to lightly lock the wheels together.
DC motors with good gearboxes and a tacho (magnetic or opto) sensor are getting common.
To avoid wheel slip, tracks are much better for straight line travel.
Sumo bots have very sticky wheel treads and low duro rubber tires.
Sumo bots also probably have the best motor/wheel/tire tech and much is DIY.

A new way of compensating is with motion sensors, ie optical mouse type positioning.

A 20x20x20cm bot is too big for those tiny cheap steppers even if using 4 of them.
Would 4 x 17 size steppers work? or two with tracks?
What speed do you need?

I hate DC motor gear noise and I'm looking at magnetic gearboxes.
A magnetic clutch to lock the wheels might work, have not seen that done yet.
I have seen those FPV/Drone camera gimbal motor start being used now.
They are basically drone motors rewound with finer wire and run as 3 phase steppers.

Currently best motor tech is in those drone motors, controllers are setup setup for speed control and not positioning control.
Some of the controllers are hackable, so they could be changed for this application if there was something like an encoder input option.
They would make serious kickarse servo motors for CNC mills, 3D printers etc.
But using these then is more a matter of picking best motor controller.
I have not seen any suitable yet, but have not checked recently, kickstarter project?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
Joel_Mckay
Posts: 289
Joined: Mon Nov 12, 2012 10:22 pm
Contact: Website

Re: Choosing motors

Sun Feb 24, 2019 11:01 am

Infraviolet wrote:
Sat Feb 23, 2019 6:37 pm
Post #2, stepper motors with gearboxes for £1.54? How physically small, how much torque possible from them? I'd be interested to know for future projects of my own.
Modding the 5v version of the $1.60 28BYJ-48 for the more powerful bipolar mode is easy, and allows on to use current-regulated Pololu A4988 Stepper Motor Driver modules. https://www.youtube.com/watch?v=jHLyJbNgcDo
Apparently one can get 800g/cm torque out of them for repeatable positioning, but some types have a slip clutch given they are used as air conditioner vent nozzle actuators.

As with any hardware problem, the old joke really does apply. ;-)
"Fast, good or cheap. Choose two"
Since people probably want to start with something more forgiving of mistakes, than I assume slow and cheap are appropriate design priorities.

People have already 3D printed robot chassis for these:
https://www.thingiverse.com/thing:2779252

Good luck,
J

User avatar
Gavinmc42
Posts: 4027
Joined: Wed Aug 28, 2013 3:31 am

Re: Choosing motors

Sun Feb 24, 2019 11:41 pm

"Fast, good or cheap. Choose two"
The Pi's are one of the few things that break that old triangle.
Modding the 5v version of the $1.60 28BYJ-48 for the more powerful bipolar mode is easy,
Have not tried that, probably worth trying if the weight of the bot can be kept low.
Chassis of foamcore board?
With 4988 or similar from Ti, use 3S or 4S Li Po battery pack to drive those steppers faster.

Those steppers only have a ferrite magnet, could they be upgraded to rare earth?
There are supposed to be two versions 64:1 and 16:1 reduction.
Too much torque will stuff those plastic gears, they have a tiny tooth profile.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Choosing motors

Mon Feb 25, 2019 2:03 am

Gavinmc42 wrote:
Sun Feb 24, 2019 1:52 am
DC brush motors have a mechanical clutch
DC motors with good gearboxes and a tacho (magnetic or opto) sensor
Sumo bots have very sticky wheel treads and low duro rubber tires
A new way of compensating is with motion sensors, optical mouse type positioning.
I hate DC motor gear noise and I'm looking at magnetic gearboxes.
I have seen those FPV/Drone camera gimbal motor start being used now.
3 phase steppers, drone motors, controllers for speed control and not positioning control.

Magnetic Gearboxe Motor

Never heard of magnetic gear. What is that? I only know metal and plastic gears. :o

I am starting a newbie motor project this Monday. Usually first thing first is check out Lady Ada. Her TT (Twin Turbo) motor looks good. So I will order one from TaoBao (Not AdaFruit, too expensive! :mrgreen: )


AdaFruit 3V-6V DC 200rpm TT Gearbox Motor - $2.95
https://www.adafruit.com/product/3777
https://www.youtube.com/watch?time_cont ... rIfFRchgn8 (youtube)

AliExpress Yellow DC 3V-6V Dual Axis Gearmotor TT Motor Gear Reducer Motor For Arduino Smart Strong Magnetic with Anti-interference US$1.52
https://fr.aliexpress.com/item/Jaune-DC ... 40455.html

TaoBao DC3V-6V Gear Motor TT Anit EMI 4WD - CN¥3.21 (x0.15 ~=US$0.5)
https://detail.tmall.com/item.htm?spm=a ... 280dd2cb
I am an electronics and smart home hobbyist.

User avatar
Gavinmc42
Posts: 4027
Joined: Wed Aug 28, 2013 3:31 am

Re: Choosing motors

Mon Feb 25, 2019 2:59 am

https://en.wikipedia.org/wiki/Magnetic_gear
I get magnets from here, trying to figure out if a high ratio magnetic worm drive gear box could be made
https://supermagnetman.com/

Those TT motors are the best value for hobby bots, good to learn on.
And once those cheap motors wear out you can replace them with lower current, higher voltage 12V ones.
Because they are cheap speed can be dependent on brush wear.
Try driving in a straight line.

Replacement RS-130 size motors are low cost, even here only $1.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Choosing motors

Mon Feb 25, 2019 4:26 am

Gavinmc42 wrote:
Mon Feb 25, 2019 2:59 am
Those TT motors are the best value for hobby bots, good to learn on.
And once those cheap motors wear out you can replace them with lower current, higher voltage 12V ones.

DC3V TT Motors and DC12V N20 Motors

Yes, my plan is to upgrade to 12V motor later for the following reason.

I am playing with power MOSFET IRL540N to PWM motor speed control . This MOSFET seems to like voltage higher than 6V.

...
Attachments
gear_motor_2019feb2501.jpg
gear_motor_2019feb2501.jpg (189.46 KiB) Viewed 2188 times
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Choosing motors

Mon Feb 25, 2019 5:24 am

Simonyeee wrote:
Sat Feb 23, 2019 9:13 am
The robot should be able to drive really straight, so sometimes it has to travel 1 meter and should stay on the exact line and not change its orientation. It should also be able to do this if there is more weight on one wheel, because of an uneven ground. If possible it should also be affordable.

MPU6050 MEMS 3 axis gyroscope and accelerometer

Perhaps you might like consider the cheapy mems gyro-accelero mpu6050. You can drive laser straight, say less than one degree deviation in 1km, and keep track your 3D position as precise as 1mm (my guessestimate, no guarantee, though). :mrgreen:

AliExpress GY521 3 axis gyroscope MEMS and 3-axis MEMS Accelerometer Module MPU-6050 gyro Digital Module Motion processor US$2.54
https://fr.aliexpress.com/item/1pcs-lot ... 32137.html

.....Chip: MPU-6050
.....Power Supply Voltage: 3v ~ 5v
.....Communication Mode: Standard IIC Protocol Communication;
.....Integrated 16bit AD converter, 16-bit data output
.....Angular velocity sensors: ± 250, ± 500, ± 1000, and ± 2000 ° / sec
.....Accelerometer range: ±2G, ±4G, ±8G and ±16G

TaoBao HMC5883L 3-Axis Magnetometer
https://detail.tmall.com/item.htm?spm=a ... abbucket=6

HMC5883L Triple-axis Magnetometer Board - US$9.95
https://www.adafruit.com/product/1746

MPU-9255 HMC5883 MAG3110 LSM303DLH Magnetometer/Accelerometer

Arduino Self Balancing Robot Using MPU6050 (youtube)
https://www.youtube.com/watch?v=I6z26LVu5y0
...
Last edited by tlfong01 on Mon Feb 25, 2019 2:56 pm, edited 1 time in total.
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Choosing motors

Mon Feb 25, 2019 6:41 am

tlfong01 wrote:
Mon Feb 25, 2019 4:26 am
Gavinmc42 wrote:
Mon Feb 25, 2019 2:59 am
Those TT motors are the best value for hobby bots, good to learn on.
And once those cheap motors wear out you can replace them with lower current, higher voltage 12V ones.

Rpi 3V GPIO Direct Drive 12V IRL540N PWM DC3-6V TT Motors

I guess 12VDC low duty cycle PWM can drive 3-6VDC motor with little risk of frying any. Just in case, I have loads of CN¥ 0.5 motors standing by for frying anyway. :mrgreen:

...
Attachments
irl540n_tt_motor_2019feb2501.jpg
irl540n_tt_motor_2019feb2501.jpg (129.22 KiB) Viewed 2166 times
Last edited by tlfong01 on Mon Feb 25, 2019 8:04 am, edited 1 time in total.
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Choosing motors

Mon Feb 25, 2019 7:54 am

tlfong01 wrote:
Mon Feb 25, 2019 6:41 am
tlfong01 wrote:
Mon Feb 25, 2019 4:26 am
Rpi 3V GPIO Direct Drive 12V IRL540N PWM DC3-6V TT Motors
I guess 12VDC low duty cycle PWM can drive 3-6VDC motor with little risk of frying any. Just in case, I have loads of cheap, CN¥ 0.5 motors standing by to fry! :mrgreen:

Vgs 5V 1kHz 5% Duty Cycle Square Wave Driving Vcc 12V IRL540N with RS130 3~6VDC Motor

Everything looks OK. I started with 5% duty cycle and the little motor barely moved. Multi meter displayed around 120mA (rms, I think). Motor moved faster and faster as the duty cycle was increased. (Instead of the Rpi GPIO, I am using a DSP signal generator (40 yuan), because I don't have that many Rpi's to fry!)
...
Attachments
irl540n_rs130_3v6v_motor_test_2019feb2502.jpg
irl540n_rs130_3v6v_motor_test_2019feb2502.jpg (173.23 KiB) Viewed 2145 times
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Choosing motors

Mon Feb 25, 2019 9:24 am

Infraviolet wrote:
Sat Feb 23, 2019 6:37 pm
Post #2, stepper motors with gearboxes for £1.54? How physically small, how much torque possible from them? I'd be interested to know for future projects of my own.

Second Hand, Taken-Out-From-Machines Stepping Motors

When I first learnt how to play with stepping motors, I bought a couple from TaoBao second hand shops.

They sell those "taken out from machines" at as low as one tenth of the new price, some new CN¥200 motors down to CN¥20 second hand. I knew stepping motors have no brushes to wear out, only the connecting wires are broken. So I think they were worth my money.
:mrgreen:

TaoBao 2nd Hand Oriental 42 Series Two Phase Stepping Motor PK245-01A 1.2A 4V 3.3R - ¥33
https://item.taobao.com/item.htm?spm=a2 ... t=6#detail

Second Hand Stepping Motors
https://www.taobao.com/list/product/%E4 ... %BE_1.htm

Alibaba New Vextra Oriental PK245-01A Motor
https://tw.1688.com/item/-706B3234352D3 ... DB4EF.html

Big Stepping Motors
https://www.raspberrypi.org/forums/view ... r#p1355744
...
Attachments
pk245_stepper_2019feb2501.jpg
pk245_stepper_2019feb2501.jpg (152.06 KiB) Viewed 2127 times
I am an electronics and smart home hobbyist.

User avatar
Gavinmc42
Posts: 4027
Joined: Wed Aug 28, 2013 3:31 am

Re: Choosing motors

Mon Feb 25, 2019 11:49 am

Yep stepper motors pretty much last forever.
Pulling old stuff apart is a good way to start a collection.

Some of my best servo robot motors came from old reel to reel mag tape computer drives.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Choosing motors

Mon Feb 25, 2019 12:25 pm

tlfong01 wrote:
Mon Feb 25, 2019 7:54 am
Vgs 5V 1kHz 5% Duty Cycle Square Wave Driving Vcc 12V IRL540N with RS130 3~6VDC Motor

DC Motor Characteristics

Geared motor seems to take smaller current than no gear motor. I am a little bit confused. I only remember the DC motor characteristics is a bit difficult to understand. So I read my old diary to refresh my memory.

Voltage, current, torque and speed in DC motors - Electronics StackExchange
https://electronics.stackexchange.com/q ... -dc-motors

Pololu Motors and Gearboxes
https://www.pololu.com/category/22/motors-and-gearboxes

RobotShop Motors and Actuators
https://www.robotshop.com/en/motors-actuators.html

Pololu Stepping Motors Catalogue
https://www.pololu.com/category/87/stepper-motors

My DC Motor Journal
https://penzu.com/p/a25b1076...
Last edited by tlfong01 on Tue Feb 26, 2019 12:58 am, edited 1 time in total.
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Choosing motors

Mon Feb 25, 2019 1:29 pm

Simonyeee wrote:
Sat Feb 23, 2019 9:13 am
My robot will use 4 motors for 4 wheels.

TB6612 Motor Driver Module

You might also like to consider motor driver modules. I would recommend the cheapy TB6612 motor driver module. Like AdaFruit, SparkFun gives very good tutorials, but their stuff is a bit expensive. :mrgreen:

SparkFun TB6612 Motor Driver - US$4.95
https://www.sparkfun.com/products/14451

AliExpress TB6612FNG Double Motor Driver Module - US$1.31
https://fr.aliexpress.com/item/Hot-TB66 ... 2773ceada8

TaoBao TB6612FNG Double Motor Driver Module - CN¥13.85
https://detail.tmall.com/item.htm?spm=a ... abbucket=6

SparkFun TB6612FNG Hookup Guide
https://learn.sparkfun.com/tutorials/tb ... 1545628477

EPIC "ROBOT SUMO WRESTLING"! ロボット相撲 - 3,352 views
https://www.youtube.com/watch?v=Ykou5fHQqGM

International Robot Sumo Tournament 2016 - 17,987 views
https://www.youtube.com/watch?v=orVAhhQAJ_c

International Robot Sumo Tournament 2013 - 25,547 views
https://www.youtube.com/watch?v=WXEZh30xZqY

International Robot Sumo Tournament 2014 - 17,927 views
https://www.youtube.com/watch?v=aF0gDTbcOxE
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Choosing motors

Mon Mar 11, 2019 4:18 am

Gavinmc42 wrote:
Mon Feb 25, 2019 2:59 am
TT motors are the best value for hobby bots, good to learn on.
Replacement RS-130 size motors are low cost, even here only $1.

TT RS130 Motors for Toy Cars

Yes, 130 motors are very good for poor hobbyists. So I have started learning. :mrgreen:

tlfong01's Toy Car DIY PenZu Diary
https://penzu.com/p/39061ac7

/ to continue, ...
...
Attachments
tt130_2019mar1101s.jpg
tt130_2019mar1101s.jpg (152.77 KiB) Viewed 1769 times
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Choosing motors

Mon Mar 11, 2019 2:58 pm

tlfong01 wrote:
Mon Mar 11, 2019 4:18 am
TT RS130 Motor Toy Car
tlfong01's Toy Car DIY PenZu Diary
https://penzu.com/p/39061ac7

Toy 4WD Assembly and Testing Notes

Plastic cheap things are very good for quick prototyping. I am using a old plastic box cover to hold the gear motors. Both the box and motors are very forgiving for poor, careless, absent minded newbie hobbyist craftsmanship. I don't to care much about precision, because plastic is easy to "machine", using hand tools such as the electric drill and files.

Now the four motors are running clumisily, and wheels laughingly out of alignment and way off centre. But I think IF one day, perhaps 3 months from now, I can successfully climb up the very steep learning curve of the great Gyro/Accelero MPU6050, I can, proudly command this ugly looking yellow 4WD to do impressive things like moving in a straight line, remember orientation, etc etc.

But of course I am only day dreaming now, and there are too many more things to learn, such as the DC motor driver TB6612FNG, ...


Toy 4WD Test Youtube
https://youtu.be/ygn3MgYIO7M (youtube)

SparkFun 3-Axis Gyro/Accelerometer IC MPU-6050 US$12.95
https://www.sparkfun.com/products/10937

The MPU-6050 is a serious little piece of motion processing tech! By combining a MEMS 3-axis gyroscope and a 3-axis accelerometer on the same silicon die together with an onboard Digital Motion Processor (DMP) capable of processing complex 9-axis MotionFusion algorithms. The parts’ integrated 9-axis MotionFusion algorithms can even access external magnetometers or other sensors through an auxiliary master I2C bus, allowing the devices to gather a full set of sensor data without intervention from the system processor.

SparkFun Motor Driver - Dual TB6612FNG - US$5
https://www.sparkfun.com/products/14451

The TB6612FNG Motor Driver can control up to two DC motors at a constant current of 1.2A. Two input signals (IN1 and IN2) can be used to control the motor in one of four function modes: CW, CCW, short-brake and stop. The two motor outputs (A and B) can be separately controlled, and the speed of each motor is controlled via a PWM input signal with a frequency up to 100kHz.
...
Attachments
toy_4wd_2019mar1101.jpg
toy_4wd_2019mar1101.jpg (168.48 KiB) Viewed 1731 times
I am an electronics and smart home hobbyist.

User avatar
Gavinmc42
Posts: 4027
Joined: Wed Aug 28, 2013 3:31 am

Re: Choosing motors

Tue Mar 12, 2019 12:50 am

Pixart have nice sensors for robot vacuum navigation type apps.
Just a fancy optical mouse sensor with longer range.
Should help those bot suck in straight lines.

Ah young whippersnapper you are so spoilt ;)
When I first started gyros had a motor and a big spinning wheel.
Accelerometers were about the size of single serve baked beans cans.
Motors had open frames and weak magnets.
Logic was done with valves etc, batteries lasted minutes.
An IMU as accurate as the 6050 was only on Nuclear submarines or later on cruise missiles?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Choosing motors

Tue Mar 12, 2019 7:35 am

Gavinmc42 wrote:
Tue Mar 12, 2019 12:50 am
1. Pixart robot vacuum navigation, optical mouse sensor, help bot suck in straight lines
2. gyros had a motor and a big spinning wheel.
3. Accelerometers size of single serve baked beans cans.
4. An IMU as accurate as the 6050 was only on Nuclear submarines or later on cruise missiles?

Nuclear submarine grade IMU

I don't understand what you are talking about, because I have zero experience in using gyro, accelero, magnetometer (pressure sensor, barometric altimeter). I once wrongly thought that IMU is hardware and includes gyro and accelero. I think I need to google very hard before pretending to know the basics and build up more reputation and respect than I deserve.

But I am glad to hear that MPU6050 is nuclear submarine grade. So now I can boast to my friends that I doing nothing much research, just simple nuclear submarine grade gyro and accelero, you know, those motion and position devices in sea and air carriers like b737max :mrgreen: , ...

Anyway, I googled the following tutorial from SparkFun, and made a summary.

Accelerometer, Gyro and IMU Buying Guide - SparkFun
https://www.sparkfun.com/pages/accel_gyro_guide

Accelerometers and gyros are becoming increasingly popular in consumer electronics, so maybe it's time you added them to your project! Scrolling through SparkFun's sensors category reveals a huge list of these sensors that might be perfect for your next project, if only you knew what they did, and which one best fit your project.

The goal of this buying guide is to get you speaking the same language as these sensors' datasheets and to help you select the one that is best-suited for your needs.

Accelerometers
What's an accelerometer measure? Well, acceleration. You know...how fast something is speeding up or slowing down. You'll see acceleration displayed either in units of meters per second squared (m/s2), or G-force (g), ...

Accelerometers are used to sense both static (e.g. gravity) and dynamic (e.g. sudden starts/stops) acceleration. One of the more widely used applications for accelerometers is tilt-sensing. Because they are affected by the acceleration of gravity, an accelerometer can tell you how it's oriented with respect to the Earth's surface. For example, Apple's iPhone has an accelerometer, which lets it know whether it's being held in portrait or landscape mode. An accelerometer can also be used to sense motion. For instance, an accelerometer in Nintendo's WiiMote can be used to sense emulated forehands and backhands of a tennis racket, or rolls of a bowling ball.

Finally, an accelerometer can also be used to sense if a device is in a state of free fall. This feature is implemented in several hard drives: if a drop is sensed, the hard drive is quickly switched off to protect against data loss.

Now that you know what they do, let's consider what characteristics you should be looking for when selecting your accelerometer:

Range , ...

Interface, ... digital accelerometers usually feature a serial interface be it SPI or I²C.

Depending on your experience, these may be the most difficult to get integrated with your microcontroller. That said, digital accelerometers are popular because they usually have more features, and are less susceptible to noise than their analog counterparts.

Number of axes measured - This one's very straightforward: out of the three axes possible (x, y, and z), how many can the accelerometer sense? Three-axis accelerometers are usually the way to go; Power Usage, ... Bonus Features, ...

Gyros
Gyroscopes measure angular velocity, how fast something is spinning about an axis. If you're trying to monitor the orientation of an object in motion, an accelerometer may not give you enough information to know exactly how it's oriented. Unlike accelerometers gyros are not affected by gravity, so they make a great complement to each other.

In the past, gyros have been used for space navigation, missile control, under-water guidance, and flight guidance. Now they are starting to be used alongside accelerometers for applications like motion-capture and vehicle navigation.

A lot of what was considered when selecting an accelerometer still applies to selecting the perfect gyro: Range, ... Number of axes measured, ... Power Usage, ...

IMUs
Gyroscopes and accelerometers are great, but alone they don't give you quite enough information to be able to comfortably calculate things like orientation, position, and velocity. To measure those and other variables many people combine the two sensors, to create an inertial measurement unit (IMU) which provides two to six degrees of freedom (DOF). IMUs are widely used in devices that require knowledge of their exact position, for example robotic arms, guided missiles, ...

SparkFun's IMUs can really be broken down into two classes: simple IMU combo boards, which just mount an accelerometer and gyro onto a single PCB, and more complex units that interface a microcontroller with the sensors to produce a serial output, ...

...
Last edited by tlfong01 on Wed Mar 13, 2019 8:00 am, edited 1 time in total.
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Choosing motors

Tue Mar 12, 2019 9:05 am

tlfong01 wrote:
Tue Mar 12, 2019 7:35 am
2. gyros had a motor and a big spinning wheel.
3. Accelerometers size of single serve baked beans cans.
4. An IMU as accurate as the 6050, ...

MEMS MPU6050

My MPU6050 module measures 1.5cm x 2cm (update - the chip is only 4mm x 4mm x 0.9mm).

So how big is your big spinning wheel? Did you take a selfie? :mrgreen:

MPU6050 Gyro Accelero Module Picture and Schematic
https://penzu.com/p/39061ac7

InvenSense MPU6050 6-axis Motion Tracking Device Specification
https://store.invensense.com/datasheets ... V3%204.pdf

Spinning wheel - Blood Sweat & Tears - 2,829,175 views
https://www.youtube.com/watch?v=kK62tfoCmuQ
...
Attachments
mpu6050_schematic_2019mar1701ss.jpg
mpu6050_schematic_2019mar1701ss.jpg (45.41 KiB) Viewed 1449 times
Last edited by tlfong01 on Sun Mar 17, 2019 3:26 am, edited 3 times in total.
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Choosing motors

Tue Mar 12, 2019 1:17 pm

tlfong01 wrote:
Tue Mar 12, 2019 9:05 am

MPU6050 Newbie References

I googled and found a blog site by BitiFly with python examples on how to use MPU6050. I think it is good for newbies. I also found a python library by Tijnadgamer but I do't find enough documentation for newbies. So I will first try the BitiFly's examples.

Interfacing Raspberry Pi and MPU-6050 (Using Python) - BitiFly 2013nov06
http://blog.bitify.co.uk/2013/11/interf ... -6050.html

mpu6050 Python Module - Tijndagamer 2018jul29
https://github.com/Tijndagamer/mpu6050
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Choosing motors

Tue Mar 12, 2019 2:31 pm

tlfong01 wrote:
Tue Mar 12, 2019 1:17 pm

MPU6050 i2cdetect and i2cset test OK

I followed BitiFly's tutorial and found i2ctools commands i2cdetect can detect MPU6050 at 0x68 and i2cset can read its register 0x75.

Next is to write a python program to do more tests.


Interfacing Raspberry Pi and MPU-6050 (using i2ctools commands i2cdetect and i2cget) - BitiFly 2013nov06
http://blog.bitify.co.uk/2013/11/interf ... -6050.html

To detect mpu6050 at address 0x68
sudo i2cdetect -y 1

To get output from register 0x75 which has the value 0x68
sudo i2cget -y 0 0x68 0x75


Reading data from the MPU-6050 on the Raspberry Pi (using python) - BitiFly 2013nov07
http://blog.bitify.co.uk/2013/11/readin ... berry.html
...
Attachments
mpu6050_test_2019mar1201.jpg
mpu6050_test_2019mar1201.jpg (182.81 KiB) Viewed 1640 times
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Choosing motors

Tue Mar 12, 2019 3:07 pm

tlfong01 wrote:
Tue Mar 12, 2019 2:31 pm
Next is to write a python program to do more tests.
Reading data from the MPU-6050 on the Raspberry Pi (using python) - BitiFly 2013nov07
http://blog.bitify.co.uk/2013/11/readin ... berry.html

MPU6050 Block Diagram

Newbie must do - look at the block diagram before writing any python program!
...
Attachments
mpu6050_block_diagram_2019mar1201.jpg
mpu6050_block_diagram_2019mar1201.jpg (200.75 KiB) Viewed 1631 times
I am an electronics and smart home hobbyist.

Return to “Automation, sensing and robotics”